Live data from Hacker News

Building Firefox's Picture-in-Picture Support

hacks.mozilla.org

81–90 of 133 posts

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

#81

Earlier quoted context omitted.

> impossible to do without PIP. This is not my experience. I see no added value in this PIP. I use XMonad, which is a tiling window manager. I've always been able to put a video into applicative full screen, then switch the layout to whatever I want. E.g. 2 browsers windows each playing a borderless video. Before XMonad, I remember that when I switched to another workspace/window and back, my browser window would hav…

There's a reason I mentioned only i3 and sway, they stick to managing _windows_ and thus only inform the application of their window size. Screen size is unabated by them, thus when applications that have a full screen mode size-up they get the real screen size. I3 author(s) specify purity as their reasoning for this and I actually agree with them. There are some other nuances with full screen that tie into this, too…

XMonad's[0] default behaviour of being able to separately tell a program to go "fullscreen" (i.e. hide most UI) and control what portion of the screen its window takes up is extremely valuable, since many programs don't give you the option of separately hiding their UI, and it's only possible by making them go fullscreen. However, being able to hide the UI is actually most valuable when there is more than one window on the screen... This is especially important when you have a small (or average-sized) screen, but it's also useful on larger ones to avoid distractions.

Getting the "normal" fullscreen is just two keyboard shortcuts away ("fullscreen" the program and assign its window the entire screen), rather than one. From an intuitiveness point of view, being able to hide a program's UI and change its window size separately is arguably more intuitive — according to the separation of concerns, the former is managed by the program itself and the latter by the WM.

PiP is really nice, but videos aren't the content for which getting a distraction-free experience is most important...

[0] I'm sure that it's also possible with other tiling WMs such as ratpoison, stumpwm, awesome etc.

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

#82

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.

I was very pleasantly surprised to see how well this worked with i3, even if it was technically possible to get something equivalent with a lot of button presses, Firefox PIP is a lot easier.

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

#83
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.

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.)

https://github.com/darktrojan/openwith

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

#85
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 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.

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

#86
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've grown to truly hate this kind-of-PiP thing many websites

Yep. This is the quickest way to chase me off your site and ensure I don't follow links to you.

I seriously would be perfectly fine with a browser that did not know how to play video or animate gifs.

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

#87

> Given that it would be available on any video content, the feature needed to be discoverable and straight-forward for as many people as possible. This is the designer’s nightmare: Every feature needs to be available to everyone, therefore be visible on the screen. Yet they only cite rare usecases: « Watching sports event while continuing to browse the web ». In the meantime, the blue tone isn’t generally consistent…

> This is the designer’s nightmare:

Web designers are users' nightmares. Hiding a useful feature just because you don't like the color, to scratch your designer itch, isn't helpful to users.

The article says: "ideal if, for example, you want to keep an eye on that sports game while also getting some work done." This is only mentioning a single use-case, not enumerating all possible use cases. It's useful for a hell of a lot more than just sports. (Also, watching sports may be rare for you and I, but I don't think that qualifies as a rare usecase for the general population.)

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

#88
post #63

Earlier quoted context omitted.

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.

Can't you trigger that in Firefox also by right clicking on a video (or twice on YouTube) and then choosing PiP?

Problem is Firefox PiP don’t move other desktops on macOS. It is only available at where your window is.

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

#89
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.

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.

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

#90
post #13

Picture in Picture is great for lectures or follow-along tutorials and I'm glad people are taking it more seriously (initially was using Youtube on Safari purely because of this feature, but later on Chrome had it... albeit a bit wonky, I started using it on Chrome normally).

I would love to have an external controller for start/stop/fast forward/rewind when watching tutorials on Youtube. For example a controller [1] people are using to edit videos. Quite often I would like to pause the video for a while, repeat last 30 sec or by-pass some boring segment. [1] https://www.amazon.com/Contour-Design-Shuttle-Xpress-Multime...

I hesitate to mention mpv a second time in the same thread, but using mpv should make this fairly easy. You can control mpv over a unix socket, which should allow you to implement nearly any custom control scheme you can think of.

https://mpv.io/manual/master/#json-ipc

Post reply on HN