Skip to content

Instantly share code, notes, and snippets.

@pmarquees
Last active April 29, 2022 08:22
Show Gist options
  • Save pmarquees/206e42e6719539e001cd36c735111cfb to your computer and use it in GitHub Desktop.
Save pmarquees/206e42e6719539e001cd36c735111cfb to your computer and use it in GitHub Desktop.
Youtube Picture in picture

Youtube Picture-in-pitcure

Picture-in-Picture (PiP) allows users to watch videos in a floating window (always on top of other windows) so they can keep an eye on what they’re watching while interacting with other sites, or applications. Watch YouTube videos in Picture in Picure without installing any extensions by using the "new" requestPictureInPicture

How to use

  1. Add a new bookmark.
  2. Copy youtubePip.js and paste it into the URL field of the bookmark.
  3. Save.
  4. Click the bookmarklet in a YouTube tab and voilá!
  5. Profit
javascript:document.getElementsByTagName('video')[0].requestPictureInPicture();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment