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

114
Vistas
How does WebAPI MediaDevices (navigator.mediaDevices) labels the screen/monitor information?

I am trying to find a common display label between JS WebAPI to that of WindowsDisplayAPI.

When I tried to get the screen information from mediaDevices, It labeled my primary monitor as 'screen:0:0'

navigator.mediaDevices.getDisplayMedia({video: true, audio: true})
.then(stream => {
    document.getElementById('vid').srcObject = stream
    document.getElementById('vid').play
    console.log(stream.getTracks()[0].label)
}

Then I tried to get the screen information from WindowsDisplayAPI, It labeled my primary monitor as '\\.\DISPLAY1'.

Note: I tied the above step using python and .net libraries and both of them gave the same result['\\.\DISPLAY1']. The python code which I used to get the screen information.

from screeninfo import get_monitors
for m in get_monitors():
    print(m)

My question is,

How does the WebAPI map the screen information? Is there any way by which can map WebAPI information to that of WindowsDispalyAPI information?

for your reference, JS WebAPI docs - https://docs.microsoft.com/en-us/uwp/api/windows.graphics.display?view=winrt-22000

Core windows Display API docs - https://docs.microsoft.com/en-us/uwp/api/windows.graphics.display?view=winrt-22000

WindowsDisplayAPI .net library which I used - https://github.com/falahati/WindowsDisplayAPI

Python screeninfo package which I used- https://github.com/rr-/screeninfo

Thanks!!!

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