diff --git a/web/src/routes/Camera.jsx b/web/src/routes/Camera.jsx index 0d3f86df3..e99aa7db5 100644 --- a/web/src/routes/Camera.jsx +++ b/web/src/routes/Camera.jsx @@ -25,7 +25,8 @@ export default function Camera({ camera }) { const [viewMode, setViewMode] = useState('live'); const cameraConfig = config?.cameras[camera]; - const restreamEnabled = cameraConfig && Object.keys(config.go2rtc.streams || {}).includes(cameraConfig.live.stream_name); + const restreamEnabled = + cameraConfig && Object.keys(config.go2rtc.streams || {}).includes(cameraConfig.live.stream_name); const jsmpegWidth = cameraConfig ? Math.round(cameraConfig.live.height * (cameraConfig.detect.width / cameraConfig.detect.height)) : 0; @@ -63,6 +64,10 @@ export default function Camera({ camera }) { return ; } + if (!restreamEnabled) { + setViewSource('jsmpeg'); + } + const optionContent = showSettings ? (