Skip to content

Address feedback and questions on setPreferredSinkId() explainer#1299

Open
SteveBeckerMSFT wants to merge 2 commits intomainfrom
user/stevebe/update_set_preferred_sink_id_explainer
Open

Address feedback and questions on setPreferredSinkId() explainer#1299
SteveBeckerMSFT wants to merge 2 commits intomainfrom
user/stevebe/update_set_preferred_sink_id_explainer

Conversation

@SteveBeckerMSFT
Copy link
Copy Markdown
Contributor

Disallows child frames from calling setPreferredSinkId(). Attempts to simplify goals and examples to answer questions about behavior and permissions.

Copy link
Copy Markdown
Contributor

@gabrielsanbrito gabrielsanbrito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % super nit. Feel free to ignore it if not worth the work.

This API is accessible from the top-level frame and the same-origin sub frames and allows modification of the default audio output for both
the top-level frame and all sub frames, regardless of their origins. However, it’s important to note that this change does not affect custom
audio outputs specified using the setSinkId method in media element or audio context.
After successfully overriding the default audio output device, the promise fulfills with `undefined`. Success does not change the [`sinkId`](https://w3c.github.io/mediacapture-output/#dom-htmlmediaelement-sinkid) attribute of any audio renderer. Only top-level frames may successfully call `setPreferredSinkId()`. After failure, the promise rejects with one of the following errors:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super nit: Isn't the "with undefined" part redundant given that setPreferredSinkId returns Promise<void>?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants