0

Using react-qr-reader library in my React / Next.js app: https://www.npmjs.com/package/react-qr-reader

Found no relevant options for constraints in docs. Maybe it is a sideeffect with latest iOS it does not show scan window?

Initiating QrReader like this:

<QrReader onResult={scanResult} constraints={{facingMode: 'environment'}} />

But camera scan window does not appear, only that small red icon indicate, I started to open it. Why?

János
  • 32,867
  • 38
  • 193
  • 353

1 Answers1

0

Try adding style={{ width: '100%' }}, as in the example here: https://www.npmjs.com/package/react-qr-reader

torquan
  • 356
  • 1
  • 6
  • Seems that documentation is outdated, I got this error: `Property 'style' does not exist on type 'IntrinsicAttributes & QrReaderProps'.` – János Nov 01 '22 at 12:45
  • I tried `videoStyle={{ width: '100%' }}` without no luck. – János Nov 01 '22 at 12:50