Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi am trying to play mp4 videos in html5 player. its working fine in chrome.
but not working ie as well as Firefox.What could be the reason

This is my webconfig to referring iis mime type

C#
<system.webServer>
   <directoryBrowse enabled="true" />
   <staticContent>
     <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
   </staticContent>
 </system.webServer>


Any guess?
Posted
Comments
Nathan Minier 13-Nov-14 7:55am    
If you don't have:
<meta http-equiv="X-UA-Compatible" content="IE=edge">
then it may be parsing correctly.

What error are you getting, exactly?
Anto Reegan 13-Nov-14 8:02am    
hello Nathan thanks for your immediate reply.
Am getting "Invalid source" msg in the video player.
Nathan Minier 13-Nov-14 8:07am    
I had a similar issue with svgs when I first pushed our IIS to support html5.

Have a look at this SO post and the directions on the first answer, this has resolved my issues with content types in the past:
http://stackoverflow.com/questions/14079808/html5-video-is-not-playing-mp4-error-invalid-source
Anto Reegan 13-Nov-14 8:11am    
but make this same changes in web config
like as i asked in this post

Will it help us..?

Nathan Minier 13-Nov-14 8:13am    
It's an IIS configuration issue, not your application. The overall webserver might not be configured to serve mp4 content properly. Unfortunately, nothing you do to the web.config will help unless that is addressed.

1 solution

It may come to surprise for you: the term "MP4" does not mean something certain. This is a general name of the technology, but there are several different standards for this compression, and several different media compression algorithms and supporting codec. Moreover, the same streams can be packed in different file/stream formats, commonly called "media containers".

No wonder, browsers support only some subsets of the very big set of all possible variants, different subsets for different browsers. All you can do about it is to re-master your media files to something most common. The situation with acceptable used by HTML5 <video> element is extremely complicated and is a subject of permanent change. For some background, please see:
http://en.wikipedia.org/wiki/Digital_container_format[^],
http://en.wikipedia.org/wiki/Codec[^],
http://en.wikipedia.org/wiki/Codec[^],
http://en.wikipedia.org/wiki/MPEG-4[^],
http://en.wikipedia.org/wiki/HTML5_Audio[^],
http://en.wikipedia.org/wiki/HTML5_video[^].

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900