html

<video id="video" loop x5-video-player-fullscreen="true" webkit-playsinline="true" x-webkit-airplay="true" playsinline="true" x5-playsinline >
    <source src="images/video.mp4" type="video/mp4" />
</video>

 

jquery

<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
//视频
var video = document.getElementById('video');
function videoAutoPlay(video) {
    document.addEventListener("WeixinJSBridgeReady", function () {
        video.play();
        alert("1")
    }, false);
    document.addEventListener('YixinJSBridgeReady', function () {
        video.play();
    }, false);
}
videoAutoPlay(video);
video.play();
video.controls=false;

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注