Intent to Experiment: AudioWorklet

187 views
Skip to first unread message

Hongchan Choi

unread,
Nov 13, 2017, 1:02:33 PM11/13/17
to blink-dev

Contact emails

hong...@chromium.org, rt...@chromium.org


Spec

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


Summary

The AudioWorklet exposes the low-level audio processing capability to web developers within Web Audio API's ecosystem. It started as a replacement of ScriptProcessorNode, which revealed serious design flaws over past years, but AudioWorklet offers low latency, runs on render thread and empowers developers with extensible interface.


Intent to Implement: https://groups.google.com/a/chromium.org/d/topic/blink-dev/fBfWECEGZa8/discussion


Goals for experimentation

Origin Trials will provide us with the tangible metric on how AudioWorklet can replace ScriptProcessorNode without critical issues. Also we want to ensure that the new API design and the implementation meet the developer expectation before the stable release.


Pros and Cons of pre-launch evaluation


Pros

  • More focused/detailed feedback from the trial participants.

  • The previous iteration of this functionality - ScriptProcessorNode - revealed a design flaw. The OT will provide us with the tangible metric on how AudioWorklet can replace ScriptProcessorNode without potential issues.

  • Within the framework of Origin Trials, we can make the stable launch with more confidence.


Cons

  • WebAudio has been heavily driven by independent/individual/academic developers.  Most of the community that we expect to initially use AudioWorklet do not have massive audiences where the burden of doing an OT-based releases are justified.

  • The design of AudioWorklet is already reviewed by TAG. AudioWorkletNode is fundamentally better than ScriptProcessorNode by design. Proving something obvious might be meaningful, yet redundant when the engineering resources are limited.

  • WebAudio industry partners might not be capable of partial exposure or testing, so they will not include the AudioWorklet until it is shipped in the stable.

  • Measuring the audio performance is often difficult to do correctly due to the hardware dependency, so the direct/personal contact with participants is already inevitable. When there is an active channel between WebAudio team and the developers, another formal procedure is extra burden considering WebAudio team is only 2 SWEs with no PM.


Experimental timeline

Enabled: Jan 23th, 2018: Chrome 64 Stable

Disabled: Mar 6th, 2018: Chrome 65 Stable


Any risks when the experiment finishes?

The sites will lose the ability to run the script code via AudioWorklet interface. We expect the participants can detect the token expiration and adapt the behavior accordingly. (e.g. fall back to ScriptProcessorNode or warn visitors for absence of the feature)


Ongoing technical constraints

None.


Will this feature be supported on all five Blink platforms supported by Origin Trials (Windows, Mac, Linux, Chrome OS, and Android)?

Yes.


OWP launch tracking bug

https://crbug.com/469639


Link to entry on the feature dashboard

https://www.chromestatus.com/feature/4588498229133312


Chris Harrelson

unread,
Nov 13, 2017, 1:53:07 PM11/13/17
to Hongchan Choi, blink-dev
LGTM

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGJqXNsUJfVQvaDjNJuuZmHUSPjbqXH%2B8bwZJJCHjj8TeT0p8w%40mail.gmail.com.

Jochen Eisinger

unread,
Nov 24, 2017, 9:18:27 AM11/24/17
to Chris Harrelson, Hongchan Choi, blink-dev
wondering whether AudioWorklet is also restricted to secure contexts?

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

Anne van Kesteren

unread,
Nov 24, 2017, 9:29:51 AM11/24/17
to Jochen Eisinger, Chris Harrelson, Hongchan Choi, blink-dev
On Fri, Nov 24, 2017 at 3:18 PM, Jochen Eisinger <joc...@chromium.org> wrote:
> wondering whether AudioWorklet is also restricted to secure contexts?

Seems that was mistakenly declared out-of-scope:

https://github.com/WebAudio/web-audio-api/issues/1436

I asked for that issue to be reopened.


--
https://annevankesteren.nl/

Hiroki Nakagawa

unread,
Nov 26, 2017, 9:30:14 PM11/26/17
to Anne van Kesteren, Jochen Eisinger, Chris Harrelson, Hongchan Choi, blink-dev
Implementation-wise, all worklets (Paint, Animation and AudioWorklet) are now restricted to secure contexts:

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

Jochen Eisinger

unread,
Nov 27, 2017, 3:06:37 AM11/27/17
to Hiroki Nakagawa, Anne van Kesteren, Chris Harrelson, Hongchan Choi, blink-dev

Cool, thanks for clarifying

Hongchan Choi

unread,
Nov 27, 2017, 12:54:05 PM11/27/17
to Jochen Eisinger, Hiroki Nakagawa, Anne van Kesteren, Chris Harrelson, blink-dev
Sorry for the late response - just got back from US holidays.

I also added a comment on the spec issue. We have a PR under the work, and it will be merged soon.
Reply all
Reply to author
Forward
0 new messages