- From: Jan-Ivar Bruaroey <jib@mozilla.com>
- Date: Thu, 27 Mar 2014 14:21:50 -0400
- To: Dominique Hazael-Massieux <dom@w3.org>, Eric Rescorla <ekr@rtfm.com>
- CC: "public-media-capture@w3.org" <public-media-capture@w3.org>
- Message-ID: <53346C3E.6020801@mozilla.com>
On 3/27/14 1:49 PM, Dominique Hazael-Massieux wrote: > Is there any browser that actually supports the current constraint > syntax? My understanding was there isn't, and as a result, there must be > very few (if any) real applications that rely on the current syntax > (beyond {video: true, audio: true} which I understand the new proposal > would support). Exactly, there are zero implementations of spec-constraints in the field. Allow me prove it. There is one constraint implementation, but look at what it supports: >From https://webrtc.googlecode.com/svn/trunk/samples/js/demos/html/constraints-and-stats.html : > { > "audio": true, > "video": { > "mandatory": { > "minWidth": "300", > "maxWidth": "640", > "minHeight": "200", > "maxHeight": "480", > "minFrameRate": "30" > }, > "optional": [] > } > } This is not to spec, and moreover, spec does not work, not even in Canary. Try this https://bug947665.bugzilla.mozilla.org/attachment.cgi?id=8397955 and you'll get: Camera constraints are {"audio":true,"video":{"mandatory":{"width":{"min":300,"max":640},"height":{"min":200,"max":480}},"optional":[]}} attachment.cgi?id=8397955:220 <https://bug947665.bugzilla.mozilla.org/attachment.cgi?id=8397955> 2Not connected yet attachment.cgi?id=8397955:220 <https://bug947665.bugzilla.mozilla.org/attachment.cgi?id=8397955> GetUserMedia failed So it is not true that the current spec is rooted in current use. People will need to change constraints already, likely as soon as Firefox implements the spec. It is not too late. >> the major benefit of this is better WebIDL conformance > I think the improve readibility and writability for developers is also a > pretty important benefit. +1. I think some devs at least will look to the spec for syntax. In any case, whether they do or not, I think they should be able to, and that it needs to be easy to read for everyone, for this to be successful. >> WRT to the details: >> As I mentioned in a previous message, this doesn't seem to be >> generalizable to talk about multiple instances of audio and video. > Is that something the current constraints proposal support? > >> I share Cullen's concern about not being able to list a set of >> devices in order of preference. This is basic functionality. > Doesn't "prefer" combined with sourceId give that? Yes, it could be clearer in the proposal, but I suggest we infer a preferred order in sequences (possibly only when using "prefer"?) - E.g. this should do what you want: var constraints = { video: { prefer: ["sourceId"], sourceId: ["4930cde4-09ed-4397-81d2-8163ce322d36", "4930cde4-09ed-4397-81d2-8163ce322d36"], } }; .: Jan-Ivar :.
Received on Thursday, 27 March 2014 18:22:20 UTC