The PictureInPictureEvent() constructor returns a newly created 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.


var pictureInPictureEvent = new PictureInPictureEvent(typeArg[, pictureInPictureInit]);


The PictureInPictureEvent() constructor also inherits arguments from Event().

Is a DOMString representing the name of the event.
focusEventInit Optional
Is a PictureInPictureEventInit dictionary, having the following fields:
  • "relatedTarget", optional and defaulting to null, is an EventTarget.


Specification Status Comment
Picture-in-Picture API
The definition of 'PictureInPictureEvent()' in that specification.
Draft Initial definition

Browser compatibility

BCD tables only load in the browser

See also