Skip to content

Instantly share code, notes, and snippets.

@amberstar amberstar/PiP
Created Jun 14, 2019

Embed
What would you like to do?
Javascript to make video on current page PiP
javascript:(function(){document.querySelectorAll("video").forEach(function(video){if(window.getComputedStyle(video).display!=='none'){video.webkitSetPresentationMode("picture-in-picture");}});})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.