From d2d63a38fe4a021be2b8292bc6a03c8d08ecd9c2 Mon Sep 17 00:00:00 2001 From: Chris Needham Date: Thu, 21 Mar 2024 15:30:21 +0000 Subject: [PATCH 1/2] Move requirements for PiP window visibility and closing See #191 --- index.bs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/index.bs b/index.bs index 8a40305..e5ebb52 100644 --- a/index.bs +++ b/index.bs @@ -209,14 +209,16 @@ the user agent MUST run the following steps: 8. Set {{pictureInPictureElement}} to |video|. 9. Let Picture-in-Picture window be a new instance of {{PictureInPictureWindow}} associated with {{pictureInPictureElement}}. -10. Append relevant settings object's origin to +10. When the Picture-in-Picture window is opened it MUST be visible, even when + the Document is not in focus or hidden. +11. Append relevant settings object's origin to initiators of active Picture-in-Picture sessions. -11. Queue a task to fire an event named +12. Queue a task to fire an event named {{enterpictureinpicture}} using {{PictureInPictureEvent}} at the |video| with its {{bubbles}} attribute initialized to `true` and its {{PictureInPictureEvent/pictureInPictureWindow}} attribute initialized to Picture-in-Picture window. -12. If {{pictureInPictureElement}} is fullscreenElement, it is +13. If {{pictureInPictureElement}} is fullscreenElement, it is RECOMMENDED to exit fullscreen. It is RECOMMENDED that video frames are not rendered in the page and in the @@ -237,6 +239,9 @@ It is also RECOMMENDED that the Picture-in-Picture window has a maximum and minimum size. For example, it could be restricted to be between a quarter and a half of one dimension of the screen. +The user agent SHOULD provide a way for users to manually close the +Picture-in-Picture window. + ## Exit Picture-in-Picture ## {#exit-pip} When the exit Picture-in-Picture algorithm is invoked, @@ -306,11 +311,6 @@ available controls on the Picture-in-Picture window. ## Interaction with Page Visibility ## {#page-visibility} -When {{pictureInPictureElement}} is set, the Picture-in-Picture window MUST -be visible, even when the Document is not in focus or hidden. The user -agent SHOULD provide a way for users to manually close the Picture-in-Picture -window. - The Picture-in-Picture window visibility MUST NOT be taken into account by the user agent to determine if the system visibility state of a traversable navigable has changed. From 708dd16ebc1d27cd4bf2df543b52b3f8568b90b7 Mon Sep 17 00:00:00 2001 From: Chris Needham Date: Thu, 21 Mar 2024 15:53:34 +0000 Subject: [PATCH 2/2] Move requirements for PiP window visibility and closing --- index.bs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/index.bs b/index.bs index e5ebb52..e7dc4b8 100644 --- a/index.bs +++ b/index.bs @@ -209,16 +209,14 @@ the user agent MUST run the following steps: 8. Set {{pictureInPictureElement}} to |video|. 9. Let Picture-in-Picture window be a new instance of {{PictureInPictureWindow}} associated with {{pictureInPictureElement}}. -10. When the Picture-in-Picture window is opened it MUST be visible, even when - the Document is not in focus or hidden. -11. Append relevant settings object's origin to +10. Append relevant settings object's origin to initiators of active Picture-in-Picture sessions. -12. Queue a task to fire an event named +11. Queue a task to fire an event named {{enterpictureinpicture}} using {{PictureInPictureEvent}} at the |video| with its {{bubbles}} attribute initialized to `true` and its {{PictureInPictureEvent/pictureInPictureWindow}} attribute initialized to Picture-in-Picture window. -13. If {{pictureInPictureElement}} is fullscreenElement, it is +12. If {{pictureInPictureElement}} is fullscreenElement, it is RECOMMENDED to exit fullscreen. It is RECOMMENDED that video frames are not rendered in the page and in the @@ -239,8 +237,10 @@ It is also RECOMMENDED that the Picture-in-Picture window has a maximum and minimum size. For example, it could be restricted to be between a quarter and a half of one dimension of the screen. -The user agent SHOULD provide a way for users to manually close the -Picture-in-Picture window. +When {{pictureInPictureElement}} is set, the Picture-in-Picture window MUST +be visible, even when the Document is not in focus or hidden. The user +agent SHOULD provide a way for users to manually close the Picture-in-Picture +window. ## Exit Picture-in-Picture ## {#exit-pip}