Search code examples
webassemblymultiple-monitors

possible to check for multiple monitor with webassembly?


I'm looking for a web solution to check if the user has multiple monitors, and if so, how many. I know this can't be done with pure javascript other than a very hacky way of checking screen size and then making an educated guess if it's super wide.

I've done a fair bit of googling to see if webassembly might solve this problem but have come up empty in my searches so far. I have not done anything with webassembly yet so if this is possible, this would be my first foray into it.

If it can't be done with webassembly, does anyone else have any other suggestions, a chrome extension etc?


Solution

  • That is not possible as WebAssembly has no direct access to video hardware, drivers or system functions and must rely on Javascript bindings/wrapper for this purpose. And about the guess two times 800x600 is still less than someone with 4K has. Also it might be difficult because different display/presentation managers organize screen space in different ways.