change barcode to force back cam

This commit is contained in:
2025-11-12 17:59:59 -06:00
parent 7bf7935010
commit 2011e27898
+3 -2
View File
@@ -90,7 +90,6 @@ export default function BarcodeScanner({ onScan }: BarcodeScannerProps) {
} }
}; };
/** 🧩 Fallback con ZXing-JS (para iPad/Safari sin soporte nativo) */
const startZXing = async () => { const startZXing = async () => {
try { try {
zxingReader = new BrowserMultiFormatReader(); zxingReader = new BrowserMultiFormatReader();
@@ -137,7 +136,7 @@ export default function BarcodeScanner({ onScan }: BarcodeScannerProps) {
startBarcodeDetector(); startBarcodeDetector();
/** 🧹 Limpieza */
return () => { return () => {
if (animationFrame) cancelAnimationFrame(animationFrame); if (animationFrame) cancelAnimationFrame(animationFrame);
if (stream) stream.getTracks().forEach((t) => t.stop()); if (stream) stream.getTracks().forEach((t) => t.stop());
@@ -168,3 +167,5 @@ export default function BarcodeScanner({ onScan }: BarcodeScannerProps) {
/> />
); );
} }
//Chatgpt
//Gemini