Re: [mediacapture-screen-share] Revisit: Let getDisplayMedia() influence the default type choice in the picker (#184)

> What change? This is [literally already specified](https://w3c.github.io/mediacapture-screen-share/#dom-mediadevices).

Sorry, I was meaning we would not reuse MediaTrackConstraints but define specific DisplayAudioTrackConstraints and DisplayVideoTrackConstraints dictionaries, with clearly identified constraints, meaningful to screensharing.

That would prevent throwing for instance if adding an  audio constraint exact property added in the video constraints part of a getDisplayMedia call. I just tested it and browsers seem to consistently allow this.

Then, instead of adding a ConstrainDOMString, we would add an enum on displaySurface.
Or we could name it preferredSurface to make it clear this is a preference, not a choice.
We would get better WebIDL typing.
And browsers would not have to start throwing on `navigator.mediaDevices.getDisplayMedia({ video : { displaySurface : { exact : 'window' }}})`.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 24 September 2021 13:39:16 UTC