|
|
@@ -122,7 +122,7 @@ function getConstraints(um = [], options = {}) {
|
|
122
|
122
|
}
|
|
123
|
123
|
}
|
|
124
|
124
|
if (options.cameraDeviceId) {
|
|
125
|
|
- constraints.video.deviceId = options.cameraDeviceId;
|
|
|
125
|
+ constraints.video.deviceId = { exact: options.cameraDeviceId };
|
|
126
|
126
|
} else {
|
|
127
|
127
|
const facingMode = options.facingMode || CameraFacingMode.USER;
|
|
128
|
128
|
|
|
|
@@ -139,11 +139,14 @@ function getConstraints(um = [], options = {}) {
|
|
139
|
139
|
|
|
140
|
140
|
constraints.audio = {
|
|
141
|
141
|
autoGainControl: !disableAGC && !disableAP,
|
|
142
|
|
- deviceId: options.micDeviceId,
|
|
143
|
142
|
echoCancellation: !disableAEC && !disableAP,
|
|
144
|
143
|
noiseSuppression: !disableNS && !disableAP
|
|
145
|
144
|
};
|
|
146
|
145
|
|
|
|
146
|
+ if (options.micDeviceId) {
|
|
|
147
|
+ constraints.audio.deviceId = { exact: options.micDeviceId };
|
|
|
148
|
+ }
|
|
|
149
|
+
|
|
147
|
150
|
if (stereo) {
|
|
148
|
151
|
Object.assign(constraints.audio, { channelCount: 2 });
|
|
149
|
152
|
}
|