Building Firefox's Picture-in-Picture Support
hacks.mozilla.org
hacks.mozilla.org
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.
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.
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.
youtube.com##.ytp-pause-overlayEven 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
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.
Youtube does not.
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.
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.
Glad to also have it available on Linux and Mac now. It's perfect for on-the-side Youtube videos.
I tried FF PiP recently, but I have "bspwm config honor_size_hints true" and that makes the window resize itself until it's the size of a postage stamp.
The above is a known bug in FF, though apparently fixed in FF73: https://bugzilla.mozilla.org/show_bug.cgi?id=1600414
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 have stopped being fullscreen.
I'd rather have Firefox not adding hacks to work around the flaws of mainstream window managers.
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.
> [...] 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.
For Chrome users, I was using the "Windowed - floating Youtube/every website" plugin to achieve the same effect. It also gives you the control UI, which PiP doesn't have yet.
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.
This triggered some mental alarm bells when I read it.
I understand what Mozilla is trying to accomplish, but this feels like it could become a serious WTF moment for a developer. "There is absolutely no way in hell this element should be able to receive mouse events right now, what is Firefox doing?"
Is this a problem? Perhaps the web is so far down the hacks/exceptions route that adding one more legitimately won't make a difference?
It sounds like the kind of stuff that clickjackers use, but this sounds like it could be used for even more nefarious purposes.
[1] https://www.amazon.com/Contour-Design-Shuttle-Xpress-Multime...
It typically would be a usecase for the Macbook touch bar, does anyone has one and can tell us whether it has an integration with web videoplayers?
Doesn't work within the PIP window though.
However, rewinding is probably not among standard functionality of these extensions.
If only someone would built good email client into Browser like old Opera, that would be godsend. Opera and Maxthon were ages ahead in terms of certain features.
It is little weird for me, they ended up putting video within shadow DOM container.
I've seen a couple of this breaking the video out of the main layout, but not sure if it was this Firefox feature or not. I was pretty sure that once the video broke out of the normal layout, the original location of the video was replaced with ads playing without audio. I was immediately turned of by it.
- the mechanism is about the same: the video stays in the corner
- the term ‘picture in picture’ is already familiar to people, from TVs
...so the term is generalized. Happens a lot. If the feature gets popular and the term sticks around, decades later people might search the web for ‘why is it called PiP when it's not what it does’. We can even imagine that zero videos may be involved by then (though unlikely―there are other terms for that.)
for example, this is published by google: https://chrome.google.com/webstore/detail/picture-in-picture...
Video is typically so-and-so dimensions in the bottom right-hand corner. Clicking the video (I assume) pauses it. Pausing a video (I assume) can change the request pattern for what is being streamed. Most sites use a white background (let's say).
So an attacker who controls video content can stream a still image of some site or browser security "statement" with a picture of a button to click if the statement is untrue. If the user clicks the fake button they stop the video and signal to the attacker their response to the statement.
Not super useful given an arbitrary page behind the video. But what if the video's content is about, say, how to change settings on your bank site to get a better APR? I can imagine someone assuming that the video has turned into a small "quiz" from the bank. Maybe even a "click here to proceed" button to get them to unpause the video.
think about click jacking, address bar spoofing, and similar mosaic style hijacking. that's not even getting into potential CORS and origin spoofing potential.
I am surprised that the API is modelled to only allow watching videos in PiP, while the old and mature Fullscreen API allows to put any element in full screen. These should be analogous. I don't see a reason why I can run a <video> in a small window, but not a <canvas> a <picture>, etc.
Pip needs to be common API driven (as Chrome is) to make building portable video applications possible.
A terrible misstep from Mozilla. (And yes, this has been repeatedly raised on the bug tracker with no answer)
So much of the modern web is "run your code on my computer," so this feels nice, where the browser is my tool to browse the web.
Ah yes, Mozilla should follow the steps of Google's web experiments playground, the Chrome browser. Every month we hear about a new self-serving feature implemented by Google/Chrome engineers.
The web is slowly drifting to the IE days again, and of course this move by Mozilla doesn't help it, but let's not forget the bigger culprit.
Too bad it is "under" the button to switch to the next video, so I can't actually click it...
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 with the websites’ colors.
I would have supposed moderatelt-used features belongs in the right-click menu like the rest, or they need to find a way to merge it with the video controls (I guess an Apple designer would imagine a new kind of special press to detach the video, which is fine too).
I imagine if you intently watch videos it’s not useful, but for multitasking it’s great. Or note taking etc.
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.)
SymfonyCasts is an example where I like the videos. They aren't the typical YouTube style of "let me talk about random things for 5 minutes so I get this video over the 10 minute mark", they get pretty much straight to the point. They have a text version below, which also makes search easy, And you can click on any sentence in the text version to jump to the right position in the video. I found them very helpful when I started with Symfony, but haven't really watched any once I had a solid enough understanding to get work done and incrementally learn more things as I need them.
The 'failure mode' for a lazy text tutorial is that important details are left out. The 'failure mode' for a lazy video tutorial is that they didn't edit anything out.
In the end everybody eventually needs to learn from written content; not only for the viewers efficiency, but also because it's more efficient for content creators to produce written content over video content.
You can even guess your 'reckon' from looking at the kind of video content that is out there - again, this seems mostly to be a consequence of creator efficiency.
With that said, who cares?
Hell, I sometimes hit up streams - for instance, Antirez has been streaming himself building out parts of Redis 6, because it may introduce me to new techniques or minutae I didn't know. It's way, way, way more chill than reading source code, and it's a lot better than the blog post on it he probably won't write.
(YouTube PIP is kind of difficult to discover; you have to right-click, move the mouse off the menu, and right-click again to get the native right-click menu, which is where the PIP button is.)
it allows me to size video frames arbitrarily across streaming sites like CyTube that don't support frame-out natively.
As someone who had to use mosaic and gopher and all that shit, i'd really rather not revisit it. It's nice in the way that it's sort of quaint to boot up an old workstation that has nothing but QBASIC, but it's not actually pleasant or useful.
I wish it was a little bit easier to maximize on other monitors
instead of having to try to resize it perfectly