use fallback timeout for opening media source

covers the case where there is no active connection to the go2rtc stream and the camera takes a long time to start
This commit is contained in:
Josh Hawkins 2025-12-21 22:09:21 -06:00
parent 54f4af3c6a
commit fb0838558f

View File

@ -260,7 +260,7 @@ function MSEPlayer({
// @ts-expect-error for typing
value: codecs(MediaSource.isTypeSupported),
},
3000,
(fallbackTimeout ?? 3) * 1000,
).catch(() => {
if (wsRef.current) {
onDisconnect();
@ -290,7 +290,7 @@ function MSEPlayer({
type: "mse",
value: codecs(MediaSource.isTypeSupported),
},
3000,
(fallbackTimeout ?? 3) * 1000,
).catch(() => {
if (wsRef.current) {
onDisconnect();