html5 video plays on all browsers except IE9

人走茶凉 提交于 2019-12-24 14:16:12

问题


I wanted to post this question and answer because I wasn't able to find it anywhere.

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.

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>

回答1:


First check whether your browser support HTML 5 Video or not

Check browser supporting video or not




回答2:


To get it to play on IE9,

You need this full markup:

<!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>


来源:https://stackoverflow.com/questions/10744438/html5-video-plays-on-all-browsers-except-ie9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!