getSettings() 方法在 MediaStreamTrack interface returns a MediaTrackSettings object containing the current values of each of the constrainable properties for the current MediaStreamTrack . Capabilities, constraints, and settings for details on how to work with constrainable properties.

句法

const settings = track.getSettings()
					

返回

A MediaTrackSettings object describing the current configuration of the track's constrainable properties.

注意: The returned object identifies the current values of every constrainable property, including those which are platform defaults rather than having been expressly set by the site's code. To instead fetch the most-recently established constraints for the track's properties, as specified by the site's code, use getConstraints() .

规范

规范 状态 注释
媒体捕获和流
The definition of 'getSettings()' in that specification.
候选推荐 初始定义。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
getSettings Chrome 61 Edge 12 Firefox 50 IE No Opera 48 Safari Yes WebView Android 61 Chrome Android 61 Firefox Android 50 Opera Android 45 Safari iOS 11 Samsung Internet Android 8.0

图例

完整支持

完整支持

不支持

不支持

元数据

  • 最后修改: