55 comments

[ 3.5 ms ] story [ 207 ms ] thread
All the other major browsers allow this but Firefox does not.

https://caniuse.com/mdn-api_htmlvideoelement_disablepicturei...

So annoying because I should be able to create a user interface with animated UI made of videos, not animated GIFs.

There are many more valid use cases for disablePictureInPicture in the bugzilla thread https://bugzilla.mozilla.org/show_bug.cgi?id=1611831

Annoying.

Why should a website get to choose how content is consumed
So CSS should just be removed entirely... after all, why should a website get to choose how I consume it?
Uh, you mean CSS overrides? Or are you purposely being silly?

The website can offer their CSS, and I can load my CSS (greasemonkey scripts) to override it. They have the choice and so do I.

The argument is "why should a website have the ability to block me from what I am doing to the content they give me"

Why should a website limit what I do?

Don’t be silly. You know any website can just use a canvas to show text and it’d be over. I wanna know how well your CSS overrides work on Google Docs and Google Maps.

Users lost that fight when CSS was introduced. I wish the web was just pure content, but it’s not.

They can't "just use" canvas as that's a lot of extra work (and still not a perfect substitute)

Also not clear how users lost the fight with CSS when the lack of control is due to canvas

Google docs, maps, etc.. are sites.

You can choose not to go to them. Use open street map, or whatever.

A browser has more control over what you use.

And even yet, when all browsers follow the same standard, you have even less "control" - the standards should be for users

You can personalize the CSS of any website with extensions. The correct comparison here would be talking about disabling the capability to do this.
(comment deleted)
User's can disable or modify CSS whenever and however they want :)
There was a lot examples but the main complaint seemed to be a rephrased "We don't want users to be able to do that". Perhaps I missed a valid use case but, this seems a lot like wanting to disable rightclick (and giving a dubious reason why).

Mozilla is right.

As I said, video is a valid replacement for animated GIFs - why should this have a picture in picture icon over it?
if it is shorter than 45 sec the pip option doesn't appear most gifs aren't that long so video can still be a replacement
The video component does not always know how long a video is.
It sounds like you've identified the actual problem you need to fix. Why shouldn't the browser know how long a couple of short video files are?

Also, if the video files don't have an audio track, you shouldn't get a PIP control. Why do these GIF-replacement videos have an audio track? I believe (but have not tested) that adding the `muted` attribute to the `<video>` element will have the same effect as removing the audio track from the video files themselves.

It's not the same thing at all, because the PiP actually breaks things in a casual way, whereas right-click doesn't. Of course anyone can break anything with the inspector or user CSS, but that's also hard to do so that's fine.

The core problem is that for some applications the video is inextricably linked to some other content on the page and just makes no sense on its own, but Firefox always treats the video as its own content. Often that's fine. Sometimes it's not.

It's not even per-site. If you use SiteX where PiP is problematic then you can't even disable it just for that site but have to disable it globally.

I don't see how the user of SiteX is served by any of this.

Just completely Independent if this issue. I think "others do this so you are bad if you not follow" argument is childish and stupid, but it will never go away.

All the others are jumping out the window into the fire, FOLLOW THEM!"

Were you here for the hellish days of when all browsers were incompatible?
If you want compatibility, you should be lobbying other browsers follow suit - not ask Mozilla to gut a pro-user feature.
All the other browser permit you to override the user. They are not user's agents anymore, are they?
Not just that. All these anti-user demands are justified in the name of 'user-experience' or similar non-sequitur.
"Developers can opt to exclude the Picture-in-Picture button from videos hosted on their domains and inform users that the Picture-in-Picture experience might not be the best fit for their website. In such cases, Firefox will display a notification indicating that Picture-in-Picture is not recommended for that particular website. However, you retain full control and can override this recommendation by activating the Enable anyway option. This empowers you to choose to use Picture-in-Picture, even if the developer discourages it." This is at the bottom of the Mozilla KB article about PiP, and I'm just assuming that this was added after this bug was created. Unless a brief pop up telling people they are allowed to turn it back on is THAT horrible, I don't get why this wouldn't work for you.
I can't tell if some of those comments are serious or not...

I agree with the Firefox folks here: the browser is the user's agent. Being the web developer's canvas comes after.

(comment deleted)
A browsers first priority should always be to give the best USER experience and not let developers dictate what features are available on a specific website to maximize profits or whatever they are up to, they should not be able to deny the user a feature the is GENERAL PURPOSE.
The developers (me, in this case) ARE trying to give the best user experience, but Firefox feels it knows best what that experience is.

Splodging a big ugly and pointless Picture in Picture icon over a video is not the best user experience in all cases. As the application developer it should be up to me to make that decision, not Firefox.

(comment deleted)
(comment deleted)
> As the application developer

As an application developer you're obviously shipping an executable or an app, so why is Firefox part of the equation?

Totally lost rn. Could you please elaborate?

Maybe then developers should be asking for the button to be re-designed, rather than the feature to be disabled?

Personally I make use of this feature a lot, it's one of the reasons I prefer firefox over chrome (though there's things to accomplish similar things on Chrome, but firefox native support is better... you even get some controls over the video on the pip window).

Care to provide an example where the icon is so offensive? It sounds to me like your trying to use tools in unintended ways to avoid best practice for what you're actually trying to achieve.
There's loads of people reporting real-world use cases and problems in that issue.
Actually after reading all the comments, there are surprisingly few specific problems (I was hoping for a good example but was disappointed).

The way I interpret this, the original description mentioned "you can't display your ads, overlays or anything else and thus it breaks player implementations of content providers" - and I am pretty sure Firefox's decision for PIP feature was _specifically_ to allow one to watch picture without ads or (often terrible) players by content providers.

Now, the commenters understood that, and rightfully assumed that asking "hey FF, you made a system to block ads.. can you add an attribute to disable that?" would get their request denied, again. So they all say words like "enterprise system" to explain why they cannot give an example.

Note that any time there is a problem with specific website URL (like mirroring in comment 23, or video controls in comment 34 and 36) get assigned separate bugs and fixed. It's only vague "enterprise system" use cases which get rejected.

(Well, that and spanish learning system in comment 29, which needs to be able to track how of the video was watched. I am split about this - from one side I see the usefullness of knowing that sometimes, from other side this is exactly a kind of creepy feature that firefox is known to not implement)

You're a web author who thinks web authors don't have enough control. Also: users don't need control. Does that about summarize your stance?
> Splodging a big ugly and pointless Picture in Picture icon over a video is not the best user experience in all cases.

You are over-exaggerating it to get what you want, aren't you? I had to go back and check. It appears only when you roll the mouse over the video and it's inconspicuous even then.

If the icon was the problem why go after the entire feature?
I like this feature a lot. I would be upset if websites could arbitrarily prevent me from using it at their own whim. Anyone that doesn't like the pop-up which appears on hover can disable it themselves in the settings. It isn't your decision.
(comment deleted)
You decided the button is ugly. You decided the users or your website do never ever want to watch a video on your website in a picture in picture view.

You want to take the decision away from the user because you claim that user experience is better.

What is so special about your website an your video that nobody ever would want to use a general purpose feature for that video?

The Firefox user agent permits users to put a video PiP when they choose.
Can't all those use cases in the Bugzilla report be fixed by "inform users that using pip in Firefox on our videos breaks the functionality on our site"?
All these years using Firefox, I did not know this feature existed.

On the other hand, a few years ago I accidentally triggered PiP in mobile Safari, and it worked so inconsistently especially on YouTube when switching to another app, that I dread using it.

(Recently invidious showed how to do it properly)

NewPipe's implementation is clean, too.
Good. Software running on your computer should always do what you want, and not let some random Web developer dictate what you can and can't do.
Does the browser provide some sort of event or property to the site when a video is playing in PiP mode so the site can display feedback?
Seems fair to say “we aren’t going to let web developers cripple the user experience”. A bit like the inane fight over autofill and passwords a few years back - web developers don’t always know best, don’t always have the users’ interests at heart, are often subject to foolish and outdated requirements from their bosses/organisations etc

Where this policy falls down is in assuming that video content consumption is all Netflix or YouTube. The absence of an API makes certain experiences that use video in different ways.

The UK driving test has a hazard perception part where the examinee has to click to indicate a developing hazard - if there are hardwired buttons on the video player that popup a new window, you can’t build something like that safely.

Half the point of JavaScript in the browser is that the browser development team cannot predict all the possible meanings of a click in a rich web experience.

Three out of the three popular video websites I visit, intentionally break PIP against my will... On all browsers except Firefox. I agree with FF here.
Great. Now add a cli flag to (really) disable pocket.
Firefox's refusal here makes me respect the browser even more and makes me more happy that it's my browser of choice.

User agency should be prioritized over all other concerns.