Skip to content

Commit

Permalink
Add on click from main dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Mar 15, 2024
1 parent 2ae7835 commit a199569
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web/src/components/player/BirdseyeLivePlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions web/src/views/live/LiveDashboardView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export default function LiveDashboardView({
<BirdseyeLivePlayer
birdseyeConfig={birdseyeConfig}
liveMode={birdseyeConfig.restream ? "mse" : "jsmpeg"}
onClick={() => onSelectCamera("birdseye")}
/>
)}
{cameras.map((camera) => {
Expand Down

0 comments on commit a199569

Please sign in to comment.