Firefox's Picture-in-Picture mode to support site-specific wrappers for improved functionality

Martin Brinkmann
Jan 29, 2022
Firefox
|
20

Mozilla laid the foundation for site-specific video wrapper scripts in this week's release of Firefox Nightly, the cutting-edge development version of the Firefox browser.

firefox picture in picture youtube

These video wrapper scripts improve the browser's Picture-in-Picture mode by adding support for site-specific controls and features, such as subtitles or captions.

Picture-in-Picture modes are supported by many modern web browsers. The mode allows users to move media playback to a standalone overlay interface that is displayed on top of the browser. Users get basic controls, e.g., to play and pause videos, and may use the browser to navigate to other tabs or pages without losing media playback focus.

ADVERTISEMENT

Work on site-specific video player adapters started about a year ago when bug 1670108 was opened on Mozilla's bug tracking site. Main reasons for wanting to implement scripts for specific services was compatibility, as global features would sometimes cause unwanted breakage. Mike Conley, the original poster on the bug tracking site, gave an example where a simple function that would change the current time of the video would result in playback stopping on Netflix.

The introduction of site-specific solutions for Firefox's Picture-in-Picture mode brings advanced controls to the mode and reduces the chance of breakage.

Mozilla mentions four video streaming services in its announcement. According to the organization, users can expect scripts for Netflix, YouTube and Amazon, and other services that have not been mentioned in the announcement.

The latest version of Firefox Nightly includes the infrastructure that powers these site-specific video wrapper scripts. Mozilla implemented a proof-of-concept script for YouTube that syncs the mute button of the Picture-in-Picture window with the mute state of the video player on YouTube.

Mozilla will keep the functionality restricted to Firefox Nightly for now to address potential bugs and issues that are reported to the organization. The feature will then be uplifted to Firefox Stable eventually.

Closing words

Firefox's Picture-in-Picture mode will get a functionality boost out of this, especially if site-specific features such as subtitles or captions are supported by the wrapper scripts. Firefox users who use the browser's Picture-in-Picture mode will likely find the improved functionality useful, provided that sites that they use the feature on are supported by it.

Now You: do you use Picture-in-Picture mode in your browser of choice?

Summary
Firefox's Picture-in-Picture mode to support site-specific wrappers for improved functionality
Article Name
Firefox's Picture-in-Picture mode to support site-specific wrappers for improved functionality
Description
Mozilla laid the foundation for site-specific video wrapper scripts in this week's release of Firefox Nightly, the cutting-edge development version of the Firefox browser.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Previous Post: «
Next Post: «

