W3C home > Mailing lists > Public > public-webrtc@w3.org > November 2013

constraints vs attributes

From: Jim Barnett <Jim.Barnett@genesyslab.com>
Date: Tue, 12 Nov 2013 07:38:59 +0000
To: "public-webrtc@w3.org" <public-webrtc@w3.org>
Message-ID: <57A15FAF9E58F841B2B1651FFE16D2811EC5EA@GENSJZMBX03.msg.int.genesyslab.com>
I think that the Constrainable interface is based on three largely orthogonal features that distinguish it from attributes:

1.       The application can query the set of legal values for the property.  This is useful when the set of values is non-obvious, particularly when the set of values can vary from device to device.  (Supported screen resolutions would be an example.)

2.       The application can request a range of values, allowing the UA to choose within that range.

3.       The UA may ignore the application's request for certain values if it cannot satisfy it (and this is not treated as an error)

I think that Constrainable is appropriate when any of these three conditions holds.  Attributes are suitable when:

1.       There is no need to query the set of legal values because all devices support the same ones.

2.       The app needs only to specify a specific value (or ranges don't make sense).

3.       The UA must accept the value the app specifies (as long as it matches the attribute's type).

So things with Boolean values should be attributes (this is the opposite of what I said on the call).  So should things whose values can be any string or any int.


-          Jim
Received on Tuesday, 12 November 2013 07:39:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:36 UTC