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 Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-08-21 UTC。
[null,null,["最終更新日 2024-08-21 UTC。"],[[["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"]]