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

269
Visualizações
video source can't be started DOM exception

Error:

Uncaught (in promise) DOMException: Could not start video source

What I tried:

I checked that is my chrome is allowed to access camera and it was allowed.
I tried to updated my camera drive but no updates were available.
This error comes mostly but sometimes my site doesn't give this error.
How to resolve this issue?
It is a problem of my laptop and it is still saying that my code has an error pls give any solutions
Code:

getDevices: async function(){
    let $this = this;
    navigator.mediaDevices
    .enumerateDevices()
    .then(function(devices) {
        devices.forEach(function(device) {
            if(device.kind == "audioinput"){
                $this.microphones.push(device);
            }
            else if(device.kind == "audiooutput"){
                $this.speakers.push(device);
            }
            else if(device.kind == "videoinput"){
                $this.cameras.push(device);
            }
        });
     });
    let videoStream = await navigator.mediaDevices.getUserMedia({video: true,audio: false});
    let audioStream = await navigator.mediaDevices.getUserMedia({video: false,audio: true});
    const combinedStream = new MediaStream(
        [
            ...videoStream.getVideoTracks(),
            ...audioStream.getAudioTracks()
        ]
    );

    document.getElementById("myVideo").srcObject=combinedStream;
    document.getElementById("myVideo").muted = true;
},
setCamera: async function(){
    let videoStream = await navigator.mediaDevices.getUserMedia({video:{deviceId:this.selectedCamera},audio: false});
    let audioStream = await navigator.mediaDevices.getUserMedia({video: false,audio: true});
    const combinedStream = new MediaStream(
        [
            ...videoStream.getVideoTracks(),
            ...audioStream.getAudioTracks()
        ]
    );

    document.getElementById("myVideo").srcObject=combinedStream;
    document.getElementById("myVideo").muted = true;
}, //It says that The error is on this line and the error is Uncaught (in promise) DOMException: Could not start video source.

-Thanks For All Your Solutions

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