Supports for Picture-in-Picture mode.
Name | pip |
Global name¹ | window.VlitejsPip |
Path | vlitejs/dist/plugins/pip |
Entry point | vlitejs/dist/plugins/pip/pip.js |
Stylesheet | - |
Provider² | 'html5' |
Media type³ | 'video' |
- ¹ Useful only if
vLitejs
is included with a<script>
tag (see CDN section).
<video id="player" class="vlite-js" src="<path_to_video_mp4>"></video>
import 'vlitejs/dist/vlite.css';
import Vlitejs from 'vlitejs';
import VlitejsPip from 'vlitejs/dist/plugins/pip';
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.