document-picture-in-picture
document-picture-in-picture copied to clipboard
Not working in sidePanel webextension
trafficstars
I'm working on a webextension and tried documentPictureInPicture.requestWindow() from within a sidePanel. Unfortunately it doesn't work from there (onenter and window attributes are both null).
@steimelchrome Is this expected that the API doesn't work from extension pages?
Yes we don't currently allow the API to work from extension pages in Chrome. I don't know that it's technically infeasible to eventually support but since IIUC those are not attached to a WebContents then most of the code just doesn't work as is
For extension pages, my test results are:
- it works if the extension page is opened in a browser tab (like a normal web page).
- it doesn't work for extension popup page, side panel page and offscreen document. The pip window closes immediately after calling
requestWindow()