mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-12 14:15:22 +03:00
Only set stalled error when player is visible
This commit is contained in:
parent
30b86271ea
commit
dc907ed197
@ -328,7 +328,10 @@ function MSEPlayer({
|
||||
|
||||
setBufferTimeout(
|
||||
setTimeout(() => {
|
||||
onError("stalled");
|
||||
// only error and fallback if player is visible
|
||||
if (document.visibilityState === "visible") {
|
||||
onError("stalled");
|
||||
}
|
||||
}, 3000),
|
||||
);
|
||||
}
|
||||
|
||||
@ -238,7 +238,9 @@ export default function WebRtcPlayer({
|
||||
|
||||
setBufferTimeout(
|
||||
setTimeout(() => {
|
||||
onError("stalled");
|
||||
if (document.visibilityState === "visible") {
|
||||
onError("stalled");
|
||||
}
|
||||
}, 3000),
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user