Re: [mediacapture-screen-share] getSupportedOptions() (#260)

Thanks for the jsfiddle! That seems sufficient to me.

Regarding "why", the bar for custom feature detection APIs should be extremely high IMHO, because it's a problem that disappears over time. IOW, if it can be shimmed in JS at all, then no new API should be needed.

I believe this opinion is generally shared, as MDN is filled with examples like `addEventListener`'s [passive](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#improving_scrolling_performance_with_passive_listeners) option.

> We have [mediaDevices.getSupportedConstraints()](https://w3c.github.io/mediacapture-main/#dom-mediadevices-getsupportedconstraints)

It exists specifically to solve the narrow problem where non-failure of an `exact` [_"constraint being ignored due to lack of support in a user agent is not tolerated by the application"_](https://w3c.github.io/mediacapture-main/#example-10). Since `exact` constraints are [largely deprecated](https://w3c.github.io/mediacapture-main/#dfn-allowed-required-constraints-for-device-selection) in new specs, there should be no need to extend this pattern. 

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


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

Received on Thursday, 23 March 2023 22:00:18 UTC