Skip to content

Commit

Permalink
fix(Stats): Fix completionPercent for Live (#6957)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored Jul 1, 2024
1 parent 7c33192 commit d719328
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -5480,7 +5480,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
const element = /** @type {!HTMLVideoElement} */ (this.video_);

const completionRatio = element.currentTime / element.duration;
if (!isNaN(completionRatio)) {
if (!isNaN(completionRatio) && !this.isLive()) {
this.stats_.setCompletionPercent(Math.round(100 * completionRatio));
}

Expand Down

0 comments on commit d719328

Please sign in to comment.