English 中文(简体)
除 IE9 外, 在所有浏览器上播放 html5 视频播放
原标题:html5 video plays on all browsers except IE9

我想发表这个问题和答案 因为我无法找到它 任何地方。

如果您在不同的浏览器上玩 HTML 5 , 请确保 HTML 的其余部分有效, 以便您的视频在 IE9 上播放 。

以下代码用于铬19、Firefox 12、Opera11以及iOS5, 但“强”NOT

<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>
问题回答

首先检查您的浏览器是否支持 HTML 5 视频

< a href=> "http://html5test.com/" rel="nofollow" > 检查支持视频或不支持视频的浏览器





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签