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." } } |