### Initialize QrScanner with Options (New API) Source: https://github.com/nimiq/qr-scanner/blob/master/README.md Creates a QrScanner instance using the new API by providing an options object to the constructor. This enables detailed scan results and is the recommended approach. The example shows a basic setup with a video element and a callback for decoded results. ```js const qrScanner = new QrScanner( videoElem, result => console.log('decoded qr code:', result), { /* your options or returnDetailedScanResult: true if you're not specifying any other options */ }, ); ``` -------------------------------- ### Install QR Scanner Library Source: https://github.com/nimiq/qr-scanner/blob/master/README.md Instructions for installing the QR Scanner library using popular package managers like npm and Yarn, or by directly copying the minified files. ```bash npm install --save qr-scanner ``` ```bash yarn add qr-scanner ``` -------------------------------- ### Prepare HTML Video Element for Web Cam Scanning Source: https://github.com/nimiq/qr-scanner/blob/master/README.md Describes the initial HTML setup required for web camera scanning, specifically creating a