html5-qrcode
html5-qrcode copied to clipboard
Video missing after app switch on iOS
Describe the bug When the component is used on a page which is added to the Home Screen of a iPhone, the scanner malfunctions when you switch away from the app. The same behavior does not occur when you view the same page through Safari (this works correctly).
To Reproduce Steps to reproduce the behavior:
- On iPhone, open https://scanapp.org/ in Safari
- Click on 'Add to Home Screen'
- Close Safari and open the 'ScanApp' app through the new icon on the Home Screen
- Give permissions and start scan. Wait until scanner is operational.
- Push the hardware button to return to the Home Screen
- Click the 'ScanApp' icon again
- Video is now gone, and scanner visuals are overlaying the whole page
Expected behavior After returning to the app the scanner should still be operational, just like the same page in Safari.
Screenshots
After switching:
Smartphone (please complete the following information):
- Device: iPhone7 & iPhone 12 Pro
- OS: iOS 15.6 & 15.5
- Browser Safari
Additional context
- Behavior reproduces in own app using the 'Html5Qrcode' component. Reopening the view will re-request camera permissions, which fixes the issue. No 'onScanFailure' or exception is observed.
- Same issue cannot be reproduced on Android.
- Same issue occurs when you swipe the notificationbar down and up.
Same issue on iPod Touch and iPad Mini.
Also confirmed with iPhone 8 & 13. Also reproducable after upgrade to iOS 15.7.1.
@mebjas Is there anything more we can add to this issue to make it more clear?
Is this ever going to be fixed? On iOS 16 I'm having the same behaviour. Trying to upgrade to 17 to see potential impact...