0
以下は、モバイルデバイスで自動的に再生したいビデオのコードです。それはデスクトップ上で自動起動しますが、ページがiPhoneにロードされたときには自動起動しません。モバイルでhtml5ビデオを自動再生する方法
<div class="w3-row">
<div class="w3-col w3-full">
<div class="w3-display-container" >
<div id="videoWrapper_disable">
<!-- Start EasyHtml5Video.com BODY section -->
<div class="easyhtml5video" style="position:relative;max-width:1280px;">
<video playsinline controls="controls" autoplay="autoplay" poster="w3movies/Forever_I_Run_%28Live%29_-_Elevation_Worship.jpg" style="width:100%" loop="loop" onended="var v=this;setTimeout(function(){v.play()},1)">
<source playsinline src="w3movies/Forever_I_Run_%28Live%29_-_Elevation_Worship.ogv" type="video/ogg" />
<source playsinline src="w3movies/Forever_I_Run_%28Live%29_-_Elevation_Worship.mp4" />
<object type="application/x-shockwave-flash" data="w3movies/flashfox.swf" width="1280" height="720" style="position:relative;">
<param name="movie" value="w3movies/flashfox.swf" />
<param name="allowFullScreen" value="false" />
<param name="flashVars" value="autoplay=true&controls=true&fullScreenEnabled=false&posterOnEnd=true&loop=true&poster=w3movies/Forever_I_Run_%28Live%29_-_Elevation_Worship.jpg&src=Forever_I_Run_%2528Live%2529_-_Elevation_Worship.m4v" />
<embed src="w3movies/flashfox.swf" width="1280" height="720" style="position:relative;" flashVars="autoplay=true&controls=true&fullScreenEnabled=false&posterOnEnd=true&loop=true&poster=w3movies/Forever_I_Run_%28Live%29_-_Elevation_Worship.jpg&src=Forever_I_Run_%2528Live%2529_-_Elevation_Worship.m4v" allowFullScreen="false" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer_en" />
<img alt="Forever I Run (Live) - Elevation Worship" src="w3movies/Forever_I_Run_%28Live%29_-_Elevation_Worship.jpg" style="position:absolute;left:0;" width="100%" title="Video playback is not supported by your browser" />
</object>
</video>
</div>
</div>
</div>
</div>
<script src="w3movies/html5ext.js" type="text/javascript"></script>