Bug 1520329 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Here's the design:

1. A content process in a browser tab hosts a <video> that the user wants to view in a PiP window
2. The user expresses that intent somehow (for now, this will be via a video element context menu item that's only displayed if PiP is enabled)
3. The parent process is alerted, and it opens up an alwaysOnTop window, which hosts a single <browser> element. That <browser> element must run in the same content process as the originating tab.
4. Privileged code in the content process of the originating tab is told about the new window (and underlying blank document) that's been made available to it. It creates a new <video> element for the new document, and sets its source to be a MediaStream from the original video.

That should be enough to start.
Here's the general idea:

1. A content process in a browser tab hosts a <video> that the user wants to view in a PiP window
2. The user expresses that intent somehow (for now, this will be via a video element context menu item that's only displayed if PiP is enabled)
3. The parent process is alerted, and it opens up an alwaysOnTop window, which hosts a single <browser> element. That <browser> element must run in the same content process as the originating tab.
4. Privileged code in the content process of the originating tab is told about the new window (and underlying blank document) that's been made available to it. It creates a new <video> element for the new document, and sets its source to be a MediaStream from the original video.

That should be enough to start.

Back to Bug 1520329 Comment 0