Navigator.mozCameras

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

Important: Up until Firefox 1.4, you accessed device cameras using navigator.mozCameras. From Firefox 2.0 onwards, the syntax has changed a bit, and you use navigator.mozCamera instead. Visit the navigator.mozCamera page for more details.

Non-standard
This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

Summary

Returns an array of CameraManager objects you can use to access the cameras available on the user's device.

Syntax

var camera = window.navigator.mozCameras;

Value

navigator.mozCameras returns an array of CameraManager objects you can use to access the cameras 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.

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

See also

Document Tags and Contributors

Last updated by: chrisdavidmills,
Hide Sidebar