chore: Update Danmuku show and hide methods

This commit is contained in:
Harvey Zack committed 2024-05-27 13:55:59 +08:00
1 parent f79538d259
commit 24e51b96e2
3 files changed
+9 -1

No files matched your search

@@ -655,17 +655,21 @@ class Danmuku {
return this;
}
show() {
if (!this.isHide) return this;
this.isHide = false;
this.start();
this.$danmuku.style.display = "";
this.option.visible = true;
this.art.emit("artplayerPluginDanmuku:show");
return this;
}
hide() {
if (this.isHide) return this;
this.isHide = true;
this.stop();
this.queue.forEach((item)=>this.makeWait(item));
this.$danmuku.style.display = "none";
this.option.visible = false;
this.art.emit("artplayerPluginDanmuku:hide");
return this;
}