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

171
Visualizações
navigator.getUserMedia() doesn't work on mobile

While developing video chat with angular, I faced this issue.

ngOnInit() {
  navigator.mediaDevices && navigator.mediaDevices.getUserMedia({audio:true, video: true})
    .then(res=> console.log(res))
    .catch(err => console.log("err: ", err));
}

Console result:

err: DomException: Could not start video source

This works well on Desktop/Chrome, but never works on Android/Chrome. I tested it on Android Emulators such as Nox App Player and Bluestacks.

I've hosted the angular project with this command.

ng serve --host MY_IP_ADDRESS --disable-host-check --ssl

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Twilio developer evangelist here.

When you test this on an Android device, are you doing so on localhost or over HTTPS? You can only use getUserMedia on a secure domain or localhost.

If I need to test on a device, I use ngrok to tunnel to my localhost. You can then access the ngrok URL over HTTPS.

Another reason this might not work is that you're using the camera in another application or browser tab, and the device only allows access to the camera from one application at a time.

For the emulators, make sure you have cameras configured correctly within the emulator.

about 4 years ago · Juan Pablo Isaza Relatório
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