Re: Proposal: Constraints as dictionaries

On 11/21/13 12:28 PM, Martin Thomson wrote:
> The point I was making was that your example at least was just (assuming C):
>
>     navigator.getUserMedia([{width: 1920}]);
>
> As opposed to:
>
>    navigator.getUserMedia({video: [{width:1920}]});  // wow, cool helmet }]}:)|-<

Thanks for catching that, I did not mean to leave out the type. I was too eager to fit 80 characters. Sorry for the confusion!

> I don't think that we want to lose the whole ability to say whether
> you want audio or video.  In particular, collapsing the two makes
> things like sourceId impossible to specify (i.e., { audio: true,
> video: true, sourceId: "12341234234"} never successfully resolves).

Good point, and thanks for tethering my train of thought on that matter.

>> By the same argument we should use double everywhere. Are you saying we
>> should use double everywhere?
> For constraints, yes.

I prefer our constraints WebIDL to be as boring as possible. Constraints/Capabilities/Settings are complicated enough as they are.

Though, since you mention it, I would love to get rid of unsigned for width/height, as I find the signed/unsigned business for magnitudes just a source of programming errors. On a related note we landed on double over float for stats http://www.w3.org/2011/04/webrtc/wiki/Stats

.: Jan-Ivar :.

Received on Thursday, 21 November 2013 18:26:31 UTC