camera.startCapture
根據
captureMode
中的 [選項]。
這項指令已新增至 API 級別 2。
參數
- 這個指令在要求主體中沒有參數。「是否為間隔」圖片
擷取或錄影內容取決於
captureMode
選項。
對於間隔拍攝,是否開放式擷取,取決於
captureNumber
等於或大於 0。
captureMode
、captureInterval
和
必須先設定 captureNumber
,才能進行間隔拍攝。
只需將 captureMode
設為「影片」影片開始前
擷取,而且只能由 camera.stopCapture 指令停止。
結果
- 開放式擷取 (當 captureMode == "video" 或 captureNumber == 0)
- 非開放式間隔擷取:
- fileUrls:指向圖片的絕對網址清單
用於間隔擷取的檔案。請注意,這個指令不會傳回
因為拍攝完成,因此會立即進入
fileUrls
完成 captureNumber
即可完成。指令執行進度可以是
定期輪詢攝影機即可取得這些資料舉例來說,在
預估持續時間 (time = captureInterval * (captureNumber - 1)
)
使用 /osc/commands/status API
而 fileUrls
是指令執行完畢後傳回的結果。
如果指令未順利完成 (例如,只有 3 張圖片來自
在相機耗盡前拍攝的影片) 或攝影機連線中斷
用戶端手機,但指令已順利完成
用戶端應該能使用
camera.listFiles
之後在用戶端和相機之間建立新連線時。
錯誤
- disabledCommand:指令目前已停用。例如相機
出現在錄影或間歇擷取的中間
- InvalidParameterName:無法辨識參數名稱;例如
無法辨識
sessionId
。
指令 I/O |
指令輸入 |
none |
指令輸出 |
{ "results": { "fileUrls":[ "url1", "url2", "url3", ... "urln" ] } } |
指令輸出 (錯誤) |
{ "error": { "code": "disabledCommand", "message": "Command is currently disabled." } } |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-21 (世界標準時間)。
[null,null,["上次更新時間:2024-08-21 (世界標準時間)。"],[[["Initiates either video or interval image capture based on pre-set capture mode."],["For interval capture, `captureMode`, `captureInterval`, and `captureNumber` options must be configured beforehand."],["For video capture, only `captureMode` needs to be set to \"video\" and can be stopped using the `camera.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."]]],["This command initiates video or interval image capture based on the `captureMode` setting. For interval capture, `captureNumber` determines if it's open-ended; `captureInterval` and `captureNumber` must be preset. Video capture, set by `captureMode`, is ended via `camera.stopCapture`. Open-ended capture has no immediate results. Non-open-ended interval capture eventually provides a `fileUrls` list, accessible after the completion time or if interrupted. Errors include `disabledCommand` and `invalidParameterName`. The command's input is null, and output results with file URLs.\n"]]