2013-02-10 93 views
3

我有我的视频播放器的一个问题,现在我要求帮助的Video.js IE 9的MP4/WebM错误

的Video.js无法在IE 9(也许10播放视频,我无法检查),所有其他浏览器正确显示视频

这里是an example link。以下错误

IE控制台显示:

LOG: Video Error[object Object]

HTML代码:

<video class='video-js vjs-default-skin' controls data-setup='{"techOrder": ["flash", "html5", "links"]}' height='576' id='video_16' poster='/system/videos/file_previews/000/000/016/medium/1360091100-30.jpg?1360091101' preload='none' width='720'> 
    <source src='http://uklasi.com.ua/5-klas/matematika/koordinatniy-promin/16.mp4' type='video/mp4'> 
    <source src='http://uklasi.com.ua/5-klas/matematika/koordinatniy-promin/16.webm' type='video/webm'> 
</video> 

我的HTTP标头:

HTTP/1.1 200 OK 
Server: nginx/1.2.6 
Date: Sun, 10 Feb 2013 12:05:40 GMT 
Content-Type: video/mp4 
Content-Length: 41625464 
Last-Modified: Tue, 05 Feb 2013 19:05:00 GMT 
Connection: keep-alive 
Content-Disposition: inline; filename="koordinatniy-promin-16" 
Cache-Control: max-age=0, private, must-revalidate 
Accept-Ranges: bytes 

没有人之前面对这个问题? :(

+0

你应该补充的是,错误只发生在谁没有闪光的人 - 如果Flash是可用的,示例链接工作就好了。这是错误的HTML5视频。 – 2013-02-10 12:26:18

+0

尝试http://stackoverflow.com/questions/5006765/html5-video-error-internet-explorer-9或http://stackoverflow.com/questions/6944679/html5-mp4-video-does-not-play- in-ie9等(Google是你的朋友 - “ie video error html5”) – 2013-02-10 12:27:09

+0

是的,这个问题只出现在html5中。 – 2013-02-11 08:20:02

回答

6

我有MP4和IE9具有的Video.js打了类似的问题 - 这个固定:

<script type="text/javascript" charset="utf-8"> 
//mvp - if it is IE9 - the first line tests for IE9 - then fall back to flash 
if(navigator.userAgent.indexOf("Trident/5")>-1){ 
_V_.options.techOrder = ["flash"]; 
_V_.options.flash.swf = "tech/flash/video-js.swf"; 
} 
</script> 

基本上它强制使用,如果它检测到IE9的Flash播放器...

MVP

更新... 13年3月28日 IE10和的Video.js不能正常工作或者..加入另一个块来测试IE10使用: “三叉戟/ 6”(而不是5),并且该力IE10也使用Flash。 视频正在播放!

没有尝试IE11还....

+0

这个解决方案适用于我,但我必须去[videojs文档](https://github.com/videojs/video.js/blob/master/docs/tech.md#adding-playback-technology)到弄清楚如何在当前版本中进行设置。我刚刚在