Skip to content

Commit

Permalink
Add target-latency and current-latency to debug view
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmccartney committed Oct 30, 2024
1 parent f5be970 commit 1a29ed2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/playbackstrategy/msestrategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ function MSEStrategy(mediaSources, windowType, mediaKind, playbackElement, isUHD

function onTimeUpdate() {
DebugTool.updateElementTime(mediaElement.currentTime)
DebugTool.dynamicMetric("current-latency", mediaPlayer.getCurrentLiveLatency())
DebugTool.dynamicMetric("target-latency", mediaPlayer.getTargetLiveDelay())

const currentMpdTimeSeconds =
windowType === WindowTypes.SLIDING
Expand Down
2 changes: 2 additions & 0 deletions src/playbackstrategy/msestrategy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const mockDashInstance = {
isReady: jest.fn(),
refreshManifest: jest.fn(),
getDashMetrics: jest.fn(),
getTargetLiveDelay: jest.fn(),
getCurrentLiveLatency: jest.fn(),
getDashAdapter: jest.fn(),
getBitrateInfoListFor: jest.fn(),
getAverageThroughput: jest.fn(),
Expand Down

0 comments on commit 1a29ed2

Please sign in to comment.