[mediacapture-main] Pull Request: Once you implement a MediaTrackSupportedConstraints member, you support it

jan-ivar has just submitted a new pull request for 
https://github.com/w3c/mediacapture-main:

== Once you implement a MediaTrackSupportedConstraints member, you 
support it ==
The [spec 
says](http://w3c.github.io/mediacapture-main/getusermedia.html#widl-MediaDevices-getSupportedConstraints-MediaTrackSupportedConstraints):

"A supported constrainable property MUST be represented by a member 
whose name is the constraint name and *whose value is true*. Any 
constrainable properties not supported by the User Agent MUST *not be 
present* in the returned dictionary."

In other words, members are always true. This optimizes the WebIDL to 
match.

I was originally against the breakdown of discrete dictionaries here, 
because of the code maintenance burden (more places to forget to 
update for each new constraint implemented), but I like that this at 
least can be managed entirely in the WebIDL definition file (and 
WebIDL binding code) without needing to define members *and* 
remembering to add manual code somewhere as well to set values to 
true.

See https://github.com/w3c/mediacapture-main/pull/209

Received on Thursday, 2 July 2015 16:53:06 UTC