Fix case where go2rtc is not setup

This commit is contained in:
Nicolas Mowen 2024-05-27 09:42:07 -06:00
parent 596a11f479
commit 72897af3cd

View File

@ -135,14 +135,18 @@ export default function LivePlayer({
); );
} }
} else if (liveMode == "jsmpeg") { } else if (liveMode == "jsmpeg") {
player = ( if (cameraActive) {
<JSMpegPlayer player = (
className="flex size-full justify-center overflow-hidden rounded-lg md:rounded-2xl" <JSMpegPlayer
camera={cameraConfig.live.stream_name} className="flex size-full justify-center overflow-hidden rounded-lg md:rounded-2xl"
width={cameraConfig.detect.width} camera={cameraConfig.live.stream_name}
height={cameraConfig.detect.height} width={cameraConfig.detect.width}
/> height={cameraConfig.detect.height}
); />
);
} else {
player = null;
}
} else { } else {
player = <ActivityIndicator />; player = <ActivityIndicator />;
} }