5
The first stage of registration of my project has two layout options: one for those who have QR Code reader (web cam) and another for those who do not have.
I need to identify if the user’s browser has access to webcam for reading the QR Code, how can I do this check?
One he even identified the cam, but at the time of showing the content it did not work. I put
$('.com-leitor').hide();
and$('.sem-leitor').hide();
there in the middle of the code that you posted a$('.com-leitor').show();
and$('.sem-leitor').show();
...– user27585
@Erick I modified the answer to include a functional test.
– OnoSendai
Cool I understand the logic I’m working here, it’s working for now but maybe I’m wrong. My system is as follows: User enters the home and has two options Login or Register if you click on the registration this first div with the login fields and registration button disappears and enters another with the next step and at that time the system check if you have webcam or not. I will try other options instead of Hide() and show(). vlw
– user27585
@Erick without stress - in case of any other doubt, feel free to create another question!
– OnoSendai
Apparently it worked with removeClass. I tested on Chrome once with the camera enabled and another with it locked and worked, I will test on other browsers. thanks.
– user27585