I’ve converted an .mp4 video into .ogg and .webm formats (with ffmpeg) and used videojs to create the following web page that plays the video on all browsers (IE6-IE9, safari, chrome, opera, firefox):
http://tanguay.info/examples/testvideo
However, Firefox (12.0) does not always play the audio, depending on how the page is accessed:
Playing from file:// with the webm source before ogg, Firefox plays fine:
<source src="videos/damconnect.mp4" type='video/mp4'>
<source src="videos/damconnect.webm" type='video/webm'>
<source src="videos/damconnect.ogg" type='video/ogg'>
But playing from file:// with the ogg source before webm, Firefox plays without audio:
And playing from http:// with either ogg or webm first, Firefox plays without audio.
How can I get Firefox to play via http:// with audio?
ADDENDUM:
Also: Opera will not play the video if ogg is listed first (just spins, doesn’t start).
I notice that my tanguay.info server seems to be sending a text/plain header with the .webm video, how can I change that?

ANSWER:
I added this .htaccess file to the directory where index.htm is, which fixed the problem:
AddType audio/ogg oga ogg
AddType video/ogg ogv
AddType video/webm webm
For the
text/plain– edit yourmime.typesfile (~www/conf) and addwebm/video webmChances are you are having the same problem with
ogg/ogv, add mime typeogg/video ogg ogvAlso ensure the audio codec is correct on conversion.
EDIT
Ok, I see you added it to the
httpd.conf– just read thisAlthough I can find any argument as to why…