Live data from Hacker News

Building Firefox's Picture-in-Picture Support

hacks.mozilla.org

91–100 of 133 posts

Re: Building Firefox's Picture-in-Picture Support

#91
post #46

At first I didn't even realize this was FF feature (I suspected something like gstreamer, but was lazy to investigate). Now that I know it is indeed FF, I just cannot wrap my head around it... 1) I can pause the video, but cannot navigate it. I guess the navigation would be there if it was technically possible, but from practical standpoint this makes it useless even if it appealed to me in other ways. Popping a vide…

I am told that Firefox Nightly now allows you to use keyboard shortcuts to seek the video. Part of the problem here is that there are some sites that have special logic around seeking, so having playback controls on the PiP popup can cause the original page's custom controls to get confused or out of sync.

That would be great. My main use-case is watching youtube videos.

When watching a video, I often pause (space) to have a better look at what's on the screen [-> rewind (left)] -> play (space)

I absolutely loathe youtube's "suggested videos" that pop in my face when I try to focus on a specific frame. I never used that feature, it's just a way to shove ads in my face. Moreover, if I close it, the open/close button is now focused, and space brings it up again instead of resuming the video. This is tedious.

I thought that PiP would solve that, but it looks like I cannot pause the video with space if I haven't clicked the pause button already, and I can't seek.

I often just revert to pasting the URL for mpv to open it after getting frustrated and losing my time with both other methods.

Re: Building Firefox's Picture-in-Picture Support

#92

Earlier quoted context omitted.

I use it a lot because I have only one monitor.

Couldn't you just open it in a new window and resize/tile your existing windows?

Websites often change their layout depending on the window size. If you simply make the window smaller, the website may switch into a different layout that makes the video even smaller. It doesn't solve the problem of showing just the video with nothing else.

Re: Building Firefox's Picture-in-Picture Support

#93

People using tiling window managers like i3 or sway should get friendly with this feature. It allows me to "full window" (note: not screen) netflix/amazon/YouTube videos in a tile which was impossible to do without PIP.

Well, there's this PR... https://github.com/swaywm/sway/pull/4255 :)

> [...] However, one may simply wish to consume the fullscreen UI, not actually fullscreen the application [...]

> This PR implements a fullscreen inhibition feature in sway. When inhibited, sway will answer fullscreen requests correctly, but will not fullscreen the container.

Re: Building Firefox's Picture-in-Picture Support

#94
post #89

Earlier quoted context omitted.

I recommend using mpv with the open-with extension instead (right click -> open with -> mpv.) Thanks to youtube-dl, mpv will handle most any video website except netflix. If you tell mpv to stay-on-top, the effect essentially picture-in-picture, but with the full capability of mpv. You can drag new links into mpv to change what video is playing (hold down shift while dragging in a new link to append to the playlist.)…

I tried this because FF doesn't do hardware video decoding yet, and, on an older laptop, FF was taking up a whole core for watching YouTube vs. around 30% in mpv. Unfortunately every "open with.." solution I tried though took 10-15 seconds to open the video in mpv, which turned out to be even more frustrating than the problem.

I've experienced what you describe. I think the problem is most severe when you're on a high-latency connection, such as a VPN to an endpoint far away, because there are a few round trips in the process with youtube-dl. I don't really have a solution to that, but using --force-window=immediate can help a little (it will make a blank mpv window appear immediately, before the video is ready, so at least you aren't left wondering whether you misclicked prior to the video starting.)

Re: Building Firefox's Picture-in-Picture Support

#96
post #85

Earlier quoted context omitted.

I use this all the time to watch Netflix while programming: put Netflix in PiP mode, then put the resulting window in the corner and switch to other applications to work.

It blows my mind that you can watch Netflix and program at the same time.

It's definitely not as efficient, but when I'm doing repetitive work it helps

Re: Building Firefox's Picture-in-Picture Support

#97
post #46

At first I didn't even realize this was FF feature (I suspected something like gstreamer, but was lazy to investigate). Now that I know it is indeed FF, I just cannot wrap my head around it... 1) I can pause the video, but cannot navigate it. I guess the navigation would be there if it was technically possible, but from practical standpoint this makes it useless even if it appealed to me in other ways. Popping a vide…

I’m not a super big fan of Firefox’s implementation here, but at the end it’s just about giving users options. The poor website behaviour you described is poor because it’s unexpected and you often don’t get much control over this.

In Safari, I like that I can pop a YouTube video out and then carry on coding or doing whatever. I think of it just like full screen mode.

Re: Building Firefox's Picture-in-Picture Support

#98
post #85

Earlier quoted context omitted.

I use this all the time to watch Netflix while programming: put Netflix in PiP mode, then put the resulting window in the corner and switch to other applications to work.

It blows my mind that you can watch Netflix and program at the same time.

Sometimes coding is just mindless typing some boiler plate. It's easy to pay attention to something else. I see it like listening to podcast or something while mindlessly grinding in a game.

Re: Building Firefox's Picture-in-Picture Support

#100
post #48

On mac os its mostly unusable, because this PIP window stays on same workspace. My browser is always fullscreen and in safari I can open small youtube window and move to other workspace (code, for example) and window still exists on each of them.

This would be one advantage of the system's built-in PiP mode employed by Safari. I don't find the limitations (maximum size, single video) to be hinderances.

I wish Safari could just open the video in a normal QuickTime Player window instead of a QuickLook-esque thing...
Post reply on HN