Update danmuku.js

This commit is contained in:
Harvey committed 2022-05-05 14:37:22 +08:00
1 parent 3c4e4845e3
commit 22af442720
1 file changed
+7 -1
@@ -33,7 +33,7 @@ export default class Danmuku {
art.on('video:waiting', this.stop.bind(this));
art.on('fullscreen', this.reset.bind(this));
art.on('fullscreenWeb', this.reset.bind(this));
art.on('destroy', this.stop.bind(this));
art.on('destroy', this.destroy.bind(this));
this.load();
}
@@ -443,4 +443,10 @@ export default class Danmuku {
return this;
}
destroy() {
this.stop();
if (this.worker && this.worker.terminate) this.worker.terminate();
this.art.emit('artplayerPluginDanmuku:destroy');
}
}