Skip to content

Commit

Permalink
fix: Fix liveLatency in stats (#5982)
Browse files Browse the repository at this point in the history
Fixes #4474
  • Loading branch information
avelad committed Dec 5, 2023
1 parent 90f1d61 commit 00c918f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/player.js
Expand Up @@ -4594,7 +4594,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {

if (this.isLive()) {
const now = this.getPresentationStartTimeAsDate().valueOf() +
this.seekRange().end * 1000;
element.currentTime * 1000;
const latency = (Date.now() - now) / 1000;
this.stats_.setLiveLatency(latency);
}
Expand Down

0 comments on commit 00c918f

Please sign in to comment.