From 2011e278987d8797bdbe5bd2c2dbde291ecaa461 Mon Sep 17 00:00:00 2001 From: IO <320154041@pcpuma.acatlan.unam.mx> Date: Wed, 12 Nov 2025 17:59:59 -0600 Subject: [PATCH] change barcode to force back cam --- src/components/BarcodeScanner.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/BarcodeScanner.tsx b/src/components/BarcodeScanner.tsx index a59c2dd..28de166 100644 --- a/src/components/BarcodeScanner.tsx +++ b/src/components/BarcodeScanner.tsx @@ -90,7 +90,6 @@ export default function BarcodeScanner({ onScan }: BarcodeScannerProps) { } }; - /** 🧩 Fallback con ZXing-JS (para iPad/Safari sin soporte nativo) */ const startZXing = async () => { try { zxingReader = new BrowserMultiFormatReader(); @@ -137,7 +136,7 @@ export default function BarcodeScanner({ onScan }: BarcodeScannerProps) { startBarcodeDetector(); - /** 🧹 Limpieza */ + return () => { if (animationFrame) cancelAnimationFrame(animationFrame); if (stream) stream.getTracks().forEach((t) => t.stop()); @@ -168,3 +167,5 @@ export default function BarcodeScanner({ onScan }: BarcodeScannerProps) { /> ); } +//Chatgpt +//Gemini \ No newline at end of file