简体   繁体   中英

Detect and distinguish computer screens/monitor using Javascript

I would like to implement a feature which could differentiate two screens extended by a computer(Pi4 in this case), so that I can render different UI in those screens as I want.

I have searched such a web api which is provided by Chrome Browser, however is it not enough for me to differentiate the screens in my case

window.screen.isExtended

Does any one has any advice or package which does provide such a feature? I know Node Webkit provides a similar api, but that does not seem to match my use case. Thanks!

Note: screens sizes and resolution are the same

I found the browser api which is released in 2020

window.getScreenDetails()

Which returns a promise to allow browser to read info about their screens.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM