hs.camera
Inspect the system's camera devices
API Overview
- Functions - API calls offered directly by the extension
- Methods - API calls which can only be made on an object returned by a constructor
API Documentation
Functions
allCameras
| Signature | hs.camera.allCameras() -> table |
|---|---|
| Type | Function |
| Description |
Get all the cameras known to the system |
| Parameters |
|
| Returns |
|
| Source | extensions/camera/libcamera.m line 329 |
isWatcherRunning
| Signature | hs.camera.isWatcherRunning() -> Boolean |
|---|---|
| Type | Function |
| Description |
Checks if the camera devices watcher is running |
| Parameters |
|
| Returns |
|
| Source | extensions/camera/libcamera.m line 468 |
setWatcherCallback
| Signature | hs.camera.setWatcherCallback(fn) |
|---|---|
| Type | Function |
| Description |
Sets/clears the callback function for the camera devices watcher |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/camera/libcamera.m line 486 |
startWatcher
| Signature | hs.camera.startWatcher() |
|---|---|
| Type | Function |
| Description |
Starts the camera devices watcher |
| Parameters |
|
| Returns |
|
| Source | extensions/camera/libcamera.m line 378 |
stopWatcher
| Signature | hs.camera.stopWatcher() |
|---|---|
| Type | Function |
| Description |
Stops the camera devices watcher |
| Parameters |
|
| Returns |
|
| Source | extensions/camera/libcamera.m line 435 |
Methods
connectionID
| Signature | hs.camera:connectionID() -> String |
|---|---|
| Type | Method |
| Description |
Get the raw connection ID of the camera |
| Parameters |
|
| Returns |
|
| Source | extensions/camera/libcamera.m line 554 |
isInUse
| Signature | hs.camera:isInUse() -> Boolean |
|---|---|
| Type | Method |
| Description |
Get the usage status of the camera |
| Parameters |
|
| Returns |
|
| Source | extensions/camera/libcamera.m line 590 |
isPropertyWatcherRunning
| Signature | hs.camera:isPropertyWatcherRunning() -> bool |
|---|---|
| Type | Method |
| Description |
Checks if the property watcher on a camera object is running |
| Parameters |
|
| Returns |
|
| Source | extensions/camera/libcamera.m line 691 |
name
| Signature | hs.camera:name() -> String |
|---|---|
| Type | Method |
| Description |
Get the name of the camera |
| Parameters |
|
| Returns |
|
| Source | extensions/camera/libcamera.m line 572 |
setPropertyWatcherCallback
| Signature | hs.camera:setPropertyWatcherCallback(fn) -> hs.camera object |
|---|---|
| Type | Method |
| Description |
Sets or clears a callback for when the properties of an hs.camera object change |
| Parameters |
|
| Returns |
|
| Source | extensions/camera/libcamera.m line 608 |
startPropertyWatcher
| Signature | hs.camera:startPropertyWatcher() |
|---|---|
| Type | Method |
| Description |
Starts the property watcher on a camera |
| Parameters |
|
| Returns |
|
| Source | extensions/camera/libcamera.m line 644 |
stopPropertyWatcher
| Signature | hs.camera:stopPropertyWatcher() |
|---|---|
| Type | Method |
| Description |
Stops the property watcher on a camera |
| Parameters |
|
| Returns |
|
| Source | extensions/camera/libcamera.m line 671 |
uid
| Signature | hs.camera:uid() -> String |
|---|---|
| Type | Method |
| Description |
Get the UID of the camera |
| Parameters |
|
| Returns |
|
| Notes |
|
| Source | extensions/camera/libcamera.m line 533 |
© 2014–2017 Hammerspoon contributors
Licensed under the MIT License.
https://www.hammerspoon.org/docs/hs.camera.html