rserota / wad

Web Audio DAW. Use the Web Audio API for dynamic sound synthesis. It's like jQuery for your ears.
MIT License
1.9k stars 160 forks source link

Cross browser issues? #11

Closed coleww closed 9 years ago

coleww commented 10 years ago

"Cross-Browser Compatibility I tried to future-proof Wad.js by using standards-compliant methods, but the cross-browser compatibility is still not great. It works best in Chrome, decently in Safari for iOS, and it works very poorly in Firefox. I have not tested it in any other browsers. I would greatly appreciate contributions to help Wad.js run optimally in any browser that supports Web Audio, especially mobile browsers."

What sorts of issues exists for cross-browser and mobile stuff? I'm interested in working on this.

rserota commented 10 years ago

There are a bunch of issuse, but I don't have a full list of everything that doesn't work. Some of the problems have to do with audioContext and navigator.getUserMedia being called different things in different browsers. If Wad can't find an audio context, then the whole thing won't work (i'm pretty sure this is the case in IE). If Wad can't find navigator.getUserMedia, then the microphone won't work (I think this is the case in pretty much every browser, except chrome).

Lots of browsers don't support various audio file formats, so Wad needs to have some kind of fallback system, so you can specify, for example, a WAV and an MP3 for a given sound, so that a client can use either if one of them doesn't work.

Mobile browsers have additional problems. I think most of the functionality is working in safari for iOS, but the microphone is tricky. I think there are additional security issues with accessing the microphone on a mobile device from a web app.

Thanks for looking into this. I'm curious to hear about anything you learn.

coleww commented 10 years ago

I'm definitely down to dig into the audio format fallback to start out. I think getting mic input on mobile is less important unless someone requests it especially if there are security barriers to overcome, but I can definitely investigate the vendor prefix dance for desktop mics. At the very least some graceful degradation, make sure that things dont totally fail if one getUserMedia fails.

I'm working on a web socket mobile-phone symphony, so I definitely want to make sure that samples or oscillators work well across mobile browsers.

rserota commented 9 years ago

The Web Audio Api seems to still be in flux, and Chrome appears to be the only browser today that natively supports the Web MIDI API, which is really important for me. I'm going to table this issue until these APIs seem more stable.