W3C home > Mailing lists > Public > public-media-capture-logs@w3.org > June 2016

Re: [mediacapture-main] Specify relation between return from getConstraints and constraints argument

From: jan-ivar via GitHub <sysbot+gh@w3.org>
Date: Thu, 02 Jun 2016 20:18:47 +0000
To: public-media-capture-logs@w3.org
Message-ID: <issue_comment.created-223409419-1464898726-sysbot+gh@w3.org>
That said, due to our spec's novel use of dictionaries in unions, what
 I get back from

```js
navigator.mediaDevices.getUserMedia({video: true})
.then(s => console.log(s.getConstraints());
```
I think would surprise most people: 
```
{
  
"deviceId":{},"echoCancellation":{},"facingMode":{},"frameRate":{},"height":{},
  
"mediaSource":"camera","mozAutoGainControl":{},"mozNoiseSuppression":{},
  
"viewportHeight":{},"viewportOffsetX":{},"viewportOffsetY":{},"viewportWidth":{},
  "width":{}
}
```

Note that this is the product of Mozilla's WebIDL compiler, and no 
special code on my part.

So perhaps preserving the literalness of this is of little value. 

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at 
https://github.com/w3c/mediacapture-main/issues/360#issuecomment-223409419
 using your GitHub account
Received on Thursday, 2 June 2016 20:18:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:27:29 UTC