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