Intent to Prototype: Shared AudioWorklet port

24 views
Skip to first unread message

Chromestatus

unread,
12:46 AM (3 hours ago) 12:46 AM
to blin...@chromium.org, hoch...@chromium.org
Contact emails
hoch...@chromium.org

Explainer
https://github.com/WebAudio/web-audio-api/issues/2456
https://github.com/WebAudio/web-audio-api/pull/2507

Specification
https://webaudio.github.io/web-audio-api/#dom-audioworklet-port

Summary
Exposes the spec-defined shared MessagePort on AudioWorklet and AudioWorkletGlobalScope. This lets web applications communicate directly between the main thread AudioWorklet and the AudioWorkletGlobalScope without creating a bootstrap AudioWorkletProcessor only for message passing. This aligns Chromium with the current Web Audio specification and existing interoperable behavior.

Blink component
Blink>WebAudio

Web Feature ID
audio-worklet

Motivation
The Web Audio specification defines a shared MessagePort on AudioWorklet and AudioWorkletGlobalScope. This lets web applications communicate directly between the main thread and the AudioWorkletGlobalScope without creating a bootstrap AudioWorkletProcessor or AudioWorkletNode only for message passing. Without this capability, developers have to keep workaround code that instantiates dummy processors solely to transfer initialization data or control messages into the worklet global scope. This adds code complexity and runtime overhead, and prevents cleanup of compatibility hacks in upstream projects. This change aligns Chromium with the current Web Audio specification and existing interoperable behavior. It also restores compatibility for real-world code that expects audioContext.audioWorklet.port to exist, including Emscripten-generated applications and demos such as the MOD player discussed in the linked issue. Relevant specification and ecosystem discussion: - https://github.com/WebAudio/web-audio-api/issues/2456 - https://github.com/WebAudio/web-audio-api/pull/2507 - https://github.com/emscripten-core/emscripten/pull/25354

Initial public proposal
No information provided

Goals for experimentation
None

Requires code in //chrome?
False

Tracking bug
https://issues.chromium.org/issues/446920095

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5079784523694080?gate=5124905436839936

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages