Native audio support was introduced in since Firefox 3.5 . Ogg is one of the media format supported by Firefox. However, sometimes you may find it doesn’t work even if you set the right source path. And you just check the network status of audio element:
Then you get the constant of a 4, which is HTMLMediaElement.NETWORK_NO_SOURCE.
This is because firefox checks the Content-Type header to make sure it’s a media file. (Webkit based browsers don’t have this restriction.) However, ogg format is not configured on most http servers. You can check the content type by:
curl -I <url-to-media-file>
Take Apache as example, you can add following content to your configuration file:
AddType audio/ogg .oga
AddType video/ogg .ogv .ogg
For more, check this article: