web api interface
MediaTrackSupportedConstraints
The MediaTrackSupportedConstraints dictionary establishes the list of constrainable properties recognized by the user agent or browser in its implementation of the MediaStreamTrack object. An object conforming to MediaTrackSupportedConstraints is returned by 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 MediaTrackConstraints dictionary.
To learn more about how constraints work, see Capabilities, constraints, and settings.
Instance properties
Some combination—but not necessarily all—of the following properties will exist on the object.
aspectRatio- : A Boolean that is
trueif theaspectRatioconstraint is supported in the current environment.
- : A Boolean that is
autoGainControl- : A Boolean that is
trueif theautoGainControlconstraint is supported in the current environment.
- : A Boolean that is
channelCount- : A Boolean that is
trueif thechannelCountconstraint is supported in the current environment.
- : A Boolean that is
deviceId- : A Boolean that is
trueif thedeviceIdconstraint is supported in the current environment.
- : A Boolean that is
echoCancellation- : A Boolean that is
trueif theechoCancellationconstraint is supported in the current environment.
- : A Boolean that is
facingMode- : A Boolean that is
trueif thefacingModeconstraint is supported in the current environment.
- : A Boolean that is
frameRate- : A Boolean that is
trueif theframeRateconstraint is supported in the current environment.
- : A Boolean that is
groupId- : A Boolean that is
trueif thegroupIdconstraint is supported in the current environment.
- : A Boolean that is
height- : A Boolean that is
trueif theheightconstraint is supported in the current environment.
- : A Boolean that is
latency- : A Boolean that is
trueif thelatencyconstraint is supported in the current environment.
- : A Boolean that is
noiseSuppression- : A Boolean that is
trueif thenoiseSuppressionconstraint is supported in the current environment.
- : A Boolean that is
restrictOwnAudio- : A Boolean that is
trueif therestrictOwnAudioconstraint is supported in the current environment.
- : A Boolean that is
resizeMode- : A Boolean that is
trueif theresizeModeconstraint is supported in the current environment.
- : A Boolean that is
sampleRate- : A Boolean that is
trueif thesampleRateconstraint is supported in the current environment.
- : A Boolean that is
sampleSize- : A Boolean that is
trueif thesampleSizeconstraint is supported in the current environment.
- : A Boolean that is
suppressLocalAudioPlayback- : A Boolean that is
trueif thesuppressLocalAudioPlaybackconstraint is supported in the current environment.
- : A Boolean that is
volumeDeprecated- : A Boolean that is
trueif thevolumeconstraint is supported in the current environment.
- : A Boolean that is
width- : A Boolean that is
trueif thewidthconstraint is supported in the current environment.
- : A Boolean that is
Instance properties specific to shared screen tracks
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:
displaySurface- : A Boolean that is
trueif thedisplaySurfaceconstraint is supported in the current environment.
- : A Boolean that is
logicalSurface- : A Boolean that is
trueif thelogicalSurfaceconstraint is supported in the current environment.
- : A Boolean that is