@stream-io/video-client 1.38.1 → 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 +6 -0
- package/dist/index.browser.es.js +4 -24
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +4 -24
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +4 -24
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/store/CallState.ts +2 -25
package/dist/index.es.js
CHANGED
|
@@ -4881,26 +4881,6 @@ const defaultEgress = {
|
|
|
4881
4881
|
hls: { playlist_url: '', status: '' },
|
|
4882
4882
|
rtmps: [],
|
|
4883
4883
|
};
|
|
4884
|
-
/**
|
|
4885
|
-
* Creates a stable participant filter function, ready to be used in combination
|
|
4886
|
-
* with the `useSyncExternalStore` hook.
|
|
4887
|
-
*
|
|
4888
|
-
* @param predicate the predicate to use.
|
|
4889
|
-
*/
|
|
4890
|
-
const createStableParticipantsFilter = (predicate) => {
|
|
4891
|
-
const empty = [];
|
|
4892
|
-
return (participants) => {
|
|
4893
|
-
// no need to filter if there are no participants
|
|
4894
|
-
if (!participants.length)
|
|
4895
|
-
return empty;
|
|
4896
|
-
// return a stable empty array if there are no remote participants
|
|
4897
|
-
// instead of creating an empty one
|
|
4898
|
-
const filteredParticipants = participants.filter(predicate);
|
|
4899
|
-
if (!filteredParticipants.length)
|
|
4900
|
-
return empty;
|
|
4901
|
-
return filteredParticipants;
|
|
4902
|
-
};
|
|
4903
|
-
};
|
|
4904
4884
|
/**
|
|
4905
4885
|
* Holds the state of the current call.
|
|
4906
4886
|
* @react You don't have to use this class directly, as we are exposing the state through Hooks.
|
|
@@ -5580,8 +5560,8 @@ class CallState {
|
|
|
5580
5560
|
// in the original subject
|
|
5581
5561
|
map((ps) => ps.sort(this.sortParticipantsBy)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5582
5562
|
this.localParticipant$ = this.participants$.pipe(map((participants) => participants.find((p) => p.isLocalParticipant)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5583
|
-
this.remoteParticipants$ = this.participants$.pipe(map(
|
|
5584
|
-
this.pinnedParticipants$ = this.participants$.pipe(map(
|
|
5563
|
+
this.remoteParticipants$ = this.participants$.pipe(map((participants) => participants.filter((p) => !p.isLocalParticipant)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5564
|
+
this.pinnedParticipants$ = this.participants$.pipe(map((participants) => participants.filter((p) => !!p.pin)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5585
5565
|
this.dominantSpeaker$ = this.participants$.pipe(map((participants) => participants.find((p) => p.isDominantSpeaker)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5586
5566
|
this.hasOngoingScreenShare$ = this.participants$.pipe(map((participants) => participants.some((p) => hasScreenShare(p))), distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }));
|
|
5587
5567
|
// dates
|
|
@@ -6014,7 +5994,7 @@ const getSdkVersion = (sdk) => {
|
|
|
6014
5994
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
6015
5995
|
};
|
|
6016
5996
|
|
|
6017
|
-
const version = "1.38.
|
|
5997
|
+
const version = "1.38.2";
|
|
6018
5998
|
const [major, minor, patch] = version.split('.');
|
|
6019
5999
|
let sdkInfo = {
|
|
6020
6000
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -15011,7 +14991,7 @@ class StreamClient {
|
|
|
15011
14991
|
this.getUserAgent = () => {
|
|
15012
14992
|
if (!this.cachedUserAgent) {
|
|
15013
14993
|
const { clientAppIdentifier = {} } = this.options;
|
|
15014
|
-
const { sdkName = 'js', sdkVersion = "1.38.
|
|
14994
|
+
const { sdkName = 'js', sdkVersion = "1.38.2", ...extras } = clientAppIdentifier;
|
|
15015
14995
|
this.cachedUserAgent = [
|
|
15016
14996
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
15017
14997
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|