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 - 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 JavaScriptnull
.no setter - iso ↔ bool
-
getter/setter pair
- isTruthy → JSBoolean
-
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of!!
in JavaScript.this
no setter - isUndefined → bool
-
Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension
Whether this value corresponds to JavaScriptundefined
.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 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 - not → JSBoolean
-
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of!
in JavaScript.this
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 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
-
add(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
+any
-
and(
JSAny? any) → JSAny? -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
&&any
-
callMethod<
R extends JSAny?> (JSAny method, [JSAny? arg1, JSAny? arg2, JSAny? arg3, JSAny? arg4]) → R -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Callsmethod
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
Callsmethod
on this JSObject with a variable number ofarguments
. -
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 keyproperty
from this JSObject. -
divide(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
/any
-
equals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
==any
-
exponentiate(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
**any
-
getProperty<
R extends JSAny?> (JSAny property) → R -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
The value of the property keyproperty
of this JSObject. -
greaterThan(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
>any
-
greaterThanOrEqualTo(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
>=any
-
has(
String property) → bool -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Shorthand helper for hasProperty to check whether this JSObject contains the property keyproperty
, 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 keyproperty
. -
instanceof(
JSFunction constructor) → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether thisJSAny?
is aninstanceof
constructor
. -
instanceOfString(
String constructorName) → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether thisJSAny?
is aninstanceof
the constructor that is defined byconstructorName
, which is looked up in the globalContext. -
isA<
T extends JSAny?> () → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether thisJSAny?
is an instance of the JavaScript type that is declared byT
. -
lessThan(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
<any
-
lessThanOrEqualTo(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
<=any
-
modulo(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
%any
-
multiply(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
*any
-
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
in JavaScript.this
!=any
-
or(
JSAny? any) → JSAny? -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
||any
-
setProperty(
JSAny property, JSAny? value) → void -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Write thevalue
of property keyproperty
of this JSObject. -
strictEquals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
===any
-
strictNotEquals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
!==any
-
subtract(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
-any
-
toString(
) → String -
A string representation of this object.
inherited
-
typeofEquals(
String typeString) → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether the result oftypeof
on thisJSAny?
istypeString
. -
unsignedRightShift(
JSAny? any) → JSNumber -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of
in JavaScript.this
>>>any
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 keyproperty
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 thevalue
of the property keyproperty
of this JSObject, but takes a Dart value.