<audio>的src地址是通过ajax从后端请求过来的,文件是wav格式的,在谷歌浏览器可以正常播放,到ie11显示无效源。
html:
<audio class="mark_voice" src="" controls="controls"></audio>
JS:
function getInfo(id) {
$.ajax({
type: 'post',
url: '/web/oneillegalMessages',
dataType: 'json',
data: { 'id': id },
async: false,
success: function(data) {
var list = data.data;
if (data.flag == "success") {
$('.mark_voice').attr("src", list.wav);
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log(XMLHttpRequest.status);
console.log(XMLHttpRequest.readyState);
console.log(textStatus);
}
})
}
IE 11 不支持
wav
格式,建议切换mp4
源。