import { h } from 'preact'; import Box from './components/Box'; import Button from './components/Button'; import Heading from './components/Heading'; import Switch from './components/Switch'; import { route } from 'preact-router'; import { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'preact/hooks'; import { ApiHost, Config } from './context'; export default function CameraMasks({ camera, url }) { const config = useContext(Config); const apiHost = useContext(ApiHost); const imageRef = useRef(null); const [imageScale, setImageScale] = useState(1); const [snap, setSnap] = useState(true); if (!(camera in config.cameras)) { return
This tool can help you create masks & zones for your {camera} camera. When done, copy each mask configuration
into your config.yml
file restart your Frigate instance to save your
changes.
{yamlPrefix} {Object.keys(points).map((mainkey) => { if (isMulti) { return ({` ${mainkey}:\n mask:\n`} {points[mainkey].map((item, subkey) => (); } else { return (- ))}
- ); } })}