Is there any way that HTML
Audio tag could play mp3
in Firefox
.
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" >
For those still looking now after FF v21 (I think) mp3 and HTML 5 audio tag works
All you have to do is wait another 5 years until the remaining MP3 patents expire...
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.
It seems that Firefox does not support .mp3 in their audio tag. See this StackOverflow post for more detail.