AI-generated Key Takeaways
-
Initiates either video or interval image capture based on pre-set capture mode.
-
For interval capture,
captureMode
,captureInterval
, andcaptureNumber
options must be configured beforehand. -
For video capture, only
captureMode
needs to be set to "video" and can be stopped using thecamera.stopCapture
command. -
The command results for non-open-ended interval capture include a list of image URLs accessible after capture completion, retrievable via polling or
camera.listFiles
. -
Errors like "disabledCommand" occur if the camera is already capturing or "invalidParameterName" if an unrecognized parameter is used.
Starts video capture or interval image capture depending on value of
captureMode
in Options.
This command was added in API level 2.
Parameters
- This command has no parameter in request body. Whether it is interval image
capture or video capture is determined by
captureMode
option. For interval capture, whether it is open ended capture or not depends on whethercaptureNumber
is equal to or larger than 0.captureMode
,captureInterval
andcaptureNumber
need to be set prior to interval capture. OnlycaptureMode
needs to be set to "video" prior to video capture, which can only be stopped by camera.stopCapture command.
Results
- Open-ended capture (when captureMode == "video" or captureNumber == 0)
- No results.
- Non-open-ended interval capture:
- fileUrls: A list of absolute URLs, pointing to image
files for interval capture. Please note this command doesn’t return
fileUrls
immediately since the capture takescaptureNumber
to complete. The progress of the command can be obtained by polling the camera periodically. For example, poll after an estimated duration (time = captureInterval * (captureNumber - 1)
) using the /osc/commands/status API andfileUrls
is the result returned when the command finishes. If the command doesn’t finish successfully (e.g. only 3 out of images were taken before the camera runs out of battery) or the camera is disconnected from the client phone in the middle, but the command does finish successfully, the client should be able to obtain the images using thecamera.listFiles
later when a new connection is established between the client and the camera.
- fileUrls: A list of absolute URLs, pointing to image
files for interval capture. Please note this command doesn’t return
Errors
- disabledCommand: Command is currently disabled; for example, the camera is in the middle of a video capture or an interval capture.
- invalidParameterName: The parameter name is unrecognized; for example,
sessionId
is not recognized.
Command I/O | |
---|---|
Command Input | none |
Command Output | { "results": { "fileUrls":[ "url1", "url2", "url3", ... "urln" ] } } |
Command Output (Error) | { "error": { "code": "disabledCommand", "message": "Command is currently disabled." } } |