新变化
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
API 级别 2.1
发布时间:2017 年 5 月
重要变更
API 级别 2
发布时间:2016 年 7 月
重要变更
- 废弃了
sessionId
和已废弃/修改的相关命令。API 级别 2 适用于一个客户端连接,摄像头制造商应确保在任何时候只连接一个客户端(例如,通过限制一个 Wi-Fi 连接)。
- 已废弃的命令
getImage
/getMetadata
。
- 文件的绝对网址用于直接从相机的 HTTP 服务器下载。
- 添加/修改了用于视频拍摄、间隔图片拍摄和实时预览的命令和选项。
- 添加了命令
startCapture
/stopCapture
/getLivePreview
/processPicture
/reset
。
- 将
listImages
重命名为 listFiles
,并修改了输入/输出以处理视频类型和图片类型。
- 添加了选项
previewFormat
、previewFormatSupport
、captureInterval
、captureIntervalSupport
、captureNumber
、captureNumberSupport
、remainingVideoSeconds
、pollingDelay
、delayProcessing
、delayProcessingSupport
和 clientVersion
。
- 修改了选项
captureModeSupport
、isoSupport
、shutterSpeedSupport
、fileFormatSupport
、hdr
、hdrSupport
、exposureBracket
和 exposureBracketSupport
。
- 添加了 360 度视频 XMP 规范。
- 向
/osc/info
输出添加了 apiLevel
字段。
- apiLevel:在 API 级别 2 中添加了字段。如果缺少此字段,则系统默认将它视为 API 级别 1。开发者应负责检索这些信息,并根据值做出不同的实现。
向后兼容性
- 摄像头制造商:如果您一直在支持 API 级别 1,强烈建议您在最终更新之前的几个月内同时支持 API 级别 1 和 API 级别 2 作为中间解决方案,并为搭载 API 级别 1 的摄像头提供固件更新,否则仅支持 API 级别 1 的客户端将不支持您的摄像头。
- 应用开发者:请注意,这些变更会影响您之前发布的应用,您有责任对这两个版本进行相应的更改,并提醒相机所有者更新其固件。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eAPI level 2.1, released in May 2017, introduced direct upload capabilities, a new open standard for 360 video XMP, and recommendations for camera make/model specification.\u003c/p\u003e\n"],["\u003cp\u003eAPI level 2, released in July 2016, deprecated \u003ccode\u003esessionId\u003c/code\u003e and related commands, focusing on a single client connection.\u003c/p\u003e\n"],["\u003cp\u003eAPI level 2 also introduced commands and options for video capture, interval image capture, and live preview while deprecating commands for retrieving images and metadata in favor of direct URL downloads.\u003c/p\u003e\n"],["\u003cp\u003eAPI level 2 added a 360 video XMP specification and \u003ccode\u003eapiLevel\u003c/code\u003e field to the \u003ccode\u003e/osc/info\u003c/code\u003e output for version identification and backward compatibility.\u003c/p\u003e\n"],["\u003cp\u003eCamera manufacturers and app developers are encouraged to support both API levels during a transition period for compatibility with older cameras and apps.\u003c/p\u003e\n"]]],["API level 2.1 introduced direct server uploads via new `switchWifi` and `uploadFile` commands, along with stitching and GPS options. It replaced the previous 360 video XMP specification with a new standard and suggested specifying camera make/model in 360 videos. API level 2 deprecated session management, removing `startSession`, `updateSession`, and `closeSession`, while adding commands for video capture, live preview, and file management. The API also added and modified various options, including new video capture-related ones.\n"],null,["# What's New\n\nAPI level 2.1\n-------------\n\nReleased May 2017\n\n### Key changes\n\n- Added [Direct Upload](/streetview/open-spherical-camera/guides/direct-upload) to allow cameras to upload directly to servers.\n - Includes new commands [`switchWifi`](/streetview/open-spherical-camera/reference/camera/switchwifi) and [`uploadFile`](/streetview/open-spherical-camera/reference/camera/uploadfile).\n - Added `photoStitchingSupport`, `photoStitching`, `videoStitchingSupport`, `videoStitching`, `videoGPSSupport`, `videoGPS` options to [OSC options](/streetview/open-spherical-camera/reference/options).\n - Added `cameraId` field to [`/osc/info`](/streetview/open-spherical-camera/guides/osc/info#output) output.\n- Replaced [360 video XMP](/streetview/open-spherical-camera/reference/header/video-xmp) specification with [a new open standard](https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md).\n- Added recommendation for specifying camera [make/model](/streetview/open-spherical-camera/reference/header/video-xmp) in 360 video MP4s.\n\nAPI level 2\n-----------\n\nReleased July 2016\n\n### Key changes\n\n- Deprecated `sessionId` and deprecated/modified related commands. API level 2 is designed for one client connection and camera manufacturers should make sure that only one client at any time is connected (for example via limiting only one wifi connection).\n - Deprecated commands [`startSession`](/streetview/open-spherical-camera/reference/camera/startsession) / [`updateSession`](/streetview/open-spherical-camera/reference/camera/updatesession) / [`closeSession`](/streetview/open-spherical-camera/reference/camera/closesession).\n - Deprecated `sessionId` from input of commands [`takePicture`](/streetview/open-spherical-camera/reference/camera/takepicture) / [`getOptions`](/streetview/open-spherical-camera/reference/camera/getoptions) / [`setOptions`](/streetview/open-spherical-camera/reference/camera/setoptions).\n- Deprecated commands [`getImage`](/streetview/open-spherical-camera/reference/camera/getimage) / [`getMetadata`](/streetview/open-spherical-camera/reference/camera/getmetadata).\n - The absolute URL of a file is used to download directly from the HTTP server of the camera.\n- Added/modified commands and [options](/streetview/open-spherical-camera/reference/options) for video capture, interval image capture and live preview.\n - Added commands [`startCapture`](/streetview/open-spherical-camera/reference/camera/startcapture) / [`stopCapture`](/streetview/open-spherical-camera/reference/camera/stopcapture) / [`getLivePreview`](/streetview/open-spherical-camera/reference/camera/getlivepreview) / [`processPicture`](/streetview/open-spherical-camera/reference/camera/processpicture) / [`reset`](/streetview/open-spherical-camera/reference/camera/reset).\n - Renamed [`listImages`](/streetview/open-spherical-camera/reference/camera/listimages) to [`listFiles`](/streetview/open-spherical-camera/reference/camera/listfiles) and modified inputs/outputs to handle video types as well as image types.\n - Added options `previewFormat`, `previewFormatSupport`, `captureInterval`, `captureIntervalSupport`, `captureNumber`, `captureNumberSupport`, `remainingVideoSeconds`, `pollingDelay`, `delayProcessing`, `delayProcessingSupport`, and `clientVersion`.\n - Modified options `captureModeSupport`, `isoSupport`, `shutterSpeedSupport`, `fileFormatSupport`, `hdr`, `hdrSupport`, `exposureBracket`, and `exposureBracketSupport`.\n- Added [360 video XMP](/streetview/open-spherical-camera/reference/header/video-xmp) specification.\n- Added `apiLevel` field to [`/osc/info`](/streetview/open-spherical-camera/guides/osc/info#output) output.\n - apiLevel: Field was added in API level 2. It is considered to be API level 1 by default when this field is missing. It is developers' responsibility to retrieve this information and implement differently based on the value.\n\nBackward compatibility\n----------------------\n\n- Camera manufacturers: If you have been supporting API level 1, it is highly recommended that you support both API level 1 and API level 2 as an intermediate solution for a few months before the final update and provide a firmware update for cameras running API level 1, otherwise, clients supporting only API level 1 won't work with your cameras.\n- App developers: Be aware these changes affect your previously-published app and it is your responsibility to make corresponding changes to either handle both versions and reminds camera owners to update their firmware."]]