CameraCapabilities.whiteBalanceModes

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

Revision Content

{{ domref() }}

{{ non-standard_header() }}

{{ B2GOnlyHeader2('certified') }}

Summary

The whiteBalanceModes property is an Array of strings identifiers for each white balance modes supported by the camera such as auto, fluorecent, etc.

Syntax

var modes = instanceOfCameraControl.capabilities.whiteBalanceModes

Value

Return an Array of strings.

Example

var options = {
  camera: navigator.mozCameras.getListOfCameras()[0]
};
 
function onSuccess(camera) {
  var modes = camera.capabilities.whiteBalanceModes;

  modes.forEach(function (value) {
    console.log(value)
  });
};

navigator.mozCameras.getCamera(options, onSuccess)

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("CameraCapabilities")}}
  • {{domxref("CameraControl")}}
  • {{domxref("CameraManager")}}

Revision Source

<p>{{ domref() }}</p>
<p>{{ non-standard_header() }}</p>
<p>{{ B2GOnlyHeader2('certified') }}</p>
<h2 id="Summary">Summary</h2>
<p>The <code>whiteBalanceModes</code> property is an <code><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code> of strings identifiers for each white balance modes supported by the camera such as <code>auto</code>, <code>fluorecent</code>, etc.</p>
<h2 id="Syntax">Syntax</h2>
<pre>
var modes = instanceOfCameraControl.capabilities.whiteBalanceModes</pre>
<h2 id="Value">Value</h2>
<p>Return an <code><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/JavaScript/Reference/Global_Objects/Array">Array</a></code> of strings.</p>
<h2 id="Example">Example</h2>
<pre class="brush: js">
var options = {
  camera: navigator.mozCameras.getListOfCameras()[0]
};
 
function onSuccess(camera) {
  var modes = camera.capabilities.whiteBalanceModes;

&nbsp; modes.forEach(function (value) {
    console.log(value)
  });
};

navigator.mozCameras.getCamera(options, onSuccess)
</pre>
<h2 id="Specification" name="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("CameraCapabilities")}}</li>
  <li>{{domxref("CameraControl")}}</li>
  <li>{{domxref("CameraManager")}}</li>
</ul>
Revert to this revision