1

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

Juliano
  • 2,422
  • 21
  • 23

2 Answers2

2

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

Community
  • 1
  • 1
darren
  • 18,845
  • 17
  • 60
  • 79
0

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"> 
JorgeAlberto
  • 61
  • 1
  • 13