0 评论

0 收藏

分享

美狐直播美颜sdk-uniapp官方合作发布插件说明-一颗优雅草科技

美狐直播美颜sdk-uniapp官方合作发布插件说明-一颗优雅草科技
关于山东小狐狸网络科技有限公司的介绍:
山东小狐狸网络科技有限公司
资本:1100万 规模:10~100人 地址:中国(山东)自由贸易试验区济南片区经十路5777号万科金域国际天泰家园1号楼办公楼2204
美狐主营:美狐美颜SDK。基于人脸识别技术和图像渲染技术,以打造专业级美颜SDK为目标,包含实时美颜、人脸美型、抖动特效、动态贴纸等特效功能,为多种音视频业务场景如直播、短视频、一对一等提供的相应的美化解决方案。
使用说明
这里面是需要填写sdk获得的授权信息。
另外本版本是腾讯云直播推流,所以需要腾讯云推流的license ,也就是第三个选项。
填写好这些信息便可运行测试。
demo示例
index.vue文件
  • <template>
  •     <view>
  •         <view class="uni-padding-wrap uni-common-mt">   
  •                 <button type="primary" @tap="start()">start </button>
  •         </view>
  •     </view>
  • </template>
  • <script>
  •     export default {
  •         data() {
  •             return {
  •                 title: 'Hello'
  •             }
  •         },
  •         onLoad() {
  •         },
  •         methods: {
  •             start()
  •             {
  •                   uni.navigateTo({
  •                       url: 'video',
  •                       success: res => {},
  •                       fail: () => {},
  •                       complete: () => {}
  •                   });
  •             }
  •         }
  •     }
  • </script>
video.nvue文件
  • <template>
  •     <div class="container">
  •         <div      :style="{ width: hqwidth, height: hqhight }" class="devices">
  •                 <MHTXLive id="mainMap"  :style="{ width: hqwidth, height: hqhight }"    ref="myMHLive"      ></MHTXLive >
  •         </div>
  •         <view class="fanhan">
  •             <button     @click="StartPreview()"> 开始预览</button>   
  •             <button     @click="StopPreview()"> 停止预览</button>   
  •             <button     @click="StartPush()"> 开始推流</button>
  •             <button     @click="StopPush()"> 停止推流</button>     
  •             <button     @click="Tiezhi()"> 贴纸</button>   
  •             <button     @click="Meiyan()"> 美颜</button>   
  •             <button     @click="Texiao()"> 特效</button>   
  •             <button     @click="Hahajing()"> 哈哈镜</button>   
  •             <button     @click="OpenFalsh()"> 闪光灯开</button>   
  •             <button     @click="CloseFlash()"> 闪光灯关</button>   
  •             <button     @click="SwitchCamera()"> 切换摄像头</button>
  •             <button     @click="back()"> back</button>
  •         </view>
  •     </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: {
  •             back(){
  •                  this.$refs.myMHLive.backbutton();  
  •                 uni.navigateBack();
  •             },
  •             StartPreview(){
  •                 var Live = this.$refs.myMHLive;
  •                 Live.StartPreview();
  •             },
  •             StopPreview(){  
  •                 var Live = this.$refs.myMHLive;
  •                 Live.StopPreview();
  •             },
  •             Texiao(){
  •                 var Live = this.$refs.myMHLive;
  •                 Live.Texiao(result => {
  •                                  const msg = JSON.stringify(result);
  •                                   // JSONObject result = new JSONObject();
  •                                   //               result.put("type",   "ViewHide" );
  •                                   //               result.put("code",   0 );
  •                                   //               result.put("msg",   "视图隐藏" );
  •                                           // params.put("type",   "ViewShow" );
  •                                           // params.put("code",   0 );
  •                                           // params.put("msg",   "视图显示" );
  •                                   console.log(result);
  •                              });
  •             },
  •             Hahajing(){
  •                 var Live = this.$refs.myMHLive;
  •                 Live.Hahajing(result => {
  •                                  const msg = JSON.stringify(result);
  •                                   // JSONObject result = new JSONObject();
  •                                   //               result.put("type",   "ViewHide" );
  •                                   //               result.put("code",   0 );
  •                                   //               result.put("msg",   "视图隐藏" );
  •                                           // params.put("type",   "ViewShow" );
  •                                           // params.put("code",   0 );
  •                                           // params.put("msg",   "视图显示" );
  •                                   console.log(result);
  •                              });
  •             },
  •             Tiezhi(){
  •                 var Live = this.$refs.myMHLive;
  •                 Live.Tiezhi(result => {
  •                                  const msg = JSON.stringify(result);
  •                                   // JSONObject result = new JSONObject();
  •                                   //               result.put("type",   "ViewHide" );
  •                                   //               result.put("code",   0 );
  •                                   //               result.put("msg",   "视图隐藏" );
  •                                           // params.put("type",   "ViewShow" );
  •                                           // params.put("code",   0 );
  •                                           // params.put("msg",   "视图显示" );
  •                                   console.log(result);
  •                              });
  •             },
  •             Meiyan(){
  •                 var Live = this.$refs.myMHLive;
  •                 Live.Meiyan(result => {
  •                                  const msg = JSON.stringify(result);
  •                                   // JSONObject result = new JSONObject();
  •                                   //               result.put("type",   "ViewHide" );
  •                                   //               result.put("code",   0 );
  •                                   //               result.put("msg",   "视图隐藏" );
  •                                           // params.put("type",   "ViewShow" );
  •                                           // params.put("code",   0 );
  •                                           // params.put("msg",   "视图显示" );
  •                                   console.log(result);
  •                              });
  •             },
  •             StartPush(){   
  •                 var Live = this.$refs.myMHLive;
  •                 Live.StartPush(
  •                     {
  •                     URL:"rtmp://txlivepush.youyacao.com/蜻蜓-uni/kiro?txSecret=205640c212325356b1f812ee95b2731a&txTime=5FEC42E3"
  •                     },
  •                         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();
  •              }
  •         }
  •     }
  • </script>
其他说明
相比涂图科技高精准定位高端企业用户,美狐sdk的价格相对就显得非常亲民,可通过优雅草科技伙伴渠道优惠购取sdk。
美狐sdk官网 www.facegl.com
优雅草科技官网 www.youyacao.com
详情可加QQ422108995
优雅草uniapp插件使用交流群:752513793

优雅草论坛2022年8月11日大改,优雅草论坛变回只服务于客户的提问交流论坛,详情查看优雅草8月11日大改,原因详情查优雅草外卖乐关闭

回复

举报 使用道具

相关帖子
全部回复
暂无回帖,快来参与回复吧
一颗优雅草科技 实名认证 机构蓝V认证
服务代表
主题 846
回复 1636
粉丝 7
快速回复 返回顶部 返回列表