DoubleRange
dictionary is used to define a range of permitted double-precision floating-point values for a property, with either or both a maximum and minimum value specified. The
ConstrainDouble
dictionary is based on this, augmenting it to support exact and ideal values as well.
max
A floating-point value specifying the largest permissible value of the property it describes.
min
A floating-point value specifying the smallest permissible value of the property it describes.
指定
min
and/or and
max
值为
required
. If no match can be found that is within the given range, an error will occur.
| 规范 | 状态 | 注释 |
|---|---|---|
|
媒体捕获和流
The definition of 'DoubleRange' in that specification. |
候选推荐 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
DoubleRange
|
Chrome Yes | Edge ≤79 | Firefox 50 | IE 不支持 No | Opera 不支持 No | Safari ? | WebView Android Yes | Chrome Android Yes | Firefox Android 50 | Opera Android 不支持 No | Safari iOS ? | Samsung Internet Android Yes |
完整支持
不支持
兼容性未知
ConstrainDoubleRange
MediaTrackConstraints
MediaTrackCapabilities
MediaTrackSupportedConstraints
DoubleRange
AudioStreamTrack
BlobEvent
CanvasCaptureMediaStream
ConstrainBoolean
ConstrainDOMString
ConstrainDouble
ConstrainLong
HTMLCanvasElement.captureStream()
LongRange
MediaDevices
MediaStream
MediaStreamTrack
MediaStreamTrackEvent
MediaTrackCapabilities
MediaTrackConstraints
MediaTrackSettings
MediaTrackSupportedConstraints
Navigator.mediaDevices
NavigatorUserMedia
NavigatorUserMediaError
VideoStreamTrack
navigator.mediaDevices.getUserMedia()