Page 1 of 1

IE9 and the <audio> tag

Posted: Tue Nov 20, 2012 8:01 am
by shiznatix
I have been trying to get IE9 to use the audio tag for quite some time now but to no avail. On every other browser on every OS, there are no problems. It is only IE (how can this browser suck for sooo long!?).

Code: Select all

<audio controls="controls">
	<source src="/files/NRUPPLYSNINGEN_XTRA.mp3" type="audio/mp3">
	<source src="/files/NRUPPLYSNINGEN_XTRA.wav" type="audio/wav">
	<source src="/files/NRUPPLYSNINGEN_XTRA.ogg" type="audio/ogg">
	Your browser does not support this audio format.
</audio>
On IE, I always just get the message "Your browser does not support this audio format." Anyone have any ideas?

Re: IE9 and the <audio> tag

Posted: Tue Nov 20, 2012 2:28 pm
by califdon
Are you using the HTML5 DocType tag? <audio> is part of HTML5, but you need to tell IE9 that your document includes HTML5, for it to work.
See http://stackoverflow.com/questions/7358 ... ing-in-ie9

Fortunately, the HTML5 tag is simplicity, itself. Instead of the usual lengthy DocType tag, it's just:
<!DOCTYPE html>