document-picture-in-picture icon indicating copy to clipboard operation
document-picture-in-picture copied to clipboard

Not working in sidePanel webextension

Open JVariance opened this issue 2 years ago • 3 comments
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).

JVariance avatar Jul 03 '23 10:07 JVariance

@steimelchrome Is this expected that the API doesn't work from extension pages?

beaufortfrancois avatar Jul 03 '23 14:07 beaufortfrancois

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

steimelchrome avatar Jul 06 '23 14:07 steimelchrome

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()

hanguokai avatar Aug 20 '23 18:08 hanguokai