Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output Device Selection in Web Audio API: AudioContext.setSinkId() #766

Closed
1 task done
hoch opened this issue Aug 30, 2022 · 8 comments
Closed
1 task done

Output Device Selection in Web Audio API: AudioContext.setSinkId() #766

hoch opened this issue Aug 30, 2022 · 8 comments
Assignees
Labels
Progress: review complete Resolution: satisfied The TAG is satisfied with this design Review type: CG early review An early review of general direction from a Community Group Topic: media

Comments

@hoch
Copy link

hoch commented Aug 30, 2022

Hello,

I'm requesting a TAG review of AudioContext.setSinkId().

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.

Further details:

We'd prefer the TAG provide feedback as (please delete all but the desired option):
☂️ open a single issue in our GitHub repo for the entire review

@hoch hoch added Progress: untriaged Review type: CG early review An early review of general direction from a Community Group labels Aug 30, 2022
@hoch
Copy link
Author

hoch commented Sep 7, 2022

Adding @svgeesus for visibility: we initially discussed this feature is too small for TAG review, but I am requesting it here per Chrome's launch process.

@svgeesus
Copy link

svgeesus commented Sep 9, 2022

TAG review of small, focused features is perfectly fine.

@svgeesus
Copy link

svgeesus commented Sep 9, 2022

some useful abilities will also be included: a) an ability to specify an output device in the AudioContext’s constructor and b) an ability to specify a “silent output device” to minimize the power consumption.

A sentence motivating the user need for each of those two improvements would be a helpful addition to the explainer. Why does WebAudio API need them? Why does HTML not have them, and should it?

@hoch
Copy link
Author

hoch commented Sep 12, 2022

Thanks for the feedback, @svgeesus! I've added the "Motivation" section on the explainer. (i.e. public design doc above)

Why does HTML not have them, and should it?

For this question, I am not sure if I can answer it with confidence. For what it's worth, there's a method selectAudioOutput() under MediaDevices, but I don't think that is suitable for Web Audio API.

@torgo torgo self-assigned this Sep 29, 2022
@maxpassion maxpassion self-assigned this Sep 29, 2022
@torgo torgo added this to the 2022-10-10-week milestone Sep 29, 2022
@maxpassion
Copy link

maxpassion commented Oct 11, 2022

Thanks for the feedback, @svgeesus! I've added the "Motivation" section on the explainer. (i.e. public design doc above)

Why does HTML not have them, and should it?

For this question, I am not sure if I can answer it with confidence. For what it's worth, there's a method selectAudioOutput() under MediaDevices, but I don't think that is suitable for Web Audio API.

Hi @hoch, you mentioned that selectAudioOutput() is not suitable for Web Audio API, could you update the explainer document to explain the reason behind the design choices?

@hoch
Copy link
Author

hoch commented Oct 13, 2022

@maxpassion Here's my response to the question (link):

Using selectAudioOutput() under MediaDevices:

Although the Audio Output Device API spec mentions briefly about AudioContext, it lacks the detail of how Web Audio API is controlled by this method. (As of writing, no browser has implemented this feature) Additionally, the method is designed to change the audio output device for all instances of MediaElement and AudioContext in a document. Even with the implementation of selectAudioOutput(), AudioContext doesn't have the ability to set the output device separately whereas AudioElement does.

@torgo
Copy link
Member

torgo commented Oct 18, 2022

Thanks for this review request. We're happy to see this move forward and we're especially glad to see it do so with multiple stakeholder support and the attention to privacy considerations. We are slightly concerned that some of the functionality is duplicated elsewhere in the platform, however we understand the different context. Can you please move the explainer into a markdown file in the appropriate repo? 🎶

@torgo torgo closed this as completed Oct 18, 2022
@torgo torgo added Progress: review complete Resolution: satisfied The TAG is satisfied with this design labels Oct 18, 2022
@torgo torgo removed this from the 2020-10-17-week milestone Oct 18, 2022
@hoch
Copy link
Author

hoch commented Oct 18, 2022

@torgo Thanks for your review! I'll move the explainer to https://github.com/WebAudio/web-audio-api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Progress: review complete Resolution: satisfied The TAG is satisfied with this design Review type: CG early review An early review of general direction from a Community Group Topic: media
Projects
None yet
Development

No branches or pull requests

4 participants