• uniapp市场美狐直播美颜sdk-uniapp官方合作发布插件说明-美狐原生sdk将不再难接入


    美狐直播美颜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="{  hqwidth, height: hqhight }" class="devices">
    		 
    				<MHTXLive id="mainMap"  :style="{  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',
    				hq0,
    				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。

    uniapp插件下载地址:

    https://ext.dcloud.net.cn/plugin?id=3800

    直接给您节省了 接入原生sdk的成本和精力。

  • 相关阅读:
    Ajax加载数据的使用
    解决VS2012新建MVC4等项目时,收到此模板加载程序集“NuGet.VisualStudio.Interop…”的错误
    XSS攻击原理
    SQL语句:一张表和另一张表的多重匹配查询
    ASP.NET打开项目错误:将指定的计数添加到该信号量中会导致其超过最大计数。
    读取数据库的数据并转换成List<>
    11款样式新颖的 jQuery/CSS3 网页菜单
    网站提高速度的13个简易规则
    微软分布式缓存解决方案
    性能优化工具 MVC Mini Profiler
  • 原文地址:https://www.cnblogs.com/yangqiangche/p/14258622.html
Copyright © 2020-2023  润新知