首页 > 解决方案 > 使用 html5 音频标签在 Internet Explorer 9+ 中加载 AAC 音频文件显示无效源

问题描述

我想在 Internet Explorer 9+ 中使用 html5 音频标签加载 AAC 文件。相同的 html 文件在 Google Chrome 和 Microsoft Edge 上运行良好,但在 Internet Explorer 11 上显示“无效源”,如下图所示。MP3 文件工作正常。

我读到使用 mp4 作为 AAC 的 MIME 类型将解决问题。但显然它没有。AAC 文件 ex2.aac 和 html 文件具有相同的位置,所以它不是一个源的东西。

无效的来源 Internet Explorer

<!DOCTYPE html>
<html>
<body>
    <audio controls>
       <source src="ex2.aac" type="audio/mp4">
    </audio>
</body>
</html>                              

标签: htmlinternet-explorerhtml5-audioaac

解决方案


我已经重现了这个问题。这可能是某种错误,或者是 IE 默认行为。我将尝试提交有关此问题的反馈。

作为临时解决方法,我建议您可以尝试将资源从 .aac 文件转换为 mp3/mp4/m4a 文件。然后,显示它。


推荐阅读