Set inversion mode for scanner to 'both'

This commit is contained in:
benthecarman
2024-03-23 17:31:44 -05:00
committed by benthecarman
parent 7e863f4ef4
commit 208f42fbed

View File

@@ -73,6 +73,9 @@ export function Reader(props: { onResult: (result: string) => void }) {
scanner = new QrScanner(container, handleResult, {
returnDetailedScanResult: true
});
// Set the inversion mode to scan both dark on light and light on dark
// This should make us more flexible in scanning QR codes
scanner.setInversionMode("both");
await scanner.start();
}
}