feat: add vercel json
This commit is contained in:
parent
a4ecf87198
commit
ac1e49dc80
|
@ -51,18 +51,19 @@ const Home = () => {
|
||||||
|
|
||||||
const startWebcam = async () => {
|
const startWebcam = async () => {
|
||||||
try {
|
try {
|
||||||
|
console.log("Requesting camera access...");
|
||||||
const stream = await navigator.mediaDevices.getUserMedia({
|
const stream = await navigator.mediaDevices.getUserMedia({
|
||||||
video: true,
|
video: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
setLoadCamera(true);
|
|
||||||
|
|
||||||
if (videoRef.current) {
|
if (videoRef.current) {
|
||||||
videoRef.current.srcObject = stream;
|
videoRef.current.srcObject = stream;
|
||||||
mediapipeHelper = new MediapipeHelper(videoRef);
|
mediapipeHelper = new MediapipeHelper(videoRef);
|
||||||
detectionHelper = new DetectionHelper();
|
detectionHelper = new DetectionHelper();
|
||||||
|
console.log("Camera access granted and helpers initialized.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setLoadCamera(true);
|
||||||
onHandDetected();
|
onHandDetected();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error accessing webcam:", error);
|
console.error("Error accessing webcam:", error);
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"rewrites": [{ "source": "/(.*)", "destination": "/" }]
|
||||||
|
}
|
Loading…
Reference in New Issue