From e8e4209c012d48b2a848e9b9260875c70ef5dffa Mon Sep 17 00:00:00 2001 From: Dominique Date: Thu, 7 Jul 2022 11:27:45 +0200 Subject: [PATCH] feat(zoom): fix missing neutralZoom for newer iPhones Newer iPhones have neutralZoom of 2 and therefore cannot find small QR-Codes if zoom is at it's default value 1. This commit uses the device neutralZoom property as the default zoom level. --- README.md | 1 + example/src/App.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index eafd2fc..4ec8d96 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ export default function App() { isActive={true} frameProcessor={frameProcessor} frameProcessorFps={5} + zoom={device?.neutralZoom ?? 1} /> {barcodes.map((barcode, idx) => ( diff --git a/example/src/App.tsx b/example/src/App.tsx index 01d97ef..a6debe8 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -36,6 +36,7 @@ export default function App() { isActive={true} frameProcessor={frameProcessor} frameProcessorFps={5} + zoom={device?.neutralZoom ?? 1} /> {barcodes.map((barcode, idx) => (