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

> Is there a good reason for the spec to mandate the the user agent MUST reject?

When you define a type in WebIDL as an enumeration, rejection is happening when the value passed to a method is not valid.
To implement the ignore rule with enum + current WebIDL, implementors would be required to add 'screen' as a valid value but ignore it, thus putting burden to those User Agents that have no use of this value.
And putting burden on developers to understand that 'screen' is a valid but ignored value...

What would be nice is if we had an open-ended enumeration: if value is understood, use it and if it is not, ignore it.
Spec would define all values except 'screen', Chrome might understand 'screen' hopefully for a limited time.
This probably requires WebIDL changes, https://github.com/whatwg/webidl/issues/893.

This would also allow to more easily extend the enumeration should we have the desire to do so.

> * You have [insinuated](https://github.com/w3c/mediacapture-screen-share/issues/184#issuecomment-1026840084) that there are more reasons than purity.

Insinuated?
I think specific reasons have been provided.

> * I don't think that the few lines of code to ignore `'monitor'` are the reason.
> * Is compatibility the reason? I think I have [addressed](https://github.com/w3c/mediacapture-screen-share/issues/184#issuecomment-1027049811) that too...?

This argument goes both side: some lines of code to ignore monitor by all UAs vs. some lines of code to add a separate property (that would do nothing than override the value to monitor in native code) by one UA.

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


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

Received on Tuesday, 1 February 2022 19:20:32 UTC