borismus/sonicnet.js — pull request #3 by mildmojo (2014-01-23 06:11:26+00:00)
Title: Add compatibility with non-prefixed WebAudio API (Firefox)

Adds partial support for Firefox. No more error messages.

As I understand it, Chrome is maintaining an old prefixed version of the Web Audio API. Firefox (and probably other non-webkit browsers) uses the newer, non-prefixed, finalized spec. This branch favors the new standard spec but falls back to the prefixed version when necessary. Firefox is the [only browser](http://caniuse.com/#feat=audio-api) that's implemented the standard so far, but other non-webkit browsers will be using it as they add support for Web Audio.

Testing with the emoticon demo, Firefox for Linux/Mac/Android (2.3+) can send but not receive emoticons. Chrome (Mac) and Chromium (Linux) can send and receive emoticons. I haven't yet spent any time analyzing the decoder code to see if there's a problem introduced in the new API. I may not be the best person to do that.

While Chrome for Android supports getUserMedia, it's a [mixed bag](http://stackoverflow.com/questions/20054273/recording-audio-in-chrome-for-android-using-web-audio-api-and-navigator-getuserm) and wasn't supported on an Android 4.0 device I tested. :-1:

Mozilla's guide, [Porting webkitAudioContext code to standards based AudioContext](https://developer.mozilla.org/en-US/docs/Web_Audio_API/Porting_webkitAudioContext_code_to_standards_based_AudioContext), was very helpful.