mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-30 03:51:25 -08:00
Update danmuku.js
This commit is contained in:
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('video:waiting', this.stop.bind(this));
|
||||||
art.on('fullscreen', this.reset.bind(this));
|
art.on('fullscreen', this.reset.bind(this));
|
||||||
art.on('fullscreenWeb', 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();
|
this.load();
|
||||||
}
|
}
|
||||||
@@ -443,4 +443,10 @@ export default class Danmuku {
|
|||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
destroy() {
|
||||||
|
this.stop();
|
||||||
|
if (this.worker && this.worker.terminate) this.worker.terminate();
|
||||||
|
this.art.emit('artplayerPluginDanmuku:destroy');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user