Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

208
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda