HTML5 视频在 IE 11 中不起作用 [英] HTML5 Video not working in IE 11
问题描述
我有一个视频档案,我在 IE 11 之外的所有版本中都可以使用.在 IE 11 中加载时出现错误错误:不支持的视频类型或无效的文件路径".以下是我正在使用的 HTML.
I have a video archive that I have working in everything except IE 11. I get the error "Error: Unsupported video type or invalid file path" when loaded in IE 11. Below is the HTML I am using.
<video id="movie" width="640" height="400" autobuffer controls preload="auto">
<source src="/media/Archive_Videos/September%202013/September_13_U-RUN.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
<source src="/media/Archive_Videos/September%202013/September_13_U-RUN.webm" type='video/webm; codecs="vp8, vorbis"' />
<source src="/media/Archive_Videos/September%202013/September_13_U-RUN.ogv" type='video/ogg; codecs="theora, vorbis"' />
<object type="application/x-shockwave-flash" data="http://player.longtailvideo.com/player.swf" width="640" height="360">
<param name="movie" value="http://player.longtailvideo.com/player.swf" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
<param name="flashVars" value="controlbar=over&file=SITE%2Fmedia%2FArchive_Videos%2FSeptember%25202013%2FSeptember_13_U-RUN.mp4" />
<span title="No video playback capabilities, please download the video below">September 2013 U-RUN</span>
</object>
<p>OOPS! It looks like your browser doesn't support HTML5 videos. You can either install the latest version of your browser or download the video below:
<br /><a href="SITE.com/media/Archive_Videos/September%202013/September_13_U-RUN.mp4">MP4 format</a> | <a href="SITE.com/media/Archive_Videos/September%202013/September_13_U-RUN.ogv">Ogg format</a> | <a href="SITE.com/media/Archive_Videos/September%202013/September_13_U-RUN.webm">WebM format</a></p>
</video>
我还有一个 .htaccess 文件,因此它可以在 Firefox 中使用.
I also have an .htaccess file so it works in Firefox.
AddType audio/ogg oga ogg
AddType video/ogg ogv
为什么它在 IE 11 中不起作用?
Why isn't it working in IE 11?
推荐答案
我相信 IE 需要 H.264 或 MPEG-4 编解码器,您似乎没有指定/包含这些编解码器.您可以随时使用 HTML5Please 和 可以检查浏览器支持我用....这两个站点通常都有关于支持、polyfill 的最新信息,以及关于如何利用新技术的建议.
I believe IE requires the H.264 or MPEG-4 codec, which it seems like you don't specify/include. You can always check for browser support by using HTML5Please and Can I use.... Both sites usually have very up-to-date information about support, polyfills, and advice on how to take advantage of new technology.
这篇关于HTML5 视频在 IE 11 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!