良い一日、私はこのプロジェクトに取り組んでいて、iPadや他のすべてのブラウザにビデオを配置する方法を学びました。
しかし、このためのコードを書いた後、iPadから取得するのはビデオの最初のキーフレームだけであることに気付きましたが、ビデオは再生されていません。iPadのその画面に表示される「再生」ボタンを押すと、ビデオが再生されるだけではありません。奇妙なことに、スクリプトには自動再生コマンドがあります。
このスクリプトの何が問題になっていますか?これを行うためのより良い方法はありますか?私はこれにあまりにも多くの時間を費やしました、そして私はそれを成し遂げることができません。Safari for Windows、Firefox、Internet Explorerでこれを確認しましたが、iPadを除くすべての場所で機能します。
<video controls width="920px" height="560px" autoplay>
<!-- if Safari/Chrome-->
<source src="video.mp4" type="video/mp4" />
<source src="video.ogv" type="video/ogg" />
<!--If the browser doesn't understand the <video> element, then reference a Flash file. You could also write something like "Use a Better Browser!" if you're feeling nasty. (Better to use a Flash file though.)-->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="920" height="560" id="csSWF">
<param name="movie" value="video_controller.swf" />
<param name="quality" value="best" />
<param name="bgcolor" value="#1a1a1a" />
<param name="allowfullscreen" value="true" />
<param name="scale" value="showall" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="autostart=true&showstartscreen=false&color=0x1A1A1A,0x1A1A1A" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="video_controller.swf" width="920" height="560">
<param name="quality" value="best" />
<param name="bgcolor" value="#1a1a1a" />
<param name="allowfullscreen" value="true" />
<param name="scale" value="showall" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="autostart=true&showstartscreen=false&color=0x1A1A1A,0x1A1A1A" />
<!--<![endif]-->
<div id="noUpdate">
<p>The video content presented here, requires a more recent version of the Adobe Flash Player. If you are using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by <a href="http://www.adobe.com/go/getflashplayer">downloading here</a>.</p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("csSWF", "9.0.28", "expressInstall.swf");
</script>
</video>