mediacapture-screen-share icon indicating copy to clipboard operation
mediacapture-screen-share copied to clipboard

Use same enum for or all include or exclude enums?

Open beaufortfrancois opened this issue 1 year ago • 2 comments

May I suggest we add a single enum for "include", "exclude" (not web exposed) and use it where needed?

Before:

enum SelfCapturePreferenceEnum {
  "include",
  "exclude"
};
enum SystemAudioPreferenceEnum {
  "include",
  "exclude"
};
enum SurfaceSwitchingPreferenceEnum {
  "include",
  "exclude"
};
enum MonitorTypeSurfacesEnum {
  "include",
  "exclude"
};

After:

enum DisplayMediaIncludeOrExclude { "include", "exclude" };

typedef DisplayMediaIncludeOrExclude SystemAudioPreferenceEnum;
typedef DisplayMediaIncludeOrExclude SelfCapturePreferenceEnum;
typedef DisplayMediaIncludeOrExclude SurfaceSwitchingPreferenceEnum;
typedef DisplayMediaIncludeOrExclude MonitorTypeSurfacesEnum;

beaufortfrancois avatar Sep 01 '23 15:09 beaufortfrancois

If it's not Web-exposed, could it be used in the IDL files of UA implementations without being reflected by a spec change, perhaps?

eladalon1983 avatar Sep 01 '23 15:09 eladalon1983

@jan-ivar @youennf What do you think?

beaufortfrancois avatar Sep 07 '23 07:09 beaufortfrancois