Re: [mediacapture-screen-share] Bring back constraints for downscaling, not selection filtering.

@ekr When I [try it](https://jsfiddle.net/jib1/f0wudbmp/) in Firefox, there's a noticable flicker, where the video appears in full size before it's downscaled. I'm not sure why this happens, since the stream is not attached to anything until after `applyConstraints` resolves. Maybe `applyConstraints` should somehow wait for frames to appear, but then there shouldn't be any frames yet.

Regardless, an implementation may be able to avoid this as you say, if JS is careful not to assign a stream to a sink prematurely. However, that may be easy to do by accident. e.g.:

```js
video.srcObject = await navigator.getDisplayMedia({video: {mediaSource: "screen"}});
await video.srcObject.getVideoTracks()[0].applyConstraints({
  mediaSource: "screen", width: 320, height: 200, frameRate: 2
});
```

It seems superior to just pass in desired constraints to begin with, unless there's a reason not to.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/49#issuecomment-328711477 using your GitHub account

Received on Tuesday, 12 September 2017 02:14:43 UTC