aparat.getLivePodgląd
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
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."],[[["\u003cp\u003eInitiates a continuous video stream with the resolution set in previewFormat.\u003c/p\u003e\n"],["\u003cp\u003eReturns a multipart video stream separated by boundary "---osclivepreview---".\u003c/p\u003e\n"],["\u003cp\u003eThis command is only available for API level 2 and above.\u003c/p\u003e\n"],["\u003cp\u003ePotential errors include disabledCommand if the camera is busy and invalidParameterName for incorrect input.\u003c/p\u003e\n"]]],["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"],null,["# camera.getLivePreview\n\nReturns a continuous video stream with the resolution specified by\n`previewFormat` in [Options](/streetview/open-spherical-camera/reference/options).\nThis command should return, \"Content-Type: multipart/x-mixed-replace; boundary=\"---osclivepreview---\"\".\n**This command was added in API level 2.**\n\nParameters\n----------\n\n- This command has no parameter in request body.\n\nResults\n-------\n\n- A continuous video stream with frames separated by the boundary separator.\n\nErrors\n------\n\n- **disabledCommand:** Command is currently disabled; for example, the camera is shooting a video.\n- **invalidParameterName:** The input parameter name is unrecognized.\n\n| Command I/O ----------- ||\n|----------------------------|-----------------------------------------------------------------------------------------------------|\n| **Command Input** | ```text none ``` |\n| **Command Output** | ```text Continuous video stream. ``` |\n| **Command Output (Error)** | ```text { \"error\": { \"code\": \"disabledCommand\", \"message\": \"Command is currently disabled.\" } } ``` |"]]