首页 > 其他分享 >微信移动端禁止video标签视频全屏播放

微信移动端禁止video标签视频全屏播放

时间:2022-09-18 02:11:35浏览次数:99  
标签:function 全屏播放 colletionMainVideo 微信 play value video && document

https://segmentfault.com/a/1190000020674521   <video src="xxxx" poster="xxxxx" muted controlslist="nodownload" disablePictureInPicture loop webkit-playsinline playsinline x5-playsinline></video>     if (typeof WeixinJSBridgeReady == "object" && typeof WeixinJSBridge.invoke == "function") {     colletionMainVideo.value && colletionMainVideo.value.play();   } else {     if (document.addEventListener) {       document.addEventListener(         "WeixinJSBridgeReady",         function () {           colletionMainVideo.value && colletionMainVideo.value.play();         },         false       );     } else if (document.attachEvent) {       document.attachEvent("WeixinJSBridgeReady", function () {         colletionMainVideo.value && colletionMainVideo.value.play();       });       document.attachEvent("onWeixinJSBridgeReady", function () {         colletionMainVideo.value && colletionMainVideo.value.play();       });     }   }   // 从其他页面返回后滑动屏幕播放视频   document.addEventListener("touchstart", function () {     colletionMainVideo.value && colletionMainVideo.value.play();   });

标签:function,全屏播放,colletionMainVideo,微信,play,value,video,&&,document
From: https://www.cnblogs.com/hutaoblog/p/16704072.html

相关文章