@stream-io/video-react-sdk 1.33.4 → 1.34.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 +16 -0
- package/dist/css/embedded.css +5 -0
- package/dist/css/embedded.css.map +1 -1
- package/dist/css/styles.css +5 -0
- package/dist/css/styles.css.map +1 -1
- package/dist/embedded.cjs.js +28 -2
- package/dist/embedded.cjs.js.map +1 -1
- package/dist/embedded.es.js +28 -2
- package/dist/embedded.es.js.map +1 -1
- package/dist/index.cjs.js +30 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +30 -4
- package/dist/index.es.js.map +1 -1
- package/dist/src/translations/index.d.ts +1 -0
- package/package.json +4 -4
- package/src/components/CallControls/CallControls.tsx +4 -9
- package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +44 -4
- package/src/translations/en.json +1 -0
|
@@ -86,6 +86,7 @@ export declare const translations: {
|
|
|
86
86
|
"Dominant Speaker": string;
|
|
87
87
|
"Poor connection quality": string;
|
|
88
88
|
"Video paused due to insufficient bandwidth": string;
|
|
89
|
+
"Audio is connecting...": string;
|
|
89
90
|
Participants: string;
|
|
90
91
|
Anonymous: string;
|
|
91
92
|
"No participants found": string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.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.44.
|
|
48
|
+
"@stream-io/video-client": "1.44.4",
|
|
49
49
|
"@stream-io/video-filters-web": "0.7.2",
|
|
50
|
-
"@stream-io/video-react-bindings": "1.13.
|
|
50
|
+
"@stream-io/video-react-bindings": "1.13.13",
|
|
51
51
|
"chart.js": "^4.4.4",
|
|
52
52
|
"clsx": "^2.0.0",
|
|
53
53
|
"react-chartjs-2": "^5.3.0"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@rollup/plugin-replace": "^6.0.2",
|
|
62
62
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
63
63
|
"@stream-io/audio-filters-web": "^0.7.3",
|
|
64
|
-
"@stream-io/video-styling": "^1.
|
|
64
|
+
"@stream-io/video-styling": "^1.12.0",
|
|
65
65
|
"@types/react": "~19.1.17",
|
|
66
66
|
"@types/react-dom": "~19.1.11",
|
|
67
67
|
"react": "19.1.0",
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { OwnCapability } from '@stream-io/video-client';
|
|
2
2
|
import { Restricted } from '@stream-io/video-react-bindings';
|
|
3
|
-
import {
|
|
4
|
-
SpeakingWhileMutedNotification,
|
|
5
|
-
MicCaptureErrorNotification,
|
|
6
|
-
} from '../Notification';
|
|
3
|
+
import { SpeakingWhileMutedNotification } from '../Notification';
|
|
7
4
|
import { RecordCallButton } from './RecordCallButton';
|
|
8
5
|
import { ReactionsButton } from './ReactionsButton';
|
|
9
6
|
import { ScreenShareButton } from './ScreenShareButton';
|
|
@@ -18,11 +15,9 @@ export type CallControlsProps = {
|
|
|
18
15
|
export const CallControls = ({ onLeave }: CallControlsProps) => (
|
|
19
16
|
<div className="str-video__call-controls">
|
|
20
17
|
<Restricted requiredGrants={[OwnCapability.SEND_AUDIO]}>
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
</SpeakingWhileMutedNotification>
|
|
25
|
-
</MicCaptureErrorNotification>
|
|
18
|
+
<SpeakingWhileMutedNotification>
|
|
19
|
+
<ToggleAudioPublishingButton />
|
|
20
|
+
</SpeakingWhileMutedNotification>
|
|
26
21
|
</Restricted>
|
|
27
22
|
<Restricted requiredGrants={[OwnCapability.SEND_VIDEO]}>
|
|
28
23
|
<ToggleVideoPublishingButton />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType, forwardRef } from 'react';
|
|
1
|
+
import { ComponentType, forwardRef, useEffect, useState } from 'react';
|
|
2
2
|
import { Placement } from '@floating-ui/react';
|
|
3
3
|
import {
|
|
4
4
|
hasAudio,
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
hasScreenShare,
|
|
7
7
|
hasVideo,
|
|
8
8
|
SfuModels,
|
|
9
|
+
StreamVideoParticipant,
|
|
9
10
|
} from '@stream-io/video-client';
|
|
10
11
|
import { useCall, useI18n } from '@stream-io/video-react-bindings';
|
|
11
12
|
import clsx from 'clsx';
|
|
@@ -13,6 +14,7 @@ import clsx from 'clsx';
|
|
|
13
14
|
import {
|
|
14
15
|
Icon,
|
|
15
16
|
IconButton,
|
|
17
|
+
LoadingIndicator,
|
|
16
18
|
MenuToggle,
|
|
17
19
|
Notification,
|
|
18
20
|
ToggleMenuButtonProps,
|
|
@@ -137,12 +139,20 @@ export const ParticipantDetails = ({
|
|
|
137
139
|
const isTrackPaused =
|
|
138
140
|
trackType !== 'none' ? hasPausedTrack(participant, trackType) : false;
|
|
139
141
|
|
|
142
|
+
const isAudioTrackUnmuted = useIsTrackUnmuted(participant);
|
|
143
|
+
const isAudioConnecting = hasAudioTrack && !isAudioTrackUnmuted;
|
|
144
|
+
|
|
140
145
|
return (
|
|
141
146
|
<>
|
|
142
147
|
<div className="str-video__participant-details">
|
|
143
|
-
<
|
|
148
|
+
<div className="str-video__participant-details__name">
|
|
144
149
|
{name || userId}
|
|
145
|
-
|
|
150
|
+
{indicatorsVisible && isAudioConnecting && (
|
|
151
|
+
<LoadingIndicator
|
|
152
|
+
className="str-video__participant-details__name--audio-connecting"
|
|
153
|
+
tooltip={t('Audio is connecting...')}
|
|
154
|
+
/>
|
|
155
|
+
)}
|
|
146
156
|
{indicatorsVisible && !hasAudioTrack && (
|
|
147
157
|
<span className="str-video__participant-details__name--audio-muted" />
|
|
148
158
|
)}
|
|
@@ -164,7 +174,7 @@ export const ParticipantDetails = ({
|
|
|
164
174
|
/>
|
|
165
175
|
)}
|
|
166
176
|
{indicatorsVisible && <SpeechIndicator />}
|
|
167
|
-
</
|
|
177
|
+
</div>
|
|
168
178
|
</div>
|
|
169
179
|
{indicatorsVisible && (
|
|
170
180
|
<Notification
|
|
@@ -206,3 +216,33 @@ export const SpeechIndicator = () => {
|
|
|
206
216
|
</span>
|
|
207
217
|
);
|
|
208
218
|
};
|
|
219
|
+
|
|
220
|
+
const useIsTrackUnmuted = (participant: StreamVideoParticipant) => {
|
|
221
|
+
const audioStream = participant.audioStream;
|
|
222
|
+
|
|
223
|
+
const [unmuted, setUnmuted] = useState(() => {
|
|
224
|
+
const track = audioStream?.getAudioTracks()[0];
|
|
225
|
+
return !!track && !track.muted;
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
useEffect(() => {
|
|
229
|
+
const track = audioStream?.getAudioTracks()[0];
|
|
230
|
+
if (!track) return;
|
|
231
|
+
|
|
232
|
+
setUnmuted(!track.muted);
|
|
233
|
+
|
|
234
|
+
const handler = () => {
|
|
235
|
+
setUnmuted(!track.muted);
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
track.addEventListener('mute', handler);
|
|
239
|
+
track.addEventListener('unmute', handler);
|
|
240
|
+
|
|
241
|
+
return () => {
|
|
242
|
+
track.removeEventListener('mute', handler);
|
|
243
|
+
track.removeEventListener('unmute', handler);
|
|
244
|
+
};
|
|
245
|
+
}, [audioStream]);
|
|
246
|
+
|
|
247
|
+
return unmuted;
|
|
248
|
+
};
|
package/src/translations/en.json
CHANGED
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"Dominant Speaker": "Dominant Speaker",
|
|
92
92
|
"Poor connection quality": "Poor connection quality. Please check your internet connection.",
|
|
93
93
|
"Video paused due to insufficient bandwidth": "Video paused due to insufficient bandwidth",
|
|
94
|
+
"Audio is connecting...": "Audio is connecting...",
|
|
94
95
|
|
|
95
96
|
"Participants": "Participants",
|
|
96
97
|
"Anonymous": ", and ({{ count }}) anonymous",
|