Some checks failed
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
47 lines
822 B
Markdown
47 lines
822 B
Markdown
# camera
|
|
|
|
### list() <sub>function</sub>
|
|
|
|
Return an array of available camera device IDs.
|
|
|
|
|
|
|
|
**Returns**: An array of camera IDs, or undefined if no cameras are available.
|
|
|
|
|
|
### open(id) <sub>function</sub>
|
|
|
|
Open a camera device with the given ID.
|
|
|
|
|
|
|
|
**id**: The camera ID to open.
|
|
|
|
|
|
**Returns**: A camera object on success, or throws an error if the camera cannot be opened.
|
|
|
|
|
|
### name(id) <sub>function</sub>
|
|
|
|
Return the name of the camera with the given ID.
|
|
|
|
|
|
|
|
**id**: The camera ID to query.
|
|
|
|
|
|
**Returns**: A string with the camera's name, or throws an error if the name cannot be retrieved.
|
|
|
|
|
|
### position(id) <sub>function</sub>
|
|
|
|
Return the physical position of the camera with the given ID.
|
|
|
|
|
|
|
|
**id**: The camera ID to query.
|
|
|
|
|
|
**Returns**: A string indicating the camera position ("unknown", "front", or "back").
|
|
|