forked from Github/frigate
Add jsmpeg support to new webUI and make birdseye default for live page (#8995)
* Add jsmpeg and make birdseye default for live view * Fix jsmpeg * Fix
This commit is contained in:
committed by
Blake Blackshear
parent
1a27c7db29
commit
2236ae5d3b
36
web/src/components/player/BirdseyeLivePlayer.tsx
Normal file
36
web/src/components/player/BirdseyeLivePlayer.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import WebRtcPlayer from "./WebRTCPlayer";
|
||||
import { BirdseyeConfig } from "@/types/frigateConfig";
|
||||
import ActivityIndicator from "../ui/activity-indicator";
|
||||
import JSMpegPlayer from "./JSMpegPlayer";
|
||||
|
||||
type LivePlayerProps = {
|
||||
birdseyeConfig: BirdseyeConfig;
|
||||
liveMode: string;
|
||||
};
|
||||
|
||||
export default function BirdseyeLivePlayer({
|
||||
birdseyeConfig,
|
||||
liveMode,
|
||||
}: LivePlayerProps) {
|
||||
if (liveMode == "webrtc") {
|
||||
return (
|
||||
<div className="max-w-5xl">
|
||||
<WebRtcPlayer camera="birdseye" />
|
||||
</div>
|
||||
);
|
||||
} else if (liveMode == "mse") {
|
||||
return <div className="max-w-5xl">Not yet implemented</div>;
|
||||
} else if (liveMode == "jsmpeg") {
|
||||
return (
|
||||
<div className={`max-w-[${birdseyeConfig.width}px]`}>
|
||||
<JSMpegPlayer
|
||||
camera="birdseye"
|
||||
width={birdseyeConfig.width}
|
||||
height={birdseyeConfig.height}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
<ActivityIndicator />;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user