Why is HTML5 video playing inconsistently in Firefox 11?

I have the following HTML5 code on my homepage and it acts weirdly in Firefox 11.

<video width="900" height="508" autoplay="autoplay" controls="controls"> <source type="video/webm" src="http://www.mysite.com/MovieClip.webm"></source> <source type="video/mp4" src="http://www.mysite.com/MovieClip.mp4"></source> </video> 

When the home page of my site loads, I see the following error message in place of the video: "There is no video with a supported format and MIME type."

However, when I open the media path "http://www.mysite.com/MovieClip.webm" , on a new tab it loads the media just fine (using the built-in HTML5 video player with HTML5 support)!

Then, right after I go back to my home page and refresh the page, now it downloads the video just fine! Any ideas on why this is happening and how to fix it?

Thanks in advance!

+7
source share
3 answers

Make sure your web server is configured to deliver WebM video in the form of a "video / webm" MIME type. You can quickly and manually check if this is done by telnetting to your web server and issuing a HEAD request:

 telnet www.mysite.com 80 

[after connecting ...]

 HEAD /MovieClip.webm HTTP/1.1 Host: www.mysite.com 

And complete the query with two carriage returns. The HTTP response header must contain the string "Content-Type:". If it does not say "video / webm", Firefox will not accept your WebM file.

+3
source

Regarding the response to multimedia responses. If your server supplies the wrong mime type in the video, just put the htaccess file with the following contents in your video directory:

 AddType video/mp4 mp4 AddType video/ogg ogg AddType video/webm webm 

It worked out well.

If, please, rate his answer;)

Hello func0der

+2
source

I'm not quite sure that this will solve your problem, but we also noticed erratic behavior in .webm movies in Firefox 11 (Windows only): The video element playlist automatically skips to the end of the movie, even if you open the file explicitly, i.e. without surrounding HTML pages. This, of course, makes it impossible to use all the autorun settings.

Our solution was to reorder the sources so that Firefox would prefer .ogg files over .webm - there was no need to change anything in the HTML code.

0
source

All Articles