mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 12:45: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;
|
className?: string;
|
||||||
birdseyeConfig: BirdseyeConfig;
|
birdseyeConfig: BirdseyeConfig;
|
||||||
liveMode: LivePlayerMode;
|
liveMode: LivePlayerMode;
|
||||||
|
onClick?: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function BirdseyeLivePlayer({
|
export default function BirdseyeLivePlayer({
|
||||||
className,
|
className,
|
||||||
birdseyeConfig,
|
birdseyeConfig,
|
||||||
liveMode,
|
liveMode,
|
||||||
|
onClick,
|
||||||
}: LivePlayerProps) {
|
}: LivePlayerProps) {
|
||||||
let player;
|
let player;
|
||||||
if (liveMode == "webrtc") {
|
if (liveMode == "webrtc") {
|
||||||
@ -50,6 +52,7 @@ export default function BirdseyeLivePlayer({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`relative flex justify-center w-full cursor-pointer ${className ?? ""}`}
|
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 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>
|
<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
|
<BirdseyeLivePlayer
|
||||||
birdseyeConfig={birdseyeConfig}
|
birdseyeConfig={birdseyeConfig}
|
||||||
liveMode={birdseyeConfig.restream ? "mse" : "jsmpeg"}
|
liveMode={birdseyeConfig.restream ? "mse" : "jsmpeg"}
|
||||||
|
onClick={() => onSelectCamera("birdseye")}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{cameras.map((camera) => {
|
{cameras.map((camera) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user