Intent to Implement and Experiment: Auto Picture-in-Picture

340 views
Skip to first unread message

François Beaufort

unread,
Jan 28, 2019, 2:22:46 AM1/28/19
to blink-dev, mlam...@chromium.org

Contact emails

fbea...@chromium.org, mlam...@chromium.org


Explainer

https://github.com/WICG/picture-in-picture/issues/111

Design doc/Spec

https://wicg.github.io/picture-in-picture/#auto-pip

Summary

Allow video in installed PWAs to automatically enter/exit Picture-in-Picture when document visibility changes.

Motivation

Video meetings web apps would benefit from automatic Picture-in-Picture behavior when user switch back and forth between web app and other applications/tabs. This is currently not possible with the user gesture requirement defined at https://wicg.github.io/picture-in-picture/#request-pip (step 6).


A declarative behaviour allows browsers to correctly implement an “auto-pip on visibility change” feature without opening up a security or annoyance can of worms. Note that this a recommended pattern to trigger Picture-in-Picture on Android.


This feature would apply only to PWAs users have installed on Desktop. We don’t want websites to use this feature for some kind of automatic popups.


Risks

Interoperability and Compatibility

Safari has shipped a vendor-prefixed API for Picture-in-Picture and we’re working with them on this addendum to the specification.


Edge: Public support

Firefox: No signals

Safari: Public support

Web / Framework developers: Positive


Ergonomics

The Picture-in-Picture Web API is still limited to video elements to punt security and compatibility (on mobile) issues around PIP-ing arbitrary HTML content and handling input events.


Activation

It will be very easy for web developers to add an “autopictureinpicture” attribute to a HTML video element.
Developer documentation will cover this feature as we did before at https://developers.google.com/web/updates/2018/10/watch-video-using-picture-in-picture.


Goals for experimentation

  • Gather feedback about the API shape

  • Validate that the API provides sufficient functionality for video meeting web apps using it to deliver user value. This will be measured by:

    • video meeting web apps that join the origin trial and choose to share their feedback

    • watch time that occurs in Picture in Picture mode


Experimental timeline

  • Starts around M73 Beta release, 2019-02-07

  • Expires when M74 Stable is cut, around 2019-04-16


Any risks when the experiment finishes?

No significant risks - content providers will feature detect and fall back to their current behavior when we disable the origin trial.


Ongoing technical constraints

None


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

The feature will be supported on all platforms that currently support the Picture-in-Picture Web API.


Link to entry on the feature dashboard

https://www.chromestatus.com/feature/5317876315586560


Yoav Weiss

unread,
Jan 30, 2019, 7:56:21 AM1/30/19
to François Beaufort, blink-dev, mlam...@chromium.org
LGTM to experiment!

This seems like a small yet useful addition to the current API, and support from other vendors around it is encouraging. 

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/53e16000-4f80-4a16-a884-cb532f295020%40chromium.org.

François Beaufort

unread,
Feb 7, 2019, 3:51:06 PM2/7/19
to blink-dev, beaufort...@gmail.com, mlam...@chromium.org
After more thoughts, we'd like to extend the original trial to expire when M75 Stable is cut, instead of M74 Stable cut.
Note that the origin trial didn't start yet.

Yoav Weiss

unread,
Feb 8, 2019, 3:35:23 AM2/8/19
to François Beaufort, blink-dev, mlam...@chromium.org
Reply all
Reply to author
Forward
0 new messages