- From: Chris Wilson <cwilso@google.com>
- Date: Tue, 9 Sep 2014 22:56:06 -0700
- To: Alex Russell <slightlyoff@google.com>
- Cc: "www-tag@w3.org List" <www-tag@w3.org>
- Message-ID: <CAJK2wqVE=watdN39-3P4kXnbW8WB99mTaQT1-zGaQT9vWHfbvA@mail.gmail.com>
An interesting question. If we were to expose the document's default output context (we don't), yes, releasing that would mute the page - or at least, the <audio> and <video> elements on the page. In order to expose that sanely, we'd also need to document how plugins hook in to the audio system, which is a whole other can of worms I'd rather not open just yet. On Tue, Sep 9, 2014 at 2:22 PM, Alex Russell <slightlyoff@google.com> wrote: > The pattern you're describing seems fine to me. What's the relationship > between this `release()` the document's default output context. Is it > possible to likewise "mute a page" by releasing that too? > > > On Fri, Aug 29, 2014 at 12:28 PM, Chris Wilson <cwilso@google.com> wrote: > >> Hello TAG! >> >> We're discussing an issue in the Web Audio API ( >> https://github.com/WebAudio/web-audio-api/issues/317) of the need for >> suspending and resuming AudioContexts for power consumption reasons. >> Alongside this, we've found the need to be able to release AudioContexts >> completely - in short, AudioContexts may be consuming system resources, and >> we need a way for developers to definitively state "I'm done with this >> now", aside from just releasing references and hoping the GC takes care of >> it. >> >> The current proposal >> <http://cwilso.github.io/web-audio-api/proposals.html#widl-AudioContext-release-Promise> >> is to add a method to the AudioContext interface: >> >> Promise release (); >> >> Releases the audio context, including any system resources used by it. >> This will not automatically release all AudioContext-created objects, >> unless other references have been released as well; however, it will >> forcibly release any system resources that might prevent additional >> AudioContexts from being created and used. The promise resolves when any >> AudioContext-creation-blocking resources have been released. >> >> Do you have any concerns over this pattern? >> >> Thanks, >> -Chris >> >> >
Received on Wednesday, 10 September 2014 05:56:34 UTC