I have jquery code that generates audio tag. The code generated works well in FF and Chrome but not in IE9. Below is the code
$(document).ready(function () {
var source = "/TTS.aspx?tts=" + $('.sound_hidden_field').text();
$('body').append("<audio style='display:block' src='" + source + "' controls autoplay type='audio/wav'></audio>");
});
I have also tried
var s = "/TTS.aspx?tts=" + $('.sound_hidden_field').text();
var audioInterview = new Audio(s);
audioInterview.play();
But the code is just not working in IE. A black rectangle appears with cross at the center. Just like image tag when no image is to be found.
html generated is being passed by w3c validator.
Thanks
IE9 does not support HTML5 audio with a
.wavformat..mp3only. See http://www.w3schools.com/html/html5_audio.asp for a table of compatibility.