goldfire / howler.js

Javascript audio library for the modern web.
https://howlerjs.com
MIT License
23.97k stars 2.23k forks source link

Firefox 72.0.2: Bug with "decodeAudioData" #1283

Open patrick99e99 opened 4 years ago

patrick99e99 commented 4 years ago

I saw some previously closed issues with decodeAudioData, such as: https://github.com/goldfire/howler.js/issues/102

I am trying to release my game using howler, but I just found out that linux machines (linux kernel 5.5.1) running Firefox intermittently throw errors:

"the buffer passed to decodeAudioData contains an unknown content type"

and

"the buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully"

This is when using the .ogg file format, yet the browser can go directly to the url of any of these failed files and they all play just fine in Firefox.

If I change the src to use .webm, then it works fine...

.. but even if I do src: ['foo.ogg', 'foo.webm']

it blows up in firefox on the ogg, and doesn't fallback to webm.........

So, I guess my only option is don't use .ogg so that linux machines can play my game?! ugh.. This is why I hate software development in the modern age.

themoonrat commented 4 years ago

I think you only need m4a and webm, so why not go with those as your two formats? Or m4a, webm, ogg? You need multiple options no matter what, so if it's webm or ogg it doesn't matter.

patrick99e99 commented 4 years ago

@themoonrat .webm is much slower to load than ogg, so it's highly unfortunate. But yes, the fact that I need multiple options, no matter what, in the year 2020 is completely ridiculous and a testament to how bad software development in the modern age is.

oxk4r01 commented 4 years ago

I'm getting this error too, despite the format. I tried with ogg, webm, mp3, m4a... and the issue persists in Firefox and in Chrome too. Does somebody have some clue about the origin/solution of this?