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

Fix cross-spec links and references #174

Merged
merged 2 commits into from
Jan 15, 2020
Merged
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
39 changes: 14 additions & 25 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Title: Picture-in-Picture
Shortname: picture-in-picture
Level: 1
Status: ED
ED: https://w3c.github.io/picture-in-picture
ED: https://w3c.github.io/picture-in-picture/
Favicon: https://raw.githubusercontent.com/google/material-design-icons/master/action/2x_web/ic_picture_in_picture_alt_black_48dp.png
Group: mediawg
Markup Shorthands: markdown yes
Expand All @@ -18,18 +18,8 @@ Abstract: content sites, or applications on their device.
</pre>

<pre class="anchors">
spec: Feature Policy; urlPrefix: https://wicg.github.io/feature-policy/#
type: dfn
text: default allowlist
text: feature name
text: policy-controlled feature
spec: HTML; urlPrefix: https://html.spec.whatwg.org/multipage/
type: dfn
urlPrefix: infrastructure.html
text: in parallel
text: reflect
urlPrefix: interaction.html
text: triggered by user activation
urlPrefix: media.html
text: media element event task source
spec: Remote-Playback; urlPrefix: https://w3c.github.io/remote-playback/#dfn-
Expand Down Expand Up @@ -183,7 +173,7 @@ run the following steps:

1. If <a>Picture-in-Picture support</a> is `false`, throw a
{{NotSupportedError}} and abort these steps.
2. If the document is not allowed to use the <a>policy-controlled feature</a>
2. If the document is not <a>allowed to use</a> the <a>policy-controlled feature</a>
named `"picture-in-picture"`, throw a {{SecurityError}} and abort these
steps.
3. If |video|'s {{readyState}} attribute is {{HAVE_NOTHING}}, throw a
Expand All @@ -192,9 +182,9 @@ run the following steps:
these steps.
5. OPTIONALLY, if the {{disablePictureInPicture}} attribute is present on
|video|, throw an {{InvalidStateError}} and abort these steps.
6. If |userActivationRequired| is `true` and the algorithm is not
<a>triggered by user activation</a>, throw a {{NotAllowedError}} and
abort these steps.
6. If |userActivationRequired| is `true` and the <a>relevant global object</a>
of <a>this</a> does not have <a>transient activation</a>, throw a
{{NotAllowedError}} and abort these steps.
7. If |video| is {{pictureInPictureElement}}, abort these steps.
8. If |playingRequired| is `true` and |video| is {{paused}}, abort these steps.
9. Set {{pictureInPictureElement}} to |video|.
Expand All @@ -203,7 +193,7 @@ run the following steps:
11. <a>Queue a task</a> to <a>fire an event</a> with the name
{{enterpictureinpicture}} using {{EnterPictureInPictureEvent}} at the
|video| with its {{bubbles}} attribute initialized to `true` and its
{{pictureInPictureWindow}} attribute initialized to
{{EnterPictureInPictureEvent/pictureInPictureWindow}} attribute initialized to
<a>Picture-in-Picture window</a>.

It is RECOMMENDED that video frames are not rendered in the page and in the
Expand Down Expand Up @@ -437,18 +427,18 @@ interface PictureInPictureWindow : EventTarget {

A {{PictureInPictureWindow}} instance represents a <a>Picture-in-Picture
window</a> associated with an {{HTMLVideoElement}}. When instantiated, an
instance of {{PictureInPictureWindow}} has its |state| set to |opened|.
instance of {{PictureInPictureWindow}} has its |state| set to `opened`.

When the <dfn>close window algorithm</dfn> with an instance of
{{PictureInPictureWindow}} is invoked, its |state| is set to |closed|.
{{PictureInPictureWindow}} is invoked, its |state| is set to `closed`.

The {{width}} attribute MUST return the width in <a lt=px value>CSS pixels</a> of the
<a>Picture-in-Picture window</a> associated with {{pictureInPictureElement}} if
the |state| is |opened|. Otherwise, it MUST return 0.
the |state| is `opened`. Otherwise, it MUST return 0.

The {{height}} attribute MUST return the height in <a lt=px value>CSS pixels</a> of the
<a>Picture-in-Picture window</a> associated with {{pictureInPictureElement}} if
the |state| is |opened|. Otherwise, it MUST return 0.
the |state| is `opened`. Otherwise, it MUST return 0.

When the size of the <a>Picture-in-Picture window</a> associated with
{{pictureInPictureElement}} changes, the user agent MUST <a>queue a task</a> to
Expand Down Expand Up @@ -497,11 +487,10 @@ specification may allow PIP-ing arbitrary HTML content.

## Feature Policy ## {#feature-policy}

This specification defines a <a>policy-controlled feature</a> that controls
whether the <a>request Picture-in-Picture algorithm</a> may return a
{{SecurityError}} and whether {{pictureInPictureEnabled}} is `true` or `false`.

The <a>feature name</a> for this feature is `"picture-in-picture"`.
This specification defines a <a>policy-controlled feature</a> named
`"picture-in-picture"` that controls whether the <a>request Picture-in-Picture
algorithm</a> may return a {{SecurityError}} and whether
{{pictureInPictureEnabled}} is `true` or `false`.

The <a>default allowlist</a> for this feature is `*`.

Expand Down