赞
踩
抖音1:1官方美颜·剪辑·插件原生sdk字节跳动-火山引擎官方伙伴优雅草发布----uniapp插件市场
插件下载地址:
激发智能增长:
火山引擎是字节跳动旗下数字服务与智能科技品牌,基于公司服务数亿用户的大数据、人工智能和基础服务等技术能力,为企业提供系统化全链路解决方案,助力企业务实地创新,给企业带来持续、快速增长。
火山引擎产品大全:
说明插件是插件授权费用,使用字节的美颜产品需要额外付费:
目前字节的美颜产品价格为60000-1000000价格,详细要求和规划请联系优雅草,联系优雅草渠道可获得折扣价,直接官方进行报备将不可享受任何折扣,已报备再联系也不行,很简单就是当你是直客还是渠道客牵涉伙伴提成的问题,不要觉得有不一样或者其他原因。
演示下载地址:
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-iA6k0nYS-1620871972298)(https://doc.youyacao.com/server/index.php?s=/api/attachment/visitFile/sign/573b247255498a7bb220177b1ffd5491)]
使用方法,示例文件:
<template> <div class="container"> <div :style="{ width: hqwidth, height: hqhight }" class="devices"> <youyacao-ZJTXLive id="mainMap" :style="{ width: hqwidth, height: hqhight }" ref="myMHLive"></youyacao-ZJTXLive > </div> <div class="fanhan" > <button @click="StartPreview()"> 开始预览</button> <button @click="StopPreview()"> 停止预览</button> <button @click="StartPreview()"> 开始预览</button> <button @click="StopPreview()"> 停止预览</button> <button @click="StartPush()"> 开始推流</button> <button @click="StopPush()"> 停止推流</button> <button @click="OpenFalsh()"> 闪光灯开</button> <button @click="CloseFlash()"> 闪光灯关</button> <button @click="SwitchCamera()"> 切换摄像头</button> <button @click="back()"> back</button> </div> <div class="fanhan2" > <button @click="EXPOSURE()">曝光</button> <button @click="BEAUTY()">美颜</button> <button @click="WHITE()">美白</button> <button @click="BIG_EYE()">大眼</button> <button @click="FACE_LIFT()">瘦脸</button> <button @click="FILTER()">滤镜</button> <button @click="MOTION_TMPL()">动效</button> <button @click="RUDDY()">红润</button> <button @click="FACEV()">V脸</button> <button @click="FACESHORT()">短脸</button> <button @click="CHINSLIME()">下巴</button> <button @click="NOSESCALE()">小鼻</button> <button @click="FILTER_MIX_LEVEL()">滤镜比率</button> </div> <div class="fanhan3" > <button @click="EXPOSURE2()">曝光</button> <button @click="BEAUTY2()">美颜</button> <button @click="WHITE2()">美白</button> <button @click="BIG_EYE2()">大眼</button> <button @click="FACE_LIFT2()">瘦脸</button> <button @click="FILTER2()">滤镜</button> <button @click="MOTION_TMPL2()">动效</button> <button @click="RUDDY2()">红润</button> <button @click="FACEV2()">V脸</button> <button @click="FACESHORT2()">短脸</button> <button @click="CHINSLIME2()">下巴</button> <button @click="NOSESCALE2()">小鼻</button> <button @click="FILTER_MIX_LEVEL2()">滤镜比率</button> </div> </div> </template> <script> var globalEvent = weex.requireModule('globalEvent'); export default { data() { return { title: 'Hello', hqwidth:0, hqhight:0, editorText:"sdsd" } }, onBackPress(e) { if (e.from == 'backbutton') { // 退出页面的是 调用一下 backbutton this.$refs.myMHLive.backbutton(); return false; } }, created() { let that = this; }, onLoad: function(option) { var that=this; plus.navigator.setFullscreen(true); uni.getSystemInfo({ success: function(e) { console.log(e) that.hqwidth = e.windowWidth that.hqhight = e.windowHeight } }) }, methods: { EXPOSURE(){ var Live = this.$refs.myMHLive; Live.EXPOSURE({ level:0 //0~10 曝光值 }); }, BEAUTY(){ var Live = this.$refs.myMHLive; Live.BEAUTY({ style:0, // 0光滑 1自然 2朦胧 level:0 //0~10 美颜值 }); }, WHITE(){ var Live = this.$refs.myMHLive; Live.WHITE({ level:0 //0~10 美白值 } ); }, BIG_EYE(){ var Live = this.$refs.myMHLive; Live.BIG_EYE({ level:0 //0~10 大眼 值 }); }, FACE_LIFT(){ var Live = this.$refs.myMHLive; Live.FACE_LIFT({ level:0 //0~10 瘦脸 值 }); }, FILTER(){ // "无" , 0 // "标准", // 1 // "樱红", // 2 // "云裳", // 3 // "纯真", // 4 // "白兰", // 5 // "元气", // 6 // "超脱", // 7 // "香氛", // 8 // "美白", // 9 // "浪漫", // 10 // "清新", // 11 // "唯美", // 12 // "粉嫩", // 13 // "怀旧", // 14 // "蓝调", // 15 // "清凉", // 16 // "日系", // 17 var Live = this.$refs.myMHLive; Live.FILTER({ index:11 }); } , MOTION_TMPL(){ // "无动效" , 0 // "Boom", // 1 // "霓虹鼠", // 2 // "星耳", // 3 // "疯狂打call", // 4 // "Q星座", // 5 // "彩色丝带", // 6 // "刘海发带", // 7 // "变脸", // 8 // "紫色小猫", // 9 // "花仙子", // 10 // "小公举", // 11 // "唯美", // 12 // "粉嫩", // 13 // "怀旧", // 14 // "蓝调", // 15 // "清凉", // 16 // "日系", // 17 var Live = this.$refs.myMHLive; Live.MOTION_TMPL({ index:11 }); }, RUDDY(){ var Live = this.$refs.myMHLive; Live.RUDDY({ level:0 //0~10 红润 值 }); }, FACEV(){ var Live = this.$refs.myMHLive; Live.FACEV({ level:0 //0~10 V脸 值 }); }, FACESHORT(){ var Live = this.$refs.myMHLive; Live.FACESHORT({ level:0 //0~10 短脸 值 }); }, CHINSLIME(){ var Live = this.$refs.myMHLive; Live.CHINSLIME({ level:0 //0~10 下巴 值 }); }, NOSESCALE(){ var Live = this.$refs.myMHLive; Live.NOSESCALE({ level:0 //0~10 小鼻 值 }); }, FILTER_MIX_LEVEL(){ var Live = this.$refs.myMHLive; Live.FILTER_MIX_LEVEL({ level:0 //0~10 滤镜 值 }); }, back(){ this.$refs.myMHLive.backbutton(); uni.navigateBack(); }, StartPreview(){ var Live = this.$refs.myMHLive; Live.StartPreview(); }, StopPreview(){ var Live = this.$refs.myMHLive; Live.StopPreview(); }, StartPush(){ var Live = this.$refs.myMHLive; Live.StartPush( { URL:"推流地址" }, result => { const msg = JSON.stringify(result); console.log(result); }); }, StopPush(){ var Live = this.$refs.myMHLive; Live.StopPush(result => { const msg = JSON.stringify(result); console.log(result); }); }, OpenFalsh(){ var Live = this.$refs.myMHLive; Live.OpenFalsh(); }, CloseFlash(){ var Live = this.$refs.myMHLive; Live.CloseFlash(); }, SwitchCamera(){ var Live = this.$refs.myMHLive; Live.SwitchCamera(); } , EXPOSURE2(){ var Live = this.$refs.myMHLive; Live.EXPOSURE({ level:5 //0~10 曝光值 }); }, BEAUTY2(){ var Live = this.$refs.myMHLive; Live.BEAUTY({ style:0, // 0光滑 1自然 2朦胧 level:5 //0~10 美颜值 }); }, WHITE2(){ var Live = this.$refs.myMHLive; Live.WHITE({ level:5 //0~10 美白值 } ); }, BIG_EYE2(){ var Live = this.$refs.myMHLive; Live.BIG_EYE({ level:5 //0~10 大眼 值 }); }, FACE_LIFT2(){ var Live = this.$refs.myMHLive; Live.FACE_LIFT({ level:5 //0~10 瘦脸 值 }); }, FILTER2(){ // "无" , 0 // "标准", // 1 // "樱红", // 2 // "云裳", // 3 // "纯真", // 4 // "白兰", // 5 // "元气", // 6 // "超脱", // 7 // "香氛", // 8 // "美白", // 9 // "浪漫", // 10 // "清新", // 11 // "唯美", // 12 // "粉嫩", // 13 // "怀旧", // 14 // "蓝调", // 15 // "清凉", // 16 // "日系", // 17 var Live = this.$refs.myMHLive; Live.FILTER({ index:2 }); } , MOTION_TMPL2(){ // "无动效" , 0 // "Boom", // 1 // "霓虹鼠", // 2 // "星耳", // 3 // "疯狂打call", // 4 // "Q星座", // 5 // "彩色丝带", // 6 // "刘海发带", // 7 // "变脸", // 8 // "紫色小猫", // 9 // "花仙子", // 10 // "小公举", // 11 // "唯美", // 12 // "粉嫩", // 13 // "怀旧", // 14 // "蓝调", // 15 // "清凉", // 16 // "日系", // 17 var Live = this.$refs.myMHLive; Live.MOTION_TMPL({ index:2 }); }, RUDDY2(){ var Live = this.$refs.myMHLive; Live.RUDDY({ level:5 //0~10 红润 值 }); }, FACEV2(){ var Live = this.$refs.myMHLive; Live.FACEV({ level:5 //0~10 V脸 值 }); }, FACESHORT2(){ var Live = this.$refs.myMHLive; Live.FACESHORT({ level:5 //0~10 短脸 值 }); }, CHINSLIME2(){ var Live = this.$refs.myMHLive; Live.CHINSLIME({ level:5 //0~10 下巴 值 }); }, NOSESCALE2(){ var Live = this.$refs.myMHLive; Live.NOSESCALE({ level:5 //0~10 小鼻 值 }); }, FILTER_MIX_LEVEL2(){ var Live = this.$refs.myMHLive; Live.FILTER_MIX_LEVEL({ level:5 //0~10 滤镜 值 }); }, } } </script> <style lang="scss"> .container{ // position: relative; // width: 100%; // height: 1000px; } .devices,.finish-box{ background-color: #000000; } .dddd{ margin: 10px; } .yincang { height: 250px; } .flex-top{ position: fixed; bottom: 250rpx; left: 0; justify-content: space-around; align-items: center; flex-direction: row; } .flex-bottom{ position: fixed; bottom: 44rpx; left: 0; justify-content: center; align-items: center; flex-direction: row; text-align: center; } .play-icon{ width: 120rpx; height: 120rpx; border-radius: 120rpx; z-index: 999; align-items: center; justify-content: center; border-width: 2px; border-color: #f00; } .red-icon{ width: 100rpx; height: 100rpx; border-radius: 100rpx; background-color: #f00; } .square-icon{ width: 70rpx; height: 70rpx; border-radius: 6rpx; background-color: #f00; } .switch-icon{ width: 60rpx; height: 46rpx; margin-right: 90rpx; justify-content: center; align-items: center; margin-top: 60rpx; } .switch-icon,.switch-icon-img{ width: 49rpx; height: 46rpx; } .ratio-icon{ width: 50rpx; height: 46rpx; margin-left: 90rpx; justify-content: center; align-items: center; margin-top: 50rpx; } .ratio-icon-img{ width: 40rpx; height: 40rpx; } .text-tips{ width: 120rpx; color: #fff; font-size: 24rpx; text-align: center; line-height: 60rpx; } .text-tips-on{ color: #FFCC00; } .btns{ flex: 1; align-items: center; } .text-btn{ width: 50rpx; height: 42rpx; } .area-btn{ width: 50rpx; height: 50rpx; } .speed-btn{ width: 49rpx; height: 56rpx; } .meiyan-btn{ width: 50rpx; height: 50rpx; } .horizons{ position: fixed; top: 0; left: 0; height: 44px; align-items: center; justify-content: space-between; flex-direction: row; padding-left: 10px; padding-right: 10px; } .horizons-time{ color: #fff; } .horizons-left{ width: 30px; height: 30px; } .horizons-right{ width: 30px; height: 30px; } .video-box{ height: 460px; background-color: #666; margin-top: 44px; } .fanhan{ background-color: rgba(0, 0, 0, 0); border-radius: 15px; // flex-direction: column; justify-content: center; align-items: center; left:10px; position: fixed; z-index: 99999; } .finish-btns{ justify-content: space-between; flex-direction: row; padding-left: 10rpx; padding-right: 10rpx; margin-top: 100rpx; } .replay{ width: 230rpx; height: 100rpx; line-height: 100rpx; background-color: #FFCC00; align-items: center; flex-direction: row; justify-content: space-around; padding-left: 20rpx; padding-right: 20rpx; } .finish-btns-imgs{ width: 40rpx; height: 34rpx; } .finish-btns-imgs1{ width: 36rpx; height: 36rpx; } .finish-btns-imgs2{ width: 35rpx; height: 40rpx; margin-right: 10rpx; } .finish-btns-text{ line-height: 100rpx; font-size: 28rpx; } .fanhan2{ background-color: rgba(0, 0, 0, 0); width: 300px; border-radius: 15px; // flex-direction: column; justify-content: center; align-items: center; left:10px; top:50px; position: fixed; z-index: 99999; } .fanhan3{ background-color: rgba(0, 0, 0, 0); width: 600px; border-radius: 15px; // flex-direction: column; justify-content: center; align-items: center; left:10px; top:50px; position: fixed; z-index: 99999; } </style>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。