【发布时间】:2012-04-09 04:36:45
【问题描述】:
源格式的顺序在 HMTL5 视频标签中是否重要?另外,如果其中一种格式不正确,难道不是所有浏览器都只会找到他们喜欢的那种,而忽略那些不好的吗?
我不明白为什么下面的代码不能在 iOS4.2 safari 上运行:
<video id="myVideo" poster="/images/01.png" width="600" height="400" >
<source src="/uploads/12373/6/oceans-clip.mp4" type="video/mp4" />
<source src="/uploads/12373/6/oceans-clip.webM" type="video/webM" />
<source src="/uploads/12373/6/oceans-clip.ogv" type="video/ogg" />
<p>Your browser does not support the video tag.</p>
</video>
<div class="control">
<a href="#" class="btnPlay">Play/Pause</a>
</div>
在我的 iPhone 上的 Safari 中,播放暂停按钮工作正常,它似乎可以加载视频,但随后我收到一个弹出窗口,提示“无法播放电影”。我唯一能想到的是 .webM 文件实际上并不存在(这是真的,它不存在,尽管其他文件存在)或者我需要在 .webM 之前指定 .ogv。
【问题讨论】:
标签: ios html mobile-safari html5-video