• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
B2G OS
  1. MDN
  2. Archive of obsolete content
  3. B2G OS
  4. B2G OS APIs
  5. CameraManager
  6. CameraManager.getListOfCameras()

CameraManager.getListOfCameras()

In This Article
  1. Summary
  2. Syntax
    1. Return value
  3. Specification
  4. Permissions
  5. See also

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

  • CameraManager.getCamera()
  • navigator.mozCamera

Document Tags and Contributors

Tags: 
  • API
  • B2G
  • camera
  • Firefox OS
  • Graphics
  • JavaScript
  • Method
  • Non Standard
  • Reference
  • Référence
  • WebAPI
 Contributors to this page: chrisdavidmills, fscholz, kscarfone, Sheppy, Jeremie
 Last updated by: chrisdavidmills, Feb 27, 2017, 2:07:19 AM
See also
  1. Camera API
  2. Archive
  3. Related pages for Camera API
    1. CameraCapabilities
    2. CameraControl
    3. CameraManager