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

Re: constraints vs attributes

From: Jan-Ivar Bruaroey <jib@mozilla.com>
Date: Wed, 13 Nov 2013 17:48:19 -0500
Message-ID: <528401B3.1000801@mozilla.com>
To: Jim Barnett <Jim.Barnett@genesyslab.com>, "public-webrtc@w3.org" <public-webrtc@w3.org>
On 11/13/13 4:00 PM, Jim Barnett wrote:
>
> Jan-Ivar,
>
> For my edification, can you explain how the use of a dictionary lets 
> you do the following:
>
> 1.Ask the device what range of framerates it supports?
>
> 2.Request that the device set a framerate between n and m frames per 
> second
>
> 3.Request the above, but allow the UA the choice of choosing another 
> framerate if it canít set it to something between n and m.
>

I'm not challenging the use of constraints with devices. I happen to 
think that's their ideal use.

I was challenging the use of constraints in other areas like 
PeerConnection and MediaTrackTransmissionController.

What I meant was a lot of the organizational benefits of constraints 
come from them being built on dictionaries, which are quite useful on 
their own as well, in new API cases where constraints may be overkill. 
For example, someone wanting a property to have a min/max range, could 
trivially define this in a webidl dictionary, without requiring a 
constrainable interface for that reason alone.

> -Jim
>
> P.S.  Perhaps thereís some terminological confusion here.  The 
> question asked was when to define something as a property inside the 
> Constrainable interface as opposed to an attribute.  The Constraint 
> structure is only one part of that interface.
>

It is quite possible we have some confusion. I though this was from the 
MediaTrackTransmissionController conversation, where I interpreted the 
need to be that we want to access a relatively simple set settings.

.: Jan-Ivar :.
Received on Wednesday, 13 November 2013 22:48:47 UTC

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