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 to true) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports the aspectRatio constraint. If the constraint isn't supported, it's not included in the list, so this value will never be false.
getter/setter pair
autoGainControl bool
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 supports the autoGainControl constraint. If the constraint isn't supported, it's not included in the list, so this value will never be false.
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 to true) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports the channelCount constraint. If the constraint isn't supported, it's not included in the list, so this value will never be false.
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 to true) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports the deviceId constraint. If the constraint isn't supported, it's not included in the list, so this value will never be false.
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 to true) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports the echoCancellation constraint. If the constraint isn't supported, it's not included in the list, so this value will never be false.
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 to true) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports the facingMode constraint. If the constraint isn't supported, it's not included in the list, so this value will never be false.
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 to true) 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 to true) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports the groupId constraint. If the constraint isn't supported, it's not included in the list, so this value will never be false.
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 to true) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports the height constraint. If the constraint isn't supported, it's not included in the list, so this value will never be false.
getter/setter pair
isDefinedAndNotNull bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

no setter
isNull bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

Whether this value corresponds to JavaScript null.
no setter
iso bool
getter/setter pair
isTruthy JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of !!this in JavaScript.
no setter
isUndefined bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

Whether this value corresponds to JavaScript undefined.
no setter
isUndefinedOrNull bool

Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension

no setter
latency bool
The MediaTrackSupportedConstraints dictionary's latency 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 supports the latency constraint. If the constraint isn't supported, it's not included in the list, so this value will never be false.
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 to true) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports the noiseSuppression constraint. If the constraint isn't supported, it's not included in the list, so this value will never be false.
getter/setter pair
not JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of !this in JavaScript.
no setter
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 to true) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports the sampleRate constraint. If the constraint isn't supported, it's not included in the list, so this value will never be false.
getter/setter pair
sampleSize bool
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 supports the sampleSize constraint. If the constraint isn't supported, it's not included in the list, so this value will never be false.
getter/setter pair
saturation bool
getter/setter pair
sharpness bool
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 to true) in the object returned by MediaDevices.getSupportedConstraints if and only if the supports the width constraint. If the constraint isn't supported, it's not included in the list, so this value will never be false.
getter/setter pair
zoom bool
getter/setter pair

Methods

add(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this + any in JavaScript.
and(JSAny? any) JSAny?

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this && any in JavaScript.
callMethod<R extends JSAny?>(JSAny method, [JSAny? arg1, JSAny? arg2, JSAny? arg3, JSAny? arg4]) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Calls method on this JSObject with up to four arguments.
callMethodVarArgs<R extends JSAny?>(JSAny method, [List<JSAny?>? arguments]) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Calls method on this JSObject with a variable number of arguments.
dartify() Object?

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Converts a JavaScript value to the Dart equivalent if possible.
delete(JSAny property) JSBoolean

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Deletes the property with key property from this JSObject.
divide(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this / any in JavaScript.
equals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this == any in JavaScript.
exponentiate(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this ** any in JavaScript.
getProperty<R extends JSAny?>(JSAny property) → R

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

The value of the property key property of this JSObject.
greaterThan(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this > any in JavaScript.
greaterThanOrEqualTo(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this >= any in JavaScript.
has(String property) bool

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for hasProperty to check whether this JSObject contains the property key property, but takes and returns a Dart value.
hasProperty(JSAny property) JSBoolean

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Whether or not this JSObject contains the property key property.
instanceof(JSFunction constructor) bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this JSAny? is an instanceof constructor.
instanceOfString(String constructorName) bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this JSAny? is an instanceof the constructor that is defined by constructorName, which is looked up in the globalContext.
isA<T extends JSAny?>() bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether this JSAny? is an instance of the JavaScript type that is declared by T.
lessThan(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this < any in JavaScript.
lessThanOrEqualTo(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this <= any in JavaScript.
modulo(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this % any in JavaScript.
multiply(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this * any in JavaScript.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notEquals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this != any in JavaScript.
or(JSAny? any) JSAny?

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this || any in JavaScript.
setProperty(JSAny property, JSAny? value) → void

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Write the value of property key property of this JSObject.
strictEquals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this === any in JavaScript.
strictNotEquals(JSAny? any) JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this !== any in JavaScript.
subtract(JSAny? any) JSAny

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this - any in JavaScript.
toString() String
A string representation of this object.
inherited
typeofEquals(String typeString) bool

Available on JSAny?, provided by the JSAnyUtilityExtension extension

Whether the result of typeof on this JSAny? is typeString.
unsignedRightShift(JSAny? any) JSNumber

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of this >>> any in JavaScript.

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String property) JSAny?

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for getProperty to get the value of the property key property of this JSObject, but takes and returns a Dart value.
operator []=(String property, JSAny? value) → void

Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension

Shorthand helper for setProperty to write the value of the property key property of this JSObject, but takes a Dart value.