Chrome for Developers Blog:
From Chrome 120, video conferencing web apps can automatically open a picture-in-picture window when the user switches focus from their current tab. This is useful for presenters who want to see and interact with participants in real time while presenting a document or using other tabs or windows. See Automatic picture-in-picture for video conferencing web apps for details.
From Chrome 134, web apps that play audio or video can automatically enter picture-in-picture mode. This means that music and video players on the web can now seamlessly switch to a mini player window when the user switches tabs, eliminating the need for manual activation.
This feature is being gradually introduced in Chrome 134 and later versions. To enable and test this feature immediately, enable the "Auto picture in picture for video playback" flag at chrome://flags/#auto-picture-in-picture-for-video-playback.
To support these media playback use cases, from Chrome 134 desktop web apps can automatically enter picture-in-picture, with a few restrictions to ensure a positive user experience. A web app is only eligible for automatic picture-in-picture for media playback if it meets all of the following conditions:
- The top frame URL is safe according to the Safe Browsing service.
- The media lives in the top frame.
- The media has been audible within the last two seconds.
- The media has audio focus.
- The media is playing.
- A media session action handler for the "enterpictureinpicture" action has been registered.
- The user's Media Engagement Index threshold has been exceeded, indicating that the user frequently consumes media in this web app. This applies if the user's browser setting is "Can ask to enter picture-in-picture". If the user explicitly allows the web app to enter picture-in-picture, this condition does not apply.
![browser-setting.jpg](/proxy.php?image=https%3A%2F%2Fdeveloper.chrome.com%2Fstatic%2Fblog%2Fautomatic-picture-in-picture-media-playback%2Fimage%2Fbrowser-setting.jpg&hash=aab9d994112be885543f059074b74a64)
Automatic picture-in-picture setting in Chrome browser site information pane.
Read more:
![developer.chrome.com](/proxy.php?image=https%3A%2F%2Fdeveloper.chrome.com%2Fstatic%2Fblog%2Fautomatic-picture-in-picture-media-playback%2Fimage%2Fthumb.jpg&hash=2281754cd72150d3c4a0607ffcffcafe&return_error=1)
Enter picture-in-picture automatically when playing media | Blog | Chrome for Developers
Chrome allows web apps playing media to automatically enter picture-in-picture.
![developer.chrome.com](/proxy.php?image=https%3A%2F%2Fwww.gstatic.com%2Fdevrel-devsite%2Fprod%2Fv0f39da1ecc369fa6a1c816bfa5d8f549228499e733c9bd8becc473543aa6caa2%2Fchrome%2Fimages%2Ffavicon.png&hash=1725f73f067e6ff3eae960ad0f2b9240&return_error=1)