Re: WebIDL-compatible syntax compromise

On 4/18/14 2:53 PM, Justin Uberti wrote:
> ... it still seems complicated to express the common use case of 
> "please give me HD, but definitely no less than VGA".

I agree, but Dan, Jim and I weren't allowed to solve that. Our mandate 
was narrow: "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." 
- I think we succeeded at that.

> As I understand it, this would be done via:
>
>   {
>     require: ["width", "height"],
>     width: {min: 640},
>     height: {min: 480},
>     prefer: [{width: 1280, height: 720}]
>   }

The above works in WebIDL without loss of expression, which was the goal.

Beyond the mandate, I think 'ideal' solves "HD over VGA" best:

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

but people wanted to wait a bit before discussing it - 
http://lists.w3.org/Archives/Public/public-media-capture/2014Apr/0026.html

> which is OK, but I think this would be more understandable as
>
>   {
>     require: { width: {min: 640}, height: {min: 480} },
>     prefer: [{width: 1280, height: 720}]
>   }

The above does not work in WebIDL since we're adamantly against ignoring 
unknown required constraints. Don't express requirements with dictionary 
members if you want all browsers to see them, hence the strings.

.: Jan-Ivar :.

Received on Friday, 18 April 2014 20:06:15 UTC