HTML5 视频在 IE9 RC 中失败,但在 IE9 Beta 中则不然
我的项目严重依赖视频,并在可用时利用 html5 视频。在大约一周前 IE9 RC 发布之前,这一直适用于所有浏览器!这非常令人沮丧!
令人困惑的是,当视频来自与我的域不同的位置时,我可以播放视频,但当它们来自我的域时则不能播放。就好像视频的路径被扭曲了。
工作:
<video src="http://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer_480x270_h264aac.m4v" controls="controls">
</video>
不工作
<video src="http://www.mysite.com/video/Big_Buck_Bunny_Trailer_480x270_h264aac.m4v" controls="controls">
</video>
请记住,这适用于所有 HTML5 浏览器(甚至 IE9 Beta),但不适用于最新的“IE9 RC”版本。并且所有读/写权限均已正确设置。
要亲自测试一下,请访问此链接: http://thebeer.co/labs/video.html
您应该在 IE9 RC 中发现前两个视频无法加载,但最后一个可以加载。更奇怪的是,您访问 IE9 RC 中将播放的视频的直接 URL。所有三个视频都可以在 Chrome 中运行(暂时因为尚未放弃 H.264 格式)。
请帮助我,伙计们……
一个破碎的人。
I have project that relies heavily on video and leverages html5 video when available. This was working across all browsers up until the IE9 RC was released about a week ago! This is very frustrating!
The confusing thing is I am able to play videos when they are sourced from a different location than my domain but not when they are sourced from my domain. It is as if the path to the video is being distorted.
WORKING:
<video src="http://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer_480x270_h264aac.m4v" controls="controls">
</video>
NOT WORKING
<video src="http://www.mysite.com/video/Big_Buck_Bunny_Trailer_480x270_h264aac.m4v" controls="controls">
</video>
Please bear in mind that this is working in all HTML5 browsers (even IE9 Beta) but not the very latest 'IE9 RC' release. And that all read/write permission have been set correctly.
To test this for yourself visit this link:
http://thebeer.co/labs/video.html
You should find in IE9 RC that the first two videos don't load but the last does. And even more strangely is you visit the direct URLS of the videos in IE9 RC they will play. All three videos work in Chrome (for the time being as the haven't dropped the H.264 format yet).
Please help me out guys...
A Broken Man.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你能检查一下你的网络服务器配置吗?似乎发送了错误的 MIME 类型。如果您转到 IE9 开发人员工具,单击“网络”选项卡,按“停止捕获”并重新加载页面,您将看到前两个视频以文本/纯文本形式发送,这意味着没有为它们指定内容类型,并且最后两个以视频/mp4 形式发送。 Chrome 似乎以某种方式处理它,但实际上并非必须如此。
您可以使用 Firebug HTTP 标头嗅探器看到相同的结果。然而,Firefox 无法播放任何视频,可能是由于 h.264 编解码器的原因。
Can you check your web server configuration? It seems that wrong MIME type is being sent. If you go to IE9 Developer tools, click the Network tab, press Stop capturing and reload the page, you will see that the first two videos are sent as text/plain, which means that no content-type is specified for them, and the last two are sent as video/mp4. Chrome seems to handle it somehow, but it really doesn't have to.
You can see the same using Firebug HTTP headers sniffer. Yet, Firefox doesn't play any of the videos, probably due to h.264 codec.