From 7025589a0a494fe4509b3641aa64ef67a13f238b Mon Sep 17 00:00:00 2001 From: Benjamin Wallberg Date: Tue, 5 Dec 2023 14:04:20 +0100 Subject: [PATCH] for lldash use min/max playbackRate when the buffer is safe in mode: liveCatchupModeLoLP (#4322) --- src/streaming/controllers/CatchupController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/streaming/controllers/CatchupController.js b/src/streaming/controllers/CatchupController.js index 400f4940e7..3508e967da 100644 --- a/src/streaming/controllers/CatchupController.js +++ b/src/streaming/controllers/CatchupController.js @@ -393,14 +393,14 @@ function CatchupController() { logger.debug('[LoL+ playback control_buffer-based] bufferLevel: ' + bufferLevel + ', newRate: ' + newRate); } else { // Hybrid: Latency-based - // Buffer is safe, vary playback rate based on latency - const cpr = liveCatchUpPlaybackRates.max; // Check if latency is within range of target latency const minDifference = 0.02; if (Math.abs(currentLiveLatency - liveDelay) <= (minDifference * liveDelay)) { newRate = 1; } else { const deltaLatency = currentLiveLatency - liveDelay; + // Buffer is safe, vary playback rate based on latency + const cpr = (deltaLatency < 0) ? Math.abs(liveCatchUpPlaybackRates.min) : liveCatchUpPlaybackRates.max; const d = deltaLatency * 5; // Playback rate must be between (1 - cpr) - (1 + cpr)