2011-10-08 75 views
1

我已經使用子碼在IE9中播放MP4視頻,但失敗了。我的視頻標籤在ie9中有什麼問題?IE9中的視頻標籤問題,無法播放MP4文件

<video class="video-js" width="576" height="324" controls="controls" preload="" poster="~/media/Images/Article/samplevideolarge.ashx?ext=.gif"> 
<source type="video/mp4; codecs=&quot;avc1.42E01E, mp4a.40.2&quot;" src="~/media/Files/Videos/sample video mp4.ashx"></source> 
<object class="vjs-flash-fallback" width="576" height="324" type="application/x-shockwave-flash" data="/global/scripts/flowplayer-3.2.7.swf"> 
<param name="movie" value="/global/scripts/flowplayer-3.2.7.swf" /> 
<param name="allowfullscreen" value="true" /> 
<param name="flashvars" value='config={"playlist":["~/media/Images/Article/samplevideolarge.ashx?ext=.gif", {"url": "~/media/Files/Videos/sample video mp4.ashx","autoPlay":false,"autoBuffering":true}]}' /> 
<!-- Image Fallback. Typically the same as the poster image. --> 
<img src="~/media/Images/Article/samplevideolarge.ashx?ext=.gif" width="576" height="324" alt="Poster Image" title="No video playback capabilities." /> 
</object> 
</video> 

謝謝。

回答

0
  1. 我相信mp4視頻的MIME類型是video/mpeg而不是video/mp4
  2. 我可能會誤解,但我不認爲你應該在編解碼器周圍加引號(或&quot;)。
  3. 這一個可能不會影響它,但擴展名是.ashx - 我不知道是什麼擴展名,但它可能會產生干擾。

還有一件事,你可能想仔細檢查一下IE9支持哪些特定的編解碼器。

+0

ashx擴展是一個ASP.NET Web處理程序文件,在這個實例中由Sitecore用來從數據庫提供媒體下載。 –

+0

我也有這個問題 - 使用video/mpeg導致IE9失敗。切換到視頻/ MP4基於這解決了它。 –

0

難道這與this有關嗎? - 只是一個鏡頭...