Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. MediaTrackSupportedConstraints

MediaTrackSupportedConstraints

TheMediaTrackSupportedConstraints dictionary establishes the list of constrainable properties recognized by theuser agent or browser in its implementation of theMediaStreamTrack object. An object conforming toMediaTrackSupportedConstraints is returned byMediaDevices.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 usegetSupportedConstraints() 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 theMediaTrackConstraints dictionary.

To learn more about how constraints work, seeCapabilities, constraints, and settings.

Instance properties

Some combination—but not necessarily all—of the following properties will exist on the object.

aspectRatio

A Boolean that istrue if theaspectRatio constraint is supported in the current environment.

autoGainControl

A Boolean that istrue if theautoGainControl constraint is supported in the current environment.

channelCount

A Boolean that istrue if thechannelCount constraint is supported in the current environment.

deviceId

A Boolean that istrue if thedeviceId constraint is supported in the current environment.

echoCancellation

A Boolean that istrue if theechoCancellation constraint is supported in the current environment.

facingMode

A Boolean that istrue if thefacingMode constraint is supported in the current environment.

frameRate

A Boolean that istrue if theframeRate constraint is supported in the current environment.

groupId

A Boolean that istrue if thegroupId constraint is supported in the current environment.

height

A Boolean that istrue if theheight constraint is supported in the current environment.

latency

A Boolean that istrue if thelatency constraint is supported in the current environment.

noiseSuppression

A Boolean that istrue if thenoiseSuppression constraint is supported in the current environment.

restrictOwnAudio

A Boolean that istrue if therestrictOwnAudio constraint is supported in the current environment.

resizeMode

A Boolean that istrue if theresizeMode constraint is supported in the current environment.

sampleRate

A Boolean that istrue if thesampleRate constraint is supported in the current environment.

sampleSize

A Boolean that istrue if thesampleSize constraint is supported in the current environment.

suppressLocalAudioPlayback

A Boolean that istrue if thesuppressLocalAudioPlayback constraint is supported in the current environment.

volumeDeprecatedNon-standard

A Boolean that istrue if thevolume constraint is supported in the current environment.

width

A Boolean that istrue if thewidth constraint is supported in the current environment.

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 istrue if thedisplaySurface constraint is supported in the current environment.

logicalSurface

A Boolean that istrue if thelogicalSurface constraint is supported in the current environment.

Specifications

Specification
Media Capture and Streams
# media-track-supported-constraints

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp