recursal/MDN huggingface dataset:
MediaTrackSupportedConstraints: volume property
===============================================

**Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

**Non-standard:** This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

 The `MediaTrackSupportedConstraints` dictionary's
 **`volume`** property is a read-only Boolean value which is
 present (and set to `true`) in the object returned by
 `MediaDevices.getSupportedConstraints()` if and only if the
 user agent supports the `volume` constraint. If the
 constraint isn't supported, it's not included in the list, so this value will never be
 `false`.

 You can access the supported constraints dictionary by calling
 `navigator.mediaDevices.getSupportedConstraints()`.

Value
-----

 This property is present in the dictionary (and its value is always `true`)
 if the user agent supports the `volume` constraint. If the property isn't
 present, this property is missing from the supported constraints dictionary, and you'll
 get `undefined` if you try to look at its value.

Examples
--------
```

<div id="result"></div>
```


```
#result {
  font:
    14px "Arial",
    sans-serif;
}
```



```js
const result = document.getElementById("result");
const supported = navigator.mediaDevices.getSupportedConstraints().volume;
result.textContent = supported ? "Supported!" : "Not supported!";
```

### Result

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Media Capture and Streams API
* `MediaDevices.getSupportedConstraints()`
* `MediaTrackSupportedConstraints`
* `MediaStreamTrack`
MediaTrackSupportedConstraints: aspectRatio property
====================================================

 The `MediaTrackSupportedConstraints` dictionary's **`aspectRatio`** property is a read-only Boolean value which is present (and set to `true`) in the object returned by `MediaDevices.getSupportedConstraints()` if and only if the
 user agent supports the `aspectRatio` constraint.
 If the constraint isn't supported, it's not included in the list, so this value will never be `false`.

You can access the supported constraints dictionary by calling `navigator.mediaDevices.getSupportedConstraints()`.

Value
-----

 This property is present in the dictionary (and its value is always `true`)
 if the user agent supports the `aspectRatio` constraint. If the property
 isn't present, this property is missing from the supported constraints dictionary, and
 you'll get `undefined` if you try to look at its value.

Examples
--------
```

<div id="result"></div>
```


```
#result {
  font:
    14px "Arial",
    sans-serif;
}
```



```js
const result = document.getElementById("result");
const supported = navigator.mediaDevices.getSupportedConstraints().aspectRatio;
result.textContent = supported ? "Supported!" : "Not supported!";
```

### Result

Specifications
--------------

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksupportedconstraints-aspectratio |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Media Capture and Streams API
* `MediaDevices.getSupportedConstraints()`
* `MediaTrackSupportedConstraints`
* `MediaStreamTrack`
MediaTrackSupportedConstraints: width property
==============================================

 The `MediaTrackSupportedConstraints` dictionary's
 **`width`** property is a read-only Boolean value which is
 present (and set to `true`) in the object returned by
 `MediaDevices.getSupportedConstraints()` if and only if the
 user agent supports the `width` constraint. If the constraint
 isn't supported, it's not included in the list, so this value will never be
 `false`.

 You can access the supported constraints dictionary by calling
 `navigator.mediaDevices.getSupportedConstraints()`.

Syntax
------


```js
widthConstraintSupported = supportedConstraintsDictionary.width
```

### Value

 This property is present in the dictionary (and its value is always `true`)
 if the user agent supports the `width` constraint. If the property isn't
 present, this property is missing from the supported constraints dictionary, and you'll
 get `undefined` if you try to look at its value.

Example
-------
```

<div id="result"></div>
```


```
#result {
  font:
    14px "Arial",
    sans-serif;
}
```



```js
const result = document.getElementById("result");
const supported = navigator.mediaDevices.getSupportedConstraints().width;
result.textContent = supported ? "Supported!" : "Not supported!";
```

### Result

Specifications
--------------

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksupportedconstraints-width |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Media Capture and Streams API
* `MediaDevices.getSupportedConstraints()`
* `MediaTrackSupportedConstraints`
* `MediaStreamTrack`
MediaTrackSupportedConstraints: groupId property
================================================

 The `MediaTrackSupportedConstraints` dictionary's
 **`groupId`** property is a read-only Boolean value which is
 present (and set to `true`) in the object returned by
 `MediaDevices.getSupportedConstraints()` if and only if the
 user agent supports the `groupId` constraint. If the
 constraint isn't supported, it's not included in the list, so this value will never be
 `false`.

 You can access the supported constraints dictionary by calling
 `navigator.mediaDevices.getSupportedConstraints()`.

Value
-----

 This property is present in the dictionary (and its value is always `true`)
 if the user agent supports the `groupId` constraint. If the property isn't
 present, this property is missing from the supported constraints dictionary, and you'll
 get `undefined` if you try to look at its value.

Examples
--------
```

<div id="result"></div>
```


```
#result {
  font:
    14px "Arial",
    sans-serif;
}
```



```js
const result = document.getElementById("result");
const supported = navigator.mediaDevices.getSupportedConstraints().groupId;
result.textContent = supported ? "Supported!" : "Not supported!";
```

### Result

Specifications
--------------

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksupportedconstraints-groupid |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Media Capture and Streams API
* `MediaDevices.getSupportedConstraints()`
* `MediaTrackSupportedConstraints`
* `MediaStreamTrack`
MediaTrackSupportedConstraints: height property
===============================================

 The `MediaTrackSupportedConstraints` dictionary's
 **`height`** property is a read-only Boolean value which is
 present (and set to `true`) in the object returned by
 `MediaDevices.getSupportedConstraints()` if and only if the
 user agent supports the `height` constraint. If the
 constraint isn't supported, it's not included in the list, so this value will never be
 `false`.

 You can access the supported constraints dictionary by calling
 `navigator.mediaDevices.getSupportedConstraints()`.

Value
-----

 This property is present in the dictionary (and its value is always `true`)
 if the user agent supports the `height` constraint. If the property isn't
 present, this property is missing from the supported constraints dictionary, and you'll
 get `undefined` if you try to look at its value.

Examples
--------
```

<div id="result"></div>
```


```
#result {
  font:
    14px "Arial",
    sans-serif;
}
```



```js
const result = document.getElementById("result");
const supported = navigator.mediaDevices.getSupportedConstraints().height;
result.textContent = supported ? "Supported!" : "Not supported!";
```

### Result

Specifications
--------------

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksupportedconstraints-height |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Media Capture and Streams API
* `MediaDevices.getSupportedConstraints()`
* `MediaTrackSupportedConstraints`
* `MediaStreamTrack`
MediaTrackSupportedConstraints: noiseSuppression property
=========================================================

 The `MediaTrackSupportedConstraints` dictionary's
 **`noiseSuppression`** property is a read-only Boolean value
 which is present (and set to `true`) in the object returned by
 `MediaDevices.getSupportedConstraints()` if and only if the
 user agent supports the **`noiseSuppression`**
 constraint. If the constraint isn't supported, it's not included in the list, so this
 value will never be `false`.

 You can access the supported constraints dictionary by calling
 `navigator.mediaDevices.getSupportedConstraints()`.

 The `noiseSuppression` constraint indicates whether or not the browser
 offers the ability to automatically control the gain (volume) on media tracks; this
 obviously is contingent on whether or not the individual device supports automatic gain
 control as well.

Value
-----

 This property is present in the dictionary (and its value is always `true`)
 if the user agent supports the `noiseSuppression` constraint (and therefore
 supports noise suppression on audio tracks). If the property isn't present, this
 property is missing from the supported constraints dictionary, and you'll get
 `undefined` if you try to look at its value.

Examples
--------

 This example displays whether or not your browser supports the
 `noiseSuppression` constraint.
```

<div id="result"></div>
```


```
#result {
  font:
    14px "Arial",
    sans-serif;
}
```



```js
const result = document.getElementById("result");
const supported =
  navigator.mediaDevices.getSupportedConstraints().noiseSuppression;
result.textContent = supported ? "Supported!" : "Not supported!";
```

### Result

Specifications
--------------

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksupportedconstraints-noisesuppression |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Media Capture and Streams API
* `MediaDevices.getSupportedConstraints()`
* `MediaTrackSupportedConstraints`
* `MediaStreamTrack`
MediaTrackSupportedConstraints: sampleRate property
===================================================

 The `MediaTrackSupportedConstraints` dictionary's
 **`sampleRate`** property is a read-only Boolean value which is
 present (and set to `true`) in the object returned by
 `MediaDevices.getSupportedConstraints()` if and only if the
 user agent supports the `sampleRate` constraint. If the
 constraint isn't supported, it's not included in the list, so this value will never be
 `false`.

 You can access the supported constraints dictionary by calling
 `navigator.mediaDevices.getSupportedConstraints()`.

Value
-----

 This property is present in the dictionary (and its value is always `true`)
 if the user agent supports the `sampleRate` constraint. If the property isn't
 present, this property is missing from the supported constraints dictionary, and you'll
 get `undefined` if you try to look at its value.

Examples
--------
```

<div id="result"></div>
```


```
#result {
  font:
    14px "Arial",
    sans-serif;
}
```



```js
const result = document.getElementById("result");
const supported = navigator.mediaDevices.getSupportedConstraints().sampleRate;
result.textContent = supported ? "Supported!" : "Not supported!";
```

### Result

Specifications
--------------

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksupportedconstraints-samplerate |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Media Capture and Streams API
* `MediaDevices.getSupportedConstraints()`
* `MediaTrackSupportedConstraints`
* `MediaStreamTrack`
MediaTrackSupportedConstraints: autoGainControl property
========================================================

 The `MediaTrackSupportedConstraints` dictionary's **`autoGainControl`** property is a read-only Boolean value which is present (and set to `true`) in the object returned by `MediaDevices.getSupportedConstraints()` if and only if the user agent supports the **`autoGainControl`** constraint.
 If the constraint isn't supported, it's not included in the list, so this value will never be `false`.

You can access the supported constraints dictionary by calling `navigator.mediaDevices.getSupportedConstraints()`.

The `autoGainControl` constraint indicates whether or not the browser offers the ability to automatically control the gain (volume) on media tracks; this obviously is contingent on whether or not the individual device supports automatic gain control as well; it's typically a feature provided by microphones.

Value
-----

 This property is present in the dictionary (and its value is always `true`) if the user agent supports the `autoGainControl` constraint.
 If the property isn't present, this property is missing from the supported constraints dictionary, and you'll get `undefined` if you try to look at its value.

Examples
--------

This example displays whether or not your browser supports the `autoGainControl` constraint.
```

<div id="result"></div>
```


```
#result {
  font:
    14px "Arial",
    sans-serif;
}
```



```js
const result = document.getElementById("result");
const supported =
  navigator.mediaDevices.getSupportedConstraints().autoGainControl;
result.textContent = supported ? "Supported!" : "Not supported!";
```

### Result

Specifications
--------------

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksupportedconstraints-autogaincontrol |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Media Capture and Streams API
* `MediaDevices.getSupportedConstraints()`
* `MediaTrackSupportedConstraints`
* `MediaStreamTrack`
MediaTrackSupportedConstraints: echoCancellation property
=========================================================

 The `MediaTrackSupportedConstraints` dictionary's
 **`echoCancellation`** property is a read-only Boolean value
 which is present (and set to `true`) in the object returned by
 `MediaDevices.getSupportedConstraints()` if and only if the
 user agent supports the `echoCancellation` constraint. If the
 constraint isn't supported, it's not included in the list, so this value will never be
 `false`.

 You can access the supported constraints dictionary by calling
 `navigator.mediaDevices.getSupportedConstraints()`.

Value
-----

 This property is present in the dictionary (and its value is always `true`)
 if the user agent supports the `echoCancellation` constraint. If the property
 isn't present, this property is missing from the supported constraints dictionary, and
 you'll get `undefined` if you try to look at its value.

Examples
--------
```

<div id="result"></div>
```


```
#result {
  font:
    14px "Arial",
    sans-serif;
}
```



```js
const result = document.getElementById("result");
const supported =
  navigator.mediaDevices.getSupportedConstraints().echoCancellation;
result.textContent = supported ? "Supported!" : "Not supported!";
```

### Result

Specifications
--------------

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksupportedconstraints-echocancellation |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Media Capture and Streams API
* `MediaDevices.getSupportedConstraints()`
* `MediaTrackSupportedConstraints`
* `MediaStreamTrack`
MediaTrackSupportedConstraints: channelCount property
=====================================================

 The `MediaTrackSupportedConstraints` dictionary's
 **`channelCount`** property is a read-only Boolean value which
 is present (and set to `true`) in the object returned by
 `MediaDevices.getSupportedConstraints()` if and only if the
 user agent supports the `channelCount` constraint. If the
 constraint isn't supported, it's not included in the list, so this value will never be
 `false`.

 You can access the supported constraints dictionary by calling
 `navigator.mediaDevices.getSupportedConstraints()`.

Value
-----

 This property is present in the dictionary (and its value is always `true`)
 if the user agent supports the `channelCount` constraint. If the property
 isn't present, this property is missing from the supported constraints dictionary, and
 you'll get `undefined` if you try to look at its value.

Examples
--------
```

<div id="result"></div>
```


```
#result {
  font:
    14px "Arial",
    sans-serif;
}
```



```js
const result = document.getElementById("result");
const supported = navigator.mediaDevices.getSupportedConstraints().channelCount;
result.textContent = supported ? "Supported!" : "Not supported!";
```

### Result

Specifications
--------------

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksupportedconstraints-channelcount |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Media Capture and Streams API
* `MediaDevices.getSupportedConstraints()`
* `MediaTrackSupportedConstraints`
* `MediaStreamTrack`
MediaTrackSupportedConstraints: sampleSize property
===================================================

 The `MediaTrackSupportedConstraints` dictionary's
 **`sampleSize`** property is a read-only Boolean value which is
 present (and set to `true`) in the object returned by
 `MediaDevices.getSupportedConstraints()` if and only if the
 user agent supports the `sampleSize` constraint. If the
 constraint isn't supported, it's not included in the list, so this value will never be
 `false`.

 You can access the supported constraints dictionary by calling
 `navigator.mediaDevices.getSupportedConstraints()`.

Value
-----

 This property is present in the dictionary (and its value is always `true`)
 if the user agent supports the `sampleSize` constraint. If the property isn't
 present, this property is missing from the supported constraints dictionary, and you'll
 get `undefined` if you try to look at its value.

Examples
--------
```

<div id="result"></div>
```


```
#result {
  font:
    14px "Arial",
    sans-serif;
}
```



```js
const result = document.getElementById("result");
const supported = navigator.mediaDevices.getSupportedConstraints().sampleSize;
result.textContent = supported ? "Supported!" : "Not supported!";
```

### Result

Specifications
--------------

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksupportedconstraints-samplesize |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Media Capture and Streams API
* `MediaDevices.getSupportedConstraints()`
* `MediaTrackSupportedConstraints`
* `MediaStreamTrack`
MediaTrackSupportedConstraints: facingMode property
===================================================

 The `MediaTrackSupportedConstraints` dictionary's
 **`facingMode`** property is a read-only Boolean value which is
 present (and set to `true`) in the object returned by
 `MediaDevices.getSupportedConstraints()` if and only if the
 user agent supports the `facingMode` constraint. If the
 constraint isn't supported, it's not included in the list, so this value will never be
 `false`.

 You can access the supported constraints dictionary by calling
 `navigator.mediaDevices.getSupportedConstraints()`.

Value
-----

 This property is present in the dictionary (and its value is always `true`)
 if the user agent supports the `facingMode` constraint. If the property isn't
 present, this property is missing from the supported constraints dictionary, and you'll
 get `undefined` if you try to look at its value.

Examples
--------
```

<div id="result"></div>
```


```
#result {
  font:
    14px "Arial",
    sans-serif;
}
```



```js
const result = document.getElementById("result");
const supported = navigator.mediaDevices.getSupportedConstraints().facingMode;
result.textContent = supported ? "Supported!" : "Not supported!";
```

### Result

Specifications
--------------

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksupportedconstraints-facingmode |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Media Capture and Streams API
* `MediaDevices.getSupportedConstraints()`
* `MediaTrackSupportedConstraints`
* `MediaStreamTrack`
MediaTrackSupportedConstraints: frameRate property
==================================================

 The `MediaTrackSupportedConstraints` dictionary's **`frameRate`** property is a read-only Boolean value which is
 present (and set to `true`) in the object returned by `MediaDevices.getSupportedConstraints()` if and only if the user agent supports the `frameRate` constraint.

If the constraint isn't supported, it's not included in the list, so this value will never be `false`.

 The `frameRate` constraint can be used to establish acceptable upper and lower bounds on the video frame rate for a new video track, or to specify an exact frame rate that must be provided for the request to succeed.
 Checking the value of this property lets you determine if the user agent allows constraining the video track configuration by frame rate. See the example to see how this can be used.

Value
-----

 This property is present in the dictionary if the user agent supports the `frameRate` constraint.
 If the property isn't present, the user agent doesn't allow specifying limits on the frame rate for video tracks.

**Note:** If this property is present, its value is always `true`.

Examples
--------

This simple example looks to see if your browser supports constraining the frame rate when requesting video tracks.

### JavaScript


```js
const result = document.getElementById("result");
const supported = navigator.mediaDevices.getSupportedConstraints().frameRate;
result.textContent = supported ? "Supported!" : "Not supported!";
```

### HTML


```html
<div id="result"></div>
```

### CSS


```css
#result {
  font:
    14px "Arial",
    sans-serif;
}
```

### Result

The output, showing if your browser supports the `frameRate` constraint, is:

 While this example is trivial, you can replace the simple output of "Supported" vs.
 "Not supported" with code to provide alternative methods for presenting the audiovisual information you want to share with the user or otherwise work with.

Specifications
--------------

| Specification |
| --- |
| Media Capture and Streams # dom-mediatracksupportedconstraints-framerate |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Media Capture and Streams API
* `MediaDevices.getSupportedConstraints()`
* `MediaTrackSupportedConstraints`
* `MediaStreamTrack`