Closed Bug 1006624 Opened 12 years ago Closed 7 years ago

Support multiple AudioContext's in Web Audio Editor

Categories

(DevTools Graveyard :: Web Audio Editor, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: jsantell, Unassigned)

Details

Low priority IMO, but something that we should handle
Errors due to this popped up in bug 1054003. We should atleast figure out a way to associate which nodes are in which context (easy), but heuristically, decide which context to show for now. In this case, howler was executed twice on the page (IIFE, and it was loaded via script tag twice), which instantiates a new context[1], creates some nodes, but does this twice, but only the second context is what the app actually uses. If there's a smart way to handle this without maintaining a structure for n+ contexts on both sides, let's do it, otherwise that may be necessary. [1]https://github.com/goldfire/howler.js/blob/v1.1.15/howler.js
Or, as another stopgap, display a message in the tool when 2+ contexts were created on a page, and the tool currently does not support that. That would be a bit challenging too, as we detect context creation not by constructor, but by the first method called. Shouldn't be bad though, just store context for the current tab actor.
Assignee: nobody → jsantell
What's your use case for this? Imagining tabbable context viewers, so you can view one context at a time, rather than mixing them on the same graph.
Flags: needinfo?(padenot)
What about graphs connected to each other, using createMediaStreamSource, and createMediaStreamDestination ? I'm basically working on stuff where you have multiple contexts, and I opened the devtools to double-check something on the Web Audio graph, and I found that it did not work.
Flags: needinfo?(padenot)
How would graphs be connected to each other with the media stream nodes? Those are still created per-context, yes? Two graphs could use the same stream (and could use the same audio element, or possibly the same audio buffer too [not sure if buffers are shared]).
Assignee: jsantell → nobody
Product: Firefox → DevTools
The code behind DevTools:Web Audio Editor has gone away. Closing this bug as INVALID
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.