I have some code to play sounds on the page, and it works with every browser, but IE8.
<audio id="myaudio" style="display:none;"></audio>
<script>
myaudio=document.getElementByID('myaudio');
myaudio.src='path/to/wav/mywav.wav';
</script>
which works fine for all tested browsers and plays file, everything works fine. All browsers, except IE8.
IE8 debugger says “Object doesn’t support this property or method” on myaudio=document.getElementByID('myaudio');.
Can’t figure out how to fix that.
The HTML
<audio>tag is a HTML 5 feature not supported in Internet Explorer until version 9. Hence why it does not work in verson 8.http://www.w3schools.com/tags/tag_audio.asp