2013-02-10 96 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)到弄清楚如何在當前版本中進行設置。我剛剛在