react-qr-reader
react-qr-reader copied to clipboard
Support for defaultProps will be removed
Currently running a basic QR and when rendering the page in NextJS I am noticing the following error.
<QrReader
videoId="scanner"
constraints={{
aspectRatio: "1",
facingMode: "environment"
}}
scanDelay={250}
onResult={(result, error) => {
if (!!result) {
}
}}
ViewFinder={() => (
<div
onClick={() => console.log("click")}
style={{
position: "absolute",
top: "0",
left: "0",
right: "0",
bottom: "0",
zIndex: 10
}}
></div>
)}
videoContainerStyle={{
position: "relative",
padding: 0,
margin: "0 auto",
border: "1px solid lightgray",
height: "300px",
width: "300px"
}}
videoStyle={{
height: "inherit",
width: "inherit",
zIndex: 1
}}
/>
The component renders on screen, however it also does not prompt for anything around video/camera access.
This exact same setup works in a Sandbox. But not within a NextJS application: https://codesandbox.io/p/sandbox/ticket-scanner-z8776t?file=%2Fsrc%2FApp.js%3A2%2C1-6%2C27