ReadonlyisWhether this camera is currently being used by any application. Queries the underlying CoreMediaIO device state each time it is read.
ReadonlynameThe human-readable name of this camera (e.g. "FaceTime HD Camera").
ReadonlytypeThe type name for JavaScript introspection. Always "HSCamera".
ReadonlyuidThe persistent unique identifier for this camera.
Register a listener that fires whenever this camera's in-use state changes.
The listener receives one argument: a boolean that is true when the camera
starts being used and false when it is released.
A JavaScript function called with true when the camera starts being used and false when released
Capture a still image from this camera.
Camera permission must be granted via hs.permissions.requestCamera() before calling
this method. The returned HSImage can be saved, displayed in a UI element, or
passed to other image-processing APIs.
A Promise that resolves to an HSImage, or rejects on error
Remove a previously registered per-camera in-use listener.
The function originally passed to addWatcher(_:)
A camera device attached to the system. Obtain instances via the
hs.cameramodule — do not instantiate directly.Reading camera properties
Watching for in-use state changes
Capturing a still image