Skip to content

Instantly share code, notes, and snippets.

@alexbilbie
Created May 1, 2020 11:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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