From 9cb19f2586ea6faec0db6737e105a608818693d7 Mon Sep 17 00:00:00 2001 From: Bertrand Berthelot Date: Tue, 10 Dec 2019 17:31:38 +0100 Subject: [PATCH] PlaybackController: in getActualPresentationTime(), ignore DVRWindow if live stream not yet started (currentTime = 0) --- src/streaming/controllers/PlaybackController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/streaming/controllers/PlaybackController.js b/src/streaming/controllers/PlaybackController.js index 007587c63c..1b79d21d40 100644 --- a/src/streaming/controllers/PlaybackController.js +++ b/src/streaming/controllers/PlaybackController.js @@ -405,7 +405,7 @@ function PlaybackController() { if (!DVRWindow) return NaN; if (currentTime > DVRWindow.end) { actualTime = Math.max(DVRWindow.end - streamInfo.manifestInfo.minBufferTime * 2, DVRWindow.start); - } else if (currentTime + 0.250 < DVRWindow.start && DVRWindow.start - currentTime > DVRWindow.start - 315360000) { + } else if (currentTime > 0 && currentTime + 0.250 < DVRWindow.start && DVRWindow.start - currentTime > DVRWindow.start - 315360000) { // Checking currentTime plus 250ms as the 'timeupdate' is fired with a frequency between 4Hz and 66Hz // https://developer.mozilla.org/en-US/docs/Web/Events/timeupdate // http://w3c.github.io/html/single-page.html#offsets-into-the-media-resource