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

132
Vistas
Entire screen sharing Media Stream getDiplayMedia()

I want to let the user share his screen, I use getDisplayMedia() to let the user start sharing and it let him choose entire screen or chrome … etc. so my question is: can I let the user always choose the entire screen, like not giving him the option of other type sharing like window … like putting constraints on it or something I tried displaySurface = 'monitor' but it didn't work

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

0

You can do work around.

You can check displaySurface,if it is not monitor(entire screen) then you can reject the promise and inside reject handler you can stop and start again.

navigator.mediaDevices
  .getDisplayMedia()
  .then((strm) => {
    let displaySurface = strm.getVideoTracks()[0].getSettings().displaySurface;
    if (displaySurface !== 'monitor') {
      throw 'Selection of entire screen mandatory!';
    }
  })
  .catch((err) => console.error(err));//Here you can stop and start again
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