Make sure jsmpeg works as expected

This commit is contained in:
Nick Mowen 2022-10-13 17:44:58 -06:00
parent 7ff2dae9d5
commit 6c95e78366

View File

@ -94,20 +94,26 @@ export default function Camera({ camera }) {
let player;
if (viewMode === 'live') {
if (cameraConfig.restream.enabled) {
<VideoPlayer
options={{
preload: 'auto',
autoplay: true,
sources: [
{
src: `${apiHost}/restream/${camera}`,
type: 'video/mp4',
},
],
}}
onReady={() => {}}
/>
if (cameraConfig.live.source == 'restream') {
player = (
<Fragment>
<div>
<VideoPlayer
options={{
preload: 'auto',
autoplay: true,
sources: [
{
src: `${apiHost}/restream/${camera}`,
type: 'video/mp4',
},
],
}}
onReady={() => {}}
/>
</div>
</Fragment>
);
} else {
player = (
<Fragment>