From 0843980350b8c90178bf0e5eb226274dd4d3cf9d Mon Sep 17 00:00:00 2001
From: Frank Liberato
The API introduced in this specification has very low impact with regards to
- privacy. Part of the API allows a website to receive
- commands from the user via buttons or other form of controls which might
- sometimes introduce a new input layer between the user and the website.
+ privacy. Part of the API allows a website to receive commands from the user
+ via buttons or other form of controls which might sometimes introduce a new
+ input layer between the user and the website.
The API introduced in this specification has very low impact with regards to
- security. Part of the API allows a website to expose metadata
- that can be used by the user agent. The user agent obviously needs to use
- this data with care.
+ security. Part of the API allows a website to expose metadata that can be
+ used by the user agent. The user agent obviously needs to use this data with
+ care.
- In general, all security considerations related to the display - of notifications from a website should apply here. It is worth noting that + In general, all security considerations related to the display of + notifications from a website should apply here. It is worth noting that the {{MediaMetadata}} offer less customization than regular web notifications, thus would be harder to spoof.
@@ -293,23 +293,23 @@ platform UI or media keys, thereby improving the user experience. preferred artwork image from metadata's {{MediaMetadata/artwork}} of the active media session. -NaN, throw a TypeError.
true and document's
@@ -1017,7 +1016,8 @@ interface MediaSession {
and true otherwise.
undefined and abort these steps.
undefined.
+ Queue a task using the [=user interaction task source=] to
+ resolve p with undefined.
true, run the following
@@ -1053,8 +1053,8 @@ interface MediaSession {
-When the convert artwork algorithm with input parameter is -invoked, where the input is a sequence of type {{MediaImage}}, the -user agent MUST run the following steps: + When the convert artwork algorithm with input parameter + is invoked, where the input is a sequence of type {{MediaImage}}, + the user agent MUST run the following steps:
frozen"),
- to prevent accidental mutation by scripts.
+ SetIntegrityLevel(image, "frozen"), to
+ prevent accidental mutation by scripts.
The title attribute reflects the {{ChapterInformation}}'s title. On getting, it @@ -1572,22 +1571,31 @@ of [=pausing all input sources=] and the media session action is {{MediaSessionAction/togglecamera}}, {{MediaSessionAction/togglemicrophone}} or {{MediaSessionAction/togglescreenshare}}. -When the media session action is {{MediaSessionAction/enterpictureinpicture}}, -the enterPictureInPictureReason -dictionary member MUST be provided and is the reason the UA has triggered this -action. +When the media session action is +{{MediaSessionAction/enterpictureinpicture}}, the enterPictureInPictureReason +dictionary member MUST be provided and is the reason the UA has triggered +this action. {{enterPictureInPictureReason}} can have one of the following values:
+ navigator.mediaSession.setActionHandler("enterfullscreen", function() {
+ remoteVideo.requestFullscreen();
+ });
+
+From 725a396ea58c87d7b8a7bd9340727aca0914016a Mon Sep 17 00:00:00 2001 From: Frank LiberatoDate: Mon, 6 Apr 2026 21:32:22 +0000 Subject: [PATCH 2/5] Revert "enterfullscreen" This reverts commit 0843980350b8c90178bf0e5eb226274dd4d3cf9d. --- index.bs | 203 +++++++++++++++++++++++++------------------------------ 1 file changed, 93 insertions(+), 110 deletions(-) diff --git a/index.bs b/index.bs index 3de074b..0aa28bc 100644 --- a/index.bs +++ b/index.bs @@ -82,9 +82,9 @@ platform UI or media keys, thereby improving the user experience. The API introduced in this specification has very low impact with regards to - privacy. Part of the API allows a website to receive commands from the user - via buttons or other form of controls which might sometimes introduce a new - input layer between the user and the website. + privacy. Part of the API allows a website to receive + commands from the user via buttons or other form of controls which might + sometimes introduce a new input layer between the user and the website.
@@ -122,9 +122,9 @@ platform UI or media keys, thereby improving the user experience. The API introduced in this specification has very low impact with regards to - security. Part of the API allows a website to expose metadata that can be - used by the user agent. The user agent obviously needs to use this data with - care. + security. Part of the API allows a website to expose metadata + that can be used by the user agent. The user agent obviously needs to use + this data with care.
@@ -154,8 +154,8 @@ platform UI or media keys, thereby improving the user experience. - In general, all security considerations related to the display of - notifications from a website should apply here. It is worth noting that + In general, all security considerations related to the display + of notifications from a website should apply here. It is worth noting that the {{MediaMetadata}} offer less customization than regular web notifications, thus would be harder to spoof.
@@ -293,23 +293,23 @@ platform UI or media keys, thereby improving the user experience. preferred artwork image from metadata's {{MediaMetadata/artwork}} of the active media session. -- Let request be a new [=request=] whose [=request/URL=] is - the preferred artwork image's {{MediaImage/src}}, - [=request/destination=] is "image", [=request/mode=] is "no-cors", - [=request/credentials mode=] is "include", and whose - [=request/use-URL-credentials flag=] is set.
+- Let request be a new [=request=] whose [=request/URL=] is the + preferred artwork image's {{MediaImage/src}}, [=request/destination=] + is "image", [=request/mode=] is "no-cors", [=request/credentials mode=] is "include", + and whose [=request/use-URL-credentials flag=] is set. +
- - [=Fetch=] request with the following steps executed as the - fetch's [=processResponse=] algorithm. + [=Fetch=] request with the following steps executed + as the fetch's [=processResponse=] algorithm.
-
- +
- Let response be the [=response=] given to the fetch's [=processResponse=] algorithm.
- If response's [=response/type=] is not - {{ResponseType/"error"}}, attempt to decode response's - [=body=] as an image. + {{ResponseType/"error"}}, attempt to decode response's [=body=] as an + image.
- If the image format is supported, use the image as the artwork for @@ -360,24 +360,25 @@ platform UI or media keys, thereby improving the user experience. is to resume the playback.
- - pause: the action's intent - is to pause the currently active playback. + pause: the action's + intent is to pause the currently active playback.
- - seekbackward: the action's - intent is to move the playback time backward by a short period (eg. a - few seconds). + seekbackward: the + action's intent is to move the playback time backward by a short + period (eg. a few seconds).
- seekforward: the action's - intent is to move the playback time forward by a short period (eg. a few - seconds). + intent is to move the playback time forward by a short period (eg. a + few seconds).
- - previoustrack: the action's - intent is to either start the current playback from the beginning if the - playback has a notion of beginning, or move to the previous item in the - playlist if the playback has a notion of playlist. + previoustrack: the + action's intent is to either start the current playback from the + beginning if the playback has a notion of beginning, or move to the + previous item in the playlist if the playback has a notion of + playlist.
- nexttrack: the action's @@ -385,54 +386,51 @@ platform UI or media keys, thereby improving the user experience. the playback has a notion of playlist.
- - skipad: the action's intent - is to skip the advertisement that is currently playing. + skipad: the action's + intent is to skip the advertisement that is currently playing.
- stop: the action's intent is to stop the playback and clear the state if appropriate.
- - seekto: the action's intent - is to move the playback time to a specific time. + seekto: the action's + intent is to move the playback time to a specific time.
- togglemicrophone: the action's intent is to mute or unmute the user's microphone.
- - togglecamera: the action's - intent is to turn the user's active camera on or off. + togglecamera: the + action's intent is to turn the user's active camera on or off.
- togglescreenshare: the action's intent is to turn the user's active screenshare on or off.
- - hangup: the action's intent - is to end a call. + hangup: the action's + intent is to end a call.
- - previousslide: the action's - intent is to go back to the previous slide when presenting slides. + previousslide: the + action's intent is to go back to the previous slide when presenting + slides.
- nextslide: the action's intent is to go to the next slide when presenting slides.
- - enterpictureinpicture: the - action's intent is to open the media session in a picture-in-picture - window. + enterpictureinpicture: + the action's intent is to open the media session in a + picture-in-picture window.
- - enterfullscreen: the - action's intent is to open the media session in fullscreen. -
-- - voiceactivity: the action's - intent is to notify the web page that voice activity has been detected - by the microphone. + voiceactivity: the + action's intent is to notify the web page that voice activity has been + detected by the microphone.
@@ -450,8 +448,8 @@ platform UI or media keys, thereby improving the user experience.
- If handler is `null`, remove action - from the supported media session actions for {{MediaSession}} and - abort these steps. + from the supported media session actions for {{MediaSession}} + and abort these steps.
- Add action to the supported media session actions @@ -492,8 +490,8 @@ platform UI or media keys, thereby improving the user experience. supported media session actions.
- - If actions does not contain the key action, abort - these steps. + If actions does not contain the key action, + abort these steps.
- Let handler be the {{MediaSessionActionHandler}} associated @@ -631,15 +629,17 @@ platform UI or media keys, thereby improving the user experience. actions.
- - Otherwise, remove pause - from available actions. + Otherwise, remove pause from available + actions.
- - If the source is a UI element created by the user agent, - it MAY remove some elements from available actions if - there are too many of them compared to the available space. + If the source is a UI element created by the user + agent, it MAY remove some elements from available + actions if there are too many of them compared to the + available space.
- Notify the source with the updated list of @@ -668,8 +668,9 @@ platform UI or media keys, thereby improving the user experience. The playback rate of the media. It is a coefficient.
- - The last reported playback position of the media. This is the - playback position of the media in seconds when the position state + The last reported playback position of the media. This is + the playback position of the media in seconds when the position + state was created.
@@ -763,7 +764,6 @@ enum MediaSessionAction { "previousslide", "nextslide", "enterpictureinpicture", - "enterfullscreen", "voiceactivity" }; @@ -887,7 +887,8 @@ interface MediaSession {
- - If state is an empty dictionary, clear the position state + If state is an empty dictionary, clear the position + state and abort these steps.
- @@ -899,8 +900,8 @@ interface MediaSession {
NaN, throw a TypeError.- - If state's {{MediaPositionState/position}} is not present, set it - to zero. + If state's {{MediaPositionState/position}} is not present, set + it to zero.
- If state's position @@ -985,8 +986,8 @@ interface MediaSession {
- - If document is not [=fully active=], return [=a promise rejected - with=] InvalidStateError. + If document is not [=fully active=], return [=a promise + rejected with=] InvalidStateError.
- If active is
trueand document's @@ -1016,8 +1017,7 @@ interface MediaSession { andtrueotherwise.- - If active is currentlyActive, queue a - task + If active is currentlyActive, queue a task using the [=user interaction task source=] to resolve p with
@@ -1039,8 +1039,8 @@ interface MediaSession { and active.undefinedand abort these steps.- - Queue a task using the [=user interaction task source=] to - resolve p with
undefined. + Queue a task using the [=user interaction task source=] + to resolve p withundefined.- If applyPausePolicy is
true, run the following @@ -1053,8 +1053,8 @@ interface MediaSession {- For each {{MediaStreamTrack}} whose source is of type captureKind, - queue a task using the [=user interaction task source=] to - [$set a track's muted state$] to newMutedState. + queue a task using the [=user interaction task source=] + to [$set a track's muted state$] to newMutedState.
@@ -1191,9 +1191,9 @@ dictionary MediaMetadataInit {- When the convert artwork algorithm with input parameter - is invoked, where the input is a sequence of type {{MediaImage}}, - the user agent MUST run the following steps: +When the convert artwork algorithm with input parameter is +invoked, where the input is a sequence of type {{MediaImage}}, the +user agent MUST run the following steps:
@@ -1411,15 +1412,15 @@ dictionary ChapterInformationInit { {{ChapterInformation/artwork}} as input.
- @@ -1277,8 +1277,8 @@ dictionary MediaMetadataInit {
- Perform - SetIntegrityLevel(image, "
frozen"), to - prevent accidental mutation by scripts. + SetIntegrityLevel(image, "frozen"), + to prevent accidental mutation by scripts.- Push image to frozenArtwork. @@ -1310,8 +1310,8 @@ dictionary MediaMetadataInit {
- Run convert artwork algorithm with convertedArtwork, and - set the {{MediaMetadata}}'s artwork images as the - result if it succeeds. + set the {{MediaMetadata}}'s artwork images as + the result if it succeeds.
- Set the {{MediaMetadata}}'s converted artwork images to @@ -1338,7 +1338,8 @@ dictionary MediaMetadataInit { session, abort these steps.
- - Otherwise, in parallel, run the update metadata algorithm. + Otherwise, in parallel, run the update metadata + algorithm.
- - Set chapterInfo's artwork images - to the result of [=Create a frozen array|creating a frozen array=] from - {{ChapterInformationInit/artwork}}. + Set chapterInfo's artwork + images to the result of [=Create a frozen array|creating a frozen + array=] from {{ChapterInformationInit/artwork}}.
- Return chapterInfo.
- +The title attribute reflects the {{ChapterInformation}}'s title. On getting, it @@ -1571,31 +1572,22 @@ of [=pausing all input sources=] and the media session action is {{MediaSessionAction/togglecamera}}, {{MediaSessionAction/togglemicrophone}} or {{MediaSessionAction/togglescreenshare}}. -When the media session action is -{{MediaSessionAction/enterpictureinpicture}}, the enterPictureInPictureReason -dictionary member MUST be provided and is the reason the UA has triggered -this action. +When the media session action is {{MediaSessionAction/enterpictureinpicture}}, +the enterPictureInPictureReason +dictionary member MUST be provided and is the reason the UA has triggered this +action. {{enterPictureInPictureReason}} can have one of the following values:
@@ -1884,15 +1876,6 @@ media session.
- - other: - the reason for entering picture-in-picture is not one of the existing enum - values + other: the reason for entering picture-in-picture is not one of the existing enum values
- - useraction: the user has - taken an explicit action to enter picture-in-picture (e.g. clicking a - picture-in-picture button in the user agent UI) + useraction: the user has taken an explicit action to enter picture-in-picture (e.g. clicking a picture-in-picture button in the user agent UI)
- - contentoccluded: the - user agent is requesting picture-in-picture because the page has become - occluded. This can happen in various cases like tab switching or tab - minimization. + contentoccluded: the user agent is requesting picture-in-picture because the page has become occluded. + This can happen in various cases like tab switching or tab minimization.
- navigator.mediaSession.setActionHandler("enterfullscreen", function() {
- remoteVideo.requestFullscreen();
- });
-
-From 4b17b12faa5b3ac09bc1d4e414ec101a296237f8 Mon Sep 17 00:00:00 2001 From: Frank LiberatoDate: Mon, 6 Apr 2026 21:14:44 +0000 Subject: [PATCH 3/5] enterfullscreen --- index.bs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/index.bs b/index.bs index 0aa28bc..86d8dcc 100644 --- a/index.bs +++ b/index.bs @@ -427,6 +427,10 @@ platform UI or media keys, thereby improving the user experience. the action's intent is to open the media session in a picture-in-picture window. + - + enterfullscreen: + the action's intent is to open the media session in full screen. +
- voiceactivity: the action's intent is to notify the web page that voice activity has been @@ -764,6 +768,7 @@ enum MediaSessionAction { "previousslide", "nextslide", "enterpictureinpicture", + "enterfullscreen", "voiceactivity" }; @@ -1876,6 +1881,15 @@ media session.
+ navigator.mediaSession.setActionHandler("enterfullscreen", function() {
+ remoteVideo.requestFullscreen();
+ });
+
+From c73dc0f7be7a3619774aa12dd1f75ed2483f4905 Mon Sep 17 00:00:00 2001 From: Frank LiberatoDate: Mon, 6 Apr 2026 21:33:32 +0000 Subject: [PATCH 4/5] remove space --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 86d8dcc..d14d52c 100644 --- a/index.bs +++ b/index.bs @@ -429,7 +429,7 @@ platform UI or media keys, thereby improving the user experience. - enterfullscreen: - the action's intent is to open the media session in full screen. + the action's intent is to open the media session in fullscreen.
- voiceactivity: the From d0f00a837378f1a593e0d18321aa95eee0ef26d0 Mon Sep 17 00:00:00 2001 From: Frank Liberato
Date: Thu, 16 Apr 2026 17:02:16 +0000 Subject: [PATCH 5/5] remoteVideo/video --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index d14d52c..03f0429 100644 --- a/index.bs +++ b/index.bs @@ -1876,7 +1876,7 @@ media session. Handling picture-in-picture: navigator.mediaSession.setActionHandler("enterpictureinpicture", function() { - remoteVideo.requestPictureInPicture(); + video.requestPictureInPicture(); });
navigator.mediaSession.setActionHandler("enterfullscreen", function() {
- remoteVideo.requestFullscreen();
+ video.requestFullscreen();
});