Open Bug 1958076 Opened 6 months ago Updated 6 months ago

Implement MediaStreamTrack::getCapabilities() and MediaTrackCapabilities for getDisplayMedia()

Categories

(Core :: WebRTC: Audio/Video, enhancement)

enhancement

Tracking

()

People

(Reporter: jib, Unassigned)

References

Details

Following on bug 1179084 but for screen-capture tracks.

We should cover the subset of https://w3c.github.io/mediacapture-screen-share/#constrainable-properties we currently support.

Screen capture back-ends don't really have "capabilities" the same way cameras do, so this is mostly about filling in some rudimentary information as detailed in the link above.

Currently our getCapabilities code isn't aware of this so it goes all the way down to https://searchfox.org/mozilla-central/rev/fa5b44a4ea5c98b6a15f39638ea4cd04dc271f3d/dom/media/systemservices/video_engine/desktop_device_info.cc#354,361

STR:

  1. Open https://jsfiddle.net/jib1/rs16kgqd/ and hit the Go! button

Expected result (Chrome):

getCapabilities(): {"max":2992,"min":1}x{"max":1934,"min":1}x{"max":30,"min":0}
getSettings(): 2992x1934x30
videoWidth/Height: 2992x1934

Actual results:

getCapabilities(): undefinedxundefinedxundefined
getSettings(): 2992x1934x30
videoWidth/Height: 2992x1934
See Also: → 1703991

Since the values exposed seem quite rudimentary, I doubt we need a whole capabilities backend for desktop capture.

It should hopefully suffice to update capabilities when we update settings.

The spec was recently clarified that capabilities should refresh when resizing a captured window.

You need to log in before you can comment on or make changes to this bug.