Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

109
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!