none
IE10/IE11支持<audio>标签吗? RRS feed

  • 问题

  • 我写了如下代码:

    <audio src="/soundtest.wav" controls=true>您的浏览器不支持 audio 标签。</audio>

    在Chrome浏览器都是正常可以播放声音的,但是在IE11,却出现下面的提示:

    连wav都不支持?那么他支持什么格式的音频文件?


    da jia hao!

    2013年12月24日 4:36

答案

  • Hi,

    As I know, The IE browser supports mp3 and acc audio. You can test it. And please refer the blog which might helpfull.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    2013年12月25日 1:23

全部回复

  • Hi,

    As I know, The IE browser supports mp3 and acc audio. You can test it. And please refer the blog which might helpfull.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    2013年12月25日 1:23
  • 微软也太恶心了。所有浏览器都支持的wav它就是不支持。你说好吧,我换成IE支持的MP3/ACC格式,可问题来了,有些浏览器不支持MP3,他妈的让我们开发人员无所适从!

    da jia hao!

    2014年1月6日 13:26
  • 你好,

    我完全理解你,但是目前每个浏览器对audio的支持格式都不一样,所以不可避免的给我们带来很多困扰。目前我们的一般做法是提供多个类型的文件类型,像下面的代码:

    <audio controls>
       <source src="horse.ogg" type="audio/ogg">
       <source src="horse.mp3" type="audio/mpeg">
       <....horse.wav>
     Your browser does not support the audio element.
     </audio> 

    这样浏览器会根据顺序检查是否支持该类型然后播放。

    希望对你有所帮助。


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    2014年1月7日 2:45