CameraManager

This API is available on Firefox OS for privileged or certified applications only.

The CameraManager interface provides access to any cameras available on the device being used.

Properties

This interface doesn't implements, nor inherits any property.

Methods

CameraManager.getCamera()
Gets a camera instance based on its identifier.
CameraManager.getListOfCameras()
Returns an Array of all camera identifiers available on the device.

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.

JavaScript
"permissions": {
  "camera": {
    "description": "Required for accessing cameras on the device."
  }
}

See also

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/cameramanager

API B2G Camera camera Certified Only DOM DOM Reference Firefox OS Graphics JavaScript Non-standard Reference Référence WebAPI