Browser Picture in Picture

Browser Picture in Picture

Nov 27, 2020ยท

4 min read

Play this article

That platform I"m working on has integrated video which we use for stand up and team meetings. We'd like to use the backlog and update stories when in a meeting without having to open extra tabs so I've been tasked with spiking out browser Picture in Picture functionality.

Is it a viable option? Let's find out...

What is browser Picture in Picture (PiP)?

mozilla has a great description []:

Picture-in-Picture feature allows you to pop videos out of their webpage into a floating, always on top, window so you can watch while continuing to work in other tabs. You can move the Picture-in-Picture window around the screen and resize it to your liking.

Picture in Picture sample

You can play with Chromes demo app here:

Picture in Picture browser support

At the time of writing this post reports a global usage of 89.85%, far higher than I expected. We're targeting evergreen browsers so all good here, no IE 11 to worry about ๐Ÿ™‚.

Picture in Picture API

The PiP api looks very simple and should be easily callable from our platform.

function togglePictureInPicture() {
  if (document.pictureInPictureElement) {
  } else {
    if (document.pictureInPictureEnabled) {


React Picture in Picture

Is there an existing react component that will save me having to do any work? ๐Ÿ˜‰ A quick search on came up with:


  • Version: 1.4.1
  • Published: 2 months ago
  • Weekly Downloads: 37
  • License: MIT
  • Bundle phobia: Minified 3.1kb, Minified + Gzipped 1kb


  • Version: 1.0.0
  • Published: 10 months ago
  • Weekly Downloads: 86
  • License: MIT
  • Bundle phobia: Minified 1.2kb, Minified + Gzipped 634b


  • Version: 1.0.0
  • Published: 1 year ago
  • Weekly Downloads: 2
  • License: MIT
  • Bundle phobia: Minified 863b, Minified + Gzipped 440b

Weekly downloads on these components are very low, either no one is using Picture in Picture or the API is so simple people are writing their own hooks.


The biggest limitation that affects our use case is only being able to use HTML Video Element for PiP. We need to have multiple Video elements, one for each meeting attendee and custom buttons for changing meeting modes.

Its a NO for now but maybe useable in the future?

The W3C specification mentions (

The API only applies to HTMLVideoElement at the moment but is meant to be extensible.

If that ever becomes reality we'll take another look ๐Ÿ™‚

Until next time!