The html element video
has an attribute called disablePictureInPicture
which works perfectly fine although it seems to only work in chrome.
Since I could only find old posts on this which didn't end up in a fix or workaround I'm asking here again.
Do you know a fix/workaround for this issue?
Firefox 116+3, 4 or 118+5 added partial support with true value.
For Firefox 115 and older:
This was recently discussed on bugzilla with this result:
(at this time) we're not planning on implementing or shipping any part of the Picture-in-Picture Web API
But I found that some websites with videos in the background do not have the pip button. They do it by removing all audio streams from the video, which results in firefox not displaying the button. Obviously this will not work for all use cases, but it might be useful in some situations.
You can do this e.g. using ffmpeg like described in this question.