vedio

<!DOCTYPE html>
<html lang="en">
   <head>
       <meta charset="UTF-8" />
       <meta name="viewport" content="width=device-width, initial-scale=1.0" />
       <title>Document</title>
   </head>
   <body>
       <video
           id="video"
           src="1.MP4"
           width="320"
           height="240"
           controls="controls"
           autoplay="autoplay"
           muted="muted"
           autoplay=""
           muted=""
           webkit-playsinline=""
           playsinline=""
           x5-video-player-type="h5"
           x5-video-player-fullscreen="true"
           playsinline
       ></video>

       <!-- loop="" -->
       <!-- playsinline ios safari 但是进度条不正常 -->
       <!-- muted chrome 加静音才能播放 -->
       <!-- x5-video-player-type="h5" x5-video-player-fullscreen="true" Android 微信 这个没测试,不知道能不能用  -->

       <!-- 必须加在微信api资源 -->
       <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
       <script>
           //一般情况下,这样就可以自动播放了,但是一些奇葩iPhone机不可以
           document.getElementById('video').play();
           //必须在微信Weixin JSAPI的WeixinJSBridgeReady才能生效
           document.addEventListener(
               'WeixinJSBridgeReady',
               function () {
                   document.getElementById('video').play();
               },
               false
           );
       </script>
   </body>
</html>


https://x5.tencent.com/tbs/guide/video.html

posted @ 2020-06-11 20:06  Running00  阅读(528)  评论(0编辑  收藏  举报