Herostratus’ legacy

words from a lazy coder

apache configuration for video tag in firefox

In contrast with Epiphany-WebKit, Firefox seems to be quite picky at rendering videos through the HTML5 tag <video>: it demands the correct HTTP headers.It doesn’t assume anything. If the stream doesn’t have the correct headers, Firefox just will put a black box in you face without any further explanation.

In order to overcome this issue, struggling a little with the sparse information available through the Internet, I came with this .htaccess file:

    AddType video/ogg          .ogv
Header set Access-Control-Allow-Origin "\*"
Header unset Etag
FileETag None

First of all, my Apache server doesn’t recognize the video/ogg mime type.

Second, the header MUST NOT include the ETag key.

And finally, there’s new header, which isn’t fully implemented by the all browsers, but it will be, and will mess up all our pages with embedded videos, is the cross domain accessibility.

More information:

  1. http://diveintohtml5.org/video.html
  2. http://www.bluishcoder.co.nz/2008/11/video-audio-and-cross-domain-usage.html
  3. http://en.flossmanuals.net/TheoraCookbook/MyHosting
  4. http://www.askapache.com/htaccess/apache-speed-etags.html
  5. http://httpd.apache.org/docs/2.0/mod/mod_headers.html