-
Notifications
You must be signed in to change notification settings - Fork 38
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
Move requirements for PiP window visibility and closing #223
base: main
Are you sure you want to change the base?
Conversation
index.bs
Outdated
@@ -209,14 +209,16 @@ the user agent MUST run the following steps: | |||
8. Set {{pictureInPictureElement}} to |video|. | |||
9. Let <dfn>Picture-in-Picture window</dfn> be a new instance of | |||
{{PictureInPictureWindow}} associated with {{pictureInPictureElement}}. | |||
10. Append <a>relevant settings object</a>'s <a>origin</a> to | |||
10. When the Picture-in-Picture window is opened it MUST be visible, even when |
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.
I'm not sure this is the right place actually.
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.
How about simply moving the following at the end of ## Request Picture-in-Picture ## {#request-pip}
section?
When {{pictureInPictureElement}} is set, the Picture-in-Picture window MUST
be visible, even when the <a>Document</a> is not in focus or hidden. The user
agent SHOULD provide a way for users to manually close the Picture-in-Picture
window.
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.
Yes, that would work. I was in two minds about it when I made this edit...
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.
I updated it as you suggested.
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.
LGTM. Thank you!
@chrisn I'll let you merge when you're ready. |
Perfect, thanks. Just waiting on confirmation from @marcoscaceres. |
When {{pictureInPictureElement}} is set, the Picture-in-Picture window MUST | ||
be visible, even when the <a>Document</a> is not in focus or hidden. The user | ||
agent SHOULD provide a way for users to manually close the Picture-in-Picture | ||
window. |
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.
I don't think this is quite right... or not stringent enough. I think what needs to happen is that:
- The pip window needs to be classified as a [=browsing context/top-level traversable=].
- The user agent MUST retain a system visibility state if "visible" for the pip window - and should be above all other windows.
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.
Reading the relevant parts of the HTML spec I'm not sure if a PiP window should be a top-level traversable, which makes it a traversable navigable, hence a navigable which "presents a Document to the user via its active session history entry". The reason I say this is that a PiP window doesn't present a Document (it's just a rendering surface for video) and doesn't affect session history AFAIK.
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.
Right, yes... it's not a navigable, but I think I think this should maybe run:
Run the focusing steps with the Picture-in-Picture
window.
To focus it. It's still a Window and Document with some limited functionality.
@@ -237,6 +237,11 @@ 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. | |||
|
|||
When {{pictureInPictureElement}} is set, the Picture-in-Picture window MUST | |||
be visible, even when the <a>Document</a> is not in focus or hidden. The user |
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.
be visible, even when the <a>Document</a> is not in focus or hidden. The user | |
be visible, even when the [=document=]'s {{Window}} is not in [=Window/focus=] or the [=document=]'s [=Document/visibility state=] is "hidden". The user |
This PR is in response to #191 and the Interaction with Page Visibility section. It moves the part about the PiP window being visible to the Request Picture-in-Picture section, as well as the recommendation to provide a way for users to close the PiP window.
Preview | Diff