html5 video tag not playing mp4 - IIS

11,840

Definitely check Chrome/Safari as suggested. Firefox doesn't support MP4 files through HTML5 video. You need a WEBM file or a fallback flash player to support Firefox (which I'm assuming Leanback does).

Overall it sounds like an issue with your version of IE9, and might be limited to your machine. Does the leanback player's video work in IE9 for you? Or the video on videojs.com? I've tested the latter myself in IE9 multiple times.

Otherwise there could be corruption in your mp4 file that IE9 can't support. I explained this more in another question.

Share:
11,840
user1215399
Author by

user1215399

Updated on June 26, 2022

Comments

  • user1215399
    user1215399 almost 2 years

    The problem I am having is that I am unable to get mp4 videos to run via a video tag.

    The server is IIS 7.5 on Win7 Ultimate.

    The htm in the file is rather simple and vanilla:

    <video width="360" height="240"  controls="controls" >
        <source src="test.mp4" type="video/mp4" />
    </video>
    

    In "Internet Explorer" the tag renders a black box with a red cross.

    In Firefox the tag renders as a grey box with a light-grey cross and the words "No video with supported format and MIME type found.".

    I know what you're thinking - add the MIME type. I have done this two different ways with no success; first I tried adding the MIME type in IIS, and then I have tried adding via the web.config with

    <staticContent>  
      <remove fileExtension=".mp4" />
      <mimeMap fileExtension=".mp4" mimeType="video/mp4"/>
    </staticContent>
    

    Neither of these made a difference. I have also typed the .mp4 file directly into the address bad and both IE and firefox are able to play it. Furthermore I have gone to websites that have use 'video' tag in both IE and firefox and they play the videos just fine.

    Can somebody please assist me in why this wont play, and what I can do to get it to play?

    Thanks