files/en-us/web/api/mediatracksupportedconstraints/index.md
{{APIRef("Media Capture and Streams")}}
The MediaTrackSupportedConstraints dictionary establishes the list of constrainable properties recognized by the {{Glossary("user agent")}} or browser in its implementation of the {{domxref("MediaStreamTrack")}} object. An object conforming to MediaTrackSupportedConstraints is returned by {{domxref("MediaDevices.getSupportedConstraints()")}}.
Because of the way interface definitions in WebIDL work, if a constraint is requested but not supported, no error will occur. Instead, the specified constraints will be applied, with any unrecognized constraints stripped from the request. That can lead to confusing and hard to debug errors, so be sure to use getSupportedConstraints() to retrieve this information before attempting to establish constraints if you need to know the difference between silently ignoring a constraint and a constraint being accepted.
An actual constraint set is described using an object based on the {{domxref("MediaTrackConstraints")}} dictionary.
To learn more about how constraints work, see Capabilities, constraints, and settings.
Some combination—but not necessarily all—of the following properties will exist on the object.
true if the aspectRatio constraint is supported in the current environment.true if the autoGainControl constraint is supported in the current environment.true if the channelCount constraint is supported in the current environment.true if the deviceId constraint is supported in the current environment.true if the echoCancellation constraint is supported in the current environment.true if the facingMode constraint is supported in the current environment.true if the frameRate constraint is supported in the current environment.true if the groupId constraint is supported in the current environment.true if the height constraint is supported in the current environment.true if the latency constraint is supported in the current environment.true if the noiseSuppression constraint is supported in the current environment.true if the {{domxref("MediaTrackConstraints.restrictOwnAudio", "restrictOwnAudio")}} constraint is supported in the current environment.true if the resizeMode constraint is supported in the current environment.true if the sampleRate constraint is supported in the current environment.true if the sampleSize constraint is supported in the current environment.true if the suppressLocalAudioPlayback constraint is supported in the current environment.true if the volume constraint is supported in the current environment.true if the width constraint is supported in the current environment.For tracks containing video sources from the user's screen, the following additional properties may be included, in addition to those available for video tracks:
true if the {{domxref("MediaTrackConstraints.displaySurface", "displaySurface")}} constraint is supported in the current environment.true if the {{domxref("MediaTrackConstraints.logicalSurface", "logicalSurface")}} constraint is supported in the current environment.{{Specifications}}