@stream-io/video-client 1.37.2 → 1.37.3
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/CHANGELOG.md +8 -0
- package/dist/index.browser.es.js +14 -6
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +14 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +14 -6
- package/dist/index.es.js.map +1 -1
- package/package.json +2 -2
- package/src/devices/MicrophoneManager.ts +15 -4
- package/src/devices/__tests__/NoiseCancellationStub.ts +6 -2
package/dist/index.es.js
CHANGED
|
@@ -6001,7 +6001,7 @@ const getSdkVersion = (sdk) => {
|
|
|
6001
6001
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
6002
6002
|
};
|
|
6003
6003
|
|
|
6004
|
-
const version = "1.37.
|
|
6004
|
+
const version = "1.37.3";
|
|
6005
6005
|
const [major, minor, patch] = version.split('.');
|
|
6006
6006
|
let sdkInfo = {
|
|
6007
6007
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -11266,7 +11266,9 @@ class MicrophoneManager extends AudioDeviceManager {
|
|
|
11266
11266
|
})
|
|
11267
11267
|
.then((canAutoEnable) => {
|
|
11268
11268
|
if (canAutoEnable) {
|
|
11269
|
-
this.noiseCancellation?.enable()
|
|
11269
|
+
this.noiseCancellation?.enable().catch((err) => {
|
|
11270
|
+
this.logger.warn('Failed to enable noise cancellation', err);
|
|
11271
|
+
});
|
|
11270
11272
|
}
|
|
11271
11273
|
})
|
|
11272
11274
|
.catch((err) => {
|
|
@@ -11336,7 +11338,9 @@ class MicrophoneManager extends AudioDeviceManager {
|
|
|
11336
11338
|
canAutoEnable = await noiseCancellation.canAutoEnable();
|
|
11337
11339
|
}
|
|
11338
11340
|
if (canAutoEnable) {
|
|
11339
|
-
noiseCancellation.enable()
|
|
11341
|
+
noiseCancellation.enable().catch((err) => {
|
|
11342
|
+
this.logger.warn('Failed to enable noise cancellation', err);
|
|
11343
|
+
});
|
|
11340
11344
|
}
|
|
11341
11345
|
}
|
|
11342
11346
|
}
|
|
@@ -11416,10 +11420,14 @@ class MicrophoneManager extends AudioDeviceManager {
|
|
|
11416
11420
|
if (this.noiseCancellation) {
|
|
11417
11421
|
const disableAudioProcessing = profile === AudioBitrateProfile.MUSIC_HIGH_QUALITY;
|
|
11418
11422
|
if (disableAudioProcessing) {
|
|
11419
|
-
this.noiseCancellation.disable()
|
|
11423
|
+
this.noiseCancellation.disable().catch((err) => {
|
|
11424
|
+
this.logger.warn('Failed to disable noise cancellation for music mode', err);
|
|
11425
|
+
}); // disable for high quality music mode
|
|
11420
11426
|
}
|
|
11421
11427
|
else {
|
|
11422
|
-
this.noiseCancellation.enable()
|
|
11428
|
+
this.noiseCancellation.enable().catch((err) => {
|
|
11429
|
+
this.logger.warn('Failed to enable noise cancellation', err);
|
|
11430
|
+
}); // restore it for other modes if available
|
|
11423
11431
|
}
|
|
11424
11432
|
}
|
|
11425
11433
|
}
|
|
@@ -14909,7 +14917,7 @@ class StreamClient {
|
|
|
14909
14917
|
this.getUserAgent = () => {
|
|
14910
14918
|
if (!this.cachedUserAgent) {
|
|
14911
14919
|
const { clientAppIdentifier = {} } = this.options;
|
|
14912
|
-
const { sdkName = 'js', sdkVersion = "1.37.
|
|
14920
|
+
const { sdkName = 'js', sdkVersion = "1.37.3", ...extras } = clientAppIdentifier;
|
|
14913
14921
|
this.cachedUserAgent = [
|
|
14914
14922
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
14915
14923
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|