The CameraControl.capabilities property returns a CameraCapabilities object, which describes all the camera's capabilities.
Properties
CameraCapabilities.effectsRead only- An
Arrayof strings identifying the effects (such asnormal,sepia,mono, etc.) that the camera supports. CameraCapabilities.fileFormatsRead only- An
Arrayof strings identifying the file formats supported by the camera, such asjpeg,rgb565, etc. CameraCapabilities.flashModesRead only- An
Arrayof strings identifying each of the flash modes supported by the camera. Possible values areauto,off,onortorch. CameraCapabilities.focusModesRead only- An
Arrayof strings identifying each of the focus modes supported by the camera such as auto, fixed, macro, etc. CameraCapabilities.maxExposureCompensationRead only- A number that defines the maximum supported exposure compensation value.
CameraCapabilities.maxFocusAreasRead only- A number that defines the maximum number of focus areas supported by the camera.
CameraCapabilities.maxMeteringAreasRead only- A number that defines the maximum number of metering areas supported by the camera.
CameraCapabilities.minExposureCompensationRead only- A number that defines the minimum supported exposure compensation value.
CameraCapabilities.pictureSizesRead only- An
Arrayof objects containing theheightandwidthproperties supported for picture taking. CameraCapabilities.previewSizesRead only- An
Arrayof objects containing theheightandwidthproperties supported for the video preview stream. CameraCapabilities.recorderProfilesRead only- An object with attributes for each of the supported recorder profiles.
CameraCapabilities.sceneModesRead only- An
Arrayof strings identifying each of the scene modes supported by the camera such asauto,night,beach, etc. CameraCapabilities.stepExposureCompensationRead only- A number that defines the exposure compensation minimum step-size.
CameraCapabilities.videoSizesRead only- An
Arrayof objects containing theheightandwidthproperties supported for video recording. CameraCapabilities.whiteBalanceModesRead only- An
Arrayof strings identifiers for each white balance modes supported by the camera such asauto,fluorecent, etc. CameraCapabilities.zoomRatiosRead only- An
Arrayof numbers representing all the supported zoom ratios. If the camera has no zoom capabilities, the value isnull.
Methods
None.
Specification
Not part of any specification as yet; this will probably be replaced by WebRTC when it gains more widespread support on mobile devices.
Permissions
Up until Firefox OS 1.4, The Camera API was a certified API, so not accessible to third party apps. From Firefox OS 2.0 onwards, the permission level has been downgraded to privileged, so it is now available for developers to use in their apps.
"permissions": {
"camera": {
"description": "Required for accessing cameras on the device."
}
}