-
Notifications
You must be signed in to change notification settings - Fork 238
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
base: main
Are you sure you want to change the base?
Conversation
remove a part that said the API can be called from sub frames.
- 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). |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.'.
remove a part that said the API can be called from sub frames.