From 76ec7e0ac090081eb91e78325e972d59343090bb Mon Sep 17 00:00:00 2001 From: sunggook Date: Fri, 2 May 2025 13:26:40 -0700 Subject: [PATCH 1/2] 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. --- SetPreferredSinkId/explainer.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/SetPreferredSinkId/explainer.md b/SetPreferredSinkId/explainer.md index 444df7a8..01869112 100644 --- a/SetPreferredSinkId/explainer.md +++ b/SetPreferredSinkId/explainer.md @@ -24,13 +24,11 @@ We’d like to propose a new API to set the default audio output device for the - Developers can modify the default audio output for the top-level frame page. - Developers can modify the default audio output for the sub frame pages. -- Developers can modify the default audio output for the top-level frame and all other sub frames from any same-origin sub frame. - 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). ## Use Cases @@ -82,9 +80,9 @@ Exceptions: Returned if switching the audio output device to the new audio device failed. ``` -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, +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. Remember to call this API within a secure context (using HTTPS). @@ -178,6 +176,3 @@ Here are the key points of this approach: * Drawback: The frame itself must explicitly call setSinkId for any specific audio outputs it requires in the current frame. In summary, the pros of this alternative include muting capabilities while maintaining the responsibility for individual frame audio settings. - -## Open Questions -* Do we have to provide permission policy (e.g. speaker-selection) for the top-level frame to allow cross-origin sub frame to be able to call the API? \ No newline at end of file From e267c0af4d323041bb1c918568dab480e27027b9 Mon Sep 17 00:00:00 2001 From: sunggook Date: Thu, 8 May 2025 17:44:10 -0700 Subject: [PATCH 2/2] sub frame specific error message --- SetPreferredSinkId/explainer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SetPreferredSinkId/explainer.md b/SetPreferredSinkId/explainer.md index 01869112..d3154d04 100644 --- a/SetPreferredSinkId/explainer.md +++ b/SetPreferredSinkId/explainer.md @@ -71,7 +71,7 @@ Return: Exceptions: NotAllowedError DOMException - Returned if a cross-origin sub frame tries to call the API. + Returned if a sub frame tries to call the API. NotFoundError DOMException Returned if the deviceId does not match any audio output device.