diff --git a/web/src/components/JSMpegPlayer.jsx b/web/src/components/JSMpegPlayer.jsx index a021c4953..d3b2b5b15 100644 --- a/web/src/components/JSMpegPlayer.jsx +++ b/web/src/components/JSMpegPlayer.jsx @@ -3,7 +3,7 @@ import { baseUrl } from '../api/baseUrl'; import { useRef, useEffect } from 'preact/hooks'; import JSMpeg from '@cycjimmy/jsmpeg-player'; -export default function JSMpegPlayer({ camera }) { +export default function JSMpegPlayer({ camera, width, height }) { const playerRef = useRef(); const url = `${baseUrl.replace(/^http/, 'ws')}/live/${camera}` @@ -32,6 +32,6 @@ export default function JSMpegPlayer({ camera }) { }, [url]); return ( -
+
); } diff --git a/web/src/routes/Camera.jsx b/web/src/routes/Camera.jsx index b134fd589..5e301631f 100644 --- a/web/src/routes/Camera.jsx +++ b/web/src/routes/Camera.jsx @@ -87,7 +87,7 @@ export default function Camera({ camera }) { player = (
- +
); diff --git a/web/src/routes/__tests__/Camera.test.jsx b/web/src/routes/__tests__/Camera.test.jsx index 54f53add3..78be9f940 100644 --- a/web/src/routes/__tests__/Camera.test.jsx +++ b/web/src/routes/__tests__/Camera.test.jsx @@ -13,7 +13,7 @@ describe('Camera Route', () => { mockSetOptions = jest.fn(); mockUsePersistence = jest.spyOn(Context, 'usePersistence').mockImplementation(() => [{}, mockSetOptions]); jest.spyOn(Api, 'useConfig').mockImplementation(() => ({ - data: { cameras: { front: { name: 'front', objects: { track: ['taco', 'cat', 'dog'] } } } }, + data: { cameras: { front: { name: 'front', detect: {width: 1280, height: 720}, objects: { track: ['taco', 'cat', 'dog'] } } } }, })); jest.spyOn(Api, 'useApiHost').mockImplementation(() => 'http://base-url.local:5000'); jest.spyOn(AutoUpdatingCameraImage, 'default').mockImplementation(({ searchParams }) => {