New issue
Advanced search Search tips
Starred by 12 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2017
NextAction: ----
OS: ----
Pri: 2
Type: Enhancement

Sign in to add a comment

Using indexes to identify RecordingDevices/etc is error-prone

Reported by, Nov 15 2012 Back to list

Issue description

(See also  Issue 296 )

Right now a bunch of interfaces use an index to key what device to use, instead of a uniqueId.  (Note  issue 296 , which shows that uniqueId often isn't unique, but that's a separate problem that would block fixing this.)

If a device is added or removed between when the application enumerates the devices and when it calls SetRecordingDevice(index) (as an example), you may end up recording from the wrong device.

Project Member

Comment 1 by, Nov 20 2012

Labels: webrtc-feedback
Project Member

Comment 2 by, Nov 20 2012

Labels: -webrtc-feedback
Project Member

Comment 3 by, Nov 20 2012

Labels: -Type-Bug Type-Enhancement
Shijing, can you comment on whether this is a problem for Chrome, and if not how we solve it?

Comment 4 by, Nov 20 2012

This is indeed a problem for webrtc but not for chrome since chrome is using its own low level IO. (In Chrome, we learnt from the mistake that we use the unique id string to select the device)

I am not sure if we can fix this webrtc problem since the API is used by multiple products, and any modification to that API will be very sensitive. 
Isn't there a problem using UniqueId to select a device, the "Unique IDs" returned often aren't unique?  (For example on Mac/Linux, the code doesn't even try to provide a UniqueId for audio devices.)  Or is that code bypassed too?

Can you provide link to the code in Chromium that's bypassing the indexes and UniqueIds?  I was looking over the code and while I see some alternate implementations to in parts, I think I missed that.  Thanks.

In any case, this API is fundamentally broken (witness  Issue 296 ).  If you can't change it, you should extend or replace it and deprecate this one.  (Guarantee UniqueIds, then have an alternate set of APIs that take those instead of indexes - one way to do it; not the only way.)
Project Member

Comment 6 by, Aug 27 2013

Labels: Dev-QAReview-NA

Comment 7 by, Dec 17 2014

Labels: Area-Audio
Project Member

Comment 8 by, Dec 18 2014

Labels: -Area-Audio Area-GetUserMedia
Project Member

Comment 9 by, Dec 1 2016

Owner: ----
Still a valid bug? Should it be moved to
Project Member

Comment 10 by, Aug 25 2017

Status: WontFix
CLosing as obsolete.

Sign in to add a comment