Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The height and width of the video does not match the height and width video on the device. #358

Open
auminskiy opened this issue Nov 2, 2023 · 1 comment

Comments

@auminskiy
Copy link

auminskiy commented Nov 2, 2023

Hello!
The height and width of the video does not match the height and width video on the device.
Have styles component:

<QrReader
scanDelay={500}
onResult={handleScan}
ViewFinder={scanOverlay}
containerStyle={{ width: 300, height: 300, }}
videoStyle={{width: 300, height: 300, border: 'solid', borderWidth: '4px', borderColor: qrData.length === 0 ? 'red' : 'green', }}
constraints={{facingMode: 'environment'}}
/>

But video sizes are not 300x300. How to fix this?

mobile camera:
Скриншот 02-11-2023 130854
desktop camera:
121401

@auminskiy
Copy link
Author

answer:
constraints={{
facingMode: 'environment',
aspectRatio: { ideal: 1 }
}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant