WHITECOLOR
WHITECOLOR

Reputation: 26142

IE10 audio element doesn't play my AAC (m4a)

IE10 audio element doesn't play my AAC (m4a) files.

Should it? the content type of the files is "audio/aac".

When I check:

audio.canPlayType("audio/mp3") --> TRUE
audio.canPlayType("audio/aac") --> FALSE
audio.canPlayType("audio/m4a") --> FALSE

I thought it should but why it doesn't?

I convert my files to AAC because of IE10 and mobile safari that don't support OGG. Safari Mobile plays this AAC files well.

Upvotes: 0

Views: 2774

Answers (1)

ndm
ndm

Reputation: 60463

See the Remarks section in http://msdn.microsoft.com/en-us/library/ie/ff975061%28v=vs.85%29.aspx

Beginning with Internet Explorer 9, any audio or video content needs the correct mime type set on the server, or the files won't play. Internet Explorer 9 and later support MP3 audio, and MP4 audio and video. [...]

Media file to serve    Extension setting    Mime type setting
...
Audio mp4              m4a                  audio/mp4
...

So you need to check for audio/mp4 in your code, and also make sure that your server sends this mime-type in the content-type header.

Upvotes: 4

Related Questions