2

I'm creating a multimedia project in Javascript and I'm having a heck of a time getting the Web Audio API to work in Opera 27 on any platform. Whenever I call decodeAudioData(...) to try to decode MP3 audio data and create a Buffer, the error callback gets called with null as the error. Nothing seems to work and the exact same code works in every other browser I've tried (IE, Safari, Chrome, Firefox). I've tried seeking for the MP3 frame header as per this helpful question and even that doesn't seem to help.

It seems like few people use the Web Audio API and even fewer use Opera, so searching around the web hasn't gotten me anywhere. Compatibility sites seem to indicate Opera supports MP3 decoding. Am I doing something subtle incorrectly? Does anyone have a workaround?

Here's a simple sample I threw together to exhibit this behavior; if anyone tried their hand at debugging it, I'd really appreciate it.

http://www.bubbulon.com/webaudiotest/

Community
  • 1
  • 1
Zack Schilling
  • 125
  • 1
  • 9
  • 1
    It seems that Opera doesn't support mp3 at least on OSX where I tested.. http://chinpen.net/decodethis/ – notthetup Mar 04 '15 at 08:09
  • 1
    Thanks for the testing website! So it looks like the following formats are unsupported by browsers: Chrome-AIFF, Safari-OGG, Opera-MP3,MP4,AIFF, Firefox-WAV,AIFF,MP4. So there does not exist a format that is compressed and works in all my targeted browsers. That is... vexing. I guess I'll switch to OGG and lose Safari or look into .js decoders... – Zack Schilling Mar 04 '15 at 14:03
  • I am suspecting Opera will implement mp3 in a bit. I see they already support it on Windows. I think mp3 will be the one format to rule them all in the end, just because of it's sheer popularity. – notthetup Mar 05 '15 at 04:22
  • Or possibly Opus? I think it's mandatory to implement for WebRTC, so guess even the free format hating browsers will get that :) – odinho - Velmont Mar 06 '15 at 09:27
  • Ah, MSIE will implement Opus in Spartan. Opera, Chrome, Firefox already has it. You can also possibly use Ogg Vorbis, and use ogv.js as fallback for IE and Safari; https://github.com/brion/ogv.js – odinho - Velmont Mar 06 '15 at 09:35

0 Answers0