Web/API/MediaStreamTrack/getCapabilities

From Get docs


The getCapabilities() method of the MediaStreamTrack interface returns a MediaTrackCapabilities object which specifies the values or range of values which each constrainable 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, constraints, and settings for details on how to work with constrainable properties.

Syntax

const capabilities = track.getCapabilities()

Return value

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

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
getCapabilities Chrome

Full support 66

Edge

Full support 12

Firefox

No support No

IE

No support No

Opera

Full support 53

Safari

Full support Yes

WebView Android

Full support 66

Chrome Android

Full support 66

Firefox Android

No support No

Opera Android

Full support 47

Safari iOS

Full support Yes

Samsung Internet Android

Full support 9.0

Legend

Full support  
Full support
No support  
No support