mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-19 19:51:20 -08:00
修复移动端销毁错误bug
This commit is contained in:
1 parent
a63cc35df0
commit
0e716da80d
3 files changed
+13
-8
No files matched your search
@@ -108,11 +108,10 @@ class Artplayer extends Emitter {
|
||||
}
|
||||
|
||||
init() {
|
||||
this.isFocus = false;
|
||||
|
||||
this.whitelist = new Whitelist(this);
|
||||
this.template = new Template(this);
|
||||
if (this.whitelist.state) {
|
||||
this.isFocus = false;
|
||||
this.storage = new Storage(this);
|
||||
this.i18n = new I18n(this);
|
||||
this.notice = new Notice(this);
|
||||
@@ -139,9 +138,11 @@ class Artplayer extends Emitter {
|
||||
}
|
||||
|
||||
destroy(removeHtml = false) {
|
||||
Artplayer.instances.splice(Artplayer.instances.indexOf(this), 1);
|
||||
this.events.destroy();
|
||||
if (this.events) {
|
||||
this.events.destroy();
|
||||
}
|
||||
this.template.destroy(removeHtml);
|
||||
Artplayer.instances.splice(Artplayer.instances.indexOf(this), 1);
|
||||
this.emit('destroy');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user