camera.getLivePreview
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trả về luồng video liên tục với độ phân giải được chỉ định bằng
previewFormat
trong mục Tuỳ chọn.
Lệnh này sẽ trả về "Content-Type: multipart/x-mixed-replace; boundary="---osclivepreview---"".
Lệnh này đã được thêm vào từ API cấp 2.
Tham số
- Lệnh này không có tham số trong nội dung yêu cầu.
Kết quả
- Luồng video liên tục với các khung được phân tách bằng dấu phân cách ranh giới.
Lỗi
- disabledCommand: Lệnh hiện đang tắt;
ví dụ: máy ảnh đang quay video.
- không hợp lệ Tham số: Tên của tham số đầu vào là
không nhận dạng được.
Lệnh I/O |
Nhập lệnh |
none |
Kết quả lệnh |
Continuous video stream. |
Ra lệnh (Lỗi) |
{
"error": {
"code": "disabledCommand",
"message": "Command is currently disabled."
}
} |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-08-21 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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.\" } } ``` |"]]