Skip to content

Instantly share code, notes, and snippets.

@alexbilbie
Created May 1, 2020 11:53
Show Gist options
  • Save alexbilbie/389591777edc21918923d7247b3ec86d to your computer and use it in GitHub Desktop.
Save alexbilbie/389591777edc21918923d7247b3ec86d to your computer and use it in GitHub Desktop.
Picture in picture
function startPiP() {
var videos = document.getElementsByTagName('video');
for(vid in videos) {
if(videos[vid].src) videos[vid].webkitSetPresentationMode("picture-in-picture");
}
}
startPiP();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment