mozmorris / react-webcam

Webcam component
https://codepen.io/mozmorris/pen/JLZdoP
MIT License
1.65k stars 281 forks source link

Play/pause button appear on the webcam viewer, but didn't do anything and then disappear when tapped. Device details: iPhone SE (1st gen), iOS 14.2, Safari 14. #318

Closed amerfathullah closed 2 years ago

amerfathullah commented 2 years ago

I'm currently working on a project where user need to capture a QR code image and the program will validate if it's matching or not in the database. I only encounter this problem after the QR code is unmatched and the app will redirect the user to the capture image page. No issue during the first time capturing the image.

amerfathullah commented 2 years ago

nvm, I got it. need to set the webcam ref to null before redirect to capture image page.

viswongdev commented 2 years ago

Mine will disappear while the is player but I want to get rid off entirely, could you tell me more how how you do it?

amerfathullah commented 2 years ago

@viswongdev I did useRef for the webcam and init it to null. when clicking the button to redirect to another page, I just reset the ref to null