Open Bug 1572736 Opened 1 year ago Updated 9 months ago

USB-ID not available via MediaStreamTrack.label

Categories

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

68 Branch
enhancement

Tracking

()

People

(Reporter: rojtberg, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

read MediaStreamTrack.label

Actual results:

"HD Pro Webcam C920"

Expected results:

"HD Pro Webcam C920 (046d:082d)" (as in Google Chrome)

the usb-id is needed to disambiguate devices with identical labels.
Search for "Digital Camera" here: http://www.linux-usb.org/usb.ids

Such disambiguation is needed for this service: https://www.calibdb.net/

Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Hi,

This seems to be an enhancement in my opinion.
Further, I am assigning a component to this in order to involve the development team and get an opinion on this.

Thanks for the report.

Status: UNCONFIRMED → NEW
Component: Untriaged → Audio/Video
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All

This is not mandated by spec, so you won't be able to make an interoperable service without changes to the spec.
That doesn't imply we would say no to exposing this information however. jib/Adam, do you have opinions?

Component: Audio/Video → WebRTC: Audio/Video
Flags: needinfo?(jib)
Flags: needinfo?(astevenson)

The purpose of label, from the examples given in the spec at least, appears to be end-user selection. There might be some marginal benefit here for users who have multiple cameras of the same brand, but of different revs, however, this seems like a tiny group (E.g. there's no benefit for those with multiple cameras of the same rev).

Search for "Digital Camera" here: http://www.linux-usb.org/usb.ids

Such disambiguation is needed for this service: https://www.calibdb.net/

I think any effort in this direction would need to be standardized first. I've tested Safari behavior and it matches Firefox, so this appears to be Chrome(ium) only behavior.

It's not clear to me what end-user benefit that web site provides. It also seems like it could work with Firefox for many users with not much effort, since "Digital Camera" aside, most entries in that list have unique names. E.g. in the STRs "HD Pro Webcam C920" alone is unique.

Flags: needinfo?(jib)

The purpose of label, from the examples given in the spec at least, appears to be end-user selection.

this will not be negatively affected

I think any effort in this direction would need to be standardized first.

I agree that a standardized way to retrieve the USB-ID, given a MediaStreamTrack would be ideal. However, this is a non trivial endeavour. It probably requires the WebUSB API (currently not supported by Firefox) and also touches aspects of access control and the case that a MediaStreamTrack does not have to be an USB device.

Including the USB-ID in the label string on the other hand only requires little effort and allow some new usecases today.

aside, most entries in that list have unique names.

that list obviously is not exhaustive. Also the existence of non unique labels already prohibits using them as database keys. The use-case of this is computer vision (e.g. augmented reality) where one needs to know which camera is used exactly.

I would like to add to the discussion that Chrome uses the UID internally, as an extra check, to estimate the group id when two devices have the same name. Supporting UID requires platform specific code in cubeb, for audio devices and in camera enumeration.

Supporting it internally also doesn't mean exposing it.

Priority: -- → P3

My understanding from the comments is that everybody agrees that we need to spec it first in order to implement it. I will remove the NI to Adam and leave it in the backlog.

Flags: needinfo?(astevenson)
You need to log in before you can comment on or make changes to this bug.