Supports for Picture-in-Picture mode.
| Name | pip |
| Path | vlitejs/plugins/pip |
| Entry point | vlitejs/plugins/pip/pip.js |
| Stylesheet | vlitejs/plugins/pip/pip.css |
| Provider虏 | 'html5' |
| Media type鲁 | 'video' |
<video id="player" src="<path_to_video_mp4>"></video>import 'vlitejs/vlite.css';
import 'vlitejs/plugins/pip.css';
import Vlitejs from 'vlitejs';
import VlitejsPip from 'vlitejs/plugins/pip.js';
Vlitejs.registerPlugin('pip', VlitejsPip);
new Vlitejs('#player', {
plugins: ['pip']
});The plugin exposes the following native Event on the .v-vlite element.
| Event Type | Description |
|---|---|
enterpip |
Sent when the video switches to picture-in-picture mode |
leavepip |
Sent when the video exits picture-in-picture mode |
See the Picture-in-Picture plugin demo.