add Artplayer.AUTO_PLAYBACK_MIN

This commit is contained in:
Harvey committed 2022-07-14 10:23:45 +08:00
1 parent 60b61dd7b1
commit 7e65d486bc
5 files changed
+21 -38

No files matched your search

+1
View File
@@ -211,6 +211,7 @@ Artplayer.RESIZE_TIME = 500;
Artplayer.SCROLL_TIME = 200;
Artplayer.SCROLL_GAP = 50;
Artplayer.AUTO_PLAYBACK_MAX = 10;
Artplayer.AUTO_PLAYBACK_MIN = 5;
Artplayer.AUTO_PLAYBACK_TIMEOUT = 3000;
Artplayer.RECONNECT_TIME_MAX = 5;
Artplayer.RECONNECT_SLEEP_TIME = 1000;
@@ -36,7 +36,7 @@ export default function autoPlayback(art) {
art.on('ready', () => {
const times = storage.get('times') || {};
const currentTime = times[art.option.url];
if (currentTime) {
if (currentTime && currentTime >= constructor.AUTO_PLAYBACK_MIN) {
append($close, icons.close);
setStyle($autoPlayback, 'display', 'flex');
+1 -1
View File
@@ -20,7 +20,7 @@ export default class Plugins {
this.add(lock);
}
if (option.autoPlayback) {
if (option.autoPlayback && !option.isLive) {
this.add(autoPlayback);
}