Intent to Ship: AudioContext.setSinkId()

332 views
Skip to first unread message

Ajay Rahatekar

unread,
Aug 30, 2022, 1:02:18 PM8/30/22
to blink-dev, hongchan, alv...@chromium.org, mjwi...@chromium.org, Ben Morss

Contact emails

hong...@chromium.org, alv...@chromium.org, mjwi...@chromium.org 


Explainer

None


Specification

https://github.com/WebAudio/web-audio-api/pull/2498


Summary

AudioContext.setSinkId sets the ID of the audio device to use for output. This allows the AudioElement to route audio to a connected output device of user's choosing.



Blink component

Blink>WebAudio


TAG review

This is a small API change within Web Audio API. The WG was advised that this is too small for the TAG review.


TAG review status

Not applicable


Risks



Interoperability and Compatibility



Gecko: Positive (https://github.com/WebAudio/web-audio-api/issues/2400) Mozilla is co-developing the spec change.


WebKit: No signal


Web developers: Positive (https://github.com/WebAudio/web-audio-api/issues/2400) Many developers chimed in the spec issue and the implementation crbug entry (crbug.com/1216187). Also several partners expressed the need for this API. We have not seen any negative feedback on this.


Other signals:


WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability

This adds a new method to AudioContext; the WebIDL change will be addressed by the DevTools automatically.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

This is a part of Web Audio API, which is available on all platforms.



Is this feature fully tested by web-platform-tests?

Yes. The WPT will be added for this feature.


Flag name

–enable-blink-features=AudioContextSetSinkId


Requires code in //chrome?

False


Tracking bug

https://crbug.com/1355977


Launch bug

https://crbug.com/1216187


Estimated milestones

108



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5190163462881280


This intent message was generated by Chrome Platform Status.



--
Ajay Rahatekar | Technical Program Manager | ajayra...@google.com | 650-797-1279

Ajay Rahatekar

unread,
Aug 30, 2022, 2:46:42 PM8/30/22
to blink-dev, Ajay Rahatekar, hongchan, alv...@chromium.org, mjwi...@chromium.org, Ben Morss
Apologies, the tracking and launch bugs in the original email are interchanged. The correct details are:

Tracking bug


Alex Russell

unread,
Aug 30, 2022, 2:54:33 PM8/30/22
to Ajay Rahatekar, blink-dev, alv...@chromium.org, mjwi...@chromium.org, Ben Morss
Doesn't this require at least consulting former TAG members before asserting no review is required?

For avoidance of delay, please at least file an FYI with the TAG.

Regards, 

Alex

--
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+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/34425811-7d74-4b1d-ad7a-cddeb7a0aadcn%40chromium.org.

Hongchan Choi

unread,
Aug 30, 2022, 3:20:10 PM8/30/22
to Alex Russell, Ajay Rahatekar, blink-dev, mjwi...@chromium.org, Ben Morss
Hi Alex,

In one of our WG teleconferences, we verbally asked the W3C liaison (Chris Lilley) about the TAG review but I was told this might be "too small to initiate the review". I can certainly start the TAG review (or FYI) if that's necessary.

Cheers,
Hongchan

Philipp Hancke

unread,
Aug 31, 2022, 1:46:45 AM8/31/22
to Ajay Rahatekar, blink-dev, hongchan, alv...@chromium.org, mjwi...@chromium.org, Ben Morss
the ID of the sink needs to be obtained from navigator.mediaDevices.enumerateDevices because https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/selectAudioOutput is not implemented anywhere?

--
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+...@chromium.org.

Hongchan Choi

unread,
Aug 31, 2022, 10:58:35 AM8/31/22
to Alex Russell, Ajay Rahatekar, blink-dev, mjwi...@chromium.org, Ben Morss
Re: Alex - we kicked off the TAG review: https://github.com/w3ctag/design-reviews/issues/766

Hongchan Choi

unread,
Aug 31, 2022, 11:08:46 AM8/31/22
to Philipp Hancke, Ajay Rahatekar, blink-dev, alv...@chromium.org, mjwi...@chromium.org, Ben Morss
1. Yes. The lack of implementation is one issue, but the relationship between selectAudioOutput() and Web Audio API is not really specified or documented.
2. Since AudioElement.setSinkId() has been used for years, we believe it makes more sense to use the same pattern for its low-level counterpart - Web Audio API's AudioContext. This approach is more specific and focused.

Chris Harrelson

unread,
Aug 31, 2022, 11:54:59 AM8/31/22
to Hongchan Choi, Philipp Hancke, Ajay Rahatekar, blink-dev, alv...@chromium.org, mjwi...@chromium.org, Ben Morss
Thanks for filing the TAG review. Could you also file for official positions from Mozilla and Webkit also? Thanks. I'm sure you're right about Mozilla, but they've requested going through the process in the past for other intents.

Ajay Rahatekar

unread,
Aug 31, 2022, 5:54:14 PM8/31/22
to Chris Harrelson, Hongchan Choi, Philipp Hancke, blink-dev, alv...@chromium.org, mjwi...@chromium.org, Ben Morss

Ajay Rahatekar

unread,
Sep 13, 2022, 10:16:15 AM9/13/22
to blink-dev, Ajay Rahatekar, hongchan, philipp...@googlemail.com, blink-dev, alv...@chromium.org, mjwi...@chromium.org, Ben Morss, Chris Harrelson
Please let us know of any other questions, concerns or observations. 

Thanks in advance.

-Ajay

Yoav Weiss

unread,
Sep 14, 2022, 11:43:26 AM9/14/22
to blink-dev, ajayra...@google.com, hongchan, philipp...@googlemail.com, blink-dev, alv...@chromium.org, mjwi...@chromium.org, mo...@google.com, Chris Harrelson
On Tuesday, September 13, 2022 at 4:16:15 PM UTC+2 ajayra...@google.com wrote:
Please let us know of any other questions, concerns or observations. 

Thanks in advance.

-Ajay

On Wednesday, August 31, 2022 at 2:54:14 PM UTC-7 Ajay Rahatekar wrote:
On Wed, Aug 31, 2022 at 8:54 AM Chris Harrelson <chri...@chromium.org> wrote:
Thanks for filing the TAG review. Could you also file for official positions from Mozilla and Webkit also? Thanks. I'm sure you're right about Mozilla, but they've requested going through the process in the past for other intents.

On Wed, Aug 31, 2022 at 8:08 AM Hongchan Choi <hong...@chromium.org> wrote:
1. Yes. The lack of implementation is one issue, but the relationship between selectAudioOutput() and Web Audio API is not really specified or documented.
2. Since AudioElement.setSinkId() has been used for years, we believe it makes more sense to use the same pattern for its low-level counterpart - Web Audio API's AudioContext. This approach is more specific and focused.


On Tue, Aug 30, 2022 at 10:46 PM Philipp Hancke <philipp...@googlemail.com> wrote:
the ID of the sink needs to be obtained from navigator.mediaDevices.enumerateDevices because https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/selectAudioOutput is not implemented anywhere?

Am Di., 30. Aug. 2022 um 19:02 Uhr schrieb 'Ajay Rahatekar' via blink-dev <blin...@chromium.org>:

The PR hasn't landed yet, and Mozilla's (positive) position states that there are some details to be determined still.
Can you expand on that? What's holding the PR from landing?

Hongchan Choi

unread,
Sep 14, 2022, 11:56:13 AM9/14/22
to Yoav Weiss, blink-dev, ajayra...@google.com, philipp...@googlemail.com, alv...@chromium.org, mjwi...@chromium.org, mo...@google.com, Chris Harrelson
The original proposal didn't work out well because of the type confusion in the union (DOMString or AudioSinkCategory) - they are both DOMString in the end. So we are considering two options:

There's no disagreement. We just need to make a decision, and that is planned during this TPAC.

Let me know if you have any questions!

Thanks,
Hongchan

Yoav Weiss

unread,
Sep 20, 2022, 5:21:13 AM9/20/22
to Hongchan Choi, blink-dev, ajayra...@google.com, philipp...@googlemail.com, alv...@chromium.org, mjwi...@chromium.org, mo...@google.com, Chris Harrelson
Once the PR lands, this seems fine to ship (IMO). Let us know when that happens :)

Mike West

unread,
Oct 4, 2022, 4:16:26 AM10/4/22
to blink-dev, Yoav Weiss, blink-dev, ajayra...@google.com, philipp...@googlemail.com, alv...@chromium.org, mjwi...@chromium.org, mo...@google.com, Chris Harrelson, hongchan
Friendly ping. It looks like conversation died down ~2 weeks ago. Has there been movement in the meantime, or should we consider this intent on hold for a while?

-mike

Hongchan Choi

unread,
Oct 4, 2022, 10:41:00 AM10/4/22
to Mike West, blink-dev, Yoav Weiss, ajayra...@google.com, philipp...@googlemail.com, alv...@chromium.org, mjwi...@chromium.org, mo...@google.com, Chris Harrelson
The spec PR is approved and we'll be landing the spec change today or tomorrow. In the meantime, we would like to answer any questions for the Blink API Owner approval.

Cheers,
Hongchan

Hongchan Choi

unread,
Oct 4, 2022, 5:30:23 PM10/4/22
to Mike West, blink-dev, Yoav Weiss, ajayra...@google.com, philipp...@googlemail.com, alv...@chromium.org, mjwi...@chromium.org, mo...@google.com, Chris Harrelson

Mike Taylor

unread,
Oct 4, 2022, 6:08:10 PM10/4/22
to Hongchan Choi, Mike West, blink-dev, Yoav Weiss, ajayra...@google.com, philipp...@googlemail.com, alv...@chromium.org, mjwi...@chromium.org, mo...@google.com, Chris Harrelson

TAMURA, Kent

unread,
Oct 4, 2022, 6:54:23 PM10/4/22
to blink-dev, Hongchan Choi, Mike West, Yoav Weiss, ajayra...@google.com, philipp...@googlemail.com, alv...@chromium.org, mjwi...@chromium.org, mo...@google.com, Chris Harrelson, Mike Taylor
LGTM2.
Mozilla is positive. Interoperability risk looks small.




--
TAMURA Kent
Software Engineer, Google


Yoav Weiss

unread,
Oct 5, 2022, 12:59:34 AM10/5/22
to TAMURA, Kent, blink-dev, Hongchan Choi, Mike West, ajayra...@google.com, philipp...@googlemail.com, alv...@chromium.org, mjwi...@chromium.org, mo...@google.com, Chris Harrelson, Mike Taylor
LGTM3
Reply all
Reply to author
Forward
0 new messages