IE9 and the <audio> tag

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

IE9 and the <audio> tag

Post 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?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: IE9 and the <audio> tag

Post 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>
Post Reply