แสดงตัวอย่างภาพถ่ายสด
แสดงสตรีมวิดีโอต่อเนื่องที่มีความละเอียดตามที่ระบุ
previewFormat
ในตัวเลือก
คำสั่งนี้ควรแสดงผลเป็น "Content-Type: multipart/x-mixed-replace; boundary="---osclivepreview---"".
เพิ่มคำสั่งนี้ใน API ระดับ 2
พารามิเตอร์
- คำสั่งนี้ไม่มีพารามิเตอร์ในเนื้อหาคำขอ
ผลลัพธ์
- สตรีมวิดีโอต่อเนื่องที่มีเฟรมแยกกันโดยเส้นแบ่งขอบเขต
ข้อผิดพลาด
- disableCommand: ปิดใช้คำสั่งอยู่ในขณะนี้
เช่น กล้องกำลังถ่ายวิดีโอ
- invalidParametersName: ชื่อพารามิเตอร์อินพุตคือ
ไม่รู้จัก
Command I/O |
อินพุตคำสั่ง |
none |
เอาต์พุตคำสั่ง |
Continuous video stream. |
เอาต์พุตคำสั่ง (ข้อผิดพลาด) |
{ "error": { "code": "disabledCommand", "message": "Command is currently disabled." } } |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-08-21 UTC
[null,null,["อัปเดตล่าสุด 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"]]