Reputation: 17400
I can't figure out the following problem:
I use HTML 5 video on my web site. For crossbrowser support, I keep video in "mov" and "ogv" formats, so that Firefox can play it.
In ./config/initializers/mime_types.rb I have the following code:
Rack::Mime::MIME_TYPES.merge!({
".ogg" => "application/ogg",
".ogx" => "application/ogg",
".ogv" => "video/ogg",
".oga" => "audio/ogg",
".mp4" => "video/mp4",
".m4v" => "video/mp4",
".mp3" => "audio/mpeg",
".m4a" => "audio/mpeg"
})
It works on my local machine, but won't on a production server.
I've tried many ways to make this work:
Rails: MIME type issues with .m4v files
Setting Mime Type for .ogv files in Rails Development Environment
Make OGG Video work with Rails
None of these helped me, and I'm completely stuck.
Upvotes: 2
Views: 5338
Reputation:
I observed a strange behavior where some of the ogv files gave a application/ogg mime type rather than video/ogg. Please check the mime type of the file you are uploading very carefully.
Upvotes: 0
Reputation: 11
On the production server or machine, if you are using a web server such as Nginx or Apache you need to declare those mime types within the respective config files for the server to rexognise it. Has this been done?
Upvotes: 1