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 Stream) 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 'getCapabilities()' in that specification.
Candidate Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
getCapabilitiesChrome Full support 66Edge Full support 12Firefox No support NoIE No support NoOpera Full support 53Safari Full support YesWebView Android Full support 66Chrome Android Full support 66Firefox Android No support NoOpera Android Full support 47Safari iOS Full support YesSamsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support

Document Tags and Contributors

Contributors to this page: mdnwebdocs-bot, sideshowbarker, fscholz, samdutton, Sheppy
Last updated by: mdnwebdocs-bot,