work with go2rtc by API
- in the Dockerfile,
go2rtcis integrated in the form of executable instead of package/library
- It's based on preact. No typescript.
- No widget libs like MUI is used. They implemented their own.
iei@iei-POCm-ADL:~/frigate/web/src$ ls
api app.css assets context hooks index.css __mocks__ routes __tests__ vite-env.d.ts
AppBar.jsx app.tsx components env.js icons main.tsx preact.d.ts Sidebar.jsx utils
- the region editor is based canvas
iei@iei-POCm-ADL:~/frigate/web/src$ grep -i canvas `find . -name "*.*sx"
`
./components/CameraImage.jsx: const canvasRef = useRef(null);
./components/CameraImage.jsx: if (canvasRef.current) {
./components/CameraImage.jsx: const ctx = canvasRef.current.getContext('2d');
./components/CameraImage.jsx: [img, scaledHeight, scaledWidth, setHasLoaded, onload, canvasRef]
./components/CameraImage.jsx: if (!config || scaledHeight === 0 || !canvasRef.current) {
./components/CameraImage.jsx: }, [apiHost, canvasRef, name, img, searchParams, scaledHeight, config]);
./components/CameraImage.jsx: <canvas data-testid="cameraimage-canvas" height={scaledHeight} ref={canvasRef} width={scaledWidth} />
./components/JSMpegPlayer.jsx: if (video.els.canvas.webkitRequestFullScreen) {
./components/JSMpegPlayer.jsx: video.els.canvas.webkitRequestFullScreen();
./components/JSMpegPlayer.jsx: video.els.canvas.mozRequestFullScreen();
./components/JSMpegPlayer.jsx: video.els.canvas.addEventListener('click',fullscreen);
[{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"15/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":720,"width":1280},{"avg_frame_rate":"0/0","bit_rate":"64000","codec_long_name":"PCMA-law/G.711A-law"}]}}][{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"15/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":480,"width":640},{"avg_frame_rate":"0/0","bit_rate":"64000","codec_long_name":"PCMA-law/G.711A-law"}]}}]