Skip to content

Commit d719328

Browse files
authored
fix(Stats): Fix completionPercent for Live (#6957)
1 parent 7c33192 commit d719328

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/player.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5480,7 +5480,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
54805480
const element = /** @type {!HTMLVideoElement} */ (this.video_);
54815481

54825482
const completionRatio = element.currentTime / element.duration;
5483-
if (!isNaN(completionRatio)) {
5483+
if (!isNaN(completionRatio) && !this.isLive()) {
54845484
this.stats_.setCompletionPercent(Math.round(100 * completionRatio));
54855485
}
54865486

0 commit comments

Comments
 (0)