I am playing around with HTML5 video and have the following snippet in an ERB:
<video id="movie" width="320" height="240" poster="/test.jpg" preload="none" controls="">
<source src="/test.mp4" type="video/mp4; codecs="avc1.42E01E, mp4a.40.2"">
<source src="/test.ogv" type="video/ogg; codecs="theora, vorbis"">
</video>
The mp4 video streams just fine from the server running in my development environment into the chrome. However firefox displays the video player with the poster image, but with a big X. The problem seems to be that mongrel is unsure of the mime type for the ogv extenstion and just returns text/plain as shown by curl:
$ curl -I http://0.0.0.0:3000/pr6.ogv
HTTP/1.1 200 OK
Connection: close
Date: Mon, 19 Apr 2010 12:33:50 GMT
Last-Modified: Sun, 18 Apr 2010 12:46:07 GMT
Content-Type: text/plain
Content-Length: 13652587
So where do I configure things so that the correct mime type will be returned? I have tried all sorts of creative searching for an answer, but the closest thing I can find is using Mime::Type.register however that only seems to deal with the responds_to stuff and didn't have any effect when I tried it just in case.
So computer setting? Mongrel config? Rails App Config? Not really sure where to look and non an expert in mime types. My dev environement is a Mac, Rails 2.3.5.