W3C home > Mailing lists > Public > public-webrtc@w3.org > May 2014

Syntax of new constraint proposal

From: Cullen Jennings (fluffy) <fluffy@cisco.com>
Date: Sun, 18 May 2014 14:53:04 +0000
To: "public-media-capture@w3.org" <public-media-capture@w3.org>, public-webrtc <public-webrtc@w3.org>
Message-ID: <C4470548-58AF-46AC-BDB6-724D48D0D623@cisco.com>

The old syntax looked something like 

videoCfg = {
 mandatory: 
    { width: { min: 640 } } 
 optional: [
    { width: { min: 1920 } }, 
    { width: { max: 2560 } } ]
}

It’s pretty easy to read that and guess what it means. 

The new syntax looks like 

videoCfg = {
 require: ["width"], 
 width: { min: 640 }, 
 advanced: [
    { width: { min: 1920 } }, 
    { width: { max: 2560 } } ]
};

I find that much more opaque when it comes to guessing what it does. I prefer the old syntax to the new proposal. I think we need some discussion on how to make this less confusing to developers. 
Received on Sunday, 18 May 2014 14:53:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:17:58 UTC