Hi
We run a webRTC teaching software in Thailand and have had great success up t'il now with our change to webRTC. The video quality and packet loss dissimulation has been of great help in our rural and difficult areas.
One of the things we still have lots of problem with are local techs using the wrong inputs or wrongly configured (device level AGC can wreck havoc paired with chrome AGC enabled all at once).
We need 2 things in order to achieve audible audio quality from different schools.
1 - Audio device selection wizard : We provide decent hardware for classes but often our local tech do not select the right inputs in the browser settings.
Solution: I did a device selection wizard which list using mediaDevices.enumerateDevices(), we pre-select our provided hardware and user can go on selecting the right hardware without even knowing.
2 - Turning off audio processing : Some classes are in pretty bad shape, they have concrete floors, walls and very little fournitures so the echo can get crazy. In theses cases we want to turn off audio processing and manually adjust volume very low to try and barely hear the students.
My problem :
Using navigator.mediaDevices.getUserMedia() is necessary to get the user selected inputs and it works flawlessly unless i add optional or mandatory constraint about audio.
This returns the right device:
navigator.mediaDevices.getUserMedia({
video: {
deviceId: { exact: this.data.videoInputDevice.id },
},
audio: {
deviceId: { exact: this.data.audioInputDevice.id },
}
}).then(
while this returns "some" audio devices
navigator.mediaDevices.getUserMedia({
video: {
deviceId: { exact: this.data.videoInputDevice.id },
},
audio: {
deviceId: { exact: this.data.audioInputDevice.id },
optional: [
{ echoCancellation: this.data.audioProcessingEnabled }
]
}
}).then(...
And this returns "some" device as well
navigator.mediaDevices.getUserMedia({
video: {
deviceId: { exact: this.data.videoInputDevice.id },
},
audio: {
deviceId: { exact: this.data.audioInputDevice.id },
mandatory: {
echoCancellation: this.data.audioProcessingEnabled,
}
}
}).then(
I've been looking at the mediaDevices Shim provided by google or at Chromium sources but i can't figure out what is happening and why can't i get both My devices and my desired audio processing.
If i use navigator.getUserMedia() with echoCancellation to false it works perfectly as well.
If there a new keyword needed for mediaDevices API ? Is turning Off echo cancellation not available there yet ?
Chrome Version 52.0.2743.116 m