0

Is there any way that HTML Audio tag could play mp3 in Firefox.

Raab
  • 34,778
  • 4
  • 50
  • 65

5 Answers5

3

FF currently supports only ogg formats, so you've to include a copy with ogg format as well:

<audio controls="controls"> 
    <source src="music.ogg" type="audio/ogg" />
    <source src="music.mp3" type="audio/mpeg" />
    Your browser does not support the audio element.
</audio>

And for sake, use old object tag for embedding you mp3 file as follows:

<object data="music.mp3" type="application/x-mplayer2" width="xxx" height="xxx">
    <param name="filename" value="music.mp3">
</object>

or use embed as:

<embed type="application/x-mplayer2" src="music.mp3" height="xxx" width="xxx" >
Vishal
  • 2,161
  • 14
  • 25
0

It seems that Firefox does not support .mp3 in their audio tag. See this StackOverflow post for more detail.

Community
  • 1
  • 1
iCanHasFay
  • 662
  • 5
  • 12
0

All you have to do is wait another 5 years until the remaining MP3 patents expire...

Boris Zbarsky
  • 34,758
  • 5
  • 52
  • 55
0

Strangly enough, firefox 3.6x and 4.x played mp3 flawless, with

<EMBED src="music.mp3" autostart=true loop=true volume=100 hidden=true>

Have two instances on my linuxbox: Firefox 4.0.1 and Firefox 20.0-> same page playes its mp3 in version 4.0.1 and does not in firefox 20.0.

nippur
  • 1
  • 1
0

For those still looking now after FF v21 (I think) mp3 and HTML 5 audio tag works

Daveo
  • 19,018
  • 10
  • 48
  • 71