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

Enter Picture-in-Picture without user activation if document.pictureInPictureElement is set #116

Closed
beaufortfrancois opened this issue Jan 29, 2019 · 7 comments

Comments

@beaufortfrancois
Copy link
Collaborator

beaufortfrancois commented Jan 29, 2019

@mounirlamouri suggested offline we may want to allow video to enter Picture-in-Picture without user activation if there's already a visible PiP window in the context of the document, in other words if document.pictureInPictureElement is set.

  The {{requestPictureInPicture()}} method, when invoked, MUST
  return <a>a new promise</a> |promise| and run the following steps <a>in
  parallel</a>:

  1. Let |video| be the video element on which the method was invoked.
- 2. Let |userActivationRequired| be `true`.
+ 2. Let |userActivationRequired| be `true` if {{pictureInPictureElement}} is
+     null. It is `false` otherwise.
  3. Let |playingRequired| be `false`.
  4. Run the <a>request Picture-in-Picture algorithm</a> with |video|,
      |userActivationRequired|, and |playingRequired|.

This could help in situations where there are multiple video elements for one PiP media session.

What do you think @jernoble @scottlaw?

@mounirlamouri
Copy link
Member

Note that this is an idea I had to help with some feedback we got from JWPlayer. They seem to be running ads and content in different

@OrenMe
Copy link

OrenMe commented Feb 5, 2019

I also support this proposal, and I was looking to see if someone already opened an issue on ad interoperability as a matter of fact.
In client side ad insertion ads are usually played on another video tag to allow main content to load or keep buffering while ad is playing.
Switching between main content and ad content is in same video element is harder to manage, requiring to detach the source buffer and re attaching it, and this is if one has control over all aspects of the video and ad, which is, for example, not the case with popular ad SDK like IMA ada SDK.
Another aspect of this interactivity is additional controls over pip element, to enable skipping add or putting a notice that current content is an advertisement.
This can be like a media session control maybe type of interface.
Maybe this is already a different subject and requires a new issue. Let me know and I’ll open a separate one.

@scottlow
Copy link

scottlow commented Feb 5, 2019

I think this proposal makes sense.

@OrenMe I believe the controls scenario you're describing is covered by the existing reference to Media Session and the skipad action defined there.

@beaufortfrancois
Copy link
Collaborator Author

@OrenMe You may want to have a look at https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/l6sW0G4jzhE. We're going to experiment with a Skip Ad button in the Picture-in-Picture window.

image

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 5, 2019
Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
@OrenMe
Copy link

OrenMe commented Feb 5, 2019

thanks @scottlow, @beaufortfrancois - indeed it answers.
So having this and the user gesture will definitely answer this scenarios.
Usually for ads there's also the aspect of ad timer and ad timer to skip - are you also considering this somewhere?

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 6, 2019
Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
@beaufortfrancois
Copy link
Collaborator Author

If @jernoble is OK with that change, spec will be updated.

@jernoble
Copy link

jernoble commented Feb 6, 2019

I'm OK with this. It has a low potential for misuse and a compelling use case.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 7, 2019
Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
Reviewed-on: https://chromium-review.googlesource.com/c/1454360
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630026}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 7, 2019
Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
Reviewed-on: https://chromium-review.googlesource.com/c/1454360
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630026}
aarongable pushed a commit to chromium/chromium that referenced this issue Feb 7, 2019
Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
Reviewed-on: https://chromium-review.googlesource.com/c/1454360
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630026}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 21, 2019
…PictureElement is set, a=testonly

Automatic update from web-platform-tests
Do not require user gesture if pictureInPictureElement is set

Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
Reviewed-on: https://chromium-review.googlesource.com/c/1454360
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630026}

--

wpt-commits: 5692bc8fe5e5ae3703dda9f0689e1d8ec3431411
wpt-pr: 15247
mykmelez pushed a commit to mykmelez/gecko that referenced this issue Feb 22, 2019
…PictureElement is set, a=testonly

Automatic update from web-platform-tests
Do not require user gesture if pictureInPictureElement is set

Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
Reviewed-on: https://chromium-review.googlesource.com/c/1454360
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630026}

--

wpt-commits: 5692bc8fe5e5ae3703dda9f0689e1d8ec3431411
wpt-pr: 15247
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 26, 2019
…PictureElement is set, a=testonly

Automatic update from web-platform-tests
Do not require user gesture if pictureInPictureElement is set

Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
Reviewed-on: https://chromium-review.googlesource.com/c/1454360
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630026}

--

wpt-commits: 5692bc8fe5e5ae3703dda9f0689e1d8ec3431411
wpt-pr: 15247
mykmelez pushed a commit to mykmelez/gecko that referenced this issue Feb 27, 2019
…PictureElement is set, a=testonly

Automatic update from web-platform-tests
Do not require user gesture if pictureInPictureElement is set

Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
Reviewed-on: https://chromium-review.googlesource.com/c/1454360
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630026}

--

wpt-commits: 5692bc8fe5e5ae3703dda9f0689e1d8ec3431411
wpt-pr: 15247
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
…PictureElement is set, a=testonly

Automatic update from web-platform-tests
Do not require user gesture if pictureInPictureElement is set

Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
Reviewed-on: https://chromium-review.googlesource.com/c/1454360
Commit-Queue: François Beaufort <beaufort.francoisgmail.com>
Reviewed-by: Mounir Lamouri <mlamourichromium.org>
Cr-Commit-Position: refs/heads/master{#630026}

--

wpt-commits: 5692bc8fe5e5ae3703dda9f0689e1d8ec3431411
wpt-pr: 15247

UltraBlame original commit: 2f27bcbec4869d7ceed7e81f7517faa1e0a75510
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
…PictureElement is set, a=testonly

Automatic update from web-platform-tests
Do not require user gesture if pictureInPictureElement is set

Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
Reviewed-on: https://chromium-review.googlesource.com/c/1454360
Commit-Queue: François Beaufort <beaufort.francoisgmail.com>
Reviewed-by: Mounir Lamouri <mlamourichromium.org>
Cr-Commit-Position: refs/heads/master{#630026}

--

wpt-commits: 5692bc8fe5e5ae3703dda9f0689e1d8ec3431411
wpt-pr: 15247

UltraBlame original commit: 2f27bcbec4869d7ceed7e81f7517faa1e0a75510
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 4, 2019
…PictureElement is set, a=testonly

Automatic update from web-platform-tests
Do not require user gesture if pictureInPictureElement is set

Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
Reviewed-on: https://chromium-review.googlesource.com/c/1454360
Commit-Queue: François Beaufort <beaufort.francoisgmail.com>
Reviewed-by: Mounir Lamouri <mlamourichromium.org>
Cr-Commit-Position: refs/heads/master{#630026}

--

wpt-commits: 5692bc8fe5e5ae3703dda9f0689e1d8ec3431411
wpt-pr: 15247

UltraBlame original commit: eed8064109e8e669fb76b940f8bc7fcc2a225b23
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
…PictureElement is set, a=testonly

Automatic update from web-platform-tests
Do not require user gesture if pictureInPictureElement is set

Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
Reviewed-on: https://chromium-review.googlesource.com/c/1454360
Commit-Queue: François Beaufort <beaufort.francoisgmail.com>
Reviewed-by: Mounir Lamouri <mlamourichromium.org>
Cr-Commit-Position: refs/heads/master{#630026}

--

wpt-commits: 5692bc8fe5e5ae3703dda9f0689e1d8ec3431411
wpt-pr: 15247

UltraBlame original commit: 2f27bcbec4869d7ceed7e81f7517faa1e0a75510
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
…PictureElement is set, a=testonly

Automatic update from web-platform-tests
Do not require user gesture if pictureInPictureElement is set

Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
Reviewed-on: https://chromium-review.googlesource.com/c/1454360
Commit-Queue: François Beaufort <beaufort.francoisgmail.com>
Reviewed-by: Mounir Lamouri <mlamourichromium.org>
Cr-Commit-Position: refs/heads/master{#630026}

--

wpt-commits: 5692bc8fe5e5ae3703dda9f0689e1d8ec3431411
wpt-pr: 15247

UltraBlame original commit: eed8064109e8e669fb76b940f8bc7fcc2a225b23
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
…PictureElement is set, a=testonly

Automatic update from web-platform-tests
Do not require user gesture if pictureInPictureElement is set

Following w3c/picture-in-picture#116, it
would be great to allow video to enter Picture-in-Picture without user
activation if there's already a visible PiP window in the context of the
document, in other words if `document.pictureInPictureElement` is set.

Bug: 928697
Change-Id: I2c191368d8dd1bd6ddade719399d0679ef410575
Reviewed-on: https://chromium-review.googlesource.com/c/1454360
Commit-Queue: François Beaufort <beaufort.francoisgmail.com>
Reviewed-by: Mounir Lamouri <mlamourichromium.org>
Cr-Commit-Position: refs/heads/master{#630026}

--

wpt-commits: 5692bc8fe5e5ae3703dda9f0689e1d8ec3431411
wpt-pr: 15247

UltraBlame original commit: eed8064109e8e669fb76b940f8bc7fcc2a225b23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants