Files
ArtPlayer/packages/artplayer-plugin-playlist
..
2019-04-21 11:57:44 +08:00
2019-04-21 18:00:02 +08:00
2019-04-21 10:03:31 +08:00
2019-04-21 10:03:31 +08:00
2019-04-21 10:03:31 +08:00
2019-04-21 11:57:44 +08:00

artplayer-plugin-playlist

Playlist plugin for ArtPlayer

Demo

Checkout the demo from Github Pages

Install

Install with npm

$ npm install artplayer-plugin-playlist

Or install with yarn

$ yarn add artplayer-plugin-playlist
import artplayerPluginPlaylist from 'artplayer-plugin-playlist';

Or umd builds are also available

<script src="artplayer-plugin-playlist.js"></script>

Will expose the global variable to window.artplayerPluginPlaylist.

Usage

var art = new Artplayer({
    container: '.artplayer-app',
    url: 'path/to/video.mp4',
    plugins: [artplayerPluginPlaylist],
});

// Load Playlist
art.plugins.artplayerPluginPlaylist.load([
    {
        title: 'video01',
        url: 'path/to/video01.mp4',
    },
    {
        title: 'video02',
        url: 'path/to/video02.mp4',
    },
]);

// Hide Playlist
art.plugins.artplayerPluginPlaylist.hide();

// Hide Playlist
art.plugins.artplayerPluginPlaylist.hide();

// Next Playlist item
art.plugins.artplayerPluginPlaylist.next();

// Prev Playlist item
art.plugins.artplayerPluginPlaylist.prev();

License

MIT © Harvey Zack