← Back to release summary

InputDeviceInfo.getCapabilities() for unavailable devices

Category
WebRTC
Type
No developer-visible change
Status
In developer trial (Behind a flag) (Chrome 122)
Intent stage
None

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.

Motivation

Allows developers to avoid expensive getUserMedia() calls that are known in advance to fail by knowing the capabilities of a device. If the device is unavailable, its capabilities are reported as empty, so an application might prefer not to call getUserMedia in this case.

Standards & signals

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

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

View on chromestatus.com