- From: Chris Wilson <cwilso@google.com>
- Date: Mon, 10 Jun 2013 09:23:02 -0700
- To: Chris Lowis <chris.lowis@bbc.co.uk>
- Cc: "Robert O'Callahan" <robert@ocallahan.org>, Olivier Thereaux <Olivier.Thereaux@bbc.co.uk>, "public-audio@w3.org" <public-audio@w3.org>
- Message-ID: <CAJK2wqWdCwO1zM8od7g4JQ1A+rs2=-KYKEfCpV_AYZkyaPZoSA@mail.gmail.com>
I would actually strongly suggest that developers use a monkey patch library, like my paired set: https://github.com/cwilso/AudioContext-MonkeyPatch: This library should be used for new projects, which are written to the official Web Audio specification, and it should monkey-patch the calls on systems that may not support the most modern definitions (e.g. patching AudioContext to webkitAudioContext, and start() calls get patched to call noteOn()). You could use this, for example, to get a properly written Web Audio app to work on iOS today. https://github.com/cwilso/webkitAudioContext-MonkeyPatch: This library can be used for old apps, written to webkitAudioContext implementations, to get them working on proper spec-compliant implementations of AudioContext (e.g. Firefox), without having to rewrite all your code. This is kind of a cheap way to do this (obviously, for any significant app you should likely revise your code), but it makes it quick and easy to get old code working on Firefox if nothing else. The big reason for not evangelizing the use of (AudioContext || webkitAudioContext) is that it actually makes it *harder* to consider changing names (between webkitAudioContext and AudioContext), as the developers will just patch that in, and won't think about finer-grained changes later on. Monkey-patch libraries can be updated independently, though. (As an aside - I'd love help testing and evangelizing these libraries. Or, if someone wants to take them over I'm happy to have that happen too.) -Chris On Mon, Jun 10, 2013 at 3:25 AM, Chris Lowis <chris.lowis@bbc.co.uk> wrote: > > Robert O'Callahan writes: > > There's no reason not to evangelize the use of (AudioContext || > > webkitAudioContext) immediately. > > I've been doing that a little bit - sending patches to code on Github > that I find. More specifically I've been suggesting that people use > Chris W's > > https://github.com/cwilso/AudioContext-MonkeyPatch > > So that they can write code "per spec" but have it work on > vendor-prefixed implementations. > > Cheers, > > Chris > > > ----------------------------- > http://www.bbc.co.uk > This e-mail (and any attachments) is confidential and > may contain personal views which are not the views of the BBC unless > specifically stated. > If you have received it in > error, please delete it from your system. > Do not use, copy or disclose the > information in any way nor act in reliance on it and notify the sender > immediately. > Please note that the BBC monitors e-mails > sent or received. > Further communication will signify your consent to > this. > ----------------------------- >
Received on Monday, 10 June 2013 16:23:30 UTC