← Back to release summary

Expose Picture-in-Picture Window in leavepictureinpicture event

Category
Multimedia
Type
No developer-visible change
Status
Enabled by default (Chrome 85)
Intent stage
Prepare to ship

Summary

Allow web developers to access pictureInPictureWindow in leavepictureinpicture event.

Motivation

Web developers won’t have to keep a global reference to the pictureInPictureWindow object that was available already in the enterpictureinpicture event.

Standards & signals

Docs: https://w3c.github.io/picture-in-picture/#example-update-video-on-window-size-changes

Explainers: As raised by Mozilla folks at https://github.com/w3c/picture-in-picture/issues/188, we should provide a way to access the Picture-in-Picture window when user-agent leaves Picture-in-Picture. This is why we’re adding a pictureInPictureWindow attribute to the leavepictureinpicture event.

View on chromestatus.com