优化进度条逻辑
This commit is contained in:
@@ -208,6 +208,7 @@ module.exports = class FontPlayer {
|
||||
if (this.delay > 0) {
|
||||
this._handlePlayFont(curFont, driftTime)
|
||||
this.timeoutTools.start(() => {
|
||||
if (!this.isPlay) return
|
||||
this._refresh()
|
||||
}, this.delay)
|
||||
return
|
||||
@@ -215,6 +216,7 @@ module.exports = class FontPlayer {
|
||||
} else if (this.curFontNum == 0) {
|
||||
this.curFontNum--
|
||||
this.waitPlayTimeout.start(() => {
|
||||
if (!this.isPlay) return
|
||||
this._refresh()
|
||||
}, -driftTime)
|
||||
return
|
||||
|
||||
@@ -125,6 +125,7 @@ module.exports = class LinePlayer {
|
||||
this.isOffseted = true
|
||||
}
|
||||
timeoutTools.start(() => {
|
||||
if (!this.isPlay) return
|
||||
this._refresh()
|
||||
}, this.delay)
|
||||
this.onPlay(this.curLineNum, curLine.text, currentTime)
|
||||
|
||||
Reference in New Issue
Block a user