mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 03:46:16 -08:00
52 lines
1.3 KiB
JavaScript
52 lines
1.3 KiB
JavaScript
var url = 'https://zhw2590582.github.io/assets-cdn';
|
|
var art = new Artplayer({
|
|
container: '.artplayer-app',
|
|
url: url + '/video/you-name.mp4',
|
|
poster: url + '/image/one-more-time-one-more-chance-poster.jpg',
|
|
autoSize: true,
|
|
controls: [
|
|
{
|
|
name: 'playlist',
|
|
position: 'right',
|
|
html: '播放列表',
|
|
click: () => {
|
|
art.plugins.artplayerPluginPlaylist.show();
|
|
},
|
|
style: {
|
|
marginRight: '15px',
|
|
},
|
|
},
|
|
{
|
|
name: 'prev',
|
|
position: 'right',
|
|
html: '上一个',
|
|
click: () => {
|
|
art.plugins.artplayerPluginPlaylist.prev();
|
|
},
|
|
style: {
|
|
marginRight: '15px',
|
|
},
|
|
},
|
|
{
|
|
name: 'next',
|
|
position: 'right',
|
|
html: '下一个',
|
|
click: () => {
|
|
art.plugins.artplayerPluginPlaylist.next();
|
|
},
|
|
},
|
|
],
|
|
plugins: [artplayerPluginPlaylist],
|
|
});
|
|
|
|
art.plugins.artplayerPluginPlaylist.load([
|
|
{
|
|
title: '你的名字',
|
|
url: url + '/video/you-name.mp4',
|
|
},
|
|
{
|
|
title: 'One more time one more chance',
|
|
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
|
},
|
|
]);
|