我在IE9中显示HTML5视频时遇到一些问题,我在我的HTAccess中添加了不同的类型
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
这是我的HTML格式
<video id="video" autoplay loop preload>
<source src="video/final_loop.mp4" type="video/mp4" />
<source src="video/final_loop.webm" type="video/webm" />
<source src="video/final_loop.ogg" type="video/ogg" />
Your browser does not support the <code>video</code> element.
</video>
我还尝试将视频转换为Theora OGV格式并使用
<source src="video/final_loop.theora.ogv" type="video/ogv" />
但这也不管用,我想。Ogg在IE9中得到了支持?
最佳答案
在微软官方网站上,IE9上有视频的代码片段
<video width="400"
height="300"
src="video.mp4"
poster="frame.png"
autoplay
controls
loop>
This content appears if the video tag or the codec is not supported.
</video>
尝试使用此代码。