camera.getLivePreview
Menampilkan streaming video berkelanjutan dengan resolusi yang ditentukan oleh
previewFormat
di Opsi.
Perintah ini akan menampilkan, "Content-Type: multipart/x-mixed- replace; boundary="---osclivepreview---"".
Perintah ini ditambahkan di API level 2.
Parameter
- Perintah ini tidak memiliki parameter dalam isi permintaan.
Hasil
- Streaming video berkelanjutan dengan frame yang dipisahkan oleh pemisah batas.
Error
- dinonaktifkanCommand: Perintah saat ini dinonaktifkan;
misalnya, kamera merekam video.
- invalidParameterName: Nama parameter input adalah
tidak dikenal.
I/O Perintah |
Input Perintah |
none |
Output Perintah |
Continuous video stream. |
Output Perintah (Error) |
{ "error": { "code": "disabledCommand", "message": "Command is currently disabled." } } |
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2024-08-21 UTC.
[null,null,["Terakhir diperbarui pada 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"]]