Search code examples
htmlinternet-explorer-9html5-video

HTML5 - mp4 video does not play in IE9


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.


Solution

  • Ended up using http://videojs.com/ to support all browsers.

    But to get the video working in IE9 and Chrome I just added html5 doc type and used mp4:

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