mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-01-07 00:06:57 +01:00
37 lines
935 B
TypeScript
37 lines
935 B
TypeScript
|
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 />;
|
||
|
}
|
||
|
}
|