camera.getLivePreview
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
以指定的解析度傳回連續的影片串流
previewFormat
中的 [選項]。
這個指令應會傳回「Content-Type: multipart/x-mixed-replace;」(內容類型:多部分/x 混合取代;boundary="---osclivepreview---"".
這項指令已新增至 API 級別 2。
參數
結果
錯誤
- disabledCommand:指令目前已停用。
例如相機正在錄影
- INVALIDParameterName:輸入參數名稱是
則無法辨識。
指令 I/O |
指令輸入 |
none |
指令輸出 |
Continuous video stream. |
指令輸出 (錯誤) |
{
"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 (世界標準時間)。"],[],["The command initiates a continuous video stream at the resolution defined by `previewFormat`. The stream is a multipart/x-mixed-replace type, using \"---osclivepreview---\" as a boundary separator. It accepts no parameters. The output is a continuous video stream with frames separated by the boundary. Errors include \"disabledCommand\" (e.g., when the camera is recording) and \"invalidParameterName\". This command was introduced in API level 2.\n"],null,[]]