Media & Capture

Picture-in-Picture

Probing…

Picture-in-Picture is a web platform capability in the Media & Capture category. Pop videos out into a floating always-on-top window. Supported in Chromium 70+ and Safari 13.1+; not available in Firefox. Requires a user gesture such as a click or tap.

User gesture

Try it

Loading demo…

Code

// Feed a canvas animation into a <video>, then float it
const stream = canvas.captureStream(30)
video.srcObject = stream
await video.play()

await video.requestPictureInPicture()
video.addEventListener('leavepictureinpicture', () => console.log('closed'))

await document.exitPictureInPicture()

Browser support

Chromium
70
Firefox
No
Safari
13.1

Frequently asked questions

Which browsers support Picture-in-Picture?

Supported in Chromium 70+ and Safari 13.1+; not available in Firefox.

Does Picture-in-Picture require HTTPS?

No. Picture-in-Picture works without a secure context, though serving your site over HTTPS is always recommended.

What is Picture-in-Picture used for?

Pop videos out into a floating always-on-top window.

Can I try Picture-in-Picture in my browser?

Yes. shwcs.net runs a live Picture-in-Picture demo that probes your current browser and lets you try the API. Everything runs locally — nothing is sent anywhere.

MDN reference ↗ Specification ↗