From f33847c63411889ad9390b017bb0da9242e154d9 Mon Sep 17 00:00:00 2001 From: Bram Boeckx <30649946+BramB-1952444@users.noreply.github.com> Date: Wed, 24 Jul 2024 14:04:17 +0200 Subject: [PATCH] Update liveCatchup.maxDrift logic to allow zero value. This will make it possible to dissable catchup with seeking as described in the documentation. (#4528) --- src/streaming/models/MediaPlayerModel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/streaming/models/MediaPlayerModel.js b/src/streaming/models/MediaPlayerModel.js index f8d71de1c0..9a50afab97 100644 --- a/src/streaming/models/MediaPlayerModel.js +++ b/src/streaming/models/MediaPlayerModel.js @@ -126,12 +126,12 @@ function MediaPlayerModel() { * @return {number} */ function getCatchupMaxDrift() { - if (!isNaN(settings.get().streaming.liveCatchup.maxDrift) && settings.get().streaming.liveCatchup.maxDrift > 0) { + if (!isNaN(settings.get().streaming.liveCatchup.maxDrift) && settings.get().streaming.liveCatchup.maxDrift >= 0) { return settings.get().streaming.liveCatchup.maxDrift; } const serviceDescriptionSettings = serviceDescriptionController.getServiceDescriptionSettings(); - if (serviceDescriptionSettings && serviceDescriptionSettings.liveCatchup && !isNaN(serviceDescriptionSettings.liveCatchup.maxDrift) && serviceDescriptionSettings.liveCatchup.maxDrift > 0) { + if (serviceDescriptionSettings && serviceDescriptionSettings.liveCatchup && !isNaN(serviceDescriptionSettings.liveCatchup.maxDrift) && serviceDescriptionSettings.liveCatchup.maxDrift >= 0) { return serviceDescriptionSettings.liveCatchup.maxDrift; }