Skip to content
Advertisement

JS, navigator.mediaDevices.getUserMedia() not working

I’m trying to get video from client’s Webcam. I wrote the code, and no errors occurred. However, when I try to get video, nothing shows up (in Google Chrome) or just a single frame of the video is displayed (in Mozilla Firefox). I have tested it out before and it worked completely fine, but now, I don’t know why, it doesn’t work. I searched for it, and found nothing about it. Any help is really appreciated. Thanks

Here’s my code:

JavaScript

Advertisement

Answer

Your code is working, but video is paused. Add 1 line to your code:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement