I am dynamically serving user created audio using html5 tag.
Works across the board, including IE10, but not with IE9. Definitely have the right doc type tags, its running in IE9 Standards, with the html5 doctype.
The script always gets restarted 4x as my code re-applies the src, and tries again if the Error event is fired. It is always this.error.code 4 ( MEDIA_ERR_SRC_NOT_SUPPORTED ) even though both m4a ( using aac audio ) and mp3 are supported by IE9.
Things I've tried
-Our server was returning audio/x-m4a, changed it to audio/m4a
-Forcing it to use mp3.
Response headers look like
Response HTTP/1.0 200 OK
Date Wed, 22 May 2013 18:09:32 GMT
Access-Control-Allow-Origin *
Content-MD5 xOmafXnKWpXcIV8x8OQVKg==
Content-Disposition inline
Content-Language en-US
Connection close
Content-Type audio/m4a
Random Theory
Is it possible IE is breaking on different bit rates of audio? The user submitted code can be 3 different bitrates, along with mono and stereo.
Sample Code
$(this.mAudioPlayer).bind({
error: function(){
if( this.tried != this.retries ){
this.src = this.src;
this.tried++;
var reason = "Error";
switch( this.error.code ){
case 1:
reason = "Aborted";
break;
case 2:
reason = "Decode";
break;
case 3:
reason = "Network";
break;
case 4:
reason = "Not_Supported";
break;
}
HandleWarning("Audio was restarted from error state because of " + reason);
}else{
HandleError("Audio failed to load");
}
},
canplay: function(){
this.loaded = true;
if( this.autoPlay ){
this.play();
}
}
});
Fiddler includes all the class i wrote, with a ton of hacks for the mess that is html5 audio cross browser support but it errors long before any of the hacks get called, so i dont think they are causing it.