Picture-in-Picture API
Checking compatibility...
Create floating video windows that stay on top, allowing users to continue watching media while interacting with other content or applications.
Basic PiP Control
Create a floating video window with simple controls. This example shows how to make a video pop out into its own window that stays visible even when you switch to other tabs or applications.
=
=
=
=
=
=
Output
Click Run to see output...
Custom PiP Window
Access information about the floating video window. This example demonstrates how to get the dimensions of the Picture-in-Picture window and detect when the user resizes it.
=
=
=
=
=
=
Output
Click Run to see output...
PiP Events
Respond to Picture-in-Picture state changes. This example shows how to detect when a video enters or exits PiP mode and how to Run Example when these events occur.
=
=
=
=
=
=
Output
Click Run to see output...