Interface PictureInPictureWindow
height: number;
onresize: ((this: PictureInPictureWindow, ev: Event) => any) | null;
width: number;
addEventListener<K extends "resize">(
type: K,
listener: (
this: PictureInPictureWindow,
ev: PictureInPictureWindowEventMap[K],
) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;
dispatchEvent(event: Event): boolean;
removeEventListener<K extends "resize">(
type: K,
listener: (
this: PictureInPictureWindow,
ev: PictureInPictureWindowEventMap[K],
) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;
}
Hierarchy
- EventTarget
- PictureInPictureWindow
Index
Properties
Methods
Properties
Readonlyheight
The read-only height property of the PictureInPictureWindow interface returns the height of the floating video window in pixels.
onresize
Readonlywidth
The read-only width property of the PictureInPictureWindow interface returns the width of the floating video window in pixels.
Methods
addEventListener
- addEventListener<K extends "resize">(
type: K,
listener: (
this: PictureInPictureWindow,
ev: PictureInPictureWindowEventMap[K],
) => any,
options?: boolean | AddEventListenerOptions,
): voidThe
addEventListener()method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.Type Parameters
- K extends "resize"
Parameters
- type: K
- listener: (this: PictureInPictureWindow, ev: PictureInPictureWindowEventMap[K]) => any
Optionaloptions: boolean | AddEventListenerOptions
Returns void
- addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): voidThe
addEventListener()method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.Parameters
- type: string
- listener: EventListenerOrEventListenerObject
Optionaloptions: boolean | AddEventListenerOptions
Returns void
dispatchEvent
The
dispatchEvent()method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.Parameters
- event: Event
Returns boolean
removeEventListener
- removeEventListener<K extends "resize">(
type: K,
listener: (
this: PictureInPictureWindow,
ev: PictureInPictureWindowEventMap[K],
) => any,
options?: boolean | EventListenerOptions,
): voidThe
removeEventListener()method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.Type Parameters
- K extends "resize"
Parameters
- type: K
- listener: (this: PictureInPictureWindow, ev: PictureInPictureWindowEventMap[K]) => any
Optionaloptions: boolean | EventListenerOptions
Returns void
- removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): voidThe
removeEventListener()method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.Parameters
- type: string
- listener: EventListenerOrEventListenerObject
Optionaloptions: boolean | EventListenerOptions
Returns void
The
PictureInPictureWindowinterface represents an object able to programmatically obtain thewidthandheightandresize eventof the floating video window.MDN Reference