מצלמה.getLivePreview
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
פונקציה זו מחזירה שידור וידאו רציף ברזולוציה שצוינה ב-
previewFormat
באפשרויות.
הפקודה הזו אמורה להחזיר, "Content-Type: multipart/x-mixed-replace; boundary="---osclivepreview---"".
הפקודה הזו נוספה ברמת API 2.
פרמטרים
- פקודה זו לא מכילה פרמטר בגוף הבקשה.
תוצאות
- וידאו בסטרימינג רציף עם פריימים שמופרדים באמצעות תו מפריד.
שגיאות
- DisabledCommand: הפקודה מושבתת כרגע.
לדוגמה, המצלמה מצלמת סרטון.
- falseParameterName: השם של פרמטר הקלט הוא
לא מזוהה.
Command I/O |
קלט פקודה |
none |
פלט הפקודה |
Continuous video stream. |
פלט הפקודה (שגיאה) |
{
"error": {
"code": "disabledCommand",
"message": "Command is currently disabled."
}
} |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-08-21 (שעון UTC).
[null,null,["עדכון אחרון: 2024-08-21 (שעון UTC)."],[],["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"]]