The PictureInPictureEvent() constructor returns a new PictureInPictureEvent object with an optional EventTarget. When the event has both a source and a destination, the relatedTarget value must be set to the other target.
On this page
PictureInPictureEvent: PictureInPictureEvent() constructor
Syntax
js
new PictureInPictureEvent(type, options)
Parameters
-
type -
A string representing the name of the event.
-
options -
An object that, in addition of the properties defined in
Event(), can have the following properties:-
The related
EventTarget, ornull(its default value).
-
Return value
A new PictureInPictureEvent object.
Specifications
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
PictureInPictureEvent |
8569–85 | 8579–85 | No | No | 7156–71 | 1613.1 | No | 105 | No | 72 | 1613.4 | 20.0 |
See also
- The
PictureInPictureEventinterface it belongs to.
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PictureInPictureEvent/PictureInPictureEvent