mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-24 23:57:41 +03:00
improve live view console errors
This commit is contained in:
parent
2d45ea271e
commit
248d934d89
@ -88,7 +88,7 @@ function MSEPlayer({
|
|||||||
(error: LivePlayerError, description: string = "Unknown error") => {
|
(error: LivePlayerError, description: string = "Unknown error") => {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.error(
|
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);
|
onError?.(error);
|
||||||
},
|
},
|
||||||
@ -484,7 +484,10 @@ function MSEPlayer({
|
|||||||
videoRef.current
|
videoRef.current
|
||||||
) {
|
) {
|
||||||
onDisconnect();
|
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),
|
}, timeoutDuration),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -42,7 +42,7 @@ export default function WebRtcPlayer({
|
|||||||
(error: LivePlayerError, description: string = "Unknown error") => {
|
(error: LivePlayerError, description: string = "Unknown error") => {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.error(
|
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);
|
onError?.(error);
|
||||||
},
|
},
|
||||||
@ -339,7 +339,10 @@ export default function WebRtcPlayer({
|
|||||||
document.visibilityState === "visible" &&
|
document.visibilityState === "visible" &&
|
||||||
pcRef.current != undefined
|
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),
|
}, 3000),
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user