News for hackers. Stuff that matters.
Re:Building Firefox's Picture-in-Picture Support by prook on Sunday February 09, 2020 @03:38PM (#22284160)
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 video into PiP mode and then go diving for the original tab to seek 10 seconds back to rewatch an interesting moment seems utterly bizarre.

2) I've grown to truly hate this kind-of-PiP thing many websites (news outlets mostly) do: Autoplay a video and then shove it to lower right corner when I try to scroll away. Along with timed "subscribe to newsletter" popup, this is an insta-close for me; Now why would I want to replicate this behavior elsewhere?

3) I'm literally unable to read through even the first words of that blogpost because of that gif. Now, thanks to this PiP feature, I can make any text unreadable by placing a distracting video on my screen.

While I'd welcome features that fight distraction (and not support attention fragmentation), there obviously is (significant part of?) FF userbase that will make use of this feature. Good for them.

Luckily for us grumpy farts, that blue PiP button can be turned off in preferences, we can mutter something about bloat, but generally go on with our lives.

Re:Building Firefox's Picture-in-Picture Support by cpeterso on Sunday February 09, 2020 @04:50PM (#22284569)
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.
Re:Building Firefox's Picture-in-Picture Support by MayeulC on Sunday February 09, 2020 @06:49PM (#22285182)
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 by aasasd on Sunday February 09, 2020 @08:56PM (#22285775)
Suggested videos can be ‘disabled’ with rules in uBlock Origin or other extensions. I'm not at the desktop so you'll have to search the web for the exact element classes/ids.
Re:Building Firefox's Picture-in-Picture Support by aasasd on Monday February 10, 2020 @12:49AM (#22286702)
Here's the class, stick this in the ‘my filters’ of uBO:

  youtube.com##.ytp-pause-overlay
Re:Building Firefox's Picture-in-Picture Support by tialaramex on Sunday February 09, 2020 @10:17PM (#22286172)
Are you sure Youtube's keyboard shortcut for pause is "Space" for you? For me it's K, with J being jump backward a few seconds and L being jump forward a few seconds. I don't know if the media buttons (Pause, Rewind, Fast Forward) would also work as this keyboard pre-dates Windows 95 so it doesn't have anything like that. [ Yes I should buy a new keyboard... ]
Re:Building Firefox's Picture-in-Picture Support by MayeulC on Monday February 10, 2020 @06:30AM (#22288203)
Thank you, I hadn't realized there were separate keyboard shortcuts, even though the one for pause is indicated on hover.

Even though space conflicts with toggling the currently selected item (tab/space), it is the more common shortcut in video player applications, and is quite easy to reach. I also think that mouse clicking an element shouldn't change the keyboard selection to that one.

Not sure how those media control are interpreted, I think I usually set them to control the MPRIS interface, so they would at the very least work on KDE with plasma browser integration.

Written with my SUN type-7 keyboard

Re:Building Firefox's Picture-in-Picture Support by ygra on Monday February 10, 2020 @08:38AM (#22288953)
Space works as long as the video player has keyboard focus. Otherwise the default browser behavior takes over which is the same as Page Down.
Re:Building Firefox's Picture-in-Picture Support by retox on Sunday February 09, 2020 @11:03PM (#22286349)
You can use stylish to remove the suggested popup div, if there's any interest I will put up a gist somewhere. I also wrote some custom CSS to center the controls rather than have them spread across my ultra-wide monitor. Huge quality of life improvement if you watch a lot of yt.
Re:Building Firefox's Picture-in-Picture Support by retox on Monday February 10, 2020 @01:07AM (#22286771)
Here are my stylesheet changes; https://pastebin.com/mRgPWKTd
Re:Building Firefox's Picture-in-Picture Support by fiddlerwoaroof on Sunday February 09, 2020 @04:01PM (#22284274)
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.
Re:Building Firefox's Picture-in-Picture Support by tetris11 on Sunday February 09, 2020 @05:40PM (#22284825)
Same, also for YouTube, KimCartoon and many others.

The reason I mention them is because the window ID of the PiP is fixed, meaning that I can easily define a window rule for it in my desktop environment independent from Firefox

I'm loving this.

Re:Building Firefox's Picture-in-Picture Support by joaobeno on Monday February 10, 2020 @11:13AM (#22290368)
Thanks man, I didn't know this...
Re:Building Firefox's Picture-in-Picture Support by gbrown on Sunday February 09, 2020 @06:31PM (#22285090)
It blows my mind that you can watch Netflix and program at the same time.
Re:Building Firefox's Picture-in-Picture Support by LandR on Sunday February 09, 2020 @08:05PM (#22285566)
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 by fiddlerwoaroof on Sunday February 09, 2020 @07:25PM (#22285390)
It's definitely not as efficient, but when I'm doing repetitive work it helps
Re:Building Firefox's Picture-in-Picture Support by rtpg on Sunday February 09, 2020 @10:47PM (#22286294)
The analogy I like is how people listen to the radio while driving. Sometimes you’re just doing something pretty simple (like a tedious refactor) and can move forward while watching something else
Re:Building Firefox's Picture-in-Picture Support by _jal on Sunday February 09, 2020 @06:32PM (#22285093)
> 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 by Fnoord on Sunday February 09, 2020 @05:53PM (#22284898)
My main complaint is that subtitles don't work with it (on Netflix, at least).

You don't have to use it. For me, it works when I'm trying to dual task on a single monitor. For example, I use it regularly on my smartphone (with a native video player).

As for the example you mentioned: the issue is autoplay. Netflix just rolled out an update when they allow you to disable that non-feature.

Re:Building Firefox's Picture-in-Picture Support by conradfr on Monday February 10, 2020 @08:56AM (#22289092)
Another thing with Netflix is that they somehow reload the page between episodes so you have to go back to the page and re-enable the PIP.

Youtube does not.

Re:Building Firefox's Picture-in-Picture Support by madeofpalk on Sunday February 09, 2020 @07:31PM (#22285417)
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.