diff --git a/web/src/components/VideoPlayer.jsx b/web/src/components/VideoPlayer.jsx index 49a79d38f..e8612a943 100644 --- a/web/src/components/VideoPlayer.jsx +++ b/web/src/components/VideoPlayer.jsx @@ -6,7 +6,7 @@ import 'videojs-seek-buttons'; import 'video.js/dist/video-js.css'; import 'videojs-seek-buttons/dist/videojs-seek-buttons.css'; -export default function VideoPlayer({ children, options, seekOptions = {}, onReady = () => {}, onDispose = () => {} }) { +export default function VideoPlayer({ children, options, audio=true, live=false, seekOptions = {}, onReady = () => {}, onDispose = () => {} }) { const playerRef = useRef(); useEffect(() => { @@ -25,7 +25,7 @@ export default function VideoPlayer({ children, options, seekOptions = {}, onRea defaultOptions.playbackRates.push(16); } - const player = videojs(playerRef.current, { ...defaultOptions, ...options }, () => { + const player = videojs(playerRef.current, { ...defaultOptions, ...options, controlBar: { volumePanel: audio, playToggle: !live, progressControl: !live, remainingTimeDisplay: !live, playbackRateMenuButton: !live } }, () => { onReady(player); }); player.seekButtons({ diff --git a/web/src/routes/Camera.jsx b/web/src/routes/Camera.jsx index 6a7fc2a3c..3d83bbf72 100644 --- a/web/src/routes/Camera.jsx +++ b/web/src/routes/Camera.jsx @@ -94,11 +94,13 @@ export default function Camera({ camera }) { let player; if (viewMode === 'live') { - if (cameraConfig.live.source == 'restream') { + if (cameraConfig.live.source == 'mp4') { player = (
{}} />