2011-10-08 117 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有关吗? - 只是一个镜头...