The html5 <audio> tag needs an mp3 file and and ogg file to be cross-browser compatible. For best results, only encode raw, wav, or aiff files this way. Mp3 to ogg will look like it works, but the file won't play on Firefox.
Encode
- Install oggenc: $ sudo apt-get install vorbis-tools
- Encode: $ oggenc -q 6 input.wav -o output.ogg
The HTML:
<audio controls="controls" preload="auto" autobuffer autoplay id="player">
<source src="http://alialujah.com/files/3513/2641/1365/a-house-a-home.mp3" type="audio/mpeg" />
<source src="http://alialujah.com/files/3813/2648/7285/a-house-a-home.ogg" type="audio/ogg" />
Aw dang! Your browser does not support html5.
</audio>