Search code examples
htmlfirefoxhtml5-videooggwebm

Why isn't my webm file playing in firefox?


I'm using video.js, I've tried using ogv and now webm. Neither will play in Firefox 25. Site is http://www.hybi.info

<video id="intro" class="video-js vjs-default-skin" width="498" height="365" 
data-setup= '{"controls":true, "autoplay": true, "preload":"auto"}'>
<source src="/images/intro.mp4" type="video/mp4">
<source src="/images/intro.webm" type="video/webm">
<source src="/images/intro.ogv" type="video/ogg">
</video>

Prior to using video.js I got

Video format or MIME type is not supported. 

Works fine in Chrome. What's the deal?


Solution

  • SOLVED: The issue here was actually the hosting account - godaddy.

    Godaddy does not by default serve .webm or .ogv/ogg and using .httaccess doesn't do anything. You instead need to create a web.config file and add in this code:

    <configuration>
       <system.webServer>
       <staticContent>
         <mimeMap fileExtension=".EXTENSION" mimeType="TYPE/SUBTYPE" />
       </staticContent>
     </system.webServer>
    </configuration>
    

    for example I added:

    <configuration>
     <system.webServer>
       <staticContent>
         <mimeMap fileExtension=".ogv" mimeType="video/ogg" />
         <mimeMap fileExtension=".webm" mimeType="video/webm" />
       </staticContent>
     </system.webServer>
    </configuration>
    

    source: http://support.godaddy.com/help/article/6286/modifying-or-adding-custom-mime-types-to-windows-hosting-accounts