aparat.getLivePodgląd
Zwraca ciągły strumień wideo o rozdzielczości określonej przez
previewFormat
w Opcjach.
Powinno ono zwrócić wartość „Content-Type: multipart/x-mixed-replace; boundary="---osclivepreview---"".
To polecenie zostało dodane na poziomie interfejsu API 2.
Parametry
- To polecenie nie ma parametru w treści żądania.
Wyniki
- Ciągły strumień wideo z klatkami oddzielonymi separatorem granic.
Błędy
- disableCommand: polecenie jest obecnie wyłączone.
np. kamera nagrywa film.
- invalidParametrName:nazwa parametru wejściowego to
Nie rozpoznano.
Polecenie I/O |
Dane wejściowe polecenia |
none |
Dane wyjściowe polecenia |
Continuous video stream. |
Dane wyjściowe polecenia (błąd) |
{ "error": { "code": "disabledCommand", "message": "Command is currently disabled." } } |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-08-21 UTC.
[null,null,["Ostatnia aktualizacja: 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"]]