@stream-io/video-react-sdk 1.35.2 → 1.36.0
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 +3 -27
- package/dist/embedded.cjs.js.map +1 -1
- package/dist/embedded.es.js +4 -28
- package/dist/embedded.es.js.map +1 -1
- package/dist/index.cjs.js +4 -28
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +5 -29
- package/dist/index.es.js.map +1 -1
- package/package.json +3 -3
- package/src/core/components/CallLayout/PaginatedGridLayout.tsx +1 -0
- package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +7 -35
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0",
|
|
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.6",
|
|
48
|
-
"@stream-io/video-client": "1.
|
|
48
|
+
"@stream-io/video-client": "1.48.0",
|
|
49
49
|
"@stream-io/video-filters-web": "0.7.4",
|
|
50
|
-
"@stream-io/video-react-bindings": "1.
|
|
50
|
+
"@stream-io/video-react-bindings": "1.15.0",
|
|
51
51
|
"chart.js": "^4.4.4",
|
|
52
52
|
"clsx": "^2.0.0",
|
|
53
53
|
"react-chartjs-2": "^5.3.0"
|
|
@@ -41,6 +41,7 @@ const PaginatedGridLayoutGroup = ({
|
|
|
41
41
|
}: PaginatedGridLayoutGroupProps) => {
|
|
42
42
|
return (
|
|
43
43
|
<div
|
|
44
|
+
data-group-size={group.length}
|
|
44
45
|
className={clsx('str-video__paginated-grid-layout__group', {
|
|
45
46
|
'str-video__paginated-grid-layout--one': group.length === 1,
|
|
46
47
|
'str-video__paginated-grid-layout--two-four':
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType, forwardRef
|
|
1
|
+
import { ComponentType, forwardRef } from 'react';
|
|
2
2
|
import { Placement } from '@floating-ui/react';
|
|
3
3
|
import {
|
|
4
4
|
hasAudio,
|
|
@@ -6,9 +6,12 @@ import {
|
|
|
6
6
|
hasScreenShare,
|
|
7
7
|
hasVideo,
|
|
8
8
|
SfuModels,
|
|
9
|
-
StreamVideoParticipant,
|
|
10
9
|
} from '@stream-io/video-client';
|
|
11
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
useCall,
|
|
12
|
+
useI18n,
|
|
13
|
+
useIsAudioConnecting,
|
|
14
|
+
} from '@stream-io/video-react-bindings';
|
|
12
15
|
import clsx from 'clsx';
|
|
13
16
|
|
|
14
17
|
import {
|
|
@@ -139,8 +142,7 @@ export const ParticipantDetails = ({
|
|
|
139
142
|
const isTrackPaused =
|
|
140
143
|
trackType !== 'none' ? hasPausedTrack(participant, trackType) : false;
|
|
141
144
|
|
|
142
|
-
const
|
|
143
|
-
const isAudioConnecting = hasAudioTrack && !isAudioTrackUnmuted;
|
|
145
|
+
const isAudioConnecting = useIsAudioConnecting(participant);
|
|
144
146
|
|
|
145
147
|
return (
|
|
146
148
|
<>
|
|
@@ -215,33 +217,3 @@ export const SpeechIndicator = () => {
|
|
|
215
217
|
</span>
|
|
216
218
|
);
|
|
217
219
|
};
|
|
218
|
-
|
|
219
|
-
const useIsTrackUnmuted = (participant: StreamVideoParticipant) => {
|
|
220
|
-
const audioStream = participant.audioStream;
|
|
221
|
-
|
|
222
|
-
const [unmuted, setUnmuted] = useState(() => {
|
|
223
|
-
const track = audioStream?.getAudioTracks()[0];
|
|
224
|
-
return !!track && !track.muted;
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
useEffect(() => {
|
|
228
|
-
const track = audioStream?.getAudioTracks()[0];
|
|
229
|
-
if (!track) return;
|
|
230
|
-
|
|
231
|
-
setUnmuted(!track.muted);
|
|
232
|
-
|
|
233
|
-
const handler = () => {
|
|
234
|
-
setUnmuted(!track.muted);
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
track.addEventListener('mute', handler);
|
|
238
|
-
track.addEventListener('unmute', handler);
|
|
239
|
-
|
|
240
|
-
return () => {
|
|
241
|
-
track.removeEventListener('mute', handler);
|
|
242
|
-
track.removeEventListener('unmute', handler);
|
|
243
|
-
};
|
|
244
|
-
}, [audioStream]);
|
|
245
|
-
|
|
246
|
-
return unmuted;
|
|
247
|
-
};
|