Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.29 KB

README.md

File metadata and controls

50 lines (35 loc) · 1.29 KB

Plugin: Picture-in-Picture

Supports for Picture-in-Picture mode.

Overview

Name pip
Path vlitejs/plugins/pip
Entry point vlitejs/plugins/pip/pip.js
Stylesheet vlitejs/plugins/pip/pip.css
Provider² 'html5'
Media type³ 'video'

Usage

HTML

<video id="player" src="<path_to_video_mp4>"></video>

JavaScript

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']
});

Events

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

Demo

See the Picture-in-Picture plugin demo.