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
761 stars 60 forks source link

Check nested iframes for video elements #36

Open KZeni opened 7 years ago

KZeni commented 7 years ago

I've added a function which checks the iframes on a page for same source policy and then checks if they have a video in them. It's even potentially recursive if the site uses nested iframes. The existing video element locating is used first & all other functionality should be left working as it was previously. That being said, I haven't yet tested this code within the safari extension itself.

Here's an example of a site using nested iframes for their self-hosted video element: https://www.giantbomb.com/chat/

jeffbax commented 6 years ago

Not sure if it is related, but I noticed that the videos on PBS also tend to be wrapped in an iframe and thus unfortunately don't work with PiPifier. I'm guessing this is to do with most iframe videos?

Example here: http://www.pbs.org/the-farthest/video/