diff --git a/src/Components/CameraFeed/FeedControls.tsx b/src/Components/CameraFeed/FeedControls.tsx index 8863ae57f55..8cff960505a 100644 --- a/src/Components/CameraFeed/FeedControls.tsx +++ b/src/Components/CameraFeed/FeedControls.tsx @@ -2,6 +2,7 @@ import { useState } from "react"; import FeedButton from "./FeedButton"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { PTZPayload } from "./useOperateCamera"; +import { isAppleDevice } from "../../Utils/utils"; const Actions = { UP: 1 << 0, @@ -12,7 +13,7 @@ const Actions = { ZOOM_OUT: 1 << 5, } as const; -// const metaKey = isAppleDevice ? "Meta" : "Control"; +const metaKey = isAppleDevice ? "Meta" : "Control"; export type PTZAction = keyof typeof Actions; @@ -53,7 +54,7 @@ interface Props { inlineView: boolean; } -export default function FeedControls(props: Props) { +export default function FeedControls({ shortcutsDisabled, ...props }: Props) { const [precision, setPrecision] = useState(1); const togglePrecision = () => setPrecision((p) => (p === 16 ? 1 : p << 1)); @@ -65,9 +66,9 @@ export default function FeedControls(props: Props) { position: ( <> @@ -75,12 +76,12 @@ export default function FeedControls(props: Props) { @@ -88,9 +89,9 @@ export default function FeedControls(props: Props) { @@ -98,34 +99,34 @@ export default function FeedControls(props: Props) { {precision}x @@ -133,9 +134,9 @@ export default function FeedControls(props: Props) { @@ -144,11 +145,11 @@ export default function FeedControls(props: Props) { @@ -156,9 +157,9 @@ export default function FeedControls(props: Props) { @@ -169,20 +170,20 @@ export default function FeedControls(props: Props) { zoom: ( <> @@ -191,22 +192,22 @@ export default function FeedControls(props: Props) { reset: ( ), fullscreen: ( props.setFullscreen(!props.isFullscreen)} - // shortcutsDisabled={shortcutsDisabled} + shortcuts={[["Shift", "F"]]} + shortcutsDisabled={shortcutsDisabled} + helpText={props.isFullscreen ? "Exit Fullscreen" : "Enter Fullscreen"} + tooltipClassName="tooltip-left translate-y-2 translate-x-1" >