From d0febd046037d050e0388b78740b30c1b578c00e Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sun, 7 Dec 2025 12:38:05 -0600 Subject: [PATCH] remove extra gap controller overrides --- web/src/components/player/HlsVideoPlayer.tsx | 21 ++------------------ 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/web/src/components/player/HlsVideoPlayer.tsx b/web/src/components/player/HlsVideoPlayer.tsx index aabd93ac8..b254b7f8b 100644 --- a/web/src/components/player/HlsVideoPlayer.tsx +++ b/web/src/components/player/HlsVideoPlayer.tsx @@ -57,7 +57,6 @@ type HlsVideoPlayerProps = { isDetailMode?: boolean; camera?: string; currentTimeOverride?: number; - enableGapControllerRecovery?: boolean; }; export default function HlsVideoPlayer({ @@ -82,7 +81,6 @@ export default function HlsVideoPlayer({ isDetailMode = false, camera, currentTimeOverride, - enableGapControllerRecovery = false, }: HlsVideoPlayerProps) { const { t } = useTranslation("components/player"); const { data: config } = useSWR("config"); @@ -173,21 +171,12 @@ export default function HlsVideoPlayer({ } // Base HLS configuration - const baseConfig: Partial = { + const hlsConfig: Partial = { maxBufferLength: 10, maxBufferSize: 20 * 1000 * 1000, startPosition: currentSource.startPosition, }; - const hlsConfig = { ...baseConfig }; - - if (enableGapControllerRecovery) { - hlsConfig.highBufferWatchdogPeriod = 1; // Check for stalls every 1 second (default: 3) - hlsConfig.nudgeOffset = 0.2; // Nudge playhead forward 0.2s when stalled (default: 0.1) - hlsConfig.nudgeMaxRetry = 5; // Try up to 5 nudges before giving up (default: 3) - hlsConfig.maxBufferHole = 0.5; // Tolerate up to 0.5s gaps between fragments (default: 0.1) - } - hlsRef.current = new Hls(hlsConfig); hlsRef.current.attachMedia(videoRef.current); hlsRef.current.loadSource(currentSource.playlist); @@ -201,13 +190,7 @@ export default function HlsVideoPlayer({ hlsRef.current.destroy(); } }; - }, [ - videoRef, - hlsRef, - useHlsCompat, - currentSource, - enableGapControllerRecovery, - ]); + }, [videoRef, hlsRef, useHlsCompat, currentSource]); // state handling