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

208
Vistas
Does navigator.mediaDevices.getUserMedia work on hybrid apps?

basic question here that I have been unable to get an answer from.

Does navigator.mediaDevices.getUserMedia work in a hybrid app?

Let me expand on this a bit.

I have a hybrid app currently that I am trying to transition to use mainly web apis, while for the most part everything is working as expected I am unable to get the camera to be accessable in an 'app' form.

When I run the code

navigator.mediaDevices.getUserMedia

I get back one of two errors (depending on the hybrid framework I use)

  1. Dom message stating permission is denied
  2. Dom message stating video stream is not ready

Now, item one would indicate that the user has not 'allowed' permissions to the actual camera but the catch is, I never get prompted to grant permissions in-app.

For number two, that would seem to indicate that the stream is already in use (have seen some stating this too can be related to permissions so I'm leaning toward that assumption)

So I guess back to the question at hand and that is, is this even possible in a hybrid app? I have seen many of similar questions with similar Dom messages but non seem to have an answer in the sense of is it even possible? I have seen some mention setting the 'feature-policy' headers but in the context of a hybrid app, running a localhost how or where is this set?

Anyhow, just wanted to ask and see if anyone else has been successful in doing this or do we need to use the native plugins for this?

Thanks again!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Yes, it’s possible to use it, I have a sample app that uses it https://github.com/jcesarmobile/can-i-use-on-webview/tree/master/getusermedia

You have to provide certain permissions on android and add certain usage descriptions on iOS.

The example app only provides camera permission/usage description because it doesn’t capture audio.

Doesn’t work on all iOS versions, I think the first version to support it was 14.5.

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