@stream-io/video-react-sdk 1.39.2 → 1.39.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 +15 -0
- package/dist/embedded.cjs.js +2 -25
- package/dist/embedded.cjs.js.map +1 -1
- package/dist/embedded.es.js +3 -26
- package/dist/embedded.es.js.map +1 -1
- package/dist/index.cjs.js +3 -26
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +4 -27
- package/dist/index.es.js.map +1 -1
- package/dist/src/core/components/CallLayout/hooks.d.ts +0 -1
- package/package.json +5 -5
- package/src/core/components/CallLayout/SpeakerLayout.tsx +5 -2
- package/src/core/components/CallLayout/hooks.ts +0 -28
|
@@ -14,5 +14,4 @@ export declare const useFilteredParticipants: ({ excludeLocalParticipant, filter
|
|
|
14
14
|
}) => StreamVideoParticipant[];
|
|
15
15
|
export declare const applyParticipantsFilter: (participants: StreamVideoParticipant[], filter: ParticipantPredicate | ParticipantFilter) => StreamVideoParticipant[];
|
|
16
16
|
export declare const usePaginatedLayoutSortPreset: (call: Call | undefined) => void;
|
|
17
|
-
export declare const useSpeakerLayoutSortPreset: (call: Call | undefined, isOneOnOneCall: boolean) => void;
|
|
18
17
|
export declare const useRawRemoteParticipants: () => StreamVideoParticipant[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-sdk",
|
|
3
|
-
"version": "1.39.
|
|
3
|
+
"version": "1.39.3",
|
|
4
4
|
"main": "./dist/index.cjs.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@floating-ui/react": "^0.27.19",
|
|
48
|
-
"@stream-io/video-client": "1.55.
|
|
49
|
-
"@stream-io/video-filters-web": "0.8.
|
|
50
|
-
"@stream-io/video-react-bindings": "1.18.
|
|
48
|
+
"@stream-io/video-client": "1.55.2",
|
|
49
|
+
"@stream-io/video-filters-web": "0.8.3",
|
|
50
|
+
"@stream-io/video-react-bindings": "1.18.3",
|
|
51
51
|
"chart.js": "^4.5.1",
|
|
52
52
|
"clsx": "^2.1.1",
|
|
53
53
|
"react-chartjs-2": "^5.3.1"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@rollup/plugin-json": "^6.1.0",
|
|
61
61
|
"@rollup/plugin-replace": "^6.0.3",
|
|
62
62
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
63
|
-
"@stream-io/audio-filters-web": "^0.10.
|
|
63
|
+
"@stream-io/audio-filters-web": "^0.10.1",
|
|
64
64
|
"@stream-io/typescript-config": "^0.0.0",
|
|
65
65
|
"@stream-io/video-styling": "^1.14.2",
|
|
66
66
|
"@types/node": "^25.9.3",
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { hasScreenShare } from '@stream-io/video-client';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
useCall,
|
|
6
|
+
useCallStateHooks,
|
|
7
|
+
useSpeakerLayoutSortPreset,
|
|
8
|
+
} from '@stream-io/video-react-bindings';
|
|
5
9
|
|
|
6
10
|
import {
|
|
7
11
|
DefaultParticipantViewUI,
|
|
@@ -19,7 +23,6 @@ import {
|
|
|
19
23
|
ParticipantPredicate,
|
|
20
24
|
useFilteredParticipants,
|
|
21
25
|
useRawRemoteParticipants,
|
|
22
|
-
useSpeakerLayoutSortPreset,
|
|
23
26
|
} from './hooks';
|
|
24
27
|
import { useCalculateHardLimit } from '../../hooks/useCalculateHardLimit';
|
|
25
28
|
import { ParticipantsAudio } from '../Audio';
|
|
@@ -2,16 +2,12 @@ import { useEffect, useMemo } from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
Call,
|
|
4
4
|
CallTypes,
|
|
5
|
-
combineComparators,
|
|
6
|
-
Comparator,
|
|
7
5
|
defaultSortPreset,
|
|
8
6
|
hasAudio,
|
|
9
7
|
hasScreenShare,
|
|
10
8
|
hasVideo,
|
|
11
9
|
isPinned,
|
|
12
10
|
paginatedLayoutSortPreset,
|
|
13
|
-
screenSharing,
|
|
14
|
-
speakerLayoutSortPreset,
|
|
15
11
|
StreamVideoParticipant,
|
|
16
12
|
} from '@stream-io/video-client';
|
|
17
13
|
import { useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
@@ -94,24 +90,6 @@ export const usePaginatedLayoutSortPreset = (call: Call | undefined) => {
|
|
|
94
90
|
}, [call]);
|
|
95
91
|
};
|
|
96
92
|
|
|
97
|
-
export const useSpeakerLayoutSortPreset = (
|
|
98
|
-
call: Call | undefined,
|
|
99
|
-
isOneOnOneCall: boolean,
|
|
100
|
-
) => {
|
|
101
|
-
useEffect(() => {
|
|
102
|
-
if (!call) return;
|
|
103
|
-
// always show the remote participant in the spotlight
|
|
104
|
-
if (isOneOnOneCall) {
|
|
105
|
-
call.setSortParticipantsBy(combineComparators(screenSharing, loggedIn));
|
|
106
|
-
} else {
|
|
107
|
-
call.setSortParticipantsBy(speakerLayoutSortPreset);
|
|
108
|
-
}
|
|
109
|
-
return () => {
|
|
110
|
-
resetSortPreset(call);
|
|
111
|
-
};
|
|
112
|
-
}, [call, isOneOnOneCall]);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
93
|
export const useRawRemoteParticipants = () => {
|
|
116
94
|
const { useRawParticipants } = useCallStateHooks();
|
|
117
95
|
const rawParticipants = useRawParticipants();
|
|
@@ -128,9 +106,3 @@ const resetSortPreset = (call: Call) => {
|
|
|
128
106
|
callConfig.options.sortParticipantsBy || defaultSortPreset,
|
|
129
107
|
);
|
|
130
108
|
};
|
|
131
|
-
|
|
132
|
-
const loggedIn: Comparator<StreamVideoParticipant> = (a, b) => {
|
|
133
|
-
if (a.isLocalParticipant) return 1;
|
|
134
|
-
if (b.isLocalParticipant) return -1;
|
|
135
|
-
return 0;
|
|
136
|
-
};
|