arnoappenzeller / PiPifier

PiPifier is a native macOS 10.12 Safari extension that lets you use every HTML5 video in Picture in Picture mode
MIT License
756 stars 60 forks source link

Hulu PiP #32

Open jessearmstrong opened 7 years ago

jessearmstrong commented 7 years ago

I can't get PiPifier to work with Hulu but I've read articles on the internet saying it should. Is this possible? Am I doing it wrong?

arnoappenzeller commented 7 years ago

I'm located in Germany so I don't have access to Hulu to test. If Hulu uses HTML5 video it should be possible.

Maybe someone else can test this

jessearmstrong commented 7 years ago

I can't figure out how Hulu works actually. I don't have Flash installed on my system but that damn thing acts like Flash. It's really confusing. I don't see a way to force it to use HTML 5, and if I change my user agent, it just tells me to download the app.

nallenscott commented 6 years ago

Hulu uses html5 in the absence of flash, but there are multiple video tags on the page for ads, intro, and feature content. PiPifier may be tripping on the extra tags.

Another option is to paste the script below into the URL field of a new bookmark. Then just click the bookmark when you are on the video page. Works like a charm:


javascript:(function(){document.querySelectorAll("video").forEach(function(video){if(window.getComputedStyle(video).display!=='none'){video.webkitSetPresentationMode("picture-in-picture");}});})();
jessearmstrong commented 6 years ago

OH MY GOD! This bookmarklet works as advertised! This might change my life...

THANK YOU! I've been beating my head against Hulu's player for months in agrevations (because you can't resize it beyond a certain point and the breakout never works for me for some reason... And even if it did, it wouldn't stay on top!)

tommymcdonald commented 6 years ago

@nallenscott Beautiful solution, thank you so much for this 🙏