PictureInPicture limits

PictureInPicture not work with video controls hidden
also I get:
can’t access property “removeAttribute”, toggle is null PictureInPictureChild.jsm:792
also document.pictureInPictureEnabled and requestPictureInPicture undefined
it not possible to add PiP programmatically?
this not work in FF:

Not being able to programmatically trigger PiP is expected, see https://hacks.mozilla.org/2020/01/how-we-built-picture-in-picture-in-firefox-desktop/ for rationale.

However, note that PiP is not an extension and if you need actual support with it, please refer to support.mozilla.org. For web dev questions there are some other forums on here.

PiP is not an extension

but I would to use it in a extension programmatically.

Then the answer is that you can’t currently. Not sure if there’s been a request to support that.

To my knowledge, the only feature request about exposing PiP to the WebExtension API is Bug 1561809.