MDN’s new design is in Beta! A sneak peek: https://blog.mozilla.org/opendesign/mdns-new-design-beta/

CameraManager.getListOfCameras()

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

Summary

This method is used to get an Array of identifiers of all the cameras available on the device.

Syntax

var cameras = navigator.mozCameras.getListOfCameras();

Return value

camera
an Array of identifiers of all cameras available

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."
  }
}

See also

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, fscholz, kscarfone, Sheppy, Jeremie
 Last updated by: chrisdavidmills,