Is it possible to tell if a device is connected to more than one monitor? I looked up everywhere but couldn't find anything useful.
Asked
Active
Viewed 278 times
0
-
1javascript is a client web language why do you not use a system language like shell or bash or dos .... which is more for these kind of action ? – jeremy-denis Aug 24 '20 at 14:35
-
No, I don't think this is possible. – evolutionxbox Aug 24 '20 at 14:37
-
@jeremy-denis I would assume this is for a webapp feature. A shell won't help there. (But then the question doesn't say anything like that) – evolutionxbox Aug 24 '20 at 14:38
-
I didn't find the answer I needed anywhere on StackOverflow, so responding late to the several related threads here. The solution is, first, check for second display with `window.screen.isExtended`. Then `await window.getScreenDetails()`, which returns an object that includes an array of screens. Very thorough explanation here: https://web.dev/multi-screen-window-placement/ – Lou Groshek Jun 21 '22 at 20:46