W3C home > Mailing lists > Public > public-media-capture@w3.org > April 2014

Re: WebIDL-compatible syntax compromise

From: Justin Uberti <juberti@google.com>
Date: Tue, 22 Apr 2014 16:28:19 -0700
Message-ID: <CAOJ7v-2JQFZcEX2qchU06QuvpRWZeNKj8rf+wch+FiUMubWUvg@mail.gmail.com>
To: Stefan HÃ¥kansson LK <stefan.lk.hakansson@ericsson.com>
Cc: Steev James <steev.a.james@gmail.com>, Dominique Hazael-Massieux <dom@w3.org>, Dan Burnett <dburnett@voxeo.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>
OK. With "ideal", I think we can live with this proposal. While not as
simple as I would like it to be, I see how it addresses the WebIDL and
fail-on-mandatory-constraints concerns, and it would allow the most common
uses of constraints to be done more succinctly then they can be expressed
today, including "want HD, but no less than VGA":

  {
    require: ["width", "height"],
    width: {min: 640, ideal: 1280 },
    height: {min: 480, ideal: 720 },
  }

My complexity concern revolves around "preferred", since I find the use of
this mechanism unintuitive. However, with "ideal", the need for this
functionality is reduced, hopefully to the point that typical use cases
need not concern themselves with it. (Is there is a current use case that
requires it?)

Anyway, I hope we can move ahead with this proposal, and I look forward to
the discussion of "ideal".





On Sat, Apr 19, 2014 at 6:11 AM, Stefan HÃ¥kansson LK <
stefan.lk.hakansson@ericsson.com> wrote:

>  On 18/04/14 20:54, Justin Uberti wrote:
>
> Been thinking about this a while. Overall, I understand the goals here but
> it still seems complicated to express the common use case of "please give
> me HD, but definitely no less than VGA". As I understand it, this would be
> done via:
>
>    {
>     require: ["width", "height"],
>     width: {min: 640},
>     height: {min: 480},
>     prefer: [{width: 1280, height: 720}]
>   }
>
>  which is OK, but I think this would be more understandable as
>
>    {
>     require: { width: {min: 640}, height: {min: 480} },
>     prefer: [{width: 1280, height: 720}]
>   }
>
> This is perhaps a little easier to understand, but the app designer _can_
> express "please give me HD, but definitely no less than VGA" with the
> syntax compromise developed by Dan, Jan-Ivar and Jim. I think that, along
> with implementers implementing support for it, is the most important thing.
> Besides, we've also said we'll consider "ideal" again once this part
> settles, which can make it more straightforward.
>
>
>  which alas, seems like the syntax we already have, e.g.
>
>   {
>     mandatory: { width: {min: 640}, height: {min: 480} },
>     optional: [{width: 1280, height: 720}]
>   }
>
>  What am I missing here?
>
>
> On Thu, Apr 3, 2014 at 5:09 AM, Steev James <steev.a.james@gmail.com>wrote:
>
>> "Preferred" seems to be good instead of advanced.
>>
>>
>> On Thu, Apr 3, 2014 at 1:10 PM, Dominique Hazael-Massieux <dom@w3.org>wrote:
>>
>>> On mar., 2014-04-01 at 21:17 -0400, Dan Burnett wrote:
>>> > At the teleconference last week we were tasked with finding a way to
>>> > adjust the current constraint syntax in the specification, without
>>> > loss of expressivity, into a syntax that was WebIDL-compatible.  We
>>> > may have done one better.
>>> >
>>> > We have found a workable compromise.
>>>
>>>  Thanks guys, this look quite good!
>>>
>>> My only comment is similar to one that others have made: I think
>>> "advanced" is not very descriptive; I'm thinking maybe
>>> "preferredProfiles" or something like that might be clearer. But I don't
>>> feel strongly at all about it, and I'm happy to leave this to the
>>> editors discretion as far as I am concerned.
>>>
>>> Dom
>>>
>>>
>>>
>>>
>>
>
>
Received on Tuesday, 22 April 2014 23:29:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:26 UTC