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

Re: constraints vs attributes

From: Stefan Håkansson LK <stefan.lk.hakansson@ericsson.com>
Date: Thu, 14 Nov 2013 03:02:55 +0000
To: Jim Barnett <Jim.Barnett@genesyslab.com>, Jan-Ivar Bruaroey <jib@mozilla.com>, "public-webrtc@w3.org" <public-webrtc@w3.org>
Message-ID: <1447FA0C20ED5147A1AA0EF02890A64B1C3DB45E@ESESSMB209.ericsson.se>
On 14/11/13 00:37, Jim Barnett wrote:
> I agree that there are a legitimate questions about when to use
> Constraints vs dictionaries or other simpler structures.  We’ll have to
> go through them  case by case.

We said today that we must go through this, and that Constraints are 
probably not the right thing for most uses in relation to PeerConnection.

> -Jim
> *From:*Jan-Ivar Bruaroey [mailto:jib@mozilla.com]
> *Sent:* Wednesday, November 13, 2013 5:48 PM
> *To:* Jim Barnett; public-webrtc@w3.org
> *Subject:* Re: constraints vs attributes
> 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 Thursday, 14 November 2013 03:03:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:17:51 UTC