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

110
Visualizações
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 à 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