"Error: unsupported audio type or invalid file path" for HTML5 Audio tag in Internet Explorer 10

I have the following html5 document with an audio tag and return to Flash for browsers that do not support it:

<!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> </head> <body> <audio autoplay controls preload="auto" autobuffer> <source src="trumpet.ogg" type="audio/ogg"> <source src="trumpet.mp3" type="audio/mp3"> <source src="trumpet.wav" type="audio/wav"> <source src="trumpet.m4a" type="audio/aac"> <!-- Flash fallback --> <object width="1" height="1" type="application/x-shockwave-flash" data="player.swf"> <param name="movie" value="player.swf"> <param name="flashvars" value="file=trumpet.mp3"> </object> </audio> </body> </html> 

All files are returned by the service with the correct MIME type in the http header. The solution works fine for all browsers except Internet Explorer 9 and 10 ( except for compatibility mode, because the Flash file will be played there).

In these two browsers, I see the player’s controls with an error message that says “Error: unsupported audio type or wrong file path”. I tried to shuffle around the order of the source tags, but could not find a solution to get it to play any of them.

Does anyone have a clue what to check or what is going on here?

See http://l.urff.at/html5audioexample for the above markup in action.

Thanks in advance for helpful hints or tips! :)

+7
source share
1 answer

Your example works fine for me in IE10 on Windows 8.

You should know that:

  • you only need Ogg Vorbis and AAC (.m4a) to cover all browsers. WAV and .mp3 will not help.
  • Some formats have complex subformats such as .wav files may contain MP3 audio, .m4a files may contain specific sampling rates or bit depths that a particular system may not support, and .ogg files may contain video or other content. Most browsers do not support all sub-formats, so you should carefully check the exact sub-formats of each sound used and make sure that they are supported. 16-bit 44.1 kHz mono / stereo is almost always supported, so try not to backtrack.
0
source

All Articles