Html5 video tag does not play mp4 - IIS

The problem I am facing is that I cannot get mp4 video to run through the video tag.

IIS 7.5 server for Win7 Ultimate.

htm in the file is pretty simple and vanilla:

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

In Internet Explorer, the tag displays a black box with a red cross.

In Firefox, the tag appears as a gray box with a light gray cross and the words "There is no video with a supported format and MIME type."

I know what you think - add a MIME type. I did this in two different ways without success; I first tried to add the MIME type in IIS, and then I tried to add via web.config using

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

None of them changed the situation. I also typed the .mp4 file directly to the address, and both IE and firefox can play it. In addition, I went to sites that use the "video" tag in IE and firefox, and they play video very well.

Can someone please help me why it won’t play, and what can I do to make it play?

thanks

+6
source share
1 answer

Definitely check Chrome / Safari as suggested. Firefox does not support MP4 files through HTML5 video. You need a WEBM file or a backup flash player to support Firefox (which I assume Leanback does).

All in all, this sounds like a problem with your version of IE9 and may be limited to your machine. Does a non-support video player play in IE9? Or video on videojs.com ? I tested the latter myself in IE9 several times.

Otherwise, there may be damage in the mp4 file, which IE9 cannot support. I explained this more in another question .

+2
source

Source: https://habr.com/ru/post/922105/


All Articles