Open Bug 976855 Opened 11 years ago Updated 3 years ago

Redundant "default" device in audio selection dropdown

Categories

(Core :: WebRTC: Audio/Video, defect, P4)

x86
macOS
defect

Tracking

()

People

(Reporter: Dolske, Unassigned)

References

()

Details

Attachments

(2 files)

When selecting an audio device from the webrtc permission prompt, I get an extra useless item. The 3 choices are "default (Built-in Microphone)", "Built-in Microphone", and "No Audio". It's no clear why the "default" item is present, since it's the same as the one other device. Oddly, the video device selection is fine, as it has exactly 2 items: "Facetime HD Camera (Built-in)" and "No Video". There's no "default" item. In fact, if I plug in a USB video device it shows up but there's still no mention (or extra menuitem) for a "default" device. Unfortunately I don't have a USB audio device to try. Is this just coming from the list OS X provides? Chrome's UI seems to show the same thing.
I believe this comes from the OS (MacOS); "default" will change depending on what the OS believes is the current preferred device. We are showing what the OS says are the list of devices; we tag the one which matches the "default" property (if any) with that string on Mac. Both ours and Chrome's are based on the code in media/webrtc/trunk/webrtc/modules/audio_coding/mac/audio_device_mac.cc. Linux has something similar but not exactly the same. I don't know if the OS treats these two devices differently in any way; you'd need to ask a mac device expert.
Does "default (Built-in Microphone)" perhaps change if you plug in or bluetooth in a miked headset?
(In reply to Jan-Ivar Bruaroey [:jib] from comment #3) > Does "default (Built-in Microphone)" perhaps change if you plug in or > bluetooth in a miked headset? Ah, I do have a USB headset. Plugging it in adds an additional item to the list, but doesn't change which one is the default. But if I go to System Preferences -> Sound -> Input, and select the headset there, then the "default" entry indicates it's the headset. Still, I'd expect that instead of a duplicate "default" device, the list shown in the UI should be actual devices. Perhaps with one tagged as being default -- "Built-in Microphone (default)" -- when there are multiple choices. Although as long as the default is the top and preselected item, the tagging isn't really needed.
We're returning the list of devices from the OS, and tagging any that match the OSX 'default' ID as "default" (same as Chrome, as you note). It may be there's a better selection mechanism (if so, great!), but without *good* knowledge of the OS API in question (and how it changed across models and OS versions!) I'm hesitant to touch it.
(In reply to Justin Dolske [:Dolske] from comment #4) > Ah, I do have a USB headset. Plugging it in adds an additional item to the > list, but doesn't change which one is the default. Hmm, did you try quitting and starting Firefox with the USB headset already in? Just making sure we don't have a refresh problem. (I would test myself except my mic is broken, new one is on the way) > Still, I'd expect that instead of a duplicate "default" device, the list > shown in the UI should be actual devices. Perhaps with one tagged as being > default -- "Built-in Microphone (default)" -- when there are multiple > choices. Although as long as the default is the top and preselected item, > the tagging isn't really needed. If what the OS default choice is never changes under us (hotplugging), then I would agree the abstraction has little value, otherwise no (but I'm no mac expert either).
See Also: → 1124987
backlog: --- → webRTC+
Rank: 35
Priority: -- → P3
Mass change P3->P4 to align with new Mozilla triage process.
Priority: P3 → P4
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: