We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

MediaStreamTrack.getCapabilities()

The getCapabilities() method of the MediaStreamTrack interface returns a MediaTrackCapabilities object which specifies the values or range of values which each constrianable property, based upon the platform and user agent.

Once you know what the browser's capabilities are, your script can use applyConstraints() to ask for the track to be configured to match ideal or acceptable settings. See Capabilities and constraints in Media Capture and Streams API (Media Streams) for details on how to work with constrainable properties.

Syntax

var capabilities = MediaStreamTrack.getCapabilities();

Parameters

None.

Return value

MediaTrackCapabilities object which specifies the value or range of values which are supported for each of the user agent's supported constrainable properties.

Specifications

Specification Status Comment
Media Capture and Streams
The definition of 'getConstraints()' in that specification.
Candidate Recommendation Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support6612 No ?53 ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support6666 ? No53 ? No

Document Tags and Contributors

Contributors to this page: fscholz, samdutton, Sheppy
Last updated by: fscholz,