@stream-io/video-react-sdk 1.35.1 → 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 +26 -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/dist/src/components/DeviceSettings/DeviceSelectorVideo.d.ts +6 -0
- package/package.json +3 -3
- package/src/components/DeviceSettings/DeviceSelectorVideo.tsx +6 -0
- package/src/core/components/CallLayout/PaginatedGridLayout.tsx +1 -0
- package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +7 -35
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export type DeviceSelectorVideoProps = {
|
|
2
2
|
title?: string;
|
|
3
|
+
/**
|
|
4
|
+
* The visual style used to render the device selector.
|
|
5
|
+
*
|
|
6
|
+
* Note: `'preview'` is not reliable on mobile browsers. Use `'list'` or
|
|
7
|
+
* `'dropdown'` on mobile devices.
|
|
8
|
+
*/
|
|
3
9
|
visualType?: 'list' | 'dropdown' | 'preview';
|
|
4
10
|
};
|
|
5
11
|
export declare const DeviceSelectorVideo: ({ title, visualType, }: DeviceSelectorVideoProps) => import("react/jsx-runtime").JSX.Element;
|
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"
|
|
@@ -5,6 +5,12 @@ import { DeviceVideoPreviewItem } from './DeviceVideoPreviewItem';
|
|
|
5
5
|
|
|
6
6
|
export type DeviceSelectorVideoProps = {
|
|
7
7
|
title?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The visual style used to render the device selector.
|
|
10
|
+
*
|
|
11
|
+
* Note: `'preview'` is not reliable on mobile browsers. Use `'list'` or
|
|
12
|
+
* `'dropdown'` on mobile devices.
|
|
13
|
+
*/
|
|
8
14
|
visualType?: 'list' | 'dropdown' | 'preview';
|
|
9
15
|
};
|
|
10
16
|
|
|
@@ -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
|
-
};
|