IE9 is driving me CRAZY with it's support for HTML5 video, as far as I understand it, it supports the H.264 codec, so any files with a .mp4 extension on the end.
The problem is, it's not playing video files with a .mp4 extension . . .
It's even more unusual in that if I test it locally, IE9 will play the mp4 video, it just doesn't play it on the server, this is also nothing to do with MIME types, I added the following MIME type to the server:
.mp4 - video.mp4
And in the network panel in the IE developer tools, it's listing it's type as "video/mp4" the only unusual thing is that the Network panel shows IE is requesting it 3 times (I have no idea why this could be)
I'm at the end of my tether, so much so that I actually wrote the code below to try and fix it (I would really hate to use this on a live site, it's horrible):
<!--[if !IE 9]><!-->
<video controls="controls">
<!--<![endif]-->
<!-- This is a horrible way to do this, but I cannot figure out for the life of me why IE9 won't play this video :( -->
<!--[if !IE 9]><!-->
<source src="video.ogv" type='video/ogg; codecs="theora, vorbis"'/>
<source src="video.mp4" type="video/mp4">
<!--<![endif]-->
<!-- If HTML5 video is not supported, the following Flash video will play -->
<p>flash video stuff is here</p>
<!--[if !IE 9]><!-->
</video>
<!--<![endif]-->
This fixes it by forcing IE9 to use the flash video for browsers that don't support HTML video (instead of doing this by default IE9 just seems to display a blank box, no error message, no anything). Unfortunately this solution is so horrible I'm almost ashamed to have written it.
Does anybody know what could be causing this? Or how I can fix it?
EDIT: Not sure if this is of any significance, but I used http://www.freemake.com/free_video_converter/ to convert the files to the correct formats