import PictureInPictureToggle from 'videojs-record/js/controls/picture-in-picture-toggle.js'PictureInPictureToggle
Extends:
Button to toggle Picture-in-Picture mode.
Constructor Summary
| Private Constructor | ||
| private |
constructor(player: videojs.Player | Object, options: Object) The constructor function for the class. |
|
Method Summary
| Public Methods | ||
| public |
Builds the default DOM |
|
| public |
async handleClick(event: EventTarget~Event) This gets called when the button is clicked. |
|
| public |
onStart(event: EventTarget~Event) Add the vjs-icon-picture-in-picture-stop class to the element so it can change appearance. |
|
| public |
onStop(event: EventTarget~Event) Add the vjs-icon-picture-in-picture-start class to the element so it can change appearance. |
|
| public |
show() Show the |
|
Private Constructors
Public Methods
public async handleClick(event: EventTarget~Event) source
This gets called when the button is clicked.
Params:
| Name | Type | Attribute | Description |
| event | EventTarget~Event | The |
Listen:
* |
tap |
* |
click |
public onStart(event: EventTarget~Event) source
Add the vjs-icon-picture-in-picture-stop class to the element so it can change appearance.
Params:
| Name | Type | Attribute | Description |
| event | EventTarget~Event |
|
The event that caused this function to run. |
Listen:
* |
Player#enterPIP |
public onStop(event: EventTarget~Event) source
Add the vjs-icon-picture-in-picture-start class to the element so it can change appearance.
Params:
| Name | Type | Attribute | Description |
| event | EventTarget~Event |
|
The event that caused this function to run. |
Listen:
* |
Player#leavePIP |
public show() source
Show the PictureInPictureToggle element if it is hidden by removing the
'vjs-hidden' class name from it.
