@snapcall/stream-ui 1.36.0 → 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 +14 -12
- package/dist/stream-ui.js +14 -12
- 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
|
}
|
|
@@ -12556,7 +12558,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: baseOptions })=>{
|
|
|
12556
12558
|
});
|
|
12557
12559
|
await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).setStep(flowStep.token);
|
|
12558
12560
|
await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).joinRecorder();
|
|
12559
|
-
} else
|
|
12561
|
+
} else {
|
|
12560
12562
|
setOptions({
|
|
12561
12563
|
...options,
|
|
12562
12564
|
controls: {
|
|
@@ -12579,7 +12581,7 @@ const $26ed036cbc17809a$var$StreamUI = ({ options: baseOptions })=>{
|
|
|
12579
12581
|
setPermissions(state.permissions);
|
|
12580
12582
|
setSelfPeerId(peerId);
|
|
12581
12583
|
setClientInitResult(event.detail || {});
|
|
12582
|
-
if (type
|
|
12584
|
+
if (type !== 'assist' && !options.greeting) try {
|
|
12583
12585
|
if (!options.headless) await (0, $15a01b611391c1e7$export$494039379563c94d)(options);
|
|
12584
12586
|
if (options.controls?.microphone?.enabled) await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableMicrophone();
|
|
12585
12587
|
if (options.controls?.camera?.enabled && flowStep?.config?.allow_video !== false) await (0, $c9e496369b59be7a$export$2f377c2162fd02b2).enableVideo();
|
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
|
}
|
|
@@ -12562,7 +12564,7 @@ const $ee8cb448c2c74888$var$StreamUI = ({ options: baseOptions })=>{
|
|
|
12562
12564
|
});
|
|
12563
12565
|
await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).setStep(flowStep.token);
|
|
12564
12566
|
await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).joinRecorder();
|
|
12565
|
-
} else
|
|
12567
|
+
} else {
|
|
12566
12568
|
setOptions({
|
|
12567
12569
|
...options,
|
|
12568
12570
|
controls: {
|
|
@@ -12585,7 +12587,7 @@ const $ee8cb448c2c74888$var$StreamUI = ({ options: baseOptions })=>{
|
|
|
12585
12587
|
setPermissions(state.permissions);
|
|
12586
12588
|
setSelfPeerId(peerId);
|
|
12587
12589
|
setClientInitResult(event.detail || {});
|
|
12588
|
-
if (type
|
|
12590
|
+
if (type !== 'assist' && !options.greeting) try {
|
|
12589
12591
|
if (!options.headless) await (0, $c3d5253d9d597eb5$export$494039379563c94d)(options);
|
|
12590
12592
|
if (options.controls?.microphone?.enabled) await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).enableMicrophone();
|
|
12591
12593
|
if (options.controls?.camera?.enabled && flowStep?.config?.allow_video !== false) await (0, $c48c1ecc38fed4e9$export$2f377c2162fd02b2).enableVideo();
|