Skip to content

enfp-dev-studio/node-mac-virtual-display

Repository files navigation

node-mac-virtual-display: Native Library for Virtual Display on macOS

A native library for macOS to create virtual displays for your applications using Node.js. This library uses CoreGraphics and CoreDisplay APIs to provide an interface for creating and managing virtual displays on macOS. This library is used in Tab Display, a service that allows iPads and Android tablets to be used as portable monitors.

Features

  • Create and Destroy single virtual displays on macOS.
  • Configurable display resolution and refresh rate.
  • Create a virtual display by cloning the main display.
  • Added option to select between Mirror and Extend display modes
  • Support for multiple virtual displays.

Requirements

  • macOS 10.14 or later
  • Node.js 12 or later

Installation

Use npm to install the library:

yarn add node-mac-virtual-display

Usage

To create/destroy a virtual display:

const VirtualDisplay = require('node-mac-virtual-display')
const vdisplay = new VirtualDisplay()
// Clone primary display
vdisplay.cloneVirtualDisplay({
  displayName: "Clone Display",
  mirror: true
})
// OR
// To create a virtual display:
vdisplay.createVirtualDisplay({
  width: 1920,
  height: 1080,
  frameRate: 60,
  hiDPI: true,
  displayName: "Virtual Display",
  mirror: false
})

//To destroy a virtual display:
vdisplay.destroyVirtualDisplay()

Contribute

Coffee fuels coding ☕️

Buy Me A Coffee

About

A Node native module to create virutal display of macOS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy