video视频在手机上播放有各种状况,很头疼的一件事,苹果上要自动播放需要进入一个微信插件jweixin-1.2.0.js

 <script type="text/javascript" src="/static/common/js/jweixin-1.2.0.js"></script>
<div class="vmask" >
        <div class="content">
            <video id="video"src="__CSS__/../temp/index.mp4" controls poster="__CSS__/../temp/guide.png" autoplay muted webkit-playsinline playsinline x5-video-player-type='h5' x5-video-player-fullscreen='true' loop="loop"></video>
            <a class="enterbtn" href="{:url('index/home')}">{:lang('Enter website')}</a>
        </div>
    </div>
	
<script type="text/javascript">
		document.addEventListener('WeixinJSBridgeReady',function(){
			  $('#video').play();
		  },false);
	</script>

By lxcss

发表评论

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