Skip to main content

MonitorInfo

Electron APIs / recorder / MonitorInfo

Information about a display monitor connected to the system.

This interface provides technical and user facing properties such as DPI, resolution, display identifiers, and whether it is the primary monitor.

Example

const monitor: MonitorInfo = {
adapterIndex: 0,
id: "MONITOR\\GSM5B10\{4d36e96e-e325-11ce-bfc1-08002be10318}_0",
altId: "DISPLAY1",
dpi: 96,
attachedToDesktop: true,
friendlyName: "LG UltraFine 4K",
refreshRate: 60,
rect: { top: 0, left: 0, width: 3840, height: 2160 },
isPrimary: true,
displayIndex: 0,
};

Properties

PropertyModifierTypeDescription
adapterIndexreadonlynumberIndex of the GPU adapter this monitor is connected to.
altIdreadonlystringAn alternative, usually simplified, identifier (e.g., DISPLAY1).
attachedToDesktopreadonlybooleanIndicates whether the monitor is currently attached to the desktop.
displayIndexreadonlynumberThe display index assigned to this monitor by the system.
dpireadonlynumberThe DPI (dots per inch) value of the monitor.
friendlyNamereadonlystringA user-friendly name for the monitor (e.g., model name).
idreadonlystringThe full device path or system identifier for the monitor.
isPrimaryreadonlybooleanWhether this monitor is set as the system’s primary display.
rectreadonlyRectThe bounding rectangle of the monitor on the virtual screen.
refreshRatereadonlynumberThe refresh rate of the monitor in Hz.