oog not supported in IE .. mp3 however is supported in IE9 + ..
Try setting your preload attribute since IE9 may have problems with the preload attribute, so try setting it to preload="metadata"
<audio controls loop preload="metadata" id="musicGame"> <source src="mp3/ambient.ogg" type="audio/ogg" /> <source src="mp3/ambient.mp3" type="audio/mpeg" /> </audio>
- metadata : indicates that only audio metadata is selected (e.g. length); It also allows the browser to simply download enough file to extract metadata, such as size, size, and duration.
Sometimes preload="auto" may work, but you will need to check !?
You may need to specify your audio source in the audio elements src attribute, without a source child
<audio src="mp3/ambient.mp3" controls autoplay loop id="musicGame"> HTML5 audio not supported </audio>
Also using DOCTYPE rights for HTML5?
<!DOCTYPE html>
And do you use the right meta tag for IE9 like this?
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
And instead of using $('#musicGame')[0] you also tried to just use?
document.getElementById("musicGame");
Some useful links to resources:
Jonathan marzullo
source share