From 1a29ed28c84eb3c836b28a7a0f981bb3e4e3a704 Mon Sep 17 00:00:00 2001 From: Ryan McCartney <33418788+ryanmccartney@users.noreply.github.com> Date: Wed, 30 Oct 2024 17:01:07 +0000 Subject: [PATCH] Add target-latency and current-latency to debug view --- src/playbackstrategy/msestrategy.js | 2 ++ src/playbackstrategy/msestrategy.test.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/playbackstrategy/msestrategy.js b/src/playbackstrategy/msestrategy.js index 2c54694b..d9ce617b 100644 --- a/src/playbackstrategy/msestrategy.js +++ b/src/playbackstrategy/msestrategy.js @@ -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 diff --git a/src/playbackstrategy/msestrategy.test.js b/src/playbackstrategy/msestrategy.test.js index 403c9f37..eccf391d 100644 --- a/src/playbackstrategy/msestrategy.test.js +++ b/src/playbackstrategy/msestrategy.test.js @@ -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(),