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

Update the spec and explainer to clarify scope #221

Merged
merged 4 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion explainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 7 additions & 10 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Repository: w3c/picture-in-picture
!Web Platform Tests: <a href="https://github.com/web-platform-tests/wpt/tree/master/permissions-policy">permissions-policy/</a><br/><a href="https://github.com/web-platform-tests/wpt/tree/master/picture-in-picture">picture-in-picture/</a>
Editor: François Beaufort, w3cid 81174, Google LLC https://www.google.com, [email protected]
Former Editor: Mounir Lamouri, w3cid 45389, Google LLC https://www.google.com, [email protected]
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.
Expand Down Expand Up @@ -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}} 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
Expand All @@ -67,10 +67,6 @@ 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.

# Examples # {#examples}

Expand Down Expand Up @@ -469,9 +465,10 @@ apply to the shadow host chain.

<em>This section is non-normative.</em>

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 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.

## Secure Context ## {#secure-context}

Expand Down
Loading