w3c / mediacapture-screen-share

Media Capture Screen Capture specification
https://w3c.github.io/mediacapture-screen-share/
Other
86 stars 28 forks source link

Define max frameRate constraint behavior when set to 0 #253

Closed beaufortfrancois closed 1 year ago

beaufortfrancois commented 1 year ago

I've noticed screen-capture web platform tests at https://github.com/web-platform-tests/wpt/blob/3728473b8ef5c7f382547d0809fe2d176c254f4c/screen-capture/getdisplaymedia.https.html#L174 say that getDisplayMedia({video: {frameRate: {max: 0}}}) should fail with OverconstrainedError.

Looking at the spec though, it's not clear what the behavior should be.

image

One could argue that the browser could decide to make this call succeed but not send any video frames (Chromium does that), on the other hand the browser could also simply fail as not sending video frames could be seen as no-op (Firefox and Safari do that).

See https://wpt.fyi/results/screen-capture/getdisplaymedia.https.html?label=experimental&label=master&aligned image

youennf commented 1 year ago

The spec says:

It seems to me the spec mandates the rejection for { max: 0 }, but may allow {max: 0.1}.

beaufortfrancois commented 1 year ago

Thank you @youennf! I'll do my best to make Chromium spec-compliant then.