mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 03:46:16 -08:00
Update danmuku.js
This commit is contained in:
1 parent
39819c5b46
commit
b2f4bb4806
1 file changed
+3
@@ -56,17 +56,20 @@ export default class Danmuku {
|
||||
if (typeof this.option.danmuku === 'function') {
|
||||
this.option.danmuku().then((danmus) => {
|
||||
this.queue = [];
|
||||
this.$danmuku.innerText = '';
|
||||
danmus.forEach(this.emit.bind(this));
|
||||
this.art.emit('artplayerPluginDanmuku:loaded');
|
||||
});
|
||||
} else if (typeof this.option.danmuku === 'string') {
|
||||
bilibiliDanmuParseFromUrl(this.option.danmuku).then((danmus) => {
|
||||
this.queue = [];
|
||||
this.$danmuku.innerText = '';
|
||||
danmus.forEach(this.emit.bind(this));
|
||||
this.art.emit('artplayerPluginDanmuku:loaded');
|
||||
});
|
||||
} else {
|
||||
this.queue = [];
|
||||
this.$danmuku.innerText = '';
|
||||
this.option.danmuku.forEach(this.emit.bind(this));
|
||||
this.art.emit('artplayerPluginDanmuku:loaded');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user