@stream-io/video-client 1.22.2 → 1.23.1
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 +17 -0
- package/dist/index.browser.es.js +34 -17
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +34 -17
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +34 -17
- package/dist/index.es.js.map +1 -1
- package/dist/src/devices/MicrophoneManager.d.ts +0 -3
- package/dist/src/stats/rtc/types.d.ts +1 -1
- package/package.json +2 -2
- package/src/devices/InputMediaDeviceManager.ts +3 -1
- package/src/devices/MicrophoneManager.ts +30 -18
- package/src/devices/__tests__/MicrophoneManager.test.ts +1 -17
- package/src/devices/__tests__/MicrophoneManagerRN.test.ts +0 -24
- package/src/devices/__tests__/NoiseCancellationStub.ts +19 -0
- package/src/stats/rtc/types.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.23.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.23.0...@stream-io/video-client-1.23.1) (2025-05-21)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- restore echoCancellation settings ([#1799](https://github.com/GetStream/stream-video-js/issues/1799)) ([e839036](https://github.com/GetStream/stream-video-js/commit/e839036f279ee9b27ce3d62d4f07e3517c3e5fef)), closes [#1794](https://github.com/GetStream/stream-video-js/issues/1794)
|
|
10
|
+
|
|
11
|
+
## [1.23.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.22.2...@stream-io/video-client-1.23.0) (2025-05-20)
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- **react-native:** Noise Cancellation ([#1793](https://github.com/GetStream/stream-video-js/issues/1793)) ([d7843e1](https://github.com/GetStream/stream-video-js/commit/d7843e1a23e6f6a35d1c159438d09bdfd17450a5))
|
|
16
|
+
- **web:** improved noise cancellation ([#1794](https://github.com/GetStream/stream-video-js/issues/1794)) ([d59f19b](https://github.com/GetStream/stream-video-js/commit/d59f19b1ba1ff83fe5f024d783b868f4e98d3380))
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
- do not mutate filters array during pipeline setup ([#1798](https://github.com/GetStream/stream-video-js/issues/1798)) ([e9832e5](https://github.com/GetStream/stream-video-js/commit/e9832e5ef41b3f6cddfe2d0cb2cf840e9b28bb86))
|
|
21
|
+
|
|
5
22
|
## [1.22.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.22.1...@stream-io/video-client-1.22.2) (2025-05-15)
|
|
6
23
|
|
|
7
24
|
- adjust ErrorFromResponse class ([#1791](https://github.com/GetStream/stream-video-js/issues/1791)) ([c0abcba](https://github.com/GetStream/stream-video-js/commit/c0abcbacfddeb87d8378c4418f80e6770981cdc8)), closes [GetStream/chat#1540](https://github.com/GetStream/chat/issues/1540)
|
package/dist/index.browser.es.js
CHANGED
|
@@ -5680,7 +5680,7 @@ const aggregate = (stats) => {
|
|
|
5680
5680
|
return report;
|
|
5681
5681
|
};
|
|
5682
5682
|
|
|
5683
|
-
const version = "1.
|
|
5683
|
+
const version = "1.23.1";
|
|
5684
5684
|
const [major, minor, patch] = version.split('.');
|
|
5685
5685
|
let sdkInfo = {
|
|
5686
5686
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -9461,13 +9461,16 @@ class InputMediaDeviceManager {
|
|
|
9461
9461
|
start: filter,
|
|
9462
9462
|
stop: undefined,
|
|
9463
9463
|
};
|
|
9464
|
+
this.call.tracer.trace(`registerFilter.${TrackType[this.trackType]}`, null);
|
|
9464
9465
|
const registered = withoutConcurrency(this.filterRegistrationConcurrencyTag, async () => {
|
|
9466
|
+
await settled(this.statusChangeConcurrencyTag);
|
|
9465
9467
|
this.filters.push(entry);
|
|
9466
9468
|
await this.applySettingsToStream();
|
|
9467
9469
|
});
|
|
9468
9470
|
return {
|
|
9469
9471
|
registered,
|
|
9470
9472
|
unregister: () => withoutConcurrency(this.filterRegistrationConcurrencyTag, async () => {
|
|
9473
|
+
await settled(this.statusChangeConcurrencyTag);
|
|
9471
9474
|
entry.stop?.();
|
|
9472
9475
|
this.filters = this.filters.filter((f) => f !== entry);
|
|
9473
9476
|
await this.applySettingsToStream();
|
|
@@ -10338,7 +10341,17 @@ class MicrophoneManager extends InputMediaDeviceManager {
|
|
|
10338
10341
|
NoiseCancellationSettingsModeEnum.AUTO_ON;
|
|
10339
10342
|
if (autoOn && callingState === CallingState.JOINED) {
|
|
10340
10343
|
this.noiseCancellationRegistration
|
|
10341
|
-
.then(() =>
|
|
10344
|
+
.then(() => {
|
|
10345
|
+
if (this.noiseCancellation?.canAutoEnable) {
|
|
10346
|
+
return this.noiseCancellation.canAutoEnable();
|
|
10347
|
+
}
|
|
10348
|
+
return true;
|
|
10349
|
+
})
|
|
10350
|
+
.then((canAutoEnable) => {
|
|
10351
|
+
if (canAutoEnable) {
|
|
10352
|
+
this.noiseCancellation?.enable();
|
|
10353
|
+
}
|
|
10354
|
+
})
|
|
10342
10355
|
.catch((err) => {
|
|
10343
10356
|
this.logger('warn', `Failed to enable noise cancellation`, err);
|
|
10344
10357
|
return this.call.notifyNoiseCancellationStopped();
|
|
@@ -10356,13 +10369,9 @@ class MicrophoneManager extends InputMediaDeviceManager {
|
|
|
10356
10369
|
/**
|
|
10357
10370
|
* Enables noise cancellation for the microphone.
|
|
10358
10371
|
*
|
|
10359
|
-
* Note: not supported in React Native.
|
|
10360
10372
|
* @param noiseCancellation - a noise cancellation instance to use.
|
|
10361
10373
|
*/
|
|
10362
10374
|
async enableNoiseCancellation(noiseCancellation) {
|
|
10363
|
-
if (isReactNative()) {
|
|
10364
|
-
throw new Error('Noise cancellation is not supported in React Native');
|
|
10365
|
-
}
|
|
10366
10375
|
const { ownCapabilities, settings } = this.call.state;
|
|
10367
10376
|
const hasNoiseCancellationCapability = ownCapabilities.includes(OwnCapability.ENABLE_NOISE_CANCELLATION);
|
|
10368
10377
|
if (!hasNoiseCancellationCapability) {
|
|
@@ -10378,6 +10387,7 @@ class MicrophoneManager extends InputMediaDeviceManager {
|
|
|
10378
10387
|
this.noiseCancellation = noiseCancellation;
|
|
10379
10388
|
// listen for change events and notify the SFU
|
|
10380
10389
|
this.noiseCancellationChangeUnsubscribe = this.noiseCancellation.on('change', (enabled) => {
|
|
10390
|
+
this.call.tracer.trace('noiseCancellation.enabled', enabled);
|
|
10381
10391
|
if (enabled) {
|
|
10382
10392
|
this.call.notifyNoiseCancellationStarting().catch((err) => {
|
|
10383
10393
|
this.logger('warn', `notifyNoiseCancellationStart failed`, err);
|
|
@@ -10389,16 +10399,28 @@ class MicrophoneManager extends InputMediaDeviceManager {
|
|
|
10389
10399
|
});
|
|
10390
10400
|
}
|
|
10391
10401
|
});
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10402
|
+
if (isReactNative()) {
|
|
10403
|
+
// no filter registration in React Native, its done in the native code on app init
|
|
10404
|
+
this.noiseCancellationRegistration = Promise.resolve();
|
|
10405
|
+
}
|
|
10406
|
+
else {
|
|
10407
|
+
const registrationResult = this.registerFilter(noiseCancellation.toFilter());
|
|
10408
|
+
this.noiseCancellationRegistration = registrationResult.registered;
|
|
10409
|
+
this.unregisterNoiseCancellation = registrationResult.unregister;
|
|
10410
|
+
await this.noiseCancellationRegistration;
|
|
10411
|
+
}
|
|
10396
10412
|
// handles an edge case where a noise cancellation is enabled after
|
|
10397
10413
|
// the participant as joined the call -> we immediately enable NC
|
|
10398
10414
|
if (noiseCancellationSettings.mode ===
|
|
10399
10415
|
NoiseCancellationSettingsModeEnum.AUTO_ON &&
|
|
10400
10416
|
this.call.state.callingState === CallingState.JOINED) {
|
|
10401
|
-
|
|
10417
|
+
let canAutoEnable = true;
|
|
10418
|
+
if (noiseCancellation.canAutoEnable) {
|
|
10419
|
+
canAutoEnable = await noiseCancellation.canAutoEnable();
|
|
10420
|
+
}
|
|
10421
|
+
if (canAutoEnable) {
|
|
10422
|
+
noiseCancellation.enable();
|
|
10423
|
+
}
|
|
10402
10424
|
}
|
|
10403
10425
|
}
|
|
10404
10426
|
catch (e) {
|
|
@@ -10410,13 +10432,8 @@ class MicrophoneManager extends InputMediaDeviceManager {
|
|
|
10410
10432
|
}
|
|
10411
10433
|
/**
|
|
10412
10434
|
* Disables noise cancellation for the microphone.
|
|
10413
|
-
*
|
|
10414
|
-
* Note: not supported in React Native.
|
|
10415
10435
|
*/
|
|
10416
10436
|
async disableNoiseCancellation() {
|
|
10417
|
-
if (isReactNative()) {
|
|
10418
|
-
throw new Error('Noise cancellation is not supported in React Native');
|
|
10419
|
-
}
|
|
10420
10437
|
await (this.unregisterNoiseCancellation?.() ?? Promise.resolve())
|
|
10421
10438
|
.then(() => this.noiseCancellation?.disable())
|
|
10422
10439
|
.then(() => this.noiseCancellationChangeUnsubscribe?.())
|
|
@@ -13770,7 +13787,7 @@ class StreamClient {
|
|
|
13770
13787
|
this.getUserAgent = () => {
|
|
13771
13788
|
if (!this.cachedUserAgent) {
|
|
13772
13789
|
const { clientAppIdentifier = {} } = this.options;
|
|
13773
|
-
const { sdkName = 'js', sdkVersion = "1.
|
|
13790
|
+
const { sdkName = 'js', sdkVersion = "1.23.1", ...extras } = clientAppIdentifier;
|
|
13774
13791
|
this.cachedUserAgent = [
|
|
13775
13792
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
13776
13793
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|