You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I've found what appears to be a bug in Chrome. In order to enumerate the list of audio devices, you need to allow access to both your Microphones and your Cameras.
I've just lost an hour trying to figure out why the DetectRTC sample page listed all 10 of my audio input devices but my own app only listed 'Microphone 1'
If you're only interested in capturing audio, you need to request permission for cameras as well as microphones or the list doesn't evaluate properly.
I appreciate that the 'how to fix labels' section does state that you need to make a getUserMedia call, but it doesn't highlight that you need to request video in order to get accurate audio device data.
if (DetectRTC.MediaDevices[0] && DetectRTC.MediaDevices[0].isCustomLabel) {
// it seems that we did not make getUserMedia request yet
navigator.mediaDevices.getUserMedia({
audio: true,
video: true
})
could easily be tweaked to make that clear;
if (DetectRTC.MediaDevices[0] && DetectRTC.MediaDevices[0].isCustomLabel) {
// it seems that we did not make getUserMedia request yet
navigator.mediaDevices.getUserMedia({
audio: true,
video: true //must request video even if you only want audio as chrome will not evaluate audio devices correctly otherwise.
})
I get this isn't a bug in your project but it's info that would help use it so thought I'd share :)
The text was updated successfully, but these errors were encountered:
Bappy1988
changed the title
Works on the demo site, but not on my app
Works on the demo site, but not on my app until I found a chrome bug :)
Jun 6, 2020
So I've found what appears to be a bug in Chrome. In order to enumerate the list of audio devices, you need to allow access to both your Microphones and your Cameras.
I've just lost an hour trying to figure out why the DetectRTC sample page listed all 10 of my audio input devices but my own app only listed 'Microphone 1'
If you're only interested in capturing audio, you need to request permission for cameras as well as microphones or the list doesn't evaluate properly.
I appreciate that the 'how to fix labels' section does state that you need to make a getUserMedia call, but it doesn't highlight that you need to request video in order to get accurate audio device data.
could easily be tweaked to make that clear;
I get this isn't a bug in your project but it's info that would help use it so thought I'd share :)
The text was updated successfully, but these errors were encountered: