mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 02:51:20 -08:00
调整播放列表接口
This commit is contained in:
1 parent
941ab07c66
commit
6056e7a0c6
9 files changed
+223
-235
No files matched your search
@@ -40,21 +40,20 @@ Will expose the global variable to `window.artplayerPluginPlaylist`.
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: 'path/to/video.mp4',
|
||||
plugins: [artplayerPluginPlaylist],
|
||||
plugins: [
|
||||
artplayerPluginPlaylist([
|
||||
{
|
||||
title: 'video01',
|
||||
url: 'path/to/video01.mp4',
|
||||
},
|
||||
{
|
||||
title: 'video02',
|
||||
url: 'path/to/video02.mp4',
|
||||
},
|
||||
]),
|
||||
],
|
||||
});
|
||||
|
||||
// Load Playlist
|
||||
art.plugins.artplayerPluginPlaylist.load([
|
||||
{
|
||||
title: 'video01',
|
||||
url: 'path/to/video01.mp4',
|
||||
},
|
||||
{
|
||||
title: 'video02',
|
||||
url: 'path/to/video02.mp4',
|
||||
},
|
||||
]);
|
||||
|
||||
// Show Playlist
|
||||
art.plugins.artplayerPluginPlaylist.show();
|
||||
|
||||
|
||||
Reference in new issue
Block a user