Intent to Implement: AudioWorklet

173 views
Skip to first unread message

Hongchan Choi

unread,
Sep 2, 2016, 1:18:56 PM9/2/16
to blink-dev
Contact emails

Spec

Summary
The AudioWorklet object allows developers to supply JavaScript code to process audio on the rendering thread, supporting custom AudioNodes. This processing mechanism ensures the synchronous execution of the script code with other built-in AudioNodes in the audio graph.

Motivation
The ScriptPrcocessor caused several issues (i.e. audio glitch, latency and flooding the main thread) so AudioWG decided to deprecate it over the new AudioWorklet API, that ensures the synchronous audio processing of the user-supplied JS code along with the native parts of Web Audio API.

This has been the most anticipated WebAudio feature from the dev community.
- crbug.com/469639 (36 stars)

Interoperability risk
Firefox: Public support (bugzilla entry)
Edge: No public signals
Safari: No public signals
Web developers: Positive (See links in Motivation)

Compatibility risk
This is a new feature, so it does not introduce any compat risk.

Ongoing technical constraints
None.

Will this feature be supported on all six Blink platforms?
Yes.

OWP launch tracking bug

Link to entry on the Chrome Platform Status

Requesting approval to ship?
No.

Domenic Denicola

unread,
Sep 2, 2016, 1:33:40 PM9/2/16
to Hongchan Choi, blink-dev
Hi Hongchan,

From: Hongchan Choi [mailto:hong...@chromium.org]

> Spec
> https://webaudio.github.io/web-audio-api/#AudioWorklet

I know we've communicated before on how to design this, but I just wanted to make sure you were aware that the spec as it stands is not in a state that could be interoperably implemented by multiple user agents. Notably, it doesn't actually have any normative spec text and algorithms, just vague descriptions of what the methods should do; and the IDL has several problems that make it not usable as-is.

I imagine you plan to work through these aspects of the spec as you implement, using implementation feedback to guide the process. That makes sense to me; after all, this isn't an intent-to-ship. But I filed a number of issues at https://github.com/WebAudio/web-audio-api/issues/created_by/domenic which could be helpful in working on this feature and in attempting to improve the interop risk when that time comes.

Best,
-Domenic

Hongchan Choi

unread,
Sep 3, 2016, 10:20:12 AM9/3/16
to Domenic Denicola, blink-dev
Thanks Domenic,

I am still addressing issues you raised via the issue tracker. One of them is using the normative spec text and algorithms. My first attempt on that end is currently under the review. I sent out the intent simply because I am starting to work on the exploratory implementation in Blink under the experimental flag. However, I can definitely withdraw the intent and come back later when the spec work is completely stable.

Best,
-Hongchan

Domenic Denicola

unread,
Sep 3, 2016, 10:25:26 AM9/3/16
to Hongchan Choi, blink-dev
From: Hongchan Choi [mailto:hong...@chromium.org]

> I am still addressing issues you raised via the issue tracker. One of them is using the normative spec text and algorithms. My https://github.com/WebAudio/web-audio-api/pull/945 on that end is currently under the review. I sent out the intent simply because I am starting to work on the exploratory implementation in Blink under the experimental flag. However, I can definitely withdraw the intent and come back later when the spec work is completely stable.

Oh, sorry, I didn't mean to imply you should withdraw the intent! It makes sense to work on implementation while the spec is still in progress. These are just things that should be addressed before the intent to *ship*.

I'll check out https://github.com/WebAudio/web-audio-api/pull/945; I'm sorry I didn't see that before filing the issues!

Hongchan Choi

unread,
Sep 3, 2016, 10:37:38 AM9/3/16
to Domenic Denicola, blink-dev
Thanks for the feedback! The list is super helpful and I'll address them soon.

Rick Byers

unread,
Sep 8, 2016, 10:18:40 AM9/8/16
to Hongchan Choi, Domenic Denicola, blink-dev
I'm excited to see this moving along.  IMHO providing primitives for performance isolation is a key part of making it possible for web developers to reason about performance in large apps composed of many pieces.  I expect that (like Compositor Worker now AnimationWorklet) it'll take a bunch of experimentation, debate and consensus building until we're really comfortable enough with the cost/benefit tradeoff of permanently adding this power to the web, but I'm optimistic that's it an achievable goal!

Reply all
Reply to author
Forward
0 new messages