简体   繁体   中英

HTTP “Content-Type” of “audio/mpeg” is not supported Issue On Firefox

Please check this url:

http://www.foodworlds.info/music/

after click on buttons (except the red one) should play small sound. However, It is working on my ' pc firefox/chrome ' and ' Mac chrome '. However, on mac firefox its throwing an error in firebug as like the below screen:

在此处输入图片说明

Anybody has idea how its happening so and how to get this resolved please?

You can try to add additional audio file formats for your <audio> tag in order to support more platforms and browsers:

<audio class="blue" controls>
  <source src="audio/test1.ogg" type="audio/ogg">
  <source src="audio/test1.mp3" type="audio/mpeg">
</audio>

It will also require you to place relevant resources on the server ( audio/test1.ogg in this case). There are a lot of online convertors (like http://media.io/ ) that may help you with converting files to other formats.

According to the Mozilla Developer Network :

To avoid patent issues, support for MPEG 4, H.264, MP3 and AAC is not built directly into Firefox. Instead it relies on support from the OS or hardware.

So using firefox, the support of some file formats like mp3 does not only depend on the browser version but also on the OS.

通过在sudo apt-get install ubuntu-restricted-extras中在Ubuntu中安装缺少的编解码器来解决此问题

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM