2017-09-29 4 views
0

Unten ist der Code für ein Video, das ich automatisch auf einem mobilen Gerät spielen möchte. Es wird automatisch auf dem Desktop gestartet, aber nicht, wenn die Seite auf einem iPhone geladen ist.Wie man ein html5video auf einem Handy autoplayt

<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> 

Antwort

0

Apple hat Autoplay auf der mobilen Safari für Videos mit Ton deaktiviert. Sie müssen mit dem Stummschalten des Sounds beginnen oder darauf warten, dass der Benutzer auf die Wiedergabetaste klickt.

Verwandte Themen