Picture in picture mode
-
Is there a way to play a video in picture in picture mode when the website tool itself doesn't offer it? I know for example in firefox you can double right click to make it available anyways.
To clarify: image of a website that does offer it.
image of a website that doesn't:
-
@jtwillert Create a bookmark with Name "Enable PiP" with this URL:
javascript:var%20v=document.querySelector(%22video%22);v.removeAttribute(%22disablePictureInPicture%22);v.requestPictureInPicture();if(history.replaceState)%7Bwindow.history.replaceState(%7B%7D,%22%22,location.href);%7D;
Works nice for me.
-
@DoctorG Sorry, I tried making a bookmark but it wouldn't really save properly. How would I go about doing that?
-
@jtwillert Copy the complete line and paste in bookmarks URL, check if URL has
javascript:
at beginning.
I added the bookmark too bookmark bar to have quick access. If you have a page with no Picture-in-Picture, just use bookmark. -
@DoctorG I pasted it but had to type in the javascript again, that was the issue. Works, thanks a lot!
-
@jtwillert In Vivaldi is a security setting to cut the javascript: at start of a URL. Thats why it was removed.
-
@jtwillert There should be a PiP option on the double-right-click menu in Vivaldi as well. It doesn't always show though, depending on the site.
A more elegant solution than using a bookmarklet:
-
Create a Command Chain in Settings > Quick Commands, with the JS code:
-
Add the Command Chain to the Web Page context menu in Settings > Appearance, under both Audio/Video and Page menus:
Now you can trigger the JS code from the context menu
-
-
fwiw, i tried both methods on two sites, picking a random video on each.
on vimeo, for https://vimeo.com/818664199, both methods worked. however, given this site already includes native pip, this test might prove nothing.
on dailymotion, for ... well actually, four random videos, neither method worked. this site also has native pip, which does work fine.
edit: also tried various videos on https://ok.ru/video/. again both methods worked, but also again, this site already includes native pip, so did this test prove anything?