0
How to see users webcam in html
I have watched a video (https://www.youtube.com/watch?v=CVClHLwv-4I) to try to access the webcam using JavaScript and then changing the video tag source to the users webcam, but it still isnât working for me and I donât know why. I know though, navigator.getUserMedia is deprecated and you now have to use navigator.mediaDevices.getUserMedia. Please help me on how to do this.
9 Answers
+ 1
Sorry for the delay I just found your notification.
Are you still working on this project? If so yes please share show your code.
0
What code editor are you using?
0
Visual Studio Code
0
Do you want me to show you my code?
0
Yes. My code wasnât pasting here just right now so here is my code: https://pastebin.com/WkfRCSaD
0
What is eternal javascript? I am using the live server VSCode extension.
0
You are missing part of the JS script. Go back to the video at 2:47 and copy exactly how you see it. Make sure you have the live view extension installed and the face-api.js library installed. Good luck!
0
If after correctly writing the JavaScript code and ensuring the extension is running: if it still does not work then, it is likely the APi is what is used to call the correct functions to access the webcam.
0
Ok, thanks!