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

Allow opening PiP windows from iframes, not just top-level browsing context

Open andreasbovens opened this issue 1 year ago • 10 comments

Right now, attempting to open a Document PiP window from an iframe results in an error:

Failed to execute 'requestWindow' on 'DocumentPictureInPicture': Opening a PiP window is only allowed from a top-level browsing context

At Whereby, we have a strong use case for allowing this. Our customers embed our video conferencing UI as an iframe in their website. Inside this UI there is a PiP button, which, when clicked, spawns a PiP window with a combined view of people in the room. At present, the content of this PiP window is generated by combining different video streams onto a canvas, but we're keen to switch to Document PiP. However, as long as iframes cannot spawn Document PiP windows, this won't be possible...

If there are concerns around capabilities and permissions, perhaps a new picture-in-picture allow directive on the iframe could alleviate those?

andreasbovens avatar Sep 27 '23 21:09 andreasbovens