Options

The following table shows all options available to set and get by camera.setOptions and camera.getOptions. An option cannot be changed when its corresponding support is empty or contains only one option.

Name Type Description Read/Write
captureMode String Current capture mode. Default to image. rw
captureModeSupport String Array List of capture modes currently available. Minimum requirement for API level 1 is ["image"], and minimum requirement for API level 2 is ["image", "interval"], where "interval" represents the mode of capturing a series of images spaced at a certain interval, please see also captureInterval and captureIntervalSupport. Two additional modes ("video" and "walkaround")are supported by API level 2, so the complete supported set by API level 2 is ["image", "interval", "video", "walkaround"], where "video" represents the video capture mode and "walkaround" represents the mode of capturing two images in sequence, the first with the users standing anywhere relative to the camera and the second with the users standing on the opposite side (relative to the first standing point) of the camera. This allows the camera to remove the users from the final image by combining the two images. When "walkaround" is supported by the camera and set to be the current capture mode, the client should expect to send two takePicture commands to the camera, where the response of the first command (when it finishes) indicates the camera is ready to take the second image while the second command should return the final image when it finishes.

To add more capture modes not supported yet, please prefix vendor-specific modes with an underscore ( _ ).

This option was modified in API level 2.

r
exposureProgram Number Current exposure program. rw
exposureProgramSupport Number Array List of exposure programs currently available; for example, [0, 1, 2, 3, 4]. Each integer represents a different exposure program:
  • 0 = Not defined
  • 1 = Manual
  • 2 = Normal program
  • 3 = Aperture priority
  • 4 = Shutter priority
Select the following link to download further details about ExposureProgram.
r
iso Number Current ISO speed setting. rw
isoSupport Number Array

API level 1: List of ISO settings currently available; for example, [100, 200, 400, 800,1600] or [] when it is in auto mode.

API level 2: List of ISO settings currently available; for example, [0, 100, 200, 400, 800, 1600], where 0 represents auto mode.

This option was modified in API level 2.

r
shutterSpeed Number Current shutter speed setting. rw
shutterSpeedSupport Number Array

API level 1: List of shutter speeds currently available; for example, [0.067, 0.033, 0.017,0.008] or [] when it is in auto mode.

API level 2: List of shutter speeds currently available; for example, [0, 0.067, 0.033, 0.017, 0.008], where 0 represents auto mode.

This option was modified in API level 2.

r
aperture Number Current aperture setting, in f-stops. rw
apertureSupport Number Array

API level 1: List of aperture settings currently available, expressed in f/number; for example, [1.4, 2, 2.8, 4, 5.6, 8, 11] or [] when it is auto mode.

API level 2: List of aperture settings currently available, expressed in f/number; for example, [0, 1.4, 2, 2.8, 4, 5.6, 8, 11], where 0 represents auto mode.

r
whiteBalance String Current white balance setting; for example, daylight. Default to auto. rw
whiteBalanceSupport String Array List of white balance settings currently available, can be a subset of the predefined list:[ "auto", "incandescent", "fluorescent", "daylight", "cloudy-daylight", "shade", "twilight"]. Values for each:
  • incandescent, around 3200K
  • fluorescent, around 4000K
  • datalight, around 5200K
  • cloudy-daylight, around 6000K
  • shade, around 7000K
  • twilight, around 12000K
Prefix vendor-specific setting names with an underscore; for example: _vendor-setting
r
exposureCompensation Number Current exposure compensation. rw
exposureCompensationSupport Number Array List of of exposure compensations currently available, usually in step 0.33 or 0.5; for example: [-1, -0.67, -0.33, 0, 0.33, 0.67, 1] r
fileFormat Object

Current file type and resolution. The format should reflect the current value of captureMode. For example, if captureMode is image, an appropriate response could be:

{
    "type": "jpeg",
    "width": 2000,
    "height": 1000
}
If captureMode is video, an appropriate response could be:
{
    "type": "mp4",
    "width": 1920,
    "height": 1080,
    "framerate": 30
}

This option was modified in API level 2.

rw
fileFormatSupport Object Array

List of the file formats currently available; for example:

[
    {
    "type": "jpeg",
    "width": 2000,
    "height": 1000
    },
    {
    "type": "jpeg",
    "width": 200,
    "height": 100
    },
    {
    "type": "mp4",
    "width": 1920,
    "height": 1080,
    "framerate": 24
    },
    {
    "type": "mp4",
    "width": 1280,
    "height": 720,
    "framerate": 30
    },
    ...
]
Select the following link for more information about all types.

This option was modified in API level 2.

r
exposureDelay Number Current delay between the takePicture command and when the exposure is started, in seconds. rw
exposureDelaySupport Number Array List of exposure delays currently available, in seconds; for example: [0, 1, 2, 5, 10, 30, 60] r
sleepDelay Number Current delay before the camera goes to sleep, in seconds. rw
sleepDelaySupport Number Array List of the sleep delays currently available, in seconds; for example, [30, 60, 120, 300, 600, 1800, 65535], where 65535 disables sleep mode (the camera doesn't sleep until powered off) and must be supported. r
offDelay Number Current delay in seconds before the camera powers off. rw
offDelaySupport Number Array List of power off delays currently available, in seconds; for example, [1800, 3600, 7200, 65535], where 65535 disables power off mode (the camera doesn’t power off until the battery is depleted or powered off manually) and must be supported. r
totalSpace Number Read-only: Number of bytes of total storage. r
remainingSpace Number Read-only: Number of bytes of free storage. r
remainingPictures Number Read-only: Estimated number of remaining pictures based on current capture setting. r
gpsInfo Object

Current GPS information. Set using setOptions using phone’s GPS:

{
    "lat": 23.532,
    "lng": -132.35
}
The lat and lng properties are decimal degrees, with lat in the range, [-90, 90], and lng in the range, [-180, 180]. When provided by a phone, please note that each GPS location is valid only until the next update from the phone. The phone must determine when to update the GPS location; for example, right before each takePicture command. 65535 notifies the camera that the current GPS location is invalid and the camera should ignore it and use its own GPS if it exists; for example, setOptions({"gpsInfo": {"lat": 65535, "lng": 65535}}) means the GPS location is invalid.
rw
dateTimeZone String Current date and time information. Set by setOptions using phone’s date, time, and time zone. The format is, YYYY:MM:DD HH:MM:SS+(-)HH:MM. Time is in 24-hour format, date and time are separated by a blank space, andtime zone is an offset from UTC time; for example, 2014:05:18 01:04:29+8:00 is China Time Zone (UTC+8:00) rw
hdr

API level 1: Boolean

API level 2: String

API level 1: Enable/disable HDR capture mode. Value is true to enable HDR, or false to disable it. Default value is false. Setting can be true only when hdrSupport is also true.

API level 2: Current HDR mode of String type.

This option was modified in API level 2.

rw
hdrSupport

API level 1: Boolean

API level 2: String Array

API level 1: A value of true signifies that the camera supports HDR. A false setting identifies a camera without HDR.

API level 2: If you don’t support HDR mode, it is [“off”]; if you supports one HDR mode, it is [“off”, “hdr”], if multiple HDR modes (different algorithms based) are supported, then it is [“off”, “hdr”, “hdr1”, “hdr2”, ...]

This option was modified in API level 2.

r
exposureBracket Object Current exposure bracket setting. Available only when hdrSupport == true (API level 1) or hdrSupport contains at least one HDR mode (API level 2). If the camera uses manual exposure bracketing, the object contains two entries:
  1. shots, an integer containing the number of shots to be taken.
  2. increment, a number containing an EV increment between shots.
For example:
{
    "shots": 3,
    "increment": 1.33
}
If the camera uses auto exposure bracketing, the object contains:
{
    "autoMode": true
}

API level 1: Default to empty {} when hdrSupport == false. Manufacturers decide default values (for example, auto exposure bracketing), when hdr is true.

API level 2: Default to empty {} when hdrSupport contains only "off". Otherwise, manufacturers decide default values (for example, auto exposure bracketing).

This option was modified in API level 2.

rw
exposureBracketSupport Object

Exposure bracket settings currently available; for example:

{
    "autoMode": true,
    "shotsSupport": [1, 3, 5, 7],
    "incrementSupport": [0.33, 0.67, 1, 1.33, 1.67, 2]
}

API level 1: Default to empty {} if hdrSupport == false. When hdrSupport == true, but auto exposure bracketing is not supported, then autoMode will be false.

API level 2: Default to empty {} if hdrSupport contains only "off". When hdrSupport contains any HDR mode, but auto exposure bracketing is not supported, then autoMode will be false.

This option was modified in API level 2.

r
gyro Boolean Set to true to enable the camera’s gyroscope module, or false to disable this feature. Default to true if the camera supports it, otherwise false. This setting can be true only when gyroSupport == true. rw
gyroSupport Boolean If the camera has a gyroscope this value should be true, otherwise, false. r
gps Boolean Enables/disables the camera GPS module. Value must be true to enable, or false to disable. Default value is true if the camera supports it, otherwise false. Setting is true only when gpsSupport == true. rw
gpsSupport Boolean This value should be true if the camera has its own GPS module, otherwise false. r
imageStabilization String Current image stabilization operation; for example, off. rw
imageStabilizationSupport String Array Image stabilization options currently available. The pre-defined list is, ["off", "on"].If the camera doesn’t support image stabilization, return ["off"], otherwise return ["off", "on"]. Prefix vendor-specific strings with an underscore ( _ ); for example, [ "off", "_horizontal_stabilization", "_vibration_correction" ]. r
wifiPassword String
At least 8 characters long, containing letters, numbers, symbols, but no spaces. It can be changed only when the camera is connected to a client device. Once it is changed, the camera must disconnect so the user must reconnect using the new wifiPassword.
The camera must provide a reset mechanism in case the password is forgotten; for example, a reset button to restore the factory default password.
w
previewFormat Object

Current live preview resolution; for example:

{
    "width": 640,
    "height": 320,
    "framerate": 24
}

This option was added in API level 2.

rw
previewFormatSupport Object Array

Currently supported live preview formats; for example:

[
    {
    "width": 640,
    "height": 320,
    "framerate": 24
    },
    ...
    {
    "width": 1280,
    "height": 720,
    "framerate": 24
    }
]

This option was added in API level 2.

r
captureInterval Number Current interval between capturing two consecutive images, in seconds.

This option was added in API level 2.

rw
captureIntervalSupport Object

Minimum and maximum intervals allowed between capturing two consecutive images, in seconds; for example:

{
    "minInterval": 10,
    "maxInterval": 60
}
It might vary depending on fileFormat.

This option was added in API level 2.

r
captureNumber Number Number of images to be captured for one interval capture session. Default to 0, which means the capture needs to be terminated explicitly by stopCapture command; otherwise, the capture stops automatically after it captures images of the specified number. The capture can also be interrupted when the camera is out of battery or when it is turned off intentionally.

This option was added in API level 2.

rw
captureNumberSupport Object

Minimum and maximum number of images that can be captured during an interval capture; for example:

{
    "minNumber": 2,
    "maxNumber": 50
}
It might change depending on remaining storage.

This option was added in API level 2.

r
remainingVideoSeconds Number Estimated number of seconds for remaining video based on current capture setting.

This option was added in API level 2.

r
pollingDelay Number Minimum interval in seconds between two consecutive status polling requests. Clients should use this field to guide their status polling behavior; for example, when it is stitching an image, clients might need to poll the camera periodically to see if it finishes stitching. Different cameras have different support; for example, some cameras can handle status polling every one second while others support longer interval.

This option was added in API level 2.

r
delayProcessing Boolean True when processing (e.g. stitching) has a lower priority than capturing, or in other words, another capture is allowed before the processing of the previous captured image is finished. This is highly recommended, especially for cameras that require long processing time.

This option was added in API level 2.

rw
delayProcessingSupport Boolean Array

[true] means processing (e.g. stitching) has a lower priority than capturing, and is always delayed by default.

[false] means processing happens right after capturing.

[true, false] means there is a choice between these two modes.

This option was added in API level 2.

r
clientVersion Number

The API level the client decides to use. Default to 1 if the camera supports both API level 1 and 2 so that clients written for API level 1 still works with the camera without any change; default to 2 if the camera only supports API level 2, which is not recommended before clients migrate to API level 2. If the camera only supports API level 2, the request trying to set it to 1 should fail. If clientVersion is set to 2 successfullly and a deprecated command from API level 1 is requested, the request should fail with error code unknownCommand.

This option was added in API level 2.

rw
photoStitchingSupport String Array

List of stitching options for photos. Return [ondevice] if photos are always stitched on the camera, [none] if the camera cannot stitch photos, and [none,ondevice] if stitching is user configurable. Prefix vendor-specific setting names with an underscore, e.g. _vendor-setting.

This option was added in API level 2.1.

r
photoStitching String

Current stitching option for photos, e.g. ondevice. Default to ondevice if it is supported.

This option was added in API level 2.1.

rw
videoStitchingSupport String Array

List of stitching options for videos. Return [ondevice] if videos are always stitched on the camera, [none] if the camera cannot stitch videos, and [none,ondevice] if stitching is user configurable. Prefix vendor-specific setting names with an underscore, e.g. _vendor-setting.

This option was added in API level 2.1.

r
videoStitching String

Current stitching option for videos, e.g. ondevice. Default to ondevice if it is supported.

This option was added in API level 2.1.

rw
videoGPSSupport String Array

List of GPS options during video capture. Return [continuous] if the camera can continuously capture GPS during video capture and embed the locations in the video. Return [none] if it cannot and [none,continuous] if video GPS support is user configurable. Prefix vendor-specific setting names with an underscore, e.g. _vendor-setting.

This option was added in API level 2.1.

r
videoGPS String

Current option for GPS support during video capture, e.g. continuous. Default to continuous if it is supported.

This option was added in API level 2.1.

rw
_vendorSpecific [type] (optional) Vendor-specific additional camera options. Prefix vendor-specific strings with an underscore ( _ ).

Send feedback about...

Open Spherical Camera API