-
Notifications
You must be signed in to change notification settings - Fork 184
Open
Description
Since last chrome update demo page is not working. On select Audio input there is message:
Could not get audio media device: TypeError: Failed to execute 'getUserMedia' on 'MediaDevices': Malformed constraint: Cannot use both optional/mandatory and specific or advanced constraints.
Some changes make working in chrome:
if (navigator.webkitGetUserMedia !== undefined) {
constraint = {
video: false,
audio: {
optional: [
{sourceId:deviceId},
{googAutoGainControl: false},
{googAutoGainControl2: false},
{echoCancellation: false},
{googEchoCancellation: false},
{googEchoCancellation2: false},
{googDAEchoCancellation: false},
{googNoiseSuppression: false},
{googNoiseSuppression2: false},
{googHighpassFilter: false},
{googTypingNoiseDetection: false},
{googAudioMirroring: false}
]
}
}
}
else if (navigator.mozGetUserMedia !== undefined) {
constraint = {
video: false,
audio: {
deviceId: deviceId ? { exact: deviceId } : void 0,
echoCancellation: false,
mozAutoGainControl: false
//mozNoiseSuppression: false
}
}
}
else {
constraint = {
video: false,
audio: {
deviceId: deviceId ? {exact: deviceId} : void 0,
echoCancellation: false
}
}
}
fdambrosio, theredspoon and tandavantoninadert
Metadata
Metadata
Assignees
Labels
No labels