Skip to content

remove a part that said the API can be called from sub frames. #1019

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sunggook
Copy link
Contributor

@sunggook sunggook commented May 2, 2025

remove a part that said the API can be called from sub frames.

remove a part that said the API can be called from sub frames.
@sunggook sunggook requested a review from SteveBeckerMSFT May 2, 2025 20:27
- Any media element or audio context can continue to override this default setting using the existing setSinkId API (cross-origin iframes continue to need 'speaker_selection' permission to call setSinkId).

## Non Goals
- A change notification for default audio output is not in scope of this project.
- Requiring a permission policy for calling the API. Since permission is gated on the speaker_selection permission, access to the API is already reasonably constrained.
- A change of the sinkId property for the default device ID. It will continue to return the existing default device ID (an empty string).
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we delete this part about the default sink id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on the feedback, it will continue to return an empty string (""), as that represents the default audio output device from the developer's perspective.

If we intended to return a preferred sink ID here, we would also need to provide an event to notify the developer when the sink ID is updated — which is not the behavior we want.

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.
This API is accessible from the top-level frame and allows modification of the default audio output for both the top-level frame and all sub frames,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also mention what happens when setPreferredSinkId is called from a sub frame? I assume it throws an exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the above error message 'Returned if a sub frame tries to call the API.'.

@sunggook sunggook requested a review from SteveBeckerMSFT May 9, 2025 00:44
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