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

Re: WebIDL-compatible syntax compromise

From: Jan-Ivar Bruaroey <jib@mozilla.com>
Date: Fri, 25 Apr 2014 14:20:23 -0400
Message-ID: <535AA767.70608@mozilla.com>
To: Stefan Håkansson LK <stefan.lk.hakansson@ericsson.com>, Justin Uberti <juberti@google.com>, Steev James <steev.a.james@gmail.com>
CC: Dominique Hazael-Massieux <dom@w3.org>, Dan Burnett <dburnett@voxeo.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>
On 4/19/14 9:11 AM, Stefan Håkansson LK 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?

Would you be happier with this?

   {
     support: [ "width", "height" ],
     mandatory: { width: {min: 640}, height: {min: 480} },
     optional: [{width: 1280, height: 720}]
   }

i.e. make the "fail on lack of support" functionality discrete (and 
elective)?

.: Jan-Ivar :.
Received on Friday, 25 April 2014 18:20:52 UTC

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