exitPictureInPicture
exitPictureInPicture refers to the Web Picture-in-Picture API function document.exitPictureInPicture(), used to exit a media element that is currently displayed in Picture-in-Picture (PiP) mode. When invoked, the PiP window closes and the media element returns to its normal placement in the page if applicable. The function is called on the global Document object.
The return value is a Promise that resolves when the exit operation completes. It may reject if
Usage typically follows a request to enter PiP. You can check whether PiP is active by examining
Notes and compatibility: Exit PiP is supported by modern browsers that implement the Picture-in-Picture API, though
See also: the corresponding videoElement.requestPictureInPicture() method, the pictureInPictureElement property, and related events such as leavepictureinpicture.