This project is designed to be a cross platform NodeJS display solution that supports multiple displays.
- Goal 1: Develop cross platform display api to query multiple physical displays
- Goal 2: Detect which display currently has focus
- Goal 3: Screen capture support for active display
Supported Platforms
Requirements
Install Yarn
npm install yarn -g
Compile
yarn
Run Demo
node test.js
Usage
const screen = require('native-screen-js');
console.log(screen.getDisplayInfo());
Output
{
"displayCount": 1,
"screens": [
{
"modelNumber": 43298, <--- OSX Only
"isBuiltIn": 1,
"isMainDisplay": 1,
"width": 1440,
"height": 900,
"x": 0, <--- Top left corner of display in virtual space
"y": 0, <--- Top left corner of display in virtual space
"rotation": 0 <--- OSX Only
}
]
}