Bug 241801 - [macOS, WebRTC] navigator.mediaDevices.enumerateDevices including dummy audio devices.
Summary: [macOS, WebRTC] navigator.mediaDevices.enumerateDevices including dummy audio...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 15
Hardware: Unspecified macOS 12
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-21 03:56 PDT by vinayak.kulkarni
Modified: 2022-09-05 22:41 PDT (History)
4 users (show)

See Also:


Attachments
Output of enumerateDevices API before and after plugging in USB dock (1.06 KB, application/x-zip-compressed)
2022-06-21 03:56 PDT, vinayak.kulkarni
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description vinayak.kulkarni 2022-06-21 03:56:53 PDT
Created attachment 460370 [details]
Output of enumerateDevices API before and after plugging in USB dock

Steps to reproduce:
1. Open 
https://webrtc.github.io/samples/src/content/devices/input-output/ page on Safari browser and check for the devices available.
2. Connect a USB dock (with ports for Audio Input and Output devices) to your laptop, without connecting any audio devices.
3. Open the pages again and check for the devices available
4. In the list of the devices you can see that USB PnP Audio Device are listed.

These devices (USB PnP Audio Device) are dummy devices and do not correspond to any working device and do not provide any audio stream or audio output functionality.
navigator.mediaDevices.enumerateDevices() output also shows the same output. 

Expected Output:
The list of the devices returned should only contain the actual devices.

Actual Output:
The list contains the dummy devices aswell.

Attaching the output of enumerateDevices API aswell. Please see the difference between *after_usb_dock and *before_usb_dock files.

Will be happy to provide more information on this bug if needed.
Comment 1 Radar WebKit Bug Importer 2022-06-23 02:09:44 PDT
<rdar://problem/95760914>
Comment 2 youenn fablet 2022-06-23 02:13:01 PDT
@vinayak, do you happen to know which Safari version you are using?
Do you know if it is a regression?
Comment 3 youenn fablet 2022-06-23 02:15:23 PDT
@vinayak, when you open FaceTime, is that device also available?
What about Chrome and/or Firefox?
Comment 4 youenn fablet 2022-06-23 02:15:27 PDT
We relaxed filtering at https://bugs.webkit.org/show_bug.cgi?id=234596.
I guess we could filter out devices named "USB PnP Audio Device" but it would be good to have a better approach.
Comment 5 vinayak.kulkarni 2022-06-23 22:58:46 PDT
@youenn, I am using Safari Version 15.4 (17613.1.17.1.13).
I don't know if it is a regression or not.

Chrome/Firefox also have this issue, have filed bugs there aswell.
Comment 6 vinayak.kulkarni 2022-06-28 02:36:07 PDT
>>> when you open FaceTime, is that device also available?
Yes youenn, the (USB PnP Audio Device) is available even in FaceTime Version 5.0 (3080) as well. 
Mac OS Monterey 12.4
Comment 7 vinayak.kulkarni 2022-07-21 04:48:41 PDT
Team, Please let me know if any information is required from my end to proceed this issue.
Happy to provide any info if required.

Thanks
Comment 8 youenn fablet 2022-07-21 05:36:31 PDT
Apparently, the issue is more with docks.
They should tell the OS when they have connected input/output devices and tell the OS accordingly. Some docks behave correctly and some do not.
Comment 9 vinayak.kulkarni 2022-09-05 22:41:00 PDT
Thanks for the info @youenn