html 5 视频仅在 ipad 广播中不起作用 2

html 5 video doesn't work only in ipad air 2

我有一个包含视频的 website。我在 Browserstack 上测试它,视频在不同的 OS 示例的另一个浏览器中工作:Windows XP IE,Windows 10 Edge,Ubuntu Firefox,Mac Safari,Android Tab 4 Chrome,Nexus 9 Chrome,iPad Pro 11 Safari,iPhone 6)。只有 iPad air 2 不播放视频,我尝试打开 youtube 并播放一些视频,但它不起作用,而且页面只是冻结。我搜索过这个,我找到的解决方案是将 mp4 编码为 m4v,但它不起作用。 视频标签设置为:播放、循环、静音。谢谢。

<video class="video--element"  preload autoplay loop muted ">
     <source src="https://master-7rqtwti65aci36n4zmn2.eu.platform.sh/media/video/e8/96/65/coqon_slider_startseite_action_export.webm" type="video/webm">
     <source src="https://master-7rqtwti-65aci36n4zmn2.eu.platform.sh/media/video/6b/09/76/COQON_HOME.mp4" type="video/mp4">
     <source src="https://master-7rqtwti-65aci36n4zmn2.eu.platform.sh/media/video/f8/29/00/coqon_slider_startseite_action_export.ogv" type="video/ogg">
</video> 

所以我找到了 HTML5 video on Wikipedia 并且在那里我找到了可以帮助浏览器确定它是否可以解码文件的编解码器。也许这有助于 ipad 选择它应该选择的文件。

所以最后应该是这样的:

<video class="video--element"  controls preload="auto" autoplay loop muted ">
 <source src="https://master-7rqtwti65aci36n4zmn2.eu.platform.sh/media/video/e8/96/65/coqon_slider_startseite_action_export.webm" type='video/webm; codecs="vp8.0, vorbis"'>
 <source src="https://master-7rqtwti-65aci36n4zmn2.eu.platform.sh/media/video/6b/09/76/COQON_HOME.mp4" type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"'>
 <source src="https://master-7rqtwti-65aci36n4zmn2.eu.platform.sh/media/video/f8/29/00/coqon_slider_startseite_action_export.ogv" type='video/ogg; codecs="theora, vorbis"'>

我还更改了 header 控件。预加载的语法是:

preload="auto|metadata|none"

metadata: The author thinks that the browser should load only metadata when the page loads

auto: The author thinks that the browser should load the entire video when the page loads

none: The author thinks that the browser should NOT load the video when the page loads

我在 here!

上找到了那些