update docs

This commit is contained in:
Harvey Zack committed 2022-04-29 23:22:00 +08:00
1 parent 4dcdda0089
commit 8a1546f9dd
94 files changed
+255 -263

No files matched your search

@@ -200,7 +200,6 @@ class Danmuku {
return {
danmuku: [],
speed: 5,
maxlength: 50,
margin: [
10,
100
@@ -216,7 +215,6 @@ class Danmuku {
return {
danmuku: 'array|function|string',
speed: 'number',
maxlength: 'number',
margin: 'array',
opacity: 'number',
fontSize: 'number',
@@ -333,7 +331,6 @@ class Danmuku {
this.option = Object.assign({}, Danmuku.option, this.option, option);
this.validator(this.option, Danmuku.scheme);
this.option.speed = clamp(this.option.speed, 1, 10);
this.option.maxlength = clamp(this.option.maxlength, 10, 100);
this.option.opacity = clamp(this.option.opacity, 0, 1);
this.option.fontSize = clamp(this.option.fontSize, 12, 100);
this.art.emit('artplayerPluginDanmuku:config', this.option);
@@ -509,7 +506,6 @@ class Danmuku {
});
if (!this.option.filter(danmu)) return this;
if (!danmu.text.trim()) return this;
if (danmu.text.length > this.option.maxlength) return this;
if (danmu.time) danmu.time = this.utils.clamp(danmu.time, 0, Infinity);
else danmu.time = this.art.currentTime + 0.5;
this.queue.push({