camera.getLiveAnteprima
Restituisce uno stream video continuo con la risoluzione specificata da
previewFormat
in Opzioni.
Questo comando dovrebbe restituire "Content-Type: multipart/x-mixed-replace; boundary="---osclivepreview---"".
Questo comando è stato aggiunto nel livello API 2.
Parametri
- Questo comando non ha parametri nel corpo della richiesta.
Risultati
- Uno stream video continuo con fotogrammi separati da un separatore di confine.
Errori
- disableCommand: il comando è attualmente disabilitato;
Ad esempio, la videocamera sta registrando un video.
- invalidParameterName:il nome del parametro di input è
non riconosciuto.
I/O comando |
Input comando |
none |
Output comando |
Continuous video stream. |
Output comando (errore) |
{ "error": { "code": "disabledCommand", "message": "Command is currently disabled." } } |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2024-08-21 UTC.
[null,null,["Ultimo aggiornamento 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"]]