I'm using html5 audio tag and can't seem to find what to specify for the codec for both mp3 and wav.
I know ogg is:
<audio>
<source type='audio/ogg; codec="vorbis"' />
</audio>
Anyone know what I would write for mp3 and wav?
I'm using html5 audio tag and can't seem to find what to specify for the codec for both mp3 and wav.
I know ogg is:
<audio>
<source type='audio/ogg; codec="vorbis"' />
</audio>
Anyone know what I would write for mp3 and wav?
For WAV, use <source type="audio/wave">
; for MP3 you want audio/mpeg. You don't need to say exactly which codec you are using, the browser will figure it out.
what browser are you using for playing the mp3 file? not all browsers support playing of mp3 trough the audio tag yet. see: http://dev.opera.com/articles/view/html5-audio-radio-player/ I suggest making a script that chooses the audio type according to the browser type. That way the user always has playing music.