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!!!