MediaTrackConstraints: autoGainControl property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
TheMediaTrackConstraints dictionary'sautoGainControl property is aConstrainBoolean describing the requested or mandatory constraints placedupon the value of theautoGainControl constrainable property.
If needed, you can determine whether or not this constraint is supported by checkingthe value ofMediaTrackSupportedConstraints.autoGainControl as returnedby a call toMediaDevices.getSupportedConstraints(). However, typicallythis is unnecessary since browsers will ignore any constraints they're unfamiliar with.
Automatic gain control is typically a feature provided by microphones, although it canbe provided by other input sources as well.
In this article
Value
If this value is a simpletrue orfalse, the user agent willattempt to obtain media with automatic gain control enabled or disabled as specified, ifpossible, but will not fail if this can't be done. If, instead, the value is given as anobject with anexact field, that field's Boolean value indicates a requiredsetting for the automatic gain control feature; if it can't be met, then the requestwill result in an error.
Examples
See theConstraint exerciser example.
Specifications
| Specification |
|---|
| Media Capture and Streams> # dom-mediatrackconstraintset-autogaincontrol> |