美好的一天,我一直在致力于这个项目并学习如何在 iPad 和所有其他浏览器上放置视频。
但在为此编写代码后,我注意到我从 iPad 获得的唯一信息是视频的第一个关键帧,但视频没有播放。当我按下 iPad 屏幕上出现的“播放”按钮时,视频不会播放。奇怪的是,该脚本有一个自动播放命令。
这个脚本有什么问题?有更好的方法吗?我在这件事上花了太多时间,却无法完成。我在 Windows 版 Safari、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>
mp4 视频的规格是什么(分辨率和配置文件)? iPad 不支持所有类型的 mp4。
您是否尝试过不使用 flash 和 ogv 源的简单 html?
它看起来像你的 over sepc:
iPad 支持的视频格式
- H.264 视频(高达 720p,每秒 30 帧;主要配置文件级别 3.1,AAC-LC 音频高达 160 Kbps、48kHz,立体声音频采用 .m4v、.mp4 和 .mov 文件格式)
- MPEG-4 视频,高达 2.5 Mbps,640 x 480 像素,每秒 30 帧,简单配置文件,AAC-LC 音频高达 160 Kbps、48kHz,立体声音频采用 .m4v、.mp4 和 .mov 文件格式。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)