feat: add vercel json

This commit is contained in:
mphstar 2025-02-22 18:50:04 +07:00
parent a4ecf87198
commit ac1e49dc80
2 changed files with 6 additions and 2 deletions

View File

@ -51,18 +51,19 @@ const Home = () => {
const startWebcam = async () => {
try {
console.log("Requesting camera access...");
const stream = await navigator.mediaDevices.getUserMedia({
video: true,
});
setLoadCamera(true);
if (videoRef.current) {
videoRef.current.srcObject = stream;
mediapipeHelper = new MediapipeHelper(videoRef);
detectionHelper = new DetectionHelper();
console.log("Camera access granted and helpers initialized.");
}
setLoadCamera(true);
onHandDetected();
} catch (error) {
console.error("Error accessing webcam:", error);

3
vercel.json Normal file
View File

@ -0,0 +1,3 @@
{
"rewrites": [{ "source": "/(.*)", "destination": "/" }]
}