mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 02:51:20 -08:00
优化demo
This commit is contained in:
1 parent
a836852e48
commit
06fc487482
14 files changed
+75
-56
No files matched your search
@@ -33,19 +33,24 @@ function artplayerPluginGif(art) {
|
||||
},
|
||||
});
|
||||
|
||||
const layer = layers.add({
|
||||
name: 'artplayer-plugin-gif-progress',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
top: '0',
|
||||
left: '0',
|
||||
height: '3px',
|
||||
width: '0%',
|
||||
'background-color': theme,
|
||||
let $progress = null;
|
||||
layers.add(
|
||||
{
|
||||
name: 'artplayer-plugin-gif-progress',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
top: '0',
|
||||
left: '0',
|
||||
height: '3px',
|
||||
width: '0%',
|
||||
'background-color': theme,
|
||||
},
|
||||
},
|
||||
});
|
||||
$ref => {
|
||||
$progress = $ref;
|
||||
},
|
||||
);
|
||||
|
||||
const $progress = layer.$ref;
|
||||
const timeLimit = 10000;
|
||||
let isProcessing = false;
|
||||
let pressStartTime = 0;
|
||||
|
||||
@@ -37,7 +37,11 @@ function artplayerPluginPlaylist(list) {
|
||||
|
||||
function switchUrl(index) {
|
||||
const itemOption = playlist[index];
|
||||
const isPlaying = player.playing;
|
||||
return player.switchUrl(itemOption.url, itemOption.title).then(() => {
|
||||
if (isPlaying) {
|
||||
player.play = true;
|
||||
}
|
||||
art.emit('artplayerPluginPlaylist:change', itemOption);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user