switchCamera
Requires:
@ray-js/lock-sdk≥1.2.0
Method signature
switchCamera(index: number)Description
Switch the camera to the specified index
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
index | number | Yes | Camera index (starting from 0) |
Return Value
Type: Promise<true>
Switched successfully
Error Code
| Error Code | Error Message |
|---|---|
1002 | Operation timed out |
1104 | Failed to switch camera |
1105 | Switching cameras is not supported |