Re: [mediacapture-main] MediaStreamTrack.applyConstraints() should resolve the Promise with the applied constraints

Chrome's implementation actually makes this happen. Go to https://beaufortfrancois.github.io/sandbox/image-capture/playground.html and execute JS code below in your console (webcam is expected):

```js
imageCapture.track.applyConstraints({advanced: [{brightness: 100}]}).then(c => {
  var appliedBrightness = imageCapture.track.getConstraints().advanced[0].brightness;
  console.assert(appliedBrightness == 100, 'applied brightness should be 100');
});
imageCapture.track.applyConstraints({advanced: [{brightness: 200}]}).then(c => {
  var appliedBrightness = imageCapture.track.getConstraints().advanced[0].brightness;
  console.assert(appliedBrightness == 200, 'applied brightness should be 200');
});
```
```
>>> Assertion failed: applied brightness should be 100
```

-- 
GitHub Notification of comment by beaufortfrancois
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/462#issuecomment-327449404 using your GitHub account

Received on Wednesday, 6 September 2017 11:00:35 UTC