Re: Max number og hardware contexts between tabs

To this point, after accidentally creating multiple context way too many
times.

I have almost gotten to the point of having a window.audioContext variable
which references the only AudioContext that I initialize once, and use
everywhere, in most of my projects, libraries.

I'm yet to encounter the downside of such an approach.


On Thu, Aug 28, 2014 at 12:17 AM, Chris Wilson <cwilso@google.com> wrote:

> It's because tabs are shared in a process, sometimes.  (Particularly in
> the same domain, if I recall correctly, but I could be wrong.)
>
> We're looking in to this more, but in short - don't create extra
> AudioContexts unless there's some really, really important reason for
> needing them.  In general, use one per app.  (We're working to make that
> easier, with the suspend/resume/release proposal.)
>
>
> On Wed, Aug 27, 2014 at 9:13 AM, Yehonathan Sharvit <viebel@gmail.com>
> wrote:
>
>>  Hello,
>>
>> I don’t understand why the max number of contexts is aggregated between
>> two tabs.
>>
>> 1. On one page I am creating 4 Audio contexts.
>> 2. I am opening a tab from this page
>> 3. On the new tab I am creating 4 Audio contexts.
>>
>> Results:
>> Failed to construct 'AudioContext': number of hardware contexts reached
>> maximum
>>
>>  Here is a repro:
>>  http://jsfiddle.net/s7z74b36/8/
>>
>>  Tested on Chrome 36
>>
>>
>> Is there a way to overcome this - weird -  limitation?
>>
>>
>> Thanks.
>>
>
>

Received on Thursday, 28 August 2014 00:07:52 UTC