mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-19 11:21:20 -08:00
add option.id
This commit is contained in:
1 parent
ec09bcdc92
commit
62988f04e0
8 files changed
+161
-134
No files matched your search
@@ -29,13 +29,13 @@ export default function autoPlayback(art) {
|
||||
if (keys.length > constructor.AUTO_PLAYBACK_MAX) {
|
||||
delete times[keys[0]];
|
||||
}
|
||||
times[art.option.url] = art.currentTime;
|
||||
times[art.option.id || art.option.url] = art.currentTime;
|
||||
storage.set('times', times);
|
||||
});
|
||||
|
||||
art.on('ready', () => {
|
||||
const times = storage.get('times') || {};
|
||||
const currentTime = times[art.option.url];
|
||||
const currentTime = times[art.option.id || art.option.url];
|
||||
if (currentTime && currentTime >= constructor.AUTO_PLAYBACK_MIN) {
|
||||
append($close, icons.close);
|
||||
setStyle($autoPlayback, 'display', 'flex');
|
||||
@@ -70,5 +70,11 @@ export default function autoPlayback(art) {
|
||||
clear() {
|
||||
return storage.del('times');
|
||||
},
|
||||
delete(id) {
|
||||
const times = storage.get('times') || {};
|
||||
delete times[id];
|
||||
storage.set('times', times);
|
||||
return times;
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user