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

112
Visualizações
getUserMedia constraints disable my camera

I am writing a webpage that displays the camera image at full size. It is meant to be used on iPads only so I made a constraint to adapt the camera resolution to 768x1024 (Provisional, just for testing the size).

The image displays on a <video> tag

The problem is that when I setup the constraint my first camera gets disabled and the page displays OBS Camera output.

Constraint

const MEDIA_CONSTRAINTS = {
    video: { 
        width: { ideal: 768 }, 
        height: { ideal: 1024 } 
    }
};

GetUserMedia

    navigator.getUserMedia(MEDIA_CONSTRAINTS, 
        (stream) => {
            video.srcObject = stream;
            }, 
        (err) => console.error(err)
    )

I think this happens when I put a height higher than 720. I am testing this on PC right now, so it may still work on iPad but I want to make sure it works in any device.

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