Skip to content

Commit a980901

Browse files
committed
1.3.5
1 parent c47afbf commit a980901

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

dist/danmaku.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
var cmtTotalWidth = that.width + cmt.width;
2424
var cmtTime = that._hasMedia ? cmt.time : cmt._utc;
2525
var cmtElapsed = cmtTotalWidth * (ct - cmtTime) * pbr / that.duration;
26-
// var cmtElapsed = cmtTotalWidth * (ct - cmt.time) * pbr / that.duration;
2726
var cmtArrival = that.width - cmtElapsed;
2827
// (rtl mode) the left end of `cmt` reach the left side of stage
2928
var cmtArrivalTime = that.duration * cmtArrival / (that.width + cmt.width);
@@ -547,6 +546,9 @@
547546
position = this.position;
548547
} else {
549548
position = binsearch(this.comments, 'time', cmt.time);
549+
if (position < this.position) {
550+
this.position += 1;
551+
}
550552
}
551553
this.comments.splice(position, 0, cmt);
552554
} else {

0 commit comments

Comments
 (0)