@stream-io/video-client 1.37.1 → 1.37.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 +6 -0
- package/dist/index.browser.es.js +24 -4
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +24 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +24 -4
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/store/CallState.ts +25 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.37.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.37.1...@stream-io/video-client-1.37.2) (2025-11-20)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **react-bindings:** getSnapshot caching ([#2008](https://github.com/GetStream/stream-video-js/issues/2008)) ([ed0983c](https://github.com/GetStream/stream-video-js/commit/ed0983cf2d1525a2faaa0b9e9387ac448b35c8e1)), closes [#2006](https://github.com/GetStream/stream-video-js/issues/2006) [#1953](https://github.com/GetStream/stream-video-js/issues/1953)
|
|
10
|
+
|
|
5
11
|
## [1.37.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.37.0...@stream-io/video-client-1.37.1) (2025-11-17)
|
|
6
12
|
|
|
7
13
|
### Bug Fixes
|
package/dist/index.browser.es.js
CHANGED
|
@@ -4867,6 +4867,26 @@ const defaultEgress = {
|
|
|
4867
4867
|
hls: { playlist_url: '', status: '' },
|
|
4868
4868
|
rtmps: [],
|
|
4869
4869
|
};
|
|
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
|
+
};
|
|
4870
4890
|
/**
|
|
4871
4891
|
* Holds the state of the current call.
|
|
4872
4892
|
* @react You don't have to use this class directly, as we are exposing the state through Hooks.
|
|
@@ -5546,8 +5566,8 @@ class CallState {
|
|
|
5546
5566
|
// in the original subject
|
|
5547
5567
|
map((ps) => ps.sort(this.sortParticipantsBy)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5548
5568
|
this.localParticipant$ = this.participants$.pipe(map((participants) => participants.find((p) => p.isLocalParticipant)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5549
|
-
this.remoteParticipants$ = this.participants$.pipe(map((
|
|
5550
|
-
this.pinnedParticipants$ = this.participants$.pipe(map((
|
|
5569
|
+
this.remoteParticipants$ = this.participants$.pipe(map(createStableParticipantsFilter((p) => !p.isLocalParticipant)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5570
|
+
this.pinnedParticipants$ = this.participants$.pipe(map(createStableParticipantsFilter((p) => !!p.pin)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5551
5571
|
this.dominantSpeaker$ = this.participants$.pipe(map((participants) => participants.find((p) => p.isDominantSpeaker)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5552
5572
|
this.hasOngoingScreenShare$ = this.participants$.pipe(map((participants) => participants.some((p) => hasScreenShare(p))), distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5553
5573
|
// dates
|
|
@@ -5980,7 +6000,7 @@ const getSdkVersion = (sdk) => {
|
|
|
5980
6000
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
5981
6001
|
};
|
|
5982
6002
|
|
|
5983
|
-
const version = "1.37.
|
|
6003
|
+
const version = "1.37.2";
|
|
5984
6004
|
const [major, minor, patch] = version.split('.');
|
|
5985
6005
|
let sdkInfo = {
|
|
5986
6006
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -14890,7 +14910,7 @@ class StreamClient {
|
|
|
14890
14910
|
this.getUserAgent = () => {
|
|
14891
14911
|
if (!this.cachedUserAgent) {
|
|
14892
14912
|
const { clientAppIdentifier = {} } = this.options;
|
|
14893
|
-
const { sdkName = 'js', sdkVersion = "1.37.
|
|
14913
|
+
const { sdkName = 'js', sdkVersion = "1.37.2", ...extras } = clientAppIdentifier;
|
|
14894
14914
|
this.cachedUserAgent = [
|
|
14895
14915
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
14896
14916
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|