CameraCapabilities

  • Revision slug: DOM/CameraCapabilities
  • Revision title: CameraCapabilities
  • Revision id: 350815
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment

Revision Content

{{ domref() }}

{{ non-standard_header() }}

The {{domxref("CameraControl.capabilities")}} property returns a CameraCapabilities object, which describes all the camera's capabilities.

Methods

None.

Properties

Name Type Description
effects {{readonlyinline}} Array An array of strings identifying the effects (such as normal, sepia, mono, etc.) that the camera supports.
fileFormats {{readonlyinline}} Array An array of strings identifying the file formats supported by the camera, such as jpeg, rgb565, etc.
flashModes {{readonlyinline}} Array An array of strings identifying each of the flash modes supported by the camera. Possible values are auto, off, on or torch.
focusModes {{readonlyinline}} Array An array of strings identifying each of the focus modes supported by the camera such as auto, fixed, macro, etc.
maxExposureCompensation {{readonlyinline}} double A number that defines the maximum supported exposure compensation value.
maxFocusAreas {{readonlyinline}} long A number that defines the maximum number of focus areas supported by the camera.
maxMeteringAreas {{readonlyinline}} long A number that defines the maximum number of metering areas supported by the camera.
minExposureCompensation {{readonlyinline}} double A number that defines the minimum supported exposure compensation value.
pictureSizes {{readonlyinline}} Array An array of objects containing the height and width properties supported for picture taking.
previewSizes {{readonlyinline}} Array An array of objects containing the height and width properties supported for the video preview stream.
recorderProfiles {{readonlyinline}} Array An array of objects for each of the recorder profiles supported by the camera.
sceneModes {{readonlyinline}} Array An array of strings identifying each of the scene modes supported by the camera such as auto, night, beach, etc.
stepExposureCompensation {{readonlyinline}} double A number that defines the exposure compensation minimum step-size.
videoSizes {{readonlyinline}} Array An array of objects containing the height and width properties supported for video recording.
whiteBalanceModes {{readonlyinline}} Array An array of strings identifiers for each white balance modes supported by the camera such as auto, fluorecent, etc.
zoomRatios {{readonlyinline}} Array An array of numbers representing all the supported zoom ratios. If the camera has no zoom capabilities, the value is null.

Specification

Not part of any specification; however, this API should be removed when the WebRTC Capture and Stream API has been implemented.

See also

  • {{ domxref("CameraControl") }}
  • {{ domxref("CameraManager") }}
  • {{ domxref("window.navigator.mozCameras","navigator.mozCameras") }}

Revision Source

<p>{{ domref() }}</p>
<p>{{ non-standard_header() }}</p>
<p>The {{domxref("CameraControl.capabilities")}} property returns a <code>CameraCapabilities</code> object, which describes all the camera's capabilities.</p>
<h2 id="Methods">Methods</h2>
<p>None.</p>
<h2 id="Properties">Properties</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Name</th>
      <th scope="col">Type</th>
      <th scope="col">Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code>effects</code> {{readonlyinline}}</td>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code></td>
      <td>An array of strings identifying the effects (such as <code>normal</code>, <code>sepia</code>, <code>mono</code>, etc.) that the camera supports.</td>
    </tr>
    <tr>
      <td><code>fileFormats</code> {{readonlyinline}}</td>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code></td>
      <td>An array of strings identifying the file formats supported by the camera, such as <code>jpeg</code>, <code>rgb565</code>, etc.</td>
    </tr>
    <tr>
      <td><code>flashModes</code> {{readonlyinline}}</td>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code></td>
      <td>An array of strings identifying each of the flash modes supported by the camera. Possible values are <code>auto</code>, <code>off</code>, <code>on</code> or <code>torch</code>.</td>
    </tr>
    <tr>
      <td><code>focusModes</code> {{readonlyinline}}</td>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code></td>
      <td>An array of strings identifying each of the focus modes supported by the camera such as auto, fixed, macro, etc.</td>
    </tr>
    <tr>
      <td style="white-space: nowrap;"><code>maxExposureCompensation</code> {{readonlyinline}}</td>
      <td><code>double</code></td>
      <td>A number that defines the maximum supported exposure compensation value.</td>
    </tr>
    <tr>
      <td><code>maxFocusAreas</code> {{readonlyinline}}</td>
      <td><code>long</code></td>
      <td>A number that defines the maximum number of focus areas supported by the camera.</td>
    </tr>
    <tr>
      <td><code>maxMeteringAreas</code> {{readonlyinline}}</td>
      <td><code>long</code></td>
      <td>A number that defines the maximum number of metering areas supported by the camera.</td>
    </tr>
    <tr>
      <td><code>minExposureCompensation</code> {{readonlyinline}}</td>
      <td><code>double</code></td>
      <td>A number that defines the minimum supported exposure compensation value.</td>
    </tr>
    <tr>
      <td><code>pictureSizes</code> {{readonlyinline}}</td>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code></td>
      <td>An array of objects containing the <code>height</code> and <code>width</code> properties supported for picture taking.</td>
    </tr>
    <tr>
      <td><code>previewSizes</code> {{readonlyinline}}</td>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code></td>
      <td>An array of objects containing the <code>height</code> and <code>width</code> properties supported for the video preview stream.</td>
    </tr>
    <tr>
      <td><code>recorderProfiles</code> {{readonlyinline}}</td>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code></td>
      <td>An array of objects for each of the recorder profiles supported by the camera.</td>
    </tr>
    <tr>
      <td><code>sceneModes</code> {{readonlyinline}}</td>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code></td>
      <td>An array of strings identifying each of the scene modes supported by the camera such as <code>auto</code>, <code>night</code>, <code>beach</code>, etc.</td>
    </tr>
    <tr>
      <td style="white-space: nowrap;"><code>stepExposureCompensation</code> {{readonlyinline}}</td>
      <td><code>double</code></td>
      <td>A number that defines the exposure compensation minimum step-size.</td>
    </tr>
    <tr>
      <td><code>videoSizes</code> {{readonlyinline}}</td>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code></td>
      <td>An array of objects containing the <code>height</code> and <code>width</code> properties supported for video recording.</td>
    </tr>
    <tr>
      <td><code>whiteBalanceModes</code> {{readonlyinline}}</td>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code></td>
      <td>An array of strings identifiers for each white balance modes supported by the camera such as <code>auto</code>, <code>fluorecent</code>, etc.</td>
    </tr>
    <tr>
      <td><code>zoomRatios</code> {{readonlyinline}}</td>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code></td>
      <td>An array of numbers representing all the supported zoom ratios. If the camera has no zoom capabilities, the value is <code>null</code>.</td>
    </tr>
  </tbody>
</table>
<h2 id="Specification">Specification</h2>
<p>Not part of any specification; however, this API should be removed when the <a class="external" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html" rel="external" title="http://dev.w3.org/2011/webrtc/editor/getusermedia.html">WebRTC Capture and Stream API</a> has been implemented.</p>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{ domxref("CameraControl") }}</li>
  <li>{{ domxref("CameraManager") }}</li>
  <li>{{ domxref("window.navigator.mozCameras","navigator.mozCameras") }}</li>
</ul>
Revert to this revision