Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

210
Views
getUserMedia() sometimes fails and sometimes works

The following code sometimes fails and sometimes it works:

navigator.mediaDevices.getUserMedia(
        {video : true}
        )
      .then((stream) => {
        video.srcObject = stream;
      })
      .catch(err => console.error('getUserMedia() failed: ', err));

Error Message when failing: DOMException: Requested device not found

Without changing anything, half an hour later it works. I work on a MacBook Pro (13-inch, M1, 2020), which does have a webcam. I use Chrome, but tested also in Safari and the result is the same. I understand that the error means, that the constraints could not be fulfilled ---> no webcam found. But I do not understand why my webcam sometimes cannot be found and without changing anything 30 minutes later it works. Using any other tools like Teams, Skype, etc. this problem does not arise.

Update: One more thing I recognized: In case of success, my browser asks for the permission to use webcam. In case of failure, my browser does not even ask for that permission.

My Question: Why can my webcam sometimes be found and sometimes not?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!