html5视频在除IE9之外的所有浏览器上播放 [英] html5 video plays on all browsers except IE9
本文介绍了html5视频在除IE9之外的所有浏览器上播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想发布这个问题和答案,因为我无法在任何地方找到它。
I wanted to post this question and answer because I wasn't able to find it anywhere.
所以,如果你正在玩HTML5 < video>
在不同的浏览器上确保您的HTML的其余部分有效,以便您的视频可以在IE9上播放。
So if you are playing with HTML5 <video>
on the different browsers make sure the rest of your HTML is valid such that your video will play on IE9.
以下代码适用于Chrome 19,Firefox 12,Opera11以及iOS5,但不 IE9:
The following code works on Chrome 19, Firefox 12, Opera11, as well as iOS5 but NOT IE9:
<video controls="controls">
<source src="video.mp4" type="video/mp4" />
<source src="video.ogg" type="video/ogg" />
Your browser does not support the video tag.
</video>
推荐答案
要在IE9上播放,
您需要这个完整标记:
<!DOCTYPE html>
<html lang="en">
<head></head>
<body>
<video controls="controls">
<source src="video.mp4" type="video/mp4" />
<source src="video.ogg" type="video/ogg" />
Your browser does not support the video tag.
</video>
</body>
</html>
这篇关于html5视频在除IE9之外的所有浏览器上播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文