W3C home > Mailing lists > Public > public-media-capture@w3.org > May 2012

Re: Syntax options for constraints structure

From: Cullen Jennings <fluffy@iii.ca>
Date: Thu, 17 May 2012 13:03:14 -0600
Cc: public-media-capture@w3.org
Message-Id: <F6328409-2275-4583-B51E-27519E1BF546@iii.ca>
To: Dan Burnett <dburnett@voxeo.com>

I prefer the style of ALTERNATIVE 2

On May 9, 2012, at 1:21 PM, Dan Burnett wrote:

> Group,
> 
> At the last meeting I agreed to send an email showing different syntax options for the constraint structure.
> Here it is.  I believe the two alternatives I show are at least close to the primary suggestions made on the call (and the list).  Let's discuss this on today's call and see if we can come to some agreement.
> 
> -- dan
> 
> 
> ****************
> ** ORIGINAL **
> ****************
> First, here are the three original examples:
> 
> Example 1:
> 
> {mandatory:[{videoMinHeight:600}, {videoMaxBandwidth:500}],
>  optional:[
>    {videoMaxAspectratio:1.333333333333},
>    {videoMinTimebetweenrefframes:20},
>    {videoMinFramerate:30},
>    {videoEnumAutowhitebalance:on}]}
> 
> This example requests a video stream with the properties shown.  Note that if the browser can satisfy either a minimum time between reference frames of 20 or a minimum framerate of 30 but not both, then it will satisfy the former.  Also, if the browser cannot, at the least, provide a video stream with a minimum height of 600 and a maximum bandwidth of 500, then the call to getUserMedia will fail.
> 
> 
> Example 2:
> 
> {mandatory:[{videoEnumProvide:true}],
> optional:[{audioEnumProvide:true}]}
> 
> This example requests both an audio and a video stream.  If the browser cannot, at the least, provide a video stream, then the errorCallback will be called with an error.
> 
> 
> Example 3: 
> 
> {mandatory:[{videoEnumProvide:true}, {audioEnumProvide:true}]}
> 
> This example requires that the browser either return a stream with both audio and video or call the errorCallback with an error.
> 
> 
> 
> ***********************
> ** ALTERNATIVE 1 **
> ***********************
> 
> Example 1:
> {video:
>  {mandatory:{minHeight:600, maxBandwidth:500},
>    optional:[
>    {maxAspectratio:1.333333333333},
>    {minTimebetweenrefframes:20},
>    {minFramerate:30},
>    {enumAutowhitebalance:on}]}}
> 
> 
> 
> Example 2:
> 
> {video:true, audio:optional}
> 
> 
> 
> Example 3:
> 
> {video:true, audio:true}
> 
> 
> 
> 
> ***********************
> ** ALTERNATIVE 2 **
> ***********************
> 
> Example 1:
> 
> {mandatory:[{videoMinHeight:600}, {videoMaxBandwidth:500}],
>  optional:[
>    {videoMaxAspectratio:1.333333333333},
>    {videoMinTimebetweenrefframes:20},
>    {videoMinFramerate:30},
>    {videoEnumAutowhitebalance:on}]}
> 
> 
> 
> Example 2:
> 
> {video:true,
> optional:[{audioEnumProvide:true}]}
> 
> 
> 
> Example 3:
> 
> {video:true, audio:true}
> 
> 
> 
Received on Thursday, 17 May 2012 19:03:42 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:14:59 GMT