mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 09:41:20 -08:00
消除timer
This commit is contained in:
1 parent
09a6c67c75
commit
f457fa779c
2 files changed
+11
No files matched your search
@@ -58,6 +58,12 @@ function artplayerPluginGif(art) {
|
|||||||
let isPress = false;
|
let isPress = false;
|
||||||
let offset = 0;
|
let offset = 0;
|
||||||
|
|
||||||
|
art.on('destroy', () => {
|
||||||
|
if (progressTimer) {
|
||||||
|
clearTimeout(progressTimer);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
function cleanTimer() {
|
function cleanTimer() {
|
||||||
$progress.style.width = '0%';
|
$progress.style.width = '0%';
|
||||||
clearTimeout(progressTimer);
|
clearTimeout(progressTimer);
|
||||||
|
|||||||
@@ -14,6 +14,11 @@ export default class Info {
|
|||||||
proxy($infoClose, 'click', () => {
|
proxy($infoClose, 'click', () => {
|
||||||
this.hide();
|
this.hide();
|
||||||
});
|
});
|
||||||
|
this.art.on('destroy', () => {
|
||||||
|
if (this.timer) {
|
||||||
|
clearTimeout(this.timer);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
show() {
|
show() {
|
||||||
|
|||||||
Reference in new issue
Block a user