Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default audio output device missing #59

Closed
nicklanng opened this issue Dec 8, 2017 · 1 comment
Closed

Default audio output device missing #59

nicklanng opened this issue Dec 8, 2017 · 1 comment

Comments

@nicklanng
Copy link

nicklanng commented Dec 8, 2017

I've been using this library for a WebRTC-enabled chrome extension, and noticed that the Default audio output device is not showing up in DetectRTC, but is showing up when I enumerate the devices on the console.

I'm using latest Chrome.

image

image

Can anyone help me understand how to make the Default device available? Thanks!

@nicklanng
Copy link
Author

nicklanng commented Dec 8, 2017

I've done some digging through the code.
I think the problem lies around the handling of duplicate devices.

https://github.com/muaz-khan/DetectRTC/blob/master/DetectRTC.js#L717

The default input device and output device share the same label and id, so DetectRTC believes that the second device is a duplicate.

Can we add the kind of device in to the key used to determine duplication?

eg

if (alreadyUsedDevices[device.deviceId + device.label + device.kind]) {
    return
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant