@stream-io/video-client 1.38.0 → 1.38.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/CHANGELOG.md +13 -0
- package/dist/index.browser.es.js +19 -26
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +19 -26
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +19 -26
- package/dist/index.es.js.map +1 -1
- package/dist/src/store/stateStore.d.ts +6 -0
- package/package.json +1 -1
- package/src/Call.ts +2 -2
- package/src/store/CallState.ts +2 -25
- package/src/store/stateStore.ts +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.38.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.38.1...@stream-io/video-client-1.38.2) (2025-12-11)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- revert usage of useSyncExternalStore ([#2043](https://github.com/GetStream/stream-video-js/issues/2043)) ([849e896](https://github.com/GetStream/stream-video-js/commit/849e8964ac90d5785a6d608443f80156d1081744)), closes [#1953](https://github.com/GetStream/stream-video-js/issues/1953) [#2034](https://github.com/GetStream/stream-video-js/issues/2034) [#2006](https://github.com/GetStream/stream-video-js/issues/2006) [#2008](https://github.com/GetStream/stream-video-js/issues/2008)
|
|
10
|
+
|
|
11
|
+
## [1.38.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.38.0...@stream-io/video-client-1.38.1) (2025-12-08)
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- added call state update for handling case when call.ring event as not triggered ([#2035](https://github.com/GetStream/stream-video-js/issues/2035)) ([3c79665](https://github.com/GetStream/stream-video-js/commit/3c79665323ad5172d3af35e9ee2f86655ac11670))
|
|
16
|
+
- **state:** ensure stable empty array for participant predicates ([#2036](https://github.com/GetStream/stream-video-js/issues/2036)) ([1aa72c8](https://github.com/GetStream/stream-video-js/commit/1aa72c8daf482bd157866960b4b9a92e272ac90b)), closes [#2034](https://github.com/GetStream/stream-video-js/issues/2034) [#2008](https://github.com/GetStream/stream-video-js/issues/2008)
|
|
17
|
+
|
|
5
18
|
## [1.38.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.37.3...@stream-io/video-client-1.38.0) (2025-12-08)
|
|
6
19
|
|
|
7
20
|
### Features
|
package/dist/index.browser.es.js
CHANGED
|
@@ -4485,6 +4485,19 @@ class StreamVideoWriteableStateStore {
|
|
|
4485
4485
|
this.setCalls((calls) => [...calls, call]);
|
|
4486
4486
|
}
|
|
4487
4487
|
};
|
|
4488
|
+
/**
|
|
4489
|
+
* Registers a {@link Call} object if it doesn't exist, otherwise updates it.
|
|
4490
|
+
*
|
|
4491
|
+
* @param call the call to register or update.
|
|
4492
|
+
*/
|
|
4493
|
+
this.registerOrUpdateCall = (call) => {
|
|
4494
|
+
if (this.calls.find((c) => c.cid === call.cid)) {
|
|
4495
|
+
return this.setCalls((calls) => calls.map((c) => (c.cid === call.cid ? call : c)));
|
|
4496
|
+
}
|
|
4497
|
+
else {
|
|
4498
|
+
return this.registerCall(call);
|
|
4499
|
+
}
|
|
4500
|
+
};
|
|
4488
4501
|
/**
|
|
4489
4502
|
* Removes a {@link Call} object from the list of {@link Call} objects created/tracked by this client.
|
|
4490
4503
|
*
|
|
@@ -4867,26 +4880,6 @@ const defaultEgress = {
|
|
|
4867
4880
|
hls: { playlist_url: '', status: '' },
|
|
4868
4881
|
rtmps: [],
|
|
4869
4882
|
};
|
|
4870
|
-
/**
|
|
4871
|
-
* Creates a stable participant filter function, ready to be used in combination
|
|
4872
|
-
* with the `useSyncExternalStore` hook.
|
|
4873
|
-
*
|
|
4874
|
-
* @param predicate the predicate to use.
|
|
4875
|
-
*/
|
|
4876
|
-
const createStableParticipantsFilter = (predicate) => {
|
|
4877
|
-
const empty = [];
|
|
4878
|
-
return (participants) => {
|
|
4879
|
-
// no need to filter if there are no participants
|
|
4880
|
-
if (!participants.length)
|
|
4881
|
-
return participants;
|
|
4882
|
-
// return a stable empty array if there are no remote participants
|
|
4883
|
-
// instead of creating an empty one
|
|
4884
|
-
const filteredParticipants = participants.filter(predicate);
|
|
4885
|
-
if (!filteredParticipants.length)
|
|
4886
|
-
return empty;
|
|
4887
|
-
return filteredParticipants;
|
|
4888
|
-
};
|
|
4889
|
-
};
|
|
4890
4883
|
/**
|
|
4891
4884
|
* Holds the state of the current call.
|
|
4892
4885
|
* @react You don't have to use this class directly, as we are exposing the state through Hooks.
|
|
@@ -5566,8 +5559,8 @@ class CallState {
|
|
|
5566
5559
|
// in the original subject
|
|
5567
5560
|
map((ps) => ps.sort(this.sortParticipantsBy)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5568
5561
|
this.localParticipant$ = this.participants$.pipe(map((participants) => participants.find((p) => p.isLocalParticipant)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5569
|
-
this.remoteParticipants$ = this.participants$.pipe(map(
|
|
5570
|
-
this.pinnedParticipants$ = this.participants$.pipe(map(
|
|
5562
|
+
this.remoteParticipants$ = this.participants$.pipe(map((participants) => participants.filter((p) => !p.isLocalParticipant)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5563
|
+
this.pinnedParticipants$ = this.participants$.pipe(map((participants) => participants.filter((p) => !!p.pin)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5571
5564
|
this.dominantSpeaker$ = this.participants$.pipe(map((participants) => participants.find((p) => p.isDominantSpeaker)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5572
5565
|
this.hasOngoingScreenShare$ = this.participants$.pipe(map((participants) => participants.some((p) => hasScreenShare(p))), distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5573
5566
|
// dates
|
|
@@ -6000,7 +5993,7 @@ const getSdkVersion = (sdk) => {
|
|
|
6000
5993
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
6001
5994
|
};
|
|
6002
5995
|
|
|
6003
|
-
const version = "1.38.
|
|
5996
|
+
const version = "1.38.2";
|
|
6004
5997
|
const [major, minor, patch] = version.split('.');
|
|
6005
5998
|
let sdkInfo = {
|
|
6006
5999
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -12237,7 +12230,7 @@ class Call {
|
|
|
12237
12230
|
}
|
|
12238
12231
|
if (this.streamClient._hasConnectionID()) {
|
|
12239
12232
|
this.watching = true;
|
|
12240
|
-
this.clientStore.
|
|
12233
|
+
this.clientStore.registerOrUpdateCall(this);
|
|
12241
12234
|
}
|
|
12242
12235
|
await this.applyDeviceConfig(response.call.settings, false);
|
|
12243
12236
|
return response;
|
|
@@ -12258,7 +12251,7 @@ class Call {
|
|
|
12258
12251
|
}
|
|
12259
12252
|
if (this.streamClient._hasConnectionID()) {
|
|
12260
12253
|
this.watching = true;
|
|
12261
|
-
this.clientStore.
|
|
12254
|
+
this.clientStore.registerOrUpdateCall(this);
|
|
12262
12255
|
}
|
|
12263
12256
|
await this.applyDeviceConfig(response.call.settings, false);
|
|
12264
12257
|
return response;
|
|
@@ -14999,7 +14992,7 @@ class StreamClient {
|
|
|
14999
14992
|
this.getUserAgent = () => {
|
|
15000
14993
|
if (!this.cachedUserAgent) {
|
|
15001
14994
|
const { clientAppIdentifier = {} } = this.options;
|
|
15002
|
-
const { sdkName = 'js', sdkVersion = "1.38.
|
|
14995
|
+
const { sdkName = 'js', sdkVersion = "1.38.2", ...extras } = clientAppIdentifier;
|
|
15003
14996
|
this.cachedUserAgent = [
|
|
15004
14997
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
15005
14998
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|