w3c / mediacapture-extensions

Extensions to Media Capture and Streams by the WebRTC Working Group
https://w3c.github.io/mediacapture-extensions/
Other
19 stars 15 forks source link

Expose the type of device in MediaDeviceInfo #1

Open youennf opened 4 years ago

youennf commented 4 years ago

Chrome is currently exposing the type (builtin, bluetooth, maybe usb) in MediaDeviceInfo.label. This seems ok to expose like this but is difficult to use by web applications, if they would like to do so. Parsing the label might be hard and localisation might make this even more difficult to use. It might be interesting to split that information in its own attribute, whose value could be an enumeration. One potential use case would be a website showing the current device being used as an icon (instead of a label) according this information.

solmaks commented 4 years ago

Indeed, exposing this information in a more structured manner would be of a great use for applications. Apart from connection type it would also be great to expose the actual type of the device, e.g. if it is a headset, or a portable speaker/mic combo.

guidou commented 4 years ago

I agree 100% with this.

guest271314 commented 4 years ago

Kindly ensure that the correct device is listed, whether by icon, text, or other unique human readable identifier, and dynamically updated, similar to DOM collection https://dom.spec.whatwg.org/#concept-collection

A collection is an object that represents a list of nodes. A collection can be either live or static. Unless otherwise stated, a collection must be live.

If a collection is live, then the attributes and methods on that object must operate on the actual underlying data, not a snapshot of the data.

to also resolve https://github.com/w3c/mediacapture-main/issues/693.

youennf commented 4 years ago

Would be a good fit for an extension spec.

youennf commented 2 years ago

Talked today at editor's call. Proposal would be to add a property to MediaDeviceInfo: USB, BT, built-in