Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

agent SHOULD provide a way for users to manually close the Picture-in-Picture
window.
Comment on lines +240 to +243
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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.


## Exit Picture-in-Picture ## {#exit-pip}

When the <dfn>exit Picture-in-Picture algorithm</dfn> is invoked,
Expand Down Expand Up @@ -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 <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.

The Picture-in-Picture window visibility MUST NOT be taken into account by the
user agent to determine if the <a>system visibility state</a> of a
<a for="/">traversable navigable</a> has changed.
Expand Down
Loading