问题解决了吗?遇到同样问题,ios 监听WeixinJSBridgeReady 和touch事件可以播放,Android 下不生效
微信浏览器中,安卓手机上,video无法自动播放,是为什么呢?安卓手机上,video无法自动播放; ios下面可以自动播放; 地址:http://h5.myailand.com/20191129/ 测试手机型号:华为p30 pro等 代码段: <video id="myVideo" autoplay src="https://ailian20190225.oss-cn-hangzhou.aliyuncs.com/20191129/fm.mp4" preload="auto" x-webkit-airplay="allow" x5-video-player-type="h5" x5-video-player-fullscreen="true" x5-video-orientation="portrait" playsinline webkit-playsinline > </video> <script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> myVideo = document.getElementById("myVideo"); myVideo.play(); document.addEventListener( "WeixinJSBridgeReady", function () { myVideo.play(); }, false ); document.addEventListener( "YixinJSBridgeReady", function () { myVideo.play(); }, false );
2020-11-09