Firefox To Play Ogg

I have an ogg/audio file converted from mp3 using Alt WAV MP3 Ogg Converter. When I drag and drop the file in Firefox or in Google Chrome, the audio plays nicely. But when a use the following code to place the file inside a page it only works on Chrome.

My code is simple as that:

<audio controls>  
     <source src="foo.ogg" type="audio/ogg">  
</audio>

Someone can tell me why?

Thanks

Answers


I think you can find your answer here. In my case I had to add MIME types to our nginx server.


Because this works on IE:

<source src="foo.ogg" type="audio/mp3">` 

And this works on Chrome, Mozilla, Safari, Opera

<source src="foo.ogg" type="audio/ogg"> 

Need Your Help

implementation of post redirect get in java web

java jsp servlets post-redirect-get

am i implementing the post redirect get approach in java web. i have this index.jsp which i can add information to database.

Invalid parameters while posting to facebook page

codeigniter facebook-graph-api facebook-php-sdk facebook-sdk-4.0

I am using below code to post contents to Facebook page that user admins.