
Firefox Picture-in-Picture - raldu
https://blog.mozilla.org/firefox/firefox-picture-in-picture-mode/
======
bentcorner
PiP is such a great feature. I have no idea how easy/hard it was to implement
but it feels nice to use. It does exactly what you'd expect it to do and
nothing more.

I use it while watching overwatch league games in the browser because it
allows me to resize the popped-out video arbitrarily, instead of the site's
embedded youtube player options of either tiny-window-in-browser or full-
screen sizes (there is no theater mode in the embedded player for some
reason).

~~~
asdff
It is a little clunky and could use a good deal of polish. For example, you
can only PiP one video, and controls remain in the tab with the video frame.
PiP only gives you play/pause, no scrubbing or anything from the embedded
player. The always on top is a feature for some, but can be a hindrance, too.
That behavior should be a toggle for the user so they can use their tools how
they like.

~~~
catalogia
These are a few of the reasons I've continued to use the "Open With" extension
with mpv. _([right-click]- >Open With->mpv)_ This provides full playback
control, lets me toggle stay-on-top, etc. Firefox's PiP is a nice thought but
just isn't right for me as currently implemented.

~~~
apetresc
Sorry, which extension is this? The only one I was able to find named "Open
With" is pretty clearly not what you were referring to.

~~~
vezycash
MPV is a player. [https://mpv.io/](https://mpv.io/)

~~~
apetresc
Oh, I know all about MPV. Invoking it cleanly from within Firefox is the part
I was asking about (and which has been answered :)

------
avian
Is anyone else annoyed that Mozilla chose to spam them with an ad for this new
feature via the email address they received when creating the Firefox sync
account? Is this really such an important thing that warrants sending an
unsolicited message to every Firefox user's inbox?

Yes, the footer says "You're receiving this email because .. is subscribed to
Firefox Account Tips." and indeed I can now see that setting in my Firefox
account. I'm sure that checkbox popped up sometime after I created the account
and was conveniently set to "true" by default.

~~~
WrtCdEvrydy
> I'm sure that checkbox popped up sometime after I created the account and
> was conveniently set to "true" by default.

Someone got paid to sell you out and cashed their check on your privacy. I
wonder if they have a gdpr contact and what it would look like if you
forwarded this and told them you did not consent to it.

~~~
zaarn
GDPR doesn't handle sending marketing mails and even in the EU it is entirely
fine to send those by default as long as they directly related to your product
("assumed consent of consumer" is the key word here). Firefox does offer a
complete opt-out last I checked that works entirely fine (never received a
mail after unsubscribing to marketing mails)

------
knasmai
I love PiP and it's def great in WFH situation where I can just have YouTube
videos playing on the side.

If anyone from Mozilla is reading this, one thing I wish Firefox did was to
allow us to make it sticky to the corner like Safari does on MacOS.

I think just throwing the PiP window to a corner and expecting it to be there
is subtle difference but makes the overall experience much simpler. I don't
having to decide where exactly to position the video and keep moving it little
by little. Also, if I push the Safari PiP video against the edge of the
screen, it simply collapses. That's helpful when the video is blocking
something I care about and I need to quickly hide it. Again, simpler
experience than allowing free form movement for my workflow.

~~~
saagarjha
Yeah, sadly Firefox doesn't use the native PiP implementation :(

------
actionowl
I'm really surprised to see how many people appreciate this feature. I've
tried to use it many times but I've found that when I'm watching a video I
either want to give it my full(screen) attention (movie, entertainment) or
have it in the background entirely (music, news, podcast.) I've personally not
found a use for it and end up closing it after about 5-10 minutes.

~~~
SV_BubbleTime
I like more than thought I would. I can keep going through tabs without losing
the video.

The problem for me is it doesn’t have controls past pause and play. If I want
to back the video up or skip it forward I need to go figure out which tab it’s
coming from, and I can’t remember if I have to unpop to get controls. Windows
10, ymmv.

~~~
avery42
This also annoys me. Even just allowing arrow keys to seek back and forth
would be enough for now.

~~~
CanisDirus
That can be enabled with _media.videocontrols.picture-in-picture.keyboard-
controls.enabled_ toggle in about:config.

~~~
avery42
Woah that's perfect, thank you!

------
detaro
Mozilla Tech Blog from January on implementing it:
[https://hacks.mozilla.org/2020/01/how-we-built-picture-in-
pi...](https://hacks.mozilla.org/2020/01/how-we-built-picture-in-picture-in-
firefox-desktop/)
([https://news.ycombinator.com/item?id=22283386](https://news.ycombinator.com/item?id=22283386))

------
brospars
Wait this is not new is it ? Ive beenm using it for the past 6 months at
least...

~~~
ckcheng
Yeah, I've been able to use it for months (FF on Mac)... Was it rolled out to
certain computers for testing before?

~~~
00deadbeef
Same here. FF on Mac. I’ve been using it since lockdown began in the UK in
March. It’s been really handy to keep BBC News in the corner of the screen
when the Government was doing daily briefings.

------
t0astbread
PiP is a cool feature but I've recently found another way to "stream" video
from the web which is now pretty much my default: For a lot of sites you can
either curl or youtube-dl the video to a file and thanks to the way encodings
and container formats work you can just play the file back using your favorite
media player while the download is still in progress. You can't seek past the
download head unfortunately but the playback you get is much more pleasant
(and for some reason also faster?) than say, on YouTube.

~~~
tartoran
I use it directly from VLC when I need to boost up the sound a few db beyond
the original threshold

~~~
t0astbread
Wait, VLC has a youtube-dl integration?

~~~
thaumasiotes
mpv does, if that's what you're looking for.

~~~
t0astbread
Oh that's nice! I was actually already using mpv for playback but I never
noticed this feature. The only disadvantage this has over my stitched together
setup is that I don't get to keep the video afterwards but it fixes a lot of
pain points.

~~~
thaumasiotes
I mean, if you want to keep the video afterwards, you can just download it and
then play it.

Which also has the advantage that playback will always be smooth. That's
almost always true of playing directly from a youtube URL, but I have had
occasional issues. Most notably that leaving a straight-from-youtube video
paused long enough will get it into a state you can't resume from.

~~~
t0astbread
Yeah, that's one of my biggest peeves with the YT player as well.

I often watch talks or similar kinds of (long) videos in the bg some of which
I might wish to keep that's why I like being able to download and view at the
same time. But downloading a second time during quite hours is probably also
fine.

------
gbolcer3
There are a couple of sites that auto-started video and when you scrolled
down, automatically did picture-in-picture. In fact I think Facebook even
experimented with it for a while. The problem with those implementations was
that the user had no control over which videos, nor the ability to prevent
them from displaying. It took a heavy amount of NoScript isolation to prevent
it from happening. I always thought it would be useful if someone would write
something that put the user back in control.

------
kevincox
I wish it worked by using the regular web fullscreen API to pop out. Instead
of going fullscreen it would just spawn a chromeless window that I can
position anywhere I want and control using my regular window manager controls.
As an advantage this would give sites full control over the content including
having the full video (or other content) controls instead of just play which
is what Firefox PiP gives you.

~~~
hobos_delight
I completely agree - I use i3 and was interested to see that this just pops up
a floating window over all of my others.

When reading the feature my thought was that it would be a floating window
_within_ the browser window - which I think I would have preferred.

~~~
kevincox
I disagree with that. The browser already does too much "window management"
already. I like that it pops out a separate window that I can do with what I
please rather than being limited to whatever window management functionality
they decide to add to their internal "window".

~~~
hobos_delight
Possibly - but in my case the windows was just floating on top of all of my
other windows, and whilst I could move and resize it, I could not move it like
other windows.

So popping out a new firefox window that operates like a normal window would
be great, but the current solution seems like the worst of both worlds.

Also on an unrelated note, seeing your username we used to work together -
hope all is going well :)

~~~
kevincox
Ah, that is weird. The window behaved fairly normally for me. (I'm on Linux
Wayland)

~~~
Izkata
Do you happen to use sway? (Or maybe just Wayland in general does it..)

I'm using a tiled window manager on X and was rather confused by other
comments here, before realizing my window manager must be giving me unintended
control over the video popup. I just get a floating window that's fully
draggable and resizable identically to other windows.

~~~
kevincox
I'm using Gnome actually. I have found that Wayland tends to keep some apps in
check so maybe the less options that Wayland provides to clients is helping me
here.

------
hasbot
I've been using this a lot lately for YouTube videos so I can watch a video
and keep web surfing. Works great, though the PiP doesn't have all the
controls (e.g. volume and seek).

~~~
stronglikedan
The amount of video/audio player clients in general that don't have a seek
function is, quite frankly, astonishing to me.

------
sylens
This seems like a massive feature that I can't believe hasn't been baked into
Chrome yet. I know Safari has an implementation but it always feels limited
and of course cannot be used on Windows or Linux.

I need to put this through its paces, but it may vault Firefox back into the
role of my default browser.

~~~
forgotpwd16
Chrome has it for about two years now, since ver. 70. On a Youtube video
right-click twice and click "Picture in picture".

~~~
tedmiston
I don't seem to have a "Picture in picture" option in the context menu on an
arbitrary YouTube video on Chrome 84 beta on macOS.

But there is a PiP button in the "hamburger with musical note" menu in the
toolbar.

It seems Google has an optional PiP Chrome extension as well. It looks like it
just makes the button more visible.

[https://chrome.google.com/webstore/detail/picture-in-
picture...](https://chrome.google.com/webstore/detail/picture-in-picture-
extens/hkgfoiooedgoejojocmhlaklaeopbecg)

~~~
ourcat
First, right-click on a YouTube video. You'll see _their_ custom menu appear
first. Now, right click _next to_ their menu (while still somewhere on the
video frame.)

You should then see the browser contextual menu with 'Picture-in-picture' in
the list of options.

------
staycoolboy
I've been using this since it was launched and I constantly forget that I need
to keep the browser tab open for PIP to work. Doh. Would be cool if the PiP
window was another instance of the native window with its zero-decor.

------
fulafel
This is normally a window manager feature, why put it in browser where it's
limited to browser tabs?

~~~
nacs
The PIP video is independent of the browser window that contained the video --
it can be moved around the desktop and resized with no window decorations and
also stays on top of all other windows in the desktop env.

~~~
swiley
If you don’t like window decorations (and I don’t blame you) just run a wm
with no window decorations (like cwm.)

~~~
notatoad
there's a lot of firefox users that don't want to switch to a new window
manager (or operating system) just for the sake of being able to pop a video
out of the window it came from.

~~~
fulafel
This makes sense on one hand, but could also be used to justify all kinds of
of non browser features that would make both WMs and FF worse off in the long
run.

------
kords
I've tried it, it's awesome. The things I'm missing in that new window are
progress bar and volume control. Or at least I haven't seen a way to make them
visible.

------
ozaark
Opera has had this feature for years and features more playback controls than
FF. It seems many features start on Opera then get "invented" in other
browsers afterwards.

~~~
forgotpwd16
You're right that it has been in Opera for years. Specifically it was
introduced back in 2016. But Maxthon had it first, introducing it in 2010.
Snaps or webpage screenshoting as well (2010), which was later put in Opera
(2017) and recently on Firefox.

------
dsego
What's new here? I've been under the impression this existed for a while. Does
it finally provide the standard video controls?

------
kgwxd
Have other hardcore anti-autoplay users noticed some autoplay getting through
as of the last update? I've had it at the highest possible settings for a long
time and nothing ever got through, now something is different. It not all the
time, but often enough that it bugs me.

------
tushar-r
This is brilliant! I've been looking for a replacement for Helium on Windows
and this seems to be it!

------
jackson1442
I've been using it with their Dev Edition and it works very nicely for me. On
a Mac, it blends in with the design language, and works on just about any
video, even video that's been DRM'd to hell and back (Netflix, Hulu, etc).

------
kbenson
While I really like this functionality, I can't seem to find any way to change
the area the picture shows up. I do not want it in the bottom right, because I
get OS messages there (maybe that's how they implemented it and why it's
there?), and I suspect either they will be covered up or cover up the picture
(a problem I often have with some apps in that location when I get messages).
Just being able to change which corner it was in (like many PIP televisions
allow) would be amazingly useful.

------
xadz
I've been using this in Chrome for Mac in YouTube for a while. It is in Safari
too. Just have to double right click a YouTube video to get the browser menu
instead of the YouTube one.

------
yuchi
«Toddler duty» is a fantastic marketing approach to the feature! (While I
usually deprecate using videos to entertain toddlers and kids, using it to
have them close to you looks… good I guess)

------
jdlyga
Doesn't Chrome do this too? If you click the music button in the toolbar, you
can pop out a video to an always-on-top window that you can watch overtop of
other apps.

------
Jaruzel
I like having a floating YouTube video on my desktop while I work so much that
I knocked up this simple solution a few years ago:

[http://www.jaruzel.com/apps/youtube/](http://www.jaruzel.com/apps/youtube/)

(Select 'View (New Window)')

It suits me, and gets used lots. I've never bothered to look, but I reckon
there's probably a Chrome extension that also does the same.

------
rsapkf
PiP is such a useful feature. Even though I use a window manager, I like the
fact that I can just take whatever video is playing out from my current tab
and move it over to my programming workspace and follow a tutorial or
something. No need to create a new window. When I'm done, I can put it right
back to the original tab on the original workspace with a single click.
Especially useful with floating mode enabled.

------
chrysoprace
I really love this feature and I hope that it receives more love and polish in
the future. It's unfortunately unusable with foreign language videos as the
subtitles don't pop out with the video. Not sure if this is due to the lack of
such an API, or if the major video providers (Netflix, YouTube, etc.) simply
haven't implemented it.

My other wishlist feature is to have rewind/forward controls natively in the
PIP window.

~~~
suzakus
Unless the captions are burned in, currently you cannot have the captions show
up in the PiP video due to the API restrictions. It's mentioned in the
proposal doc here: [https://www.w3.org/TR/picture-in-picture/#security-
considera...](https://www.w3.org/TR/picture-in-picture/#security-
considerations)

~~~
chrysoprace
Thank you. I was trying to find information on this, but all I found was this
bugzilla post:
[https://bugzilla.mozilla.org/show_bug.cgi?id=1551058](https://bugzilla.mozilla.org/show_bug.cgi?id=1551058)

------
etempleton
This is a great feature and I love Firefox and what Mozilla stands for, but I
have recently switched to Edge because of how hard my CPU is hit when I watch
YouTube videos in Firefox. I understand that this is not entirely within the
control of Mozilla and the Firefox team, but it became such an issue on my
current machine, which is admittedly quite old, that I felt forced to make the
switch.

------
raspyberr
I'm sure this works great but I've been using MPV/youtube-dl for a while now
and I don't think this will cause me to switch.

------
51Cards
I use this feature on a daily basis, in fact it's running right now. I have a
few UI issues with it, the resize border is much too hard to hit, it would be
nice to be able to click the video to pause, and I would like to see a
progress bar and mute buttons. That said it has already been a "game changer"
for how I view video every day.

------
somishere
I've been enjoying this for a while on the beta channel, however subs/captions
are very noticeably absent. Unsure if it's all <tracks> or just those not
using the built-in api for display. Needless to say custom caption
implementations are extremely common due to the discrepancies in display
between browsers.

------
thamer
For Chromium-based browsers (I used it in Brave but it should work with all of
them), create a new bookmark and set this as the URL:

javascript:document.querySelector('video').requestPictureInPicture()

It works on YouTube, Twitch, HBO Now, Netflix, probably others too. I keep it
in my Bookmarks Bar for quick access, I hope others here will find it useful!

------
SubiculumCode
This is great. Will it work with Netflix videos in the browser? The always on
top is a nice feature for this kind of thing

~~~
beirut_bootleg
It does work with Netflix. Unfortunately you won't get any subtitles.

------
xmichael0
Opera has been doing this for years...

------
anotheryou
I want a "fullscreen to second screen" option for it (also without allways on
top than)

~~~
kords
I use double-click for fullscreen, but yeah, it will go on top.

------
naktinis
It may be a nice feature, but for me Firefox's implementation seems to be a
bit too intrusive, because as a developer I can't disable it and it is always
visible as a browser-styled overlay.

Not all video elements are for stand-alone consumption. For example, there are
"hero" videos in landing pages, enterprise solutions requiring smart overlays,
or imagine a component in an online video editor.

Firefox also have no plans to support the Picutre-in-picture web API:
[https://www.w3.org/TR/picture-in-picture/](https://www.w3.org/TR/picture-in-
picture/).

See, for example, this bugzilla issue:
[https://bugzilla.mozilla.org/show_bug.cgi?id=1611831](https://bugzilla.mozilla.org/show_bug.cgi?id=1611831)

------
bvm
I love PiP but I wish it worked for multiple videos simultaneously on desktop.

~~~
tedmiston
That sounds potentially interesting. Do you have a specific use case in mind?

~~~
bvm
yeh! I like watching rocket launches from multiple camera angles!

And i watch a lot of simracing with multiple streamers streaming the same
race.

~~~
ta17711771
VLC

------
stuaxo
The only thing is its easy to forget which tab it came from.

I put it on top and then on all desktops and change desktops with it.

Sometimes I come back and close some tab and it happens to be the parent of
the video I'm watching.

------
AjithAntony
FYI, General purpose "PiP" tool for windows.

[https://github.com/LorenzCK/OnTopReplica](https://github.com/LorenzCK/OnTopReplica)

------
phkahler
This should be more of a desktop feature. I'd like to play video wallpaper on
gnome/wayland for example. I think this is as much on the desktop devs as the
browser devs, if not moreso.

------
os7borne
PiP is so functional and I've been using it for sometime now.

------
dingaling
This would be great for PiPing a general webpage rather than just a video.
Instead of tearing-off a tab, resizing its window and pinning it always-on-top
to use as a reference.

------
classics2
YouTube charges for this “feature”. How will that go over?

~~~
dhritzkiv
They do? As in, paying will expose a control on their player to enter PiP in
supported platforms?

Note: other than FF, you can also trigger PiP (edit: on Safari) on a YouTube
video by double-right-clicking on the video element OR long pressing on the
speaker icon on the tab/address bar.

~~~
recursive
> other than FF, you can also trigger PiP on a YouTube video by double-right-
> clicking on the video element OR long pressing on the speaker icon on the
> tab/address bar.

Neither of these worked for me. Chrome 83 on Win 10.

~~~
dhritzkiv
Oops - sorry! I forgot to include the important bit about Safari on macOS.
Updated my comment.

------
nanna
Must admit I've noticed the blue Picture-in-Picture but never thought to click
on it. Didn't at all occur to me what it did.

------
pixelatedindex
It's too bad that YouTube subtitles still show up in the main YT page and is
not present in the PiP modal.

~~~
suzakus
This is a technical restriction with PIP not allowing for elements to be drawn
in the PiP modal (or more specifically; HTMLVideoElement is the only thing
that can be PiPed currently)

------
winrid
FF is getting better, and it seems Chrome has started to frequently lock up in
some of my devices...

------
aaron695
If we are going to destroy our brains we might as do it well!

------
bondolo
I am glad it can be disabled globally easily. YMMV

------
huxflux
PiP made Firefox complete!

------
WmyEE0UsWAwC2i
This is a nice feature.

> play alongside while you go about your business on

> other tabs or do things outside of Firefox.

Do we need to watch video while we go about our business? You better finish
your business or the video. Which leaves me thinking: this is kind of bloat.

~~~
saagarjha
> Do we need to watch video while we go about our business? You better finish
> your business or the video.

Yes, and don't tell me how to do my work.