Comments

  1. ZeN said on January 29, 2022 at 8:49 am
    Reply

    I do indeed, one of the best features implemented during recent times.

    1. Multitasker said on February 8, 2022 at 6:35 pm
      Reply

      I like it too, I am often listening to long talk shows and am not interested watching constantly on a couple of heads, except for the occasional picture or video snippets they add in, so a small video window in the corner is great while browsing around on other sites or doing something else on the computer.

  2. Tom Hawack said on January 29, 2022 at 10:05 am
    Reply

    No idea if Picture-in-Picture mode is a good/the best, a bad/the worst feature a browser can propose, but I do know that I deeply dislike it, never use it, disable it whenever possible (i.e. on YouTube).

    1. Akina said on January 29, 2022 at 11:17 am
      Reply

      What is to dislike about it?

      1. Henk said on January 29, 2022 at 12:34 pm
        Reply

        Well to mention just one thing, it demonstrates utter disrespect for the maker of a video if you pretend to “watch” her video sideways from a corner of one eye, while in fact you’re concentrating on doing all kinds of different things in the main part of the screen.

      2. Tom Hawack said on January 29, 2022 at 4:21 pm
        Reply

        @Henk, disrespect indeed, lack of consideration anyway. Like in Parisian cabarets back when future talents (or not) would perform in front of an audience all in talks, laughs, Champagne at their tables, hardly listening to the one, the ones, artists who had worked hard to get the job and found themselves confronted to a mass of rude spectators. Things have changed – and that’s to be put on the account of progress — and there’s an increasing acknowledgement that those who work for you are to be taken into consideration (there’s not only the salary that counts). I must say that this old irrespectful attitude is something which has never been as flagrant in the States as in old Europe.

        Back to PiP :=)

      3. Clint Wayne said on February 1, 2022 at 9:14 am
        Reply

        > I must say that this old irrespectful attitude is something which has never been as flagrant in the States as in old Europe.
        The piano players in the saloons are saddened by your lies, cowboy.

      4. Tom Hawack said on February 1, 2022 at 12:19 pm
        Reply

        @Clint Wayne, you mean my mistake I guess. You don’t know American culture to say that. I do, as I know Europe. And I did specify “flagrant”. You cannot use an example as an argument! Of course you’ll always find high eyelashes and condescension everywhere but basically there is an Anglo-saxon and more specifically American attitude/tradition which may be occasionally hypocrite but which is more respectful, politer so to say. Another example is the way waiters, waitresses are thanked or not, looked at or not, from the simplest café, bar, luncheonette (US) to the most fanciest restaurants. You’ll find this respectful attitude I must admit as well in northern European countries, such as the Netherlands which I know quite well. But as a Frenchman I’m often ashamed of how some — some — French misbehave in their relationship with not only those who are at their service but with foreigners as well… until they know them better. The first-step attitude is fundamental, but things are changing in France as well as in central and southern European countries, fortunately.

      5. Tom Hawack said on January 29, 2022 at 12:40 pm
        Reply

        @Akina, for the reasons I had mentioned here on Ghacks, shared by @Henk :=)

        https://www.ghacks.net/2022/01/24/opera-browser-automatic-video-pop-out/#comment-4513753

      6. Dumbledalf said on January 29, 2022 at 9:09 pm
        Reply

        @Akina

        PIP is an useless “feature”. Some websites even have it on by default like Twitch. I really hate it as if I leave a page, I have left it for good, I don’t want parts of that page to keep chasing after me.

        People have been just fine without it so far and many now don’t even care about it, they either ignore it or turn it off.

        Stupid browsers like Edge, Firefox and Vivaldi that focus on bloating themselves with as much useless features as possible are also not used by most people, only by those who specifically need a certain feature that no extension can provide and probably kids who like all kinds of fancy stuff.

        Edge was promising when it was in Beta, but after they started bloating it, I completely lost interest in it, even now it’s uninstalled on my Windows 11.
        Vivaldi was also promising when the developers from Opera went to make the spiritual successor of Opera, but the irony is that the old Presto Opera was less bloated than Vivaldi.
        Firefox was the best browser ever since I discovered it in 2006 and have been using it until Chrome appeared in 2008. By then nobody could beat the versatility and awesomeness of Firefox, but even then Firefox felt slow and bloated, but when Chrome arrived, it immediately blew it out of the water. I had no idea a browser can be so fast. Now Firefox is some SJW rainbow-colored browser that keeps getting bloated with useless things, many customization options are cut out like useless appendages and it keeps bleeding its minuscule userbase, because it isn’t worth jack squat anymore – just a has-been that’s a waste of space and a vassal of Google.

  3. Fuzzi said on January 29, 2022 at 1:45 pm
    Reply

    I don’t know anyone who uses or likes PiP. I honestly don’t know what it’s good for.

    Either I let the audio run in the background or I’ll watch it, but obstructing my view while surfing somewhere else just doesn’t make sense. Oh and depending on the content you watch, it will be too small to be helpful or just contain the face of a speaker which is not very much added value.

    1. ZeN said on January 29, 2022 at 4:57 pm
      Reply

      I find it useful for watching sport mainly. Watching two snooker matches whilst kicking back is a nice touch for me or maybe a small window just out of view to keep an eye on the football scores etc.

  4. ULBoom said on January 29, 2022 at 2:52 pm
    Reply

    I don’t use PIP but I don’t have anything against it. It’s common now but long ago I had a way too big CRT TV with PiP and thought it was really cool, good for blurry views of what was happening on a different channel.
    Otherwise, PiP with headphones is OK; relaxation vids, whatever, anything that doesn’t require a lot of attention.

    1. aaa said on January 29, 2022 at 4:19 pm
      Reply

      PIP is a bloated code. It should be released as extension.

  5. Herman Cost said on January 29, 2022 at 2:56 pm
    Reply

    PiP is not something that interests me. I disabled it the day it became available.

  6. Mystique said on January 29, 2022 at 4:18 pm
    Reply

    I am not against PiP but I am against the implementation. The fact that all of these PiP windows are limited to the browser being underneath is annoying. I have another extension or script that usually does a better job of it so I can then happily go about my productivity tasks on the desktop whilst being able to watch a video in a little window of its own in a size of my choice topped off by utilizing another tool which will allow me to use always on top and or window transparency.

  7. olbaze said on January 29, 2022 at 6:55 pm
    Reply

    Picture-in-Picture is one of the most important features for me. I use it all the time, to watch videos while I’m playing a game, or simply to watch two videos side-by-side.

    I think Firefox’s implementation is good (multiple windows in particular), but I think there’s still room for improvement. Unlike Vivaldi, Firefox has no timeline for the time. Also, resizing the PiP window on Linux Mint doesn’t keep the aspect ratio, which is a bit of a mess.

  8. max3 said on January 30, 2022 at 12:59 am
    Reply

    Nonsense. If I wanted to watch a video while surfing the web, I would simply open two browser windows, size them appropriately and surf the web on one and watch the video on the other. What is the need for PIP code bloating my browser? Silly Mozilla. And Microsoft, and Google and on and on….

  9. Eddie said on February 1, 2022 at 10:44 am
    Reply

    I’ve just noticed that the latest update of Chrome has enhanced Picture in picture functionality.
    Limited re-sizing but fading…
    The game is on for PIP…
    Cheers guys

  10. KERR said on February 4, 2022 at 3:49 am
    Reply

    Yep, use it all the time. Great for training videos or sport. Once you start using it’s hard to go back!

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.