W3cubDocs

/Web APIs

MediaStreamTrack: getCapabilities() method

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

js

getCapabilities()

Parameters

None.

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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
getCapabilities 59 12 No No 46 11 59 59 No 43 11 7.0

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/getCapabilities