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

Re: WebIDL-compatible syntax compromise

From: Harald Alvestrand <harald@alvestrand.no>
Date: Wed, 02 Apr 2014 17:28:35 +0200
Message-ID: <533C2CA3.8080606@alvestrand.no>
To: public-media-capture@w3.org
On 04/02/2014 05:03 PM, Jan-Ivar Bruaroey wrote:
> On 4/2/14 7:48 AM, Dan Burnett wrote:
>> Regarding examples, it will probably be useful to show increasing
>> complexity, i.e.,
>> - an example with only non-required constraints
>> - one with required and non-required constraints
>> - one with required and advanced constraints
>> - one with all 3 kinds
>
> Agree, but lets start with the least complex of all:
>
> - an example with only audio:true and/or video:true
> - an example with only non-required constraints
> - one with required and non-required constraints
> - one with required and advanced constraints
>
> I would end on advanced constraints and leave out the esoteric "one
> with all 3 kinds" example. The fact that it works (and how) I think
> matters mostly to implementers rather than users, and seems clear
> enough in the current prose for those who truly desire to experiment.

As I understand the proposal, one would use "advanced" constraints only
when one wanted to give further guidance to the browser after the
required and non-required constraints had been applied - so it would be
natural for the last example to have more than just "advanced" - the
typical "I must have a size in this range but would really prefer that
size" example could be expressed as

constraints = {
   required: "width",
   width: {min: 230, max: 1024},
   advanced: [{width: 640}]
}

BTW: I don't like the name "advanced" (what do we do if we need
something even more complex) - perhaps we could call it "refinements"?

constraints = {
   width: {min: 230, max: 1024},
   refinements: [{width: 640}]
}
Received on Wednesday, 2 April 2014 15:29:12 UTC

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