Re: [mediacapture-screen-share] What is the purpose of MediaTrackCapabilities displaySurface? (#250)

> Seems more like a property of the track than a capability.

It's a constant [constrainable property](https://w3c.github.io/mediacapture-screen-share/#constrainable-properties) of the source, following [rules established in mediacapture-main](https://w3c.github.io/mediacapture-main/#defining-a-new-constrainable-property), with precedent in [deviceId](https://w3c.github.io/mediacapture-main/#dom-mediatrackcapabilities-deviceid), a constant constrainable property of camera sources, which [show up in capabilities in Chrome and Safari](https://jsfiddle.net/jib1/cnzoeLu4/).

Its purpose is to comply with the constrainable pattern, which says all constrainable properties are exposed as capabilities, settings and constraints. It has no utility other than that, that I'm aware of.

> I'd love to understand how web developers could use `if (videoTrack.getCapabilities().displaySurface === "browser")` condition

A better question might be: which members would you expect to find in `videoTrack.getCapabilities()`?

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


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

Received on Tuesday, 25 October 2022 20:25:31 UTC