IE 9 has trouble loading HTML5 audio from Tomcat

早过忘川 提交于 2019-12-11 01:14:33

问题


My HTML5 audio player, when running inside of IE9, has trouble playing audio files located on a server running Apache Tomcat. For example, it'll never load the file at this path:

http://www.siascend.com/repository/audios/1017_Q1.mp3

but happily plays the same file located @:

http://hirebrodie.com/demo/audio/1017_Q1.mp3

Either path works fine when the player runs in Chrome or Safari. Why wouldn't it work in Internet Explorer? Is this a known issue with the IE implementation of HTML5 audio?


回答1:


Tomcat by default specifies for a .mp3 extension the MIME type audio/x-mpeg.Changing this default to audio/mpeg solves the issue.In other words IE9 is NOT comfortable with audio/x-mpeg but accepts audio/mpeg as MIME type of a resource for an tag.

Source: http://social.msdn.microsoft.com/Forums/pl-PL/iewebdevelopment/thread/b4f58d95-ac27-4a28-a4ae-86477ddfc74f



来源:https://stackoverflow.com/questions/14024471/ie-9-has-trouble-loading-html5-audio-from-tomcat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!