2017-09-29 22 views
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&amp;controls=true&amp;fullScreenEnabled=false&amp;posterOnEnd=true&amp;loop=true&amp;poster=w3movies/Forever_I_Run_%28Live%29_-_Elevation_Worship.jpg&amp;src=Forever_I_Run_%2528Live%2529_-_Elevation_Worship.m4v" /> 
     <embed src="w3movies/flashfox.swf" width="1280" height="720" style="position:relative;" flashVars="autoplay=true&amp;controls=true&amp;fullScreenEnabled=false&amp;posterOnEnd=true&amp;loop=true&amp;poster=w3movies/Forever_I_Run_%28Live%29_-_Elevation_Worship.jpg&amp;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> 

答えて

0

Appleはサウンド付き動画のモバイルサファリで自動再生を無効にしています。音をミュートするか、ユーザーが再生ボタンをクリックするまで待つ必要があります。

関連する問題