From 9521606f9b74394e40997f47cf0031236b2de0c6 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Sun, 22 Nov 2026 18:33:09 -0500 Subject: [PATCH 1/3] Apply suggested fix to web/js/components/preact/HLSVideoCell.tsx from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- web/js/components/preact/HLSVideoCell.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/web/js/components/preact/HLSVideoCell.tsx b/web/js/components/preact/HLSVideoCell.tsx index 27104ffdf..03717166d 100644 --- a/web/js/components/preact/HLSVideoCell.tsx +++ b/web/js/components/preact/HLSVideoCell.tsx @@ -538,12 +538,18 @@ export function HLSVideoCell({ console.warn(`[HLS ${stream.name}] Network error recovery attempt ${attemptNum}/${MAX_RECOVERY}`); setTimeout(() => { if (isMounted && hlsPlayerRef.current) { - if (usingGo2rtc && hlsUrlRef.current) { + const isManifestLoadFailure = + data.details === Hls.ErrorDetails.MANIFEST_LOAD_ERROR || + data.details === Hls.ErrorDetails.MANIFEST_LOAD_TIMEOUT; + + if ((usingGo2rtc || isManifestLoadFailure) && hlsUrlRef.current) { // go2rtc sessions expire after 5 s of inactivity. Simply // calling startLoad() retries the same (now-expired) session // ID and keeps 404-ing. Re-fetching the master manifest via // loadSource() creates a brand-new go2rtc session. - console.log(`[HLS ${stream.name}] Reloading master manifest to create fresh go2rtc session`); + // For native HLS, manifest load failures/timeouts can also + // require reloading the source URL before startLoad(). + console.log(`[HLS ${stream.name}] Reloading master manifest for network recovery`); hlsPlayerRef.current.loadSource(hlsUrlRef.current); hlsPlayerRef.current.startLoad(); } else { From 45b9d7a7b8cecf0591b503fe03d126f41bee82ef Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Sun, 22 Nov 2026 18:33:10 -0500 Subject: [PATCH 2/3] Apply suggested fix to web/js/components/preact/HLSVideoCell.tsx from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- web/js/components/preact/HLSVideoCell.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/js/components/preact/HLSVideoCell.tsx b/web/js/components/preact/HLSVideoCell.tsx index 03717166d..c43468516 100644 --- a/web/js/components/preact/HLSVideoCell.tsx +++ b/web/js/components/preact/HLSVideoCell.tsx @@ -99,7 +99,7 @@ export function HLSVideoCell({ const container = tileContainerRef.current; const focusedInTile = focused instanceof Node && !!container?.contains(focused); - if (!focusedInTile && focused !== document.body) { + if (!focusedInTile) { hadPrivacyFocusRef.current = false; previousFocusedElementRef.current = null; return; From 494a86cd63ea8fc276c749f8ddba0fe0df8ddb7b Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Sun, 22 Nov 2026 18:35:15 -0500 Subject: [PATCH 3/3] Preserve initial privacy focus during recovery update --- web/js/components/preact/HLSVideoCell.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/js/components/preact/HLSVideoCell.tsx b/web/js/components/preact/HLSVideoCell.tsx index c43468516..03717166d 100644 --- a/web/js/components/preact/HLSVideoCell.tsx +++ b/web/js/components/preact/HLSVideoCell.tsx @@ -99,7 +99,7 @@ export function HLSVideoCell({ const container = tileContainerRef.current; const focusedInTile = focused instanceof Node && !!container?.contains(focused); - if (!focusedInTile) { + if (!focusedInTile && focused !== document.body) { hadPrivacyFocusRef.current = false; previousFocusedElementRef.current = null; return;