ConstrainDOMStringParameters would be good riddance

For numeric constraints, a single value represents an ideal target, 
whereas a collection of values (in the form of a range) represents a 
requirement.

Logically, why doesn't the same hold true for strings and enums?

In other words: For string and enum constraints, have a single value 
represent an ideal target, and have a collection of values (in the form 
of a sequence) represent a requirement?

E.g.

     { someEnumConstraint: "fourth" } // ideal
     { someEnumConstraint: [ "third", "fourth", "fifth"] // required

Unlike numeric constraints, we don't need keywords like "min" and "max":

     { someNumericConstraint: 4 } // ideal
     { someNumericConstraint: { min: 3, max: 5 } } // required

which means we don't need "ideal" and "exact" either, and can ax 
ConstrainDOMStringParameters [1]

Bonus: Enums no longer require per-type changes to the spec e.g. 
ConstrainVideoFacingModeParameters

Simpler.

.: Jan-Ivar :.

[1] 
http://w3c.github.io/mediacapture-main/getusermedia.html#idl-def-ConstrainDOMStringParameters

Received on Tuesday, 23 September 2014 17:47:47 UTC