HTML5 - mp4 video does not play in IE9

user623892 picture user623892 · Aug 4, 2011 · Viewed 157.4k times · Source

I have an mp4 video that I want to play in IE9 using HTML5 <video> tag. I added the MIME type to IIS 7 so if I browse http://localhost/video.mp4 it plays in both Chrome and IE9 but not in HTML5, Chrome plays the video in HTML though. Here's the code:

<html>
<body>
  <video src="video.mp4" width="400" height="300" preload controls>
  </video>
</body>
</html>

Any ideas?

Thanks

UPDATE:

Tried the same file in Firefox 5.0 and it didn't work either, only Chrome is able to play the mp4 video.

Answer

clif picture clif · Nov 11, 2012

for IE9 I found that a meta tag was required to set the mode

<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>

<video width="400" height="300" preload controls>
<source src="movie.mp4" type="video/mp4" />
Your browser does not support the video tag
</video>