{{APIRef("Media Capture and Streams")}}
The ConstrainDOMStringParameters
dictionary is used to specify a constraint for a property whose value is a string. It allows you to specify one or more exact
string values from which one must be the parameter's value, or a set of ideal
values which should be used if possible.
Properties
exact
- Either a single {{domxref("DOMString")}} which must be the value of the property, or an array of
DOMString
objects one of which must be the property's value. If the property can't be set to one of the listed values, matching will fail. ideal
- Either a single {{domxref("DOMString")}} or an arrray of
DOMString
s specifying ideal values for the property. If possible, one of the listed values will be used, but if it's not possible, the user agent will use the closest possible match.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('Media Capture', '#idl-def-ConstrainDOMStringParameters', 'ConstrainDOMStringParameters')}} | {{Spec2('Media Capture')}} | Initial definition |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Microsoft Edge | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatGeckoDesktop(50)}} | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} | {{CompatUnknown}} |
Feature | Android | Android Webview | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | {{CompatUnknown}} | {{CompatVersionUnknown}} | {{CompatGeckoMobile(50)}} | {{CompatNo}} | {{CompatNo}} | {{CompatUnknown}} | {{CompatVersionUnknown}} |
See also
- Media Capture and Streams API
- Capabilities, constraints, and settings
- {{domxref("MediaTrackConstraints")}}
- {{domxref("MediaTrackCapabilities")}}
- {{domxref("MediaTrackSupportedConstraints")}}