camera.getLivePreview
返回分辨率为
选项中的 previewFormat
。
此命令应返回“Content-Type: multipart/x-mixed-Replace;”boundary="---osclivepreview---"".
此命令是在 API 级别 2 中添加的。
参数
结果
错误
- disabledCommand:命令当前已停用;
例如,相机正在拍摄视频。
- invalidParameterName:输入参数名称为
无法识别。
命令 I/O |
命令输入 |
none |
命令输出 |
Continuous video stream. |
命令输出(错误) |
{ "error": { "code": "disabledCommand", "message": "Command is currently disabled." } } |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-21。
[null,null,["最后更新时间 (UTC):2024-08-21。"],[[["Initiates a continuous video stream with the resolution set in previewFormat."],["Returns a multipart video stream separated by boundary \"---osclivepreview---\"."],["This command is only available for API level 2 and above."],["Potential errors include disabledCommand if the camera is busy and invalidParameterName for incorrect input."]]],["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"]]