@snapcall/stream-ui 1.36.1 → 1.36.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/stream-ui.esm.js +12 -10
- package/dist/stream-ui.js +12 -10
- package/package.json +1 -1
package/dist/stream-ui.esm.js
CHANGED
|
@@ -2092,18 +2092,20 @@ class $f1b448a7dd8f8e1c$export$79f141de891a5fed {
|
|
|
2092
2092
|
const newWebcamDevice = this.webcams.get(webcams[newWebcamIndex]);
|
|
2093
2093
|
if (!newWebcamDevice) throw new Error(`webcam device at index ${newWebcamIndex} was not found`);
|
|
2094
2094
|
this.webcam.device = newWebcamDevice;
|
|
2095
|
-
optionalParam.deviceId = {
|
|
2095
|
+
if (this.webcam.device?.deviceId && this.webcam.device.deviceId !== 'unknown') optionalParam.deviceId = {
|
|
2096
2096
|
exact: this.webcam.device?.deviceId
|
|
2097
2097
|
};
|
|
2098
2098
|
}
|
|
2099
|
-
} else if (config?.facingMode) {
|
|
2100
|
-
optionalParam.facingMode = config.facingMode;
|
|
2101
|
-
this.webcam.facingMode = config.facingMode;
|
|
2102
2099
|
} else {
|
|
2103
|
-
if (config?.
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
}
|
|
2100
|
+
if (config?.facingMode) {
|
|
2101
|
+
optionalParam.facingMode = config.facingMode;
|
|
2102
|
+
this.webcam.facingMode = config.facingMode;
|
|
2103
|
+
} else if (config?.device) {
|
|
2104
|
+
this.webcam.device = config.device;
|
|
2105
|
+
if (this.webcam.device?.deviceId && this.webcam.device.deviceId !== 'unknown') optionalParam.deviceId = {
|
|
2106
|
+
exact: this.webcam.device?.deviceId
|
|
2107
|
+
};
|
|
2108
|
+
}
|
|
2107
2109
|
}
|
|
2108
2110
|
if (!this.webcam.device) throw new Error('no webcam devices');
|
|
2109
2111
|
this.webcam.resolution = config?.resolution || this.webcam.resolution || 'hd';
|
|
@@ -2907,9 +2909,9 @@ class $c31e3fb4360572af$export$2e2bcd8739ae039 extends $c31e3fb4360572af$var$Str
|
|
|
2907
2909
|
}
|
|
2908
2910
|
await this.processMediaPermissionsAndResolveRequests({
|
|
2909
2911
|
audio: {
|
|
2910
|
-
deviceId: {
|
|
2912
|
+
deviceId: deviceId ? {
|
|
2911
2913
|
exact: deviceId
|
|
2912
|
-
},
|
|
2914
|
+
} : undefined,
|
|
2913
2915
|
noiseSuppression: true,
|
|
2914
2916
|
echoCancellation: true
|
|
2915
2917
|
}
|
package/dist/stream-ui.js
CHANGED
|
@@ -2098,18 +2098,20 @@ class $92c2fcd7d44c3301$export$79f141de891a5fed {
|
|
|
2098
2098
|
const newWebcamDevice = this.webcams.get(webcams[newWebcamIndex]);
|
|
2099
2099
|
if (!newWebcamDevice) throw new Error(`webcam device at index ${newWebcamIndex} was not found`);
|
|
2100
2100
|
this.webcam.device = newWebcamDevice;
|
|
2101
|
-
optionalParam.deviceId = {
|
|
2101
|
+
if (this.webcam.device?.deviceId && this.webcam.device.deviceId !== 'unknown') optionalParam.deviceId = {
|
|
2102
2102
|
exact: this.webcam.device?.deviceId
|
|
2103
2103
|
};
|
|
2104
2104
|
}
|
|
2105
|
-
} else if (config?.facingMode) {
|
|
2106
|
-
optionalParam.facingMode = config.facingMode;
|
|
2107
|
-
this.webcam.facingMode = config.facingMode;
|
|
2108
2105
|
} else {
|
|
2109
|
-
if (config?.
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
}
|
|
2106
|
+
if (config?.facingMode) {
|
|
2107
|
+
optionalParam.facingMode = config.facingMode;
|
|
2108
|
+
this.webcam.facingMode = config.facingMode;
|
|
2109
|
+
} else if (config?.device) {
|
|
2110
|
+
this.webcam.device = config.device;
|
|
2111
|
+
if (this.webcam.device?.deviceId && this.webcam.device.deviceId !== 'unknown') optionalParam.deviceId = {
|
|
2112
|
+
exact: this.webcam.device?.deviceId
|
|
2113
|
+
};
|
|
2114
|
+
}
|
|
2113
2115
|
}
|
|
2114
2116
|
if (!this.webcam.device) throw new Error('no webcam devices');
|
|
2115
2117
|
this.webcam.resolution = config?.resolution || this.webcam.resolution || 'hd';
|
|
@@ -2913,9 +2915,9 @@ class $1dedebd5ff3002eb$export$2e2bcd8739ae039 extends $1dedebd5ff3002eb$var$Str
|
|
|
2913
2915
|
}
|
|
2914
2916
|
await this.processMediaPermissionsAndResolveRequests({
|
|
2915
2917
|
audio: {
|
|
2916
|
-
deviceId: {
|
|
2918
|
+
deviceId: deviceId ? {
|
|
2917
2919
|
exact: deviceId
|
|
2918
|
-
},
|
|
2920
|
+
} : undefined,
|
|
2919
2921
|
noiseSuppression: true,
|
|
2920
2922
|
echoCancellation: true
|
|
2921
2923
|
}
|