Skip to content

Commit

Permalink
Set inversion mode for scanner to 'both'
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Mar 25, 2024
1 parent 7e863f4 commit 208f42f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/Reader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 208f42f

Please sign in to comment.