Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

111
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda