W3C home > Mailing lists > Public > public-media-capture@w3.org > November 2013

unknown mandatory constraints and making mandatory harder to use

From: Jim Barnett <Jim.Barnett@genesyslab.com>
Date: Thu, 14 Nov 2013 06:19:24 +0000
To: "public-media-capture@w3.org" <public-media-capture@w3.org>
Message-ID: <57A15FAF9E58F841B2B1651FFE16D2811ECEAD@GENSJZMBX03.msg.int.genesyslab.com>
Off the top of my head:  suppose make applyConstraints and getUserMedia take _only_ a list of optional constraints as an argument  (that makes them easier to use).  Then we add a queueMandatoryConstraint call, which queues up a single mandatory constraint to be applied the next time applyConstraints or gUM is called.  This call could return an error if the UA doesn't recognize/support the constraint (note: this error tells you only about the browser, not about the devices attached to it.)

So this makes the mandatory constraints harder to use (you have to call the queue function multiple times to add multiple mandatory constraints).  And it also gives the app the information about what mandatory constraints are supported.

Of course there will be other ways to do this.

-          Jim
Received on Thursday, 14 November 2013 06:19:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:24:43 UTC