Web-Facing Change PSA: InputDeviceInfo.getCapabilities() for unavailable devices

90 views
Skip to first unread message

Guido Urdaneta

unread,
Feb 12, 2024, 12:08:41 PMFeb 12
to blink-dev

Contact emails

gui...@chromium.org

Specification

https://w3c.github.io/mediacapture-main/#ref-for-dom-inputdeviceinfo-getcapabilities-1

Design docs

https://docs.google.com/document/d/1gwAF4qMXvHLQH-Fb6MxOgiSxXzK47AwiVPvnvJIccaE/r/0-T1AP5YsdFksujPUY7rJV1Q/edit?tab=t.0

Summary

Make InputDeviceInfo.getCapabilities() return empty for cameras that are unavailable to the UA because they are opened in exclusive mode by other applications. The only platform affected in practice is Windows, which is the only platform that exhibits the issue.



Blink component

Blink>MediaStream

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

The proposed behavior change on Windows has low risk in that this change addresses a situation that is rare in practice and applications written to spec are not expected to break from this change.

Applications that don't handle the case that a given property in the result of getCapabilities() may not be present might experience some minor breakage, but this is expected to be very low both in frequency and severity. In terms of interoperability with other browsers, Blink is the only engine that currently implements InputDeviceInfo.getCapabilities() on Windows, so the existing interoperability risk is largely unchanged.



Gecko: Under consideration (https://bugzilla.mozilla.org/show_bug.cgi?id=1179084), but little activity in the last 2 years.

WebKit: Shipped/Shipping (https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceInfo/getCapabilities)

Web developers: No signals

Other signals:

Ergonomics

This feature is part of the larger MediaStreams API and is used together with other functions in that API such as enumerateDevices and getUserMedia.



Activation

No.



Security

No.


WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

The feature is implemented on all platforms. However, the behavior change covered by this PSA only applies in practice to Windows because it addresses a situation that only occurs on that platform (cameras opened in exclusive mode).



Is this feature fully tested by web-platform-tests?

Yes

https://wpt.fyi/results/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html?label=experimental&label=master&aligned



Flag name on chrome://flags

None

Finch feature name

MediaFoundationCameraUsageMonitoring

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/40946314

Launch bug

https://launch.corp.google.com/launch/4294859

Sample links


https://guidou.github.io/enumdemo8.html

Estimated milestones

Shipping on desktop122
DevTrial on desktop121


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5846051615670272

This intent message was generated by Chrome Platform Status.

Reply all
Reply to author
Forward
0 new messages