MediaTrackSettings extension type

The MediaTrackSettings dictionary is used to return the current values configured for each of a MediaStreamTrack's settings. These values will adhere as closely as possible to any constraints previously described using a MediaTrackConstraints object and set using MediaStreamTrack.applyConstraints, and will adhere to the default constraints for any properties whose constraints haven't been changed, or whose customized constraints couldn't be matched.

To learn more about how constraints and settings work, see Capabilities, constraints, and settings.


API documentation sourced from MDN Web Docs.

on
Implemented types
Available extensions

Constructors

MediaTrackSettings({int width, int height, num aspectRatio, num frameRate, String facingMode, String resizeMode, int sampleRate, int sampleSize, bool echoCancellation, bool autoGainControl, bool noiseSuppression, num latency, int channelCount, String deviceId, String groupId, String whiteBalanceMode, String exposureMode, String focusMode, JSArray<Point2D> pointsOfInterest, num exposureCompensation, num exposureTime, num colorTemperature, num iso, num brightness, num contrast, num saturation, num sharpness, num focusDistance, num pan, num tilt, num zoom, bool torch, String displaySurface, bool logicalSurface, String cursor, bool restrictOwnAudio, bool suppressLocalAudioPlayback})
factory

Properties

aspectRatio double
The MediaTrackSettings dictionary's aspectRatio property is a double-precision floating-point number indicating the of the MediaStreamTrack as currently configured. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.aspectRatio property you provided when calling either MediaDevices.getUserMedia or MediaStreamTrack.applyConstraints.
getter/setter pair
autoGainControl bool
The MediaTrackSettings dictionary's autoGainControl property is a Boolean value whose value indicates whether or not automatic gain control (AGC) is enabled on an audio track. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.autoGainControl property you provided when calling either MediaDevices.getUserMedia or MediaStreamTrack.applyConstraints.
getter/setter pair
brightness double
getter/setter pair
channelCount int
The MediaTrackSettings dictionary's channelCount property is an integer indicating how many audio channels the MediaStreamTrack is currently configured to have. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.channelCount property you provided when calling either MediaDevices.getUserMedia or MediaStreamTrack.applyConstraints.
getter/setter pair
colorTemperature double
getter/setter pair
contrast double
getter/setter pair
cursor String
The MediaTrackSettings dictionary's cursor property indicates whether or not the cursor should be captured as part of the video track included in the MediaStream returned by MediaDevices.getDisplayMedia.
getter/setter pair
deviceId String
The MediaTrackSettings dictionary's deviceId property is a string which uniquely identifies the source for the corresponding MediaStreamTrack for the origin corresponding to the browsing session. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.deviceId property you provided when calling either MediaDevices.getUserMedia.
getter/setter pair
displaySurface String
The MediaTrackSettings dictionary's displaySurface property indicates the type of display surface being captured.
getter/setter pair
echoCancellation bool
The MediaTrackSettings dictionary's echoCancellation property is a Boolean value whose value indicates whether or not echo cancellation is enabled on an audio track. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.echoCancellation property you provided when calling either MediaDevices.getUserMedia or MediaStreamTrack.applyConstraints.
getter/setter pair
exposureCompensation double
getter/setter pair
exposureMode String
getter/setter pair
exposureTime double
getter/setter pair
facingMode String
The MediaTrackSettings dictionary's facingMode property is a string indicating the direction in which the camera producing the video track represented by the MediaStreamTrack is currently facing. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.facingMode property you provided when calling either MediaDevices.getUserMedia or MediaStreamTrack.applyConstraints.
getter/setter pair
focusDistance double
getter/setter pair
focusMode String
getter/setter pair
frameRate double
The MediaTrackSettings dictionary's frameRate property is a double-precision floating-point number indicating the frame rate, in frames per second, of the MediaStreamTrack as currently configured. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.frameRate property you provided when calling either MediaDevices.getUserMedia or MediaStreamTrack.applyConstraints.
getter/setter pair
groupId String
The MediaTrackSettings dictionary's groupId property is a browsing-session unique string which identifies the group of devices which includes the source for the MediaStreamTrack. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.groupId property you provided when calling either MediaDevices.getUserMedia.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
height int
The MediaTrackSettings dictionary's height property is an integer indicating the number of pixels tall MediaStreamTrack is currently configured to be. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.height property you provided when calling either MediaDevices.getUserMedia or MediaStreamTrack.applyConstraints.
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 double
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 double
The MediaTrackSettings dictionary's latency property is a double-precision floating-point number indicating the estimated latency (specified in seconds) of the MediaStreamTrack as currently configured. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.latency property you provided when calling either MediaDevices.getUserMedia or MediaStreamTrack.applyConstraints.
getter/setter pair
logicalSurface bool
The MediaTrackSettings dictionary's logicalSurface property indicates whether or not the display area being captured is a logical surface. Logical surfaces are those which are not necessarily entirely onscreen, or may even be off-screen, such as windows' backing buffers (where only part of the buffer is visible without scrolling the containing window) and offscreen rendering contexts.
getter/setter pair
noiseSuppression bool
The MediaTrackSettings dictionary's noiseSuppression property is a Boolean value whose value indicates whether or not noise suppression technology is enabled on an audio track. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.noiseSuppression property you provided when calling either MediaDevices.getUserMedia or MediaStreamTrack.applyConstraints.
getter/setter pair
not JSBoolean

Available on JSAny?, provided by the JSAnyOperatorExtension extension

The result of !this in JavaScript.
no setter
pan double
getter/setter pair
pointsOfInterest JSArray<Point2D>
getter/setter pair
resizeMode String
getter/setter pair
restrictOwnAudio bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sampleRate int
The MediaTrackSettings dictionary's sampleRate property is an integer indicating how many audio samples per second the MediaStreamTrack is currently configured for. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.sampleRate property you provided when calling either MediaDevices.getUserMedia or MediaStreamTrack.applyConstraints.
getter/setter pair
sampleSize int
The MediaTrackSettings dictionary's sampleSize property is an integer indicating the linear sample size (in bits per sample) the MediaStreamTrack is currently configured for. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.sampleSize property you provided when calling either MediaDevices.getUserMedia or MediaStreamTrack.applyConstraints.
getter/setter pair
saturation double
getter/setter pair
sharpness double
getter/setter pair
suppressLocalAudioPlayback bool
The MediaTrackSettings dictionary's suppressLocalAudioPlayback property controls whether the audio playing in a tab will continue to be played out of a user's local speakers when the tab is captured.
getter/setter pair
tilt double
getter/setter pair
torch bool
getter/setter pair
whiteBalanceMode String
getter/setter pair
width int
The MediaTrackSettings dictionary's width property is an integer indicating the number of pixels wide MediaStreamTrack is currently configured to be. This lets you determine what value was selected to comply with your specified constraints for this property's value as described in the MediaTrackConstraints.width property you provided when calling either MediaDevices.getUserMedia or MediaStreamTrack.applyConstraints.
getter/setter pair
zoom double
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.