问题
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