html5-qrcode
html5-qrcode copied to clipboard
Full screen by set aspectRatio doesn't work on iPhone 13
Describe the bug I have read #82, then set my config to the code below, when I test the app on iPhoneX with iOS 14.7.1, it's full-screen. Then I test it on iPhone 13 with iOS 15.0.2, it doesn't seem to work.
To Reproduce Steps to reproduce the behavior:
- Main code:
const html5QrCode = new Html5Qrcode('scan-render'); const height = document.body.offsetHeight const width = document.body.offsetWidth const minWidth = Math.min(height, width) const config = { fps: 10, qrbox: { width: minWidth * 0.667, height: minWidth * 0.667 }, aspectRatio: Math.ceil((height / width) * 100) / 100 } const qrcodeSuccess = (decodedText, decodedResult) => ({ console.log('success', decodedText, decodedResult) }) html5QrCode.start({facingMode: {exact: 'environment'}}, config, qrcodeSuccess, (error) => {})
- What I see in iPhone 13 with iOS 15.0.2, the black area is a mask.
Expected behavior The video completely fill my screen.
Smartphone (please complete the following information):
- UA: Mozilla/5.0 (iPhone; CPU iPhone OS 15_0_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1
did you debug width and height result? maybe it differs that before....
did you debug width and height result? maybe it differs that before....
I'll try. But I think it doesn't matter. Because the main app mounts long time before when I call the start function.