DocumentPictureInPicture Class
The Document Picture-in-Picture API of a window (https://wicg.github.io/document-picture-in-picture/#documentpictureinpicture): DocumentPictureInPicture.RequestWindow opens an always-on-top window whose document the page fills with any content.
public sealed class DocumentPictureInPicture : EventTarget- Inheritance
EventTargetDocumentPictureInPicture
Properties
| Name | Description |
|---|---|
| OnEnter | Gets or sets the handler of the enter event, fired when a Picture-in-Picture window opens. |
| Window | Gets the Picture-in-Picture window opened by the window, or null when it is closed. |
OnEnter
DocumentPictureInPicture.csGets or sets the handler of the enter event, fired when a Picture-in-Picture window opens.
Gets the Picture-in-Picture window opened by the window, or null when it is closed.
public Window? Window { get; }Methods
| Name | Description |
|---|---|
| RequestWindow(DocumentPictureInPictureOptions?) | Opens a Picture-in-Picture window (https://wicg.github.io/document-picture-in-picture/#dom-documentpictureinpicture-requestwindow): a new top-level browsing context whose opener is the window, with an about:blank document that has the mode and the base URL of the document of the window. The task is completed at once with the new window; enter is fired by a later task. The previous Picture-in-Picture window of the window is closed. The task fails with a NotAllowedError DomException when the window is not a top-level window, is itself a Picture-in-Picture window, has no transient activation (which is consumed), or the user agent cannot open the window (UserAgentUIBackend.OpenDocumentPictureInPictureWindow), and with a RangeErrorException when only one of the width and the height is given. |
RequestWindow(DocumentPictureInPictureOptions?)
DocumentPictureInPicture.csOpens a Picture-in-Picture window (https://wicg.github.io/document-picture-in-picture/#dom-documentpictureinpicture-requestwindow): a new top-level browsing context whose opener is the window, with an about:blank document that has the mode and the base URL of the document of the window. The task is completed at once with the new window; enter is fired by a later task. The previous Picture-in-Picture window of the window is closed. The task fails with a NotAllowedError DomException when the window is not a top-level window, is itself a Picture-in-Picture window, has no transient activation (which is consumed), or the user agent cannot open the window (UserAgentUIBackend.OpenDocumentPictureInPictureWindow), and with a RangeErrorException when only one of the width and the height is given.
public Task<Window> RequestWindow(DocumentPictureInPictureOptions? options = null)Parameters
optionsDocumentPictureInPictureOptions?- The options, or null for the default options.