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. |
候选推荐 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |
完整支持
不支持
MediaStreamTrack
applyConstraints()
clone()
getCapabilities()
getConstraints()
getSettings()
stop()
AudioStreamTrack
BlobEvent
CanvasCaptureMediaStream
ConstrainBoolean
ConstrainDOMString
ConstrainDouble
ConstrainLong
DoubleRange
HTMLCanvasElement.captureStream()
LongRange
MediaDevices
MediaStream
MediaStreamTrackEvent
MediaTrackCapabilities
MediaTrackConstraints
MediaTrackSettings
MediaTrackSupportedConstraints
Navigator.mediaDevices
NavigatorUserMedia
NavigatorUserMediaError
VideoStreamTrack
navigator.mediaDevices.getUserMedia()