MediaTrackSupportedConstraints extension type
The MediaTrackSupportedConstraints
dictionary establishes the list of
constrainable properties recognized by the or browser in its implementation
of the MediaStreamTrack object. An object conforming to
MediaTrackSupportedConstraints
is returned by
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 MediaTrackConstraints dictionary.
To learn more about how constraints work, see Capabilities, constraints, and settings.
API documentation sourced from MDN Web Docs.
- on
- Implemented types
- Available extensions
Constructors
- MediaTrackSupportedConstraints({bool width, bool height, bool aspectRatio, bool frameRate, bool facingMode, bool resizeMode, bool sampleRate, bool sampleSize, bool echoCancellation, bool autoGainControl, bool noiseSuppression, bool latency, bool channelCount, bool deviceId, bool groupId, bool whiteBalanceMode, bool exposureMode, bool focusMode, bool pointsOfInterest, bool exposureCompensation, bool exposureTime, bool colorTemperature, bool iso, bool brightness, bool contrast, bool pan, bool saturation, bool sharpness, bool focusDistance, bool tilt, bool zoom, bool torch, bool displaySurface, bool logicalSurface, bool cursor, bool restrictOwnAudio, bool suppressLocalAudioPlayback})
-
factory
Properties
- aspectRatio ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
aspectRatio
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports theaspectRatio
constraint. If the constraint isn't supported, it's not included in the list, so this value will never befalse
.getter/setter pair - autoGainControl ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
autoGainControl
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports theautoGainControl
constraint. If the constraint isn't supported, it's not included in the list, so this value will never befalse
.getter/setter pair - brightness ↔ bool
-
getter/setter pair
- channelCount ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
channelCount
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports thechannelCount
constraint. If the constraint isn't supported, it's not included in the list, so this value will never befalse
.getter/setter pair - colorTemperature ↔ bool
-
getter/setter pair
- contrast ↔ bool
-
getter/setter pair
- cursor ↔ bool
-
getter/setter pair
- deviceId ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
deviceId
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports thedeviceId
constraint. If the constraint isn't supported, it's not included in the list, so this value will never befalse
.getter/setter pair - displaySurface ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
displaySurface
property indicates whether or not the MediaTrackConstraints.displaySurface constraint is supported by the user agent and the device on which the content is being used.getter/setter pair - echoCancellation ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
echoCancellation
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports theechoCancellation
constraint. If the constraint isn't supported, it's not included in the list, so this value will never befalse
.getter/setter pair - exposureCompensation ↔ bool
-
getter/setter pair
- exposureMode ↔ bool
-
getter/setter pair
- exposureTime ↔ bool
-
getter/setter pair
- facingMode ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
facingMode
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports thefacingMode
constraint. If the constraint isn't supported, it's not included in the list, so this value will never befalse
.getter/setter pair - focusDistance ↔ bool
-
getter/setter pair
- focusMode ↔ bool
-
getter/setter pair
- frameRate ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
frameRate
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports the MediaTrackConstraints.frameRate constraint.getter/setter pair - groupId ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
groupId
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports thegroupId
constraint. If the constraint isn't supported, it's not included in the list, so this value will never befalse
.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- height ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
height
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports theheight
constraint. If the constraint isn't supported, it's not included in the list, so this value will never befalse
.getter/setter pair - iso ↔ bool
-
getter/setter pair
- latency ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
latency
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports thelatency
constraint. If the constraint isn't supported, it's not included in the list, so this value will never befalse
.getter/setter pair - logicalSurface ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
logicalSurface
property indicates whether or not the MediaTrackConstraints.logicalSurface constraint is supported by the user agent and the device on which the content is being used.getter/setter pair - noiseSuppression ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
noiseSuppression
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports thenoiseSuppression
constraint. If the constraint isn't supported, it's not included in the list, so this value will never befalse
.getter/setter pair - pan ↔ bool
-
getter/setter pair
- pointsOfInterest ↔ bool
-
getter/setter pair
- resizeMode ↔ bool
-
getter/setter pair
- restrictOwnAudio ↔ bool
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sampleRate ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
sampleRate
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports thesampleRate
constraint. If the constraint isn't supported, it's not included in the list, so this value will never befalse
.getter/setter pair - sampleSize ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
sampleSize
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports thesampleSize
constraint. If the constraint isn't supported, it's not included in the list, so this value will never befalse
.getter/setter pair - saturation ↔ bool
-
getter/setter pair
-
getter/setter pair
- suppressLocalAudioPlayback ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
suppressLocalAudioPlayback
property indicates whether or not the MediaTrackConstraints.suppressLocalAudioPlayback constraint is supported by the user agent and the device on which the content is being used.getter/setter pair - tilt ↔ bool
-
getter/setter pair
- torch ↔ bool
-
getter/setter pair
- whiteBalanceMode ↔ bool
-
getter/setter pair
- width ↔ bool
-
The MediaTrackSupportedConstraints dictionary's
width
property is a read-only Boolean value which is present (and set totrue
) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports thewidth
constraint. If the constraint isn't supported, it's not included in the list, so this value will never befalse
.getter/setter pair - zoom ↔ bool
-
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited