From 248d934d89f318e7a1fb039208db66410b4bf5ca Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 3 Oct 2025 06:36:54 -0500 Subject: [PATCH] improve live view console errors --- web/src/components/player/MsePlayer.tsx | 7 +++++-- web/src/components/player/WebRTCPlayer.tsx | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/web/src/components/player/MsePlayer.tsx b/web/src/components/player/MsePlayer.tsx index f7a77393f..c4a30c7e6 100644 --- a/web/src/components/player/MsePlayer.tsx +++ b/web/src/components/player/MsePlayer.tsx @@ -88,7 +88,7 @@ function MSEPlayer({ (error: LivePlayerError, description: string = "Unknown error") => { // eslint-disable-next-line no-console console.error( - `${camera} - MSE error '${error}': ${description} See the documentation: https://docs.frigate.video/configuration/live`, + `${camera} - MSE error '${error}': ${description} See the documentation: https://docs.frigate.video/configuration/live/#live-view-faq`, ); onError?.(error); }, @@ -484,7 +484,10 @@ function MSEPlayer({ videoRef.current ) { onDisconnect(); - handleError("stalled", "Media playback has stalled."); + handleError( + "stalled", + `Media playback has stalled after ${timeoutDuration / 1000} seconds due to insufficient buffering or a network interruption.`, + ); } }, timeoutDuration), ); diff --git a/web/src/components/player/WebRTCPlayer.tsx b/web/src/components/player/WebRTCPlayer.tsx index dc3b24653..13a2a20ed 100644 --- a/web/src/components/player/WebRTCPlayer.tsx +++ b/web/src/components/player/WebRTCPlayer.tsx @@ -42,7 +42,7 @@ export default function WebRtcPlayer({ (error: LivePlayerError, description: string = "Unknown error") => { // eslint-disable-next-line no-console console.error( - `${camera} - WebRTC error '${error}': ${description} See the documentation: https://docs.frigate.video/configuration/live`, + `${camera} - WebRTC error '${error}': ${description} See the documentation: https://docs.frigate.video/configuration/live/#live-view-faq`, ); onError?.(error); }, @@ -339,7 +339,10 @@ export default function WebRtcPlayer({ document.visibilityState === "visible" && pcRef.current != undefined ) { - handleError("stalled", "WebRTC connection stalled."); + handleError( + "stalled", + "Media playback has stalled after 3 seconds due to insufficient buffering or a network interruption.", + ); } }, 3000), );