mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 04:35:25 +03:00
Add on click from main dashboard
This commit is contained in:
parent
2ae7835590
commit
a199569b8a
@ -9,12 +9,14 @@ type LivePlayerProps = {
|
||||
className?: string;
|
||||
birdseyeConfig: BirdseyeConfig;
|
||||
liveMode: LivePlayerMode;
|
||||
onClick?: () => void;
|
||||
};
|
||||
|
||||
export default function BirdseyeLivePlayer({
|
||||
className,
|
||||
birdseyeConfig,
|
||||
liveMode,
|
||||
onClick,
|
||||
}: LivePlayerProps) {
|
||||
let player;
|
||||
if (liveMode == "webrtc") {
|
||||
@ -50,6 +52,7 @@ export default function BirdseyeLivePlayer({
|
||||
return (
|
||||
<div
|
||||
className={`relative flex justify-center w-full cursor-pointer ${className ?? ""}`}
|
||||
onClick={onClick}
|
||||
>
|
||||
<div className="absolute top-0 inset-x-0 rounded-2xl z-10 w-full h-[30%] bg-gradient-to-b from-black/20 to-transparent pointer-events-none"></div>
|
||||
<div className="absolute bottom-0 inset-x-0 rounded-2xl z-10 w-full h-[10%] bg-gradient-to-t from-black/20 to-transparent pointer-events-none"></div>
|
||||
|
||||
@ -134,6 +134,7 @@ export default function LiveDashboardView({
|
||||
<BirdseyeLivePlayer
|
||||
birdseyeConfig={birdseyeConfig}
|
||||
liveMode={birdseyeConfig.restream ? "mse" : "jsmpeg"}
|
||||
onClick={() => onSelectCamera("birdseye")}
|
||||
/>
|
||||
)}
|
||||
{cameras.map((camera) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user