Implement video feed feature with components, hooks, and utility functions

This commit is contained in:
2025-12-22 12:19:00 +00:00
parent 276dcd26ed
commit 45e6a3286c
13 changed files with 313 additions and 16 deletions

View File

@@ -0,0 +1,19 @@
import { useRef } from "react";
import type { SightingType } from "../../../utils/types";
export const useCreateVideoSnapshot = (mostRecentSighting: SightingType) => {
const latestBitMapRef = useRef<ImageBitmap | null>(null);
const snapshotUrl = mostRecentSighting?.overviewUrl;
const image = new Image();
image.src = snapshotUrl;
console.log(mostRecentSighting);
const plateRect = mostRecentSighting?.overviewPlateRect;
const plateTrack = mostRecentSighting?.plateTrack;
return { snapshotUrl, latestBitMapRef, image, plateRect, plateTrack };
};