Why can't firefox play HTML5 video element from Localhost?

I am trying to play a video using HTML5 with the following code on localhost :

<html> <head> <meta charset="utf8"> <title>HTML5 &lt;video&gt; content negotiation test</title> </head> <body> </body> <video src="Firefox.ogv" autoplay="true" controls="true"> Your browser does not support the <code>video</code> element. </video> </html> 

it works fine with Chrome, http://imageshare.web.id/images/60h5p00ixmetpyerd7w.jpg

but why it does not work with firefox http://imageshare.web.id/images/4bky59ruk8djra8wtmp.jpg

i Locate it on IIS7 and this is my web.config

  <staticContent> <mimeMap fileExtension=".mp4" mimeType="video/mp4" /> <mimeMap fileExtension=".ogv" mimeType="video/ogv" /> </staticContent> 
+4
source share
2 answers

This may be a problem with the way your MIME types are configured in your .htaccess file, you may need to add the following to enable the correct .ogv display

 AddType video/ogg .ogv 

Firefox tends not to play .ogg videos if the mime type is incorrect!

+1
source

You want video / ogg, not video / ogv.

0
source

All Articles