From 7b932c94f1458aec4a45ed605b73a830fcb28b41 Mon Sep 17 00:00:00 2001 From: Chris Needham Date: Thu, 21 Mar 2024 11:47:22 +0000 Subject: [PATCH 1/4] Update the spec and explainer to clarify scope --- explainer.md | 1 - index.bs | 12 +++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/explainer.md b/explainer.md index 697d165..c34e56f 100644 --- a/explainer.md +++ b/explainer.md @@ -33,7 +33,6 @@ Many users want to continue consuming media while they interact with other conte ### For future considerations or candidates for first API * The API will take a hint for the preferred window size and position which could be ignored by the user agent. -* The API may be extended to allow an arbitrary element of the DOM to enter Picture-in-Picture. * The API may be extended to allow custom actions in the window UI. ## Proposed API diff --git a/index.bs b/index.bs index 8a40305..237f3df 100644 --- a/index.bs +++ b/index.bs @@ -12,7 +12,7 @@ Repository: w3c/picture-in-picture !Web Platform Tests: permissions-policy/
picture-in-picture/ Editor: François Beaufort, w3cid 81174, Google LLC https://www.google.com, fbeaufort@google.com Former Editor: Mounir Lamouri, w3cid 45389, Google LLC https://www.google.com, mlamouri@google.com -Abstract: This specification intends to provide APIs to allow websites to +Abstract: This specification provides APIs to allow websites to Abstract: create a floating video window always on top of other windows so that Abstract: users may continue consuming media while they interact with other Abstract: content sites, or applications on their device. @@ -56,8 +56,8 @@ window stays visible even when the user agent is not visible. Picture-in-Picture is a common platform-level feature among desktop and mobile OSs. -This specification aims to allow websites to initiate and control this behavior -by exposing the following sets of properties to the API: +This specification extends {{HTMLVideoElement}} with the aim of allowing websites +to initiate and control this behavior by exposing the following sets of properties: * Notify the website when it enters and leaves Picture-in-Picture mode. * Allow the website to trigger Picture-in-Picture mode via a user gesture on a @@ -67,10 +67,8 @@ by exposing the following sets of properties to the API: * Allow the website to exit Picture-in-Picture mode. * Allow the website to check if Picture-in-Picture mode can be triggered. -The proposed Picture-in-Picture API is very similar to [[Fullscreen]] as they -have similar properties. The API only applies to -{{HTMLVideoElement}} at the moment but is meant to be -extensible. +The Picture-in-Picture API is very similar to [[Fullscreen]] as they +have similar properties. # Examples # {#examples} From a316df169fc650471987a56a3821fc3f68d5b055 Mon Sep 17 00:00:00 2001 From: Chris Needham Date: Thu, 21 Mar 2024 12:51:26 +0000 Subject: [PATCH 2/4] Update security considerations --- index.bs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index 237f3df..ff469a4 100644 --- a/index.bs +++ b/index.bs @@ -467,9 +467,10 @@ apply to the shadow host chain. This section is non-normative. -The API applies only to {{HTMLVideoElement}} in order to start on a minimal -viable product that has limited security issues. Later versions of this -specification may allow PIP-ing arbitrary HTML content. +To prevent potential abuse through spoofing, the API applies only to +{{HTMLVideoElement}}. User interaction with the picture in picture window +is intentionally limited so that the only effect is on the picture in +picture window itself or the media being played. ## Secure Context ## {#secure-context} From 4741129ea5d7e10722d48621af1aa091cd07ddef Mon Sep 17 00:00:00 2001 From: Chris Needham Date: Thu, 21 Mar 2024 14:08:08 +0000 Subject: [PATCH 3/4] Minor edit, for consistency Use "Picture-in-Picture window" consistently --- index.bs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index ff469a4..1c6a585 100644 --- a/index.bs +++ b/index.bs @@ -468,9 +468,9 @@ apply to the shadow host chain. This section is non-normative. To prevent potential abuse through spoofing, the API applies only to -{{HTMLVideoElement}}. User interaction with the picture in picture window -is intentionally limited so that the only effect is on the picture in -picture window itself or the media being played. +{{HTMLVideoElement}}. User interaction with the Picture-in-Picture window +is intentionally limited so that the only effect is on the Picture-in-Picture +window itself or the media being played. ## Secure Context ## {#secure-context} From 66ba36d6d748690c4bd30bfdf110dcca4c799d52 Mon Sep 17 00:00:00 2001 From: Chris Needham Date: Thu, 2 May 2024 14:04:28 +0100 Subject: [PATCH 4/4] Apply suggestions from Marcos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.bs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.bs b/index.bs index 1c6a585..b5c2c09 100644 --- a/index.bs +++ b/index.bs @@ -56,7 +56,7 @@ window stays visible even when the user agent is not visible. Picture-in-Picture is a common platform-level feature among desktop and mobile OSs. -This specification extends {{HTMLVideoElement}} with the aim of allowing websites +This specification extends {{HTMLVideoElement}} allowing websites to initiate and control this behavior by exposing the following sets of properties: * Notify the website when it enters and leaves Picture-in-Picture mode. @@ -67,8 +67,6 @@ to initiate and control this behavior by exposing the following sets of properti * Allow the website to exit Picture-in-Picture mode. * Allow the website to check if Picture-in-Picture mode can be triggered. -The Picture-in-Picture API is very similar to [[Fullscreen]] as they -have similar properties. # Examples # {#examples} @@ -467,7 +465,7 @@ apply to the shadow host chain. This section is non-normative. -To prevent potential abuse through spoofing, the API applies only to +To limit potential abuse through spoofing, the API applies only to {{HTMLVideoElement}}. User interaction with the Picture-in-Picture window is intentionally limited so that the only effect is on the Picture-in-Picture window itself or the media being played.