mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 10:31:20 -08:00
update danmuku.js
This commit is contained in:
1 parent
1ba6898705
commit
c568076b6b
15 files changed
+197
-192
No files matched your search
@@ -461,9 +461,15 @@ export default class Danmuku {
|
||||
danmu.time = this.art.currentTime + 0.5;
|
||||
}
|
||||
|
||||
if (danmu.mode === undefined) {
|
||||
danmu.mode = this.option.mode;
|
||||
}
|
||||
|
||||
if (danmu.color === undefined) {
|
||||
danmu.color = this.option.color;
|
||||
}
|
||||
|
||||
this.queue.push({
|
||||
mode: this.option.mode,
|
||||
color: this.option.color,
|
||||
...danmu,
|
||||
$state: 'wait',
|
||||
$ref: null,
|
||||
|
||||
@@ -6,11 +6,10 @@ function checkVersion(art) {
|
||||
version,
|
||||
utils: { errorHandle },
|
||||
} = art.constructor;
|
||||
|
||||
const arr = version.split('.').map(Number);
|
||||
const major = arr[0];
|
||||
const minor = arr[1] / 100;
|
||||
errorHandle(major + minor >= 4.04, `弹幕库:Artplayer.js@${version} 版本不兼容,请更新到 4.4.x 版本以上`);
|
||||
errorHandle(major + minor >= 4.04, `Artplayer.js@${version}不兼容该弹幕库,请更新到 4.4.x 版本以上`);
|
||||
}
|
||||
|
||||
export default function artplayerPluginDanmuku(option) {
|
||||
@@ -34,4 +33,6 @@ export default function artplayerPluginDanmuku(option) {
|
||||
};
|
||||
}
|
||||
|
||||
window['artplayerPluginDanmuku'] = artplayerPluginDanmuku;
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayerPluginDanmuku'] = artplayerPluginDanmuku;
|
||||
}
|
||||
@@ -109,10 +109,10 @@ export default function setting(art, danmuku) {
|
||||
border: true,
|
||||
};
|
||||
|
||||
countdown(5);
|
||||
$input.value = '';
|
||||
danmuku.emit(danmu);
|
||||
addClass($send, 'art-disabled');
|
||||
countdown(danmuku.option.timeout || 5);
|
||||
art.emit('artplayerPluginDanmuku:emit', danmu);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
background-color: rgba(0, 0, 0, 0.9);
|
||||
|
||||
.art-danmuku-style-panel-title {
|
||||
font-size: 13px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user