@whereby.com/browser-sdk 3.12.24 → 3.13.1
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/dist/cdn/v3-react.js +2 -2
- package/dist/react/index.cjs +151 -113
- package/dist/react/index.d.ts +3 -74
- package/dist/react/index.esm.js +152 -115
- package/package.json +5 -7
package/dist/react/index.esm.js
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { createStoreHook, createDispatchHook, createSelectorHook, Provider as Provider$1 } from 'react-redux';
|
|
4
|
-
import { createServices, createStore, selectCurrentSpeakerDeviceId, debounce, doRtcReportStreamResolution, selectChatMessages, selectCloudRecordingRaw, selectBreakoutCurrentGroup, selectBreakoutActive, selectBreakoutGroupedParticipants, selectAllClientViewsInCurrentGroup, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, doAppStop, doSendChatMessage, doKnockRoom, doSetDisplayName, toggleCameraEnabled, toggleMicrophoneEnabled, toggleLowDataModeEnabled, doSetLocalStickyReaction, doRequestAudioEnable, doRequestVideoEnable, doAcceptWaitingParticipant, doRejectWaitingParticipant, doStartCloudRecording, doStartScreenshare, doStopCloudRecording, doStopScreenshare, doAppStart, doLockRoom, doSpotlightParticipant, doRemoveSpotlight, doKickParticipant, doEndMeeting, doBreakoutJoin, selectCameraDeviceError, selectCameraDevices, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsLocalMediaStarting, selectMicrophoneDeviceError, selectMicrophoneDevices, selectSpeakerDevices, selectLocalMediaStartError, doStartLocalMedia, doStopLocalMedia, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, selectAllClientViews, selectNumParticipants } from '@whereby.com/core';
|
|
5
|
-
import { createSelector } from '@reduxjs/toolkit';
|
|
2
|
+
import { WherebyClient, CURRENT_SPEAKER_CHANGED, debounce } from '@whereby.com/core';
|
|
6
3
|
import runes from 'runes';
|
|
7
4
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
8
5
|
|
|
9
6
|
const WherebyContext = React.createContext(null);
|
|
10
|
-
createStoreHook(WherebyContext);
|
|
11
|
-
const useDispatch = createDispatchHook(WherebyContext);
|
|
12
|
-
const useSelector = createSelectorHook(WherebyContext);
|
|
13
7
|
function Provider({ children }) {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const client = React.useMemo(() => new WherebyClient(), []);
|
|
9
|
+
React.useEffect(() => {
|
|
10
|
+
return () => {
|
|
11
|
+
client.destroy();
|
|
12
|
+
};
|
|
13
|
+
}, [client]);
|
|
14
|
+
return React.createElement(WherebyContext.Provider, { value: client }, children);
|
|
17
15
|
}
|
|
18
16
|
|
|
19
17
|
/******************************************************************************
|
|
@@ -50,13 +48,21 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
50
48
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
51
49
|
};
|
|
52
50
|
|
|
53
|
-
const useAppDispatch = useDispatch.withTypes();
|
|
54
|
-
const useAppSelector = useSelector.withTypes();
|
|
55
|
-
|
|
56
51
|
const useAudioElement = ({ stream, muted }) => {
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
52
|
+
var _a;
|
|
53
|
+
const audioEl = React.useRef(null);
|
|
54
|
+
const client = (_a = React.useContext(WherebyContext)) === null || _a === void 0 ? void 0 : _a.getLocalMedia();
|
|
55
|
+
const [currentSpeakerId, setCurrentSpeakerId] = React.useState();
|
|
56
|
+
const listener = React.useCallback((speakerId) => {
|
|
57
|
+
setCurrentSpeakerId(speakerId);
|
|
58
|
+
}, []);
|
|
59
|
+
React.useEffect(() => {
|
|
60
|
+
client === null || client === void 0 ? void 0 : client.addListener(CURRENT_SPEAKER_CHANGED, listener);
|
|
61
|
+
return () => {
|
|
62
|
+
client === null || client === void 0 ? void 0 : client.removeListener(CURRENT_SPEAKER_CHANGED, listener);
|
|
63
|
+
};
|
|
64
|
+
}, [client]);
|
|
65
|
+
React.useEffect(() => {
|
|
60
66
|
if (!audioEl.current || muted || !stream || !currentSpeakerId) {
|
|
61
67
|
return;
|
|
62
68
|
}
|
|
@@ -71,8 +77,9 @@ const useAudioElement = ({ stream, muted }) => {
|
|
|
71
77
|
};
|
|
72
78
|
|
|
73
79
|
const VideoView = React.forwardRef((_a, ref) => {
|
|
80
|
+
var _b;
|
|
74
81
|
var { muted, mirror = false, stream, onVideoResize } = _a, rest = __rest(_a, ["muted", "mirror", "stream", "onVideoResize"]);
|
|
75
|
-
const
|
|
82
|
+
const client = (_b = React.useContext(WherebyContext)) === null || _b === void 0 ? void 0 : _b.getRoomConnection();
|
|
76
83
|
const videoEl = React.useRef(null);
|
|
77
84
|
const audioEl = useAudioElement({ muted, stream });
|
|
78
85
|
React.useImperativeHandle(ref, () => {
|
|
@@ -98,11 +105,7 @@ const VideoView = React.forwardRef((_a, ref) => {
|
|
|
98
105
|
if (videoEl.current && (stream === null || stream === void 0 ? void 0 : stream.id)) {
|
|
99
106
|
const width = videoEl.current.clientWidth;
|
|
100
107
|
const height = videoEl.current.clientHeight;
|
|
101
|
-
|
|
102
|
-
streamId: stream.id,
|
|
103
|
-
width,
|
|
104
|
-
height,
|
|
105
|
-
}));
|
|
108
|
+
client === null || client === void 0 ? void 0 : client.reportStreamResolution(stream.id, width, height);
|
|
106
109
|
if (onVideoResize) {
|
|
107
110
|
onVideoResize({
|
|
108
111
|
width,
|
|
@@ -134,35 +137,24 @@ const VideoView = React.forwardRef((_a, ref) => {
|
|
|
134
137
|
});
|
|
135
138
|
VideoView.displayName = "VideoView";
|
|
136
139
|
|
|
137
|
-
const
|
|
138
|
-
const state = {
|
|
139
|
-
chatMessages,
|
|
140
|
-
cloudRecording: cloudRecording.isRecording ? { status: "recording" } : undefined,
|
|
141
|
-
breakout: {
|
|
142
|
-
isActive: breakoutActive,
|
|
143
|
-
currentGroup: breakoutCurrentGroup,
|
|
144
|
-
groupedParticipants: breakoutGroupedParticipants,
|
|
145
|
-
participantsInCurrentGroup: clientViewsInCurrentGroup,
|
|
146
|
-
},
|
|
147
|
-
connectionStatus,
|
|
148
|
-
events: notificationsEmitter,
|
|
149
|
-
liveStream: streaming.isStreaming
|
|
150
|
-
? {
|
|
151
|
-
status: "streaming",
|
|
152
|
-
startedAt: streaming.startedAt,
|
|
153
|
-
}
|
|
154
|
-
: undefined,
|
|
155
|
-
localScreenshareStatus: localParticipant.isScreenSharing ? "active" : undefined,
|
|
156
|
-
localParticipant: Object.assign(Object.assign({}, localParticipant), { stream: localMediaStream }),
|
|
157
|
-
remoteParticipants,
|
|
158
|
-
screenshares,
|
|
159
|
-
waitingParticipants,
|
|
160
|
-
spotlightedParticipants: spotlightedClientViews,
|
|
161
|
-
};
|
|
162
|
-
return state;
|
|
163
|
-
});
|
|
140
|
+
const browserSdkVersion = "3.13.1";
|
|
164
141
|
|
|
165
|
-
const
|
|
142
|
+
const initialState$1 = {
|
|
143
|
+
chatMessages: [],
|
|
144
|
+
cloudRecording: undefined,
|
|
145
|
+
breakout: {
|
|
146
|
+
isActive: false,
|
|
147
|
+
currentGroup: null,
|
|
148
|
+
groupedParticipants: [],
|
|
149
|
+
participantsInCurrentGroup: [],
|
|
150
|
+
},
|
|
151
|
+
localParticipant: undefined,
|
|
152
|
+
remoteParticipants: [],
|
|
153
|
+
screenshares: [],
|
|
154
|
+
connectionStatus: "ready",
|
|
155
|
+
waitingParticipants: [],
|
|
156
|
+
spotlightedParticipants: [],
|
|
157
|
+
};
|
|
166
158
|
|
|
167
159
|
const defaultRoomConnectionOptions = {
|
|
168
160
|
localMediaOptions: {
|
|
@@ -171,8 +163,12 @@ const defaultRoomConnectionOptions = {
|
|
|
171
163
|
},
|
|
172
164
|
};
|
|
173
165
|
function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectionOptions) {
|
|
174
|
-
|
|
175
|
-
const
|
|
166
|
+
var _a;
|
|
167
|
+
const client = (_a = React.useContext(WherebyContext)) === null || _a === void 0 ? void 0 : _a.getRoomConnection();
|
|
168
|
+
const [roomConnectionState, setRoomConnectionState] = React.useState(() => initialState$1);
|
|
169
|
+
if (!client) {
|
|
170
|
+
throw new Error("WherebyClient is not initialized. Please wrap your component with WherebyProvider.");
|
|
171
|
+
}
|
|
176
172
|
const roomConfig = React.useMemo(() => {
|
|
177
173
|
const url = new URL(roomUrl);
|
|
178
174
|
const searchParams = new URLSearchParams(url.search);
|
|
@@ -187,36 +183,45 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
|
|
|
187
183
|
};
|
|
188
184
|
}, [roomUrl, roomConnectionOptions]);
|
|
189
185
|
React.useEffect(() => {
|
|
186
|
+
const unsubscribe = client.subscribe((state) => {
|
|
187
|
+
setRoomConnectionState((prev) => (Object.assign(Object.assign({}, prev), state)));
|
|
188
|
+
});
|
|
189
|
+
const eventEmitter = client.getNotificationsEventEmitter();
|
|
190
|
+
setRoomConnectionState((prev) => (Object.assign(Object.assign({}, prev), { events: eventEmitter })));
|
|
190
191
|
return () => {
|
|
191
|
-
|
|
192
|
+
unsubscribe();
|
|
193
|
+
client.leaveRoom();
|
|
192
194
|
};
|
|
193
195
|
}, []);
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
const
|
|
199
|
-
const
|
|
200
|
-
const
|
|
201
|
-
const
|
|
202
|
-
const
|
|
203
|
-
const
|
|
204
|
-
const
|
|
205
|
-
const
|
|
206
|
-
const
|
|
207
|
-
const
|
|
208
|
-
const
|
|
209
|
-
const
|
|
210
|
-
const
|
|
211
|
-
const
|
|
212
|
-
const
|
|
213
|
-
const
|
|
214
|
-
const
|
|
215
|
-
const
|
|
216
|
-
const
|
|
217
|
-
const
|
|
218
|
-
const
|
|
219
|
-
const
|
|
196
|
+
const joinRoom = React.useCallback(() => {
|
|
197
|
+
client.initialize(roomConfig);
|
|
198
|
+
client.joinRoom();
|
|
199
|
+
}, [client]);
|
|
200
|
+
const sendChatMessage = React.useCallback((text) => client.sendChatMessage(text), [client]);
|
|
201
|
+
const knock = React.useCallback(() => client.knock(), [client]);
|
|
202
|
+
const setDisplayName = React.useCallback((displayName) => client.setDisplayName(displayName), [client]);
|
|
203
|
+
const toggleCamera = React.useCallback((enabled) => client.toggleCamera(enabled), [client]);
|
|
204
|
+
const toggleMicrophone = React.useCallback((enabled) => client.toggleMicrophone(enabled), [client]);
|
|
205
|
+
const toggleLowDataMode = React.useCallback((enabled) => client.toggleLowDataMode(enabled), [client]);
|
|
206
|
+
const toggleRaiseHand = React.useCallback((enabled) => client.toggleRaiseHand(enabled), [client]);
|
|
207
|
+
const askToSpeak = React.useCallback((participantId) => client.askToSpeak(participantId), [client]);
|
|
208
|
+
const askToTurnOnCamera = React.useCallback((participantId) => client.askToTurnOnCamera(participantId), [client]);
|
|
209
|
+
const acceptWaitingParticipant = React.useCallback((participantId) => client.acceptWaitingParticipant(participantId), [client]);
|
|
210
|
+
const rejectWaitingParticipant = React.useCallback((participantId) => client.rejectWaitingParticipant(participantId), [client]);
|
|
211
|
+
const startCloudRecording = React.useCallback(() => client.startCloudRecording(), [client]);
|
|
212
|
+
const startScreenshare = React.useCallback(() => client.startScreenshare(), [client]);
|
|
213
|
+
const stopCloudRecording = React.useCallback(() => client.stopCloudRecording(), [client]);
|
|
214
|
+
const stopScreenshare = React.useCallback(() => client.stopScreenshare(), [client]);
|
|
215
|
+
const leaveRoom = React.useCallback(() => client.leaveRoom(), [client]);
|
|
216
|
+
const lockRoom = React.useCallback((locked) => client.lockRoom(locked), [client]);
|
|
217
|
+
const muteParticipants = React.useCallback((participantIds) => client.muteParticipants(participantIds), [client]);
|
|
218
|
+
const turnOffParticipantCameras = React.useCallback((participantIds) => client.turnOffParticipantCameras(participantIds), [client]);
|
|
219
|
+
const spotlightParticipant = React.useCallback((participantId) => client.spotlightParticipant(participantId), [client]);
|
|
220
|
+
const removeSpotlight = React.useCallback((participantId) => client.removeSpotlight(participantId), [client]);
|
|
221
|
+
const kickParticipant = React.useCallback((participantId) => client.kickParticipant(participantId), [client]);
|
|
222
|
+
const endMeeting = React.useCallback((stayBehind) => client.endMeeting(stayBehind), [client]);
|
|
223
|
+
const joinBreakoutGroup = React.useCallback((group) => client.joinBreakoutGroup(group), [client]);
|
|
224
|
+
const joinBreakoutMainRoom = React.useCallback(() => client.joinBreakoutMainRoom(), [client]);
|
|
220
225
|
const { events } = roomConnectionState, state = __rest(roomConnectionState, ["events"]);
|
|
221
226
|
return {
|
|
222
227
|
state,
|
|
@@ -252,40 +257,41 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
|
|
|
252
257
|
};
|
|
253
258
|
}
|
|
254
259
|
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
microphoneDeviceError,
|
|
267
|
-
microphoneDevices,
|
|
268
|
-
speakerDevices,
|
|
269
|
-
startError,
|
|
270
|
-
};
|
|
271
|
-
return state;
|
|
272
|
-
});
|
|
260
|
+
const initialState = {
|
|
261
|
+
cameraDeviceError: null,
|
|
262
|
+
isStarting: false,
|
|
263
|
+
isSettingCameraDevice: false,
|
|
264
|
+
isSettingMicrophoneDevice: false,
|
|
265
|
+
microphoneDeviceError: null,
|
|
266
|
+
startError: null,
|
|
267
|
+
cameraDevices: [],
|
|
268
|
+
microphoneDevices: [],
|
|
269
|
+
speakerDevices: [],
|
|
270
|
+
};
|
|
273
271
|
|
|
274
272
|
function useLocalMedia(optionsOrStream = { audio: true, video: true }) {
|
|
275
|
-
|
|
276
|
-
const
|
|
273
|
+
var _a;
|
|
274
|
+
const client = (_a = React.useContext(WherebyContext)) === null || _a === void 0 ? void 0 : _a.getLocalMedia();
|
|
275
|
+
const [localMediaState, setLocalMediaState] = React.useState(() => initialState);
|
|
276
|
+
if (!client) {
|
|
277
|
+
throw new Error("WherebyClient is not initialized. Please wrap your component with WherebyProvider.");
|
|
278
|
+
}
|
|
277
279
|
React.useEffect(() => {
|
|
278
|
-
|
|
280
|
+
client.startMedia(optionsOrStream);
|
|
281
|
+
const unsubscribe = client.subscribe((state) => {
|
|
282
|
+
setLocalMediaState((prevState) => (Object.assign(Object.assign({}, prevState), state)));
|
|
283
|
+
});
|
|
279
284
|
return () => {
|
|
280
|
-
|
|
285
|
+
unsubscribe();
|
|
286
|
+
client.stopMedia();
|
|
281
287
|
};
|
|
282
288
|
}, []);
|
|
283
|
-
const setCameraDevice = React.useCallback((deviceId) =>
|
|
284
|
-
const setMicrophoneDevice = React.useCallback((deviceId) =>
|
|
285
|
-
const setSpeakerDevice = React.useCallback((deviceId) =>
|
|
286
|
-
const toggleCamera = React.useCallback((enabled) =>
|
|
287
|
-
const toggleMicrophone = React.useCallback((enabled) =>
|
|
288
|
-
const toggleLowDataMode = React.useCallback((enabled) =>
|
|
289
|
+
const setCameraDevice = React.useCallback((deviceId) => client.setCameraDevice(deviceId), [client]);
|
|
290
|
+
const setMicrophoneDevice = React.useCallback((deviceId) => client.setMicrophoneDevice(deviceId), [client]);
|
|
291
|
+
const setSpeakerDevice = React.useCallback((deviceId) => client.setSpeakerDevice(deviceId), [client]);
|
|
292
|
+
const toggleCamera = React.useCallback((enabled) => client.toggleCamera(enabled), [client]);
|
|
293
|
+
const toggleMicrophone = React.useCallback((enabled) => client.toggleMicrophone(enabled), [client]);
|
|
294
|
+
const toggleLowDataMode = React.useCallback((enabled) => client.toggleLowDataMode(enabled), [client]);
|
|
289
295
|
return {
|
|
290
296
|
state: localMediaState,
|
|
291
297
|
actions: {
|
|
@@ -1724,9 +1730,38 @@ function calculateSubgridViews({ clientViews, activeVideosSubgridTrigger, should
|
|
|
1724
1730
|
return noVideoViews;
|
|
1725
1731
|
}
|
|
1726
1732
|
function useGridParticipants({ activeVideosSubgridTrigger = ACTIVE_VIDEO_SUBGRID_TRIGGER, stageParticipantLimit = STAGE_PARTICIPANT_LIMIT, forceSubgrid = true, enableSubgrid = true, maximizedParticipant, floatingParticipant, isConstrained = false, } = {}) {
|
|
1727
|
-
|
|
1728
|
-
const
|
|
1729
|
-
|
|
1733
|
+
var _a;
|
|
1734
|
+
const [state, setState] = React.useState({
|
|
1735
|
+
allClientViews: [],
|
|
1736
|
+
spotlightedParticipants: [],
|
|
1737
|
+
numParticipants: 0,
|
|
1738
|
+
});
|
|
1739
|
+
const client = (_a = React.useContext(WherebyContext)) === null || _a === void 0 ? void 0 : _a.getGrid();
|
|
1740
|
+
if (!client) {
|
|
1741
|
+
throw new Error("useGridParticipants must be used within a WherebyProvider");
|
|
1742
|
+
}
|
|
1743
|
+
const handleClientViewChanged = React.useCallback((clientViews) => {
|
|
1744
|
+
setState((prevState) => (Object.assign(Object.assign({}, prevState), { allClientViews: clientViews })));
|
|
1745
|
+
}, [setState]);
|
|
1746
|
+
const handleSpotlightedParticipantsChanged = React.useCallback((spotlighted) => {
|
|
1747
|
+
setState((prevState) => (Object.assign(Object.assign({}, prevState), { spotlightedParticipants: spotlighted })));
|
|
1748
|
+
}, [setState]);
|
|
1749
|
+
const handleNumParticipantsChanged = React.useCallback((num) => {
|
|
1750
|
+
setState((prevState) => (Object.assign(Object.assign({}, prevState), { numParticipants: num })));
|
|
1751
|
+
}, [setState]);
|
|
1752
|
+
React.useEffect(() => {
|
|
1753
|
+
const unsubscribeClientViews = client.subscribeClientViews(handleClientViewChanged);
|
|
1754
|
+
const unsubscribeSpotlighted = client.subscribeSpotlightedParticipants(handleSpotlightedParticipantsChanged);
|
|
1755
|
+
const unsubscribeNumParticipants = client.subscribeNumberOfClientViews(handleNumParticipantsChanged);
|
|
1756
|
+
return () => {
|
|
1757
|
+
unsubscribeClientViews();
|
|
1758
|
+
unsubscribeSpotlighted();
|
|
1759
|
+
unsubscribeNumParticipants();
|
|
1760
|
+
};
|
|
1761
|
+
}, [client]);
|
|
1762
|
+
const allClientViews = React.useMemo(() => state.allClientViews, [state.allClientViews]);
|
|
1763
|
+
const spotlightedParticipants = React.useMemo(() => state.spotlightedParticipants, [state.spotlightedParticipants]);
|
|
1764
|
+
const numParticipants = React.useMemo(() => state.numParticipants, [state.numParticipants]);
|
|
1730
1765
|
const floatingClientView = React.useMemo(() => {
|
|
1731
1766
|
return floatingParticipant;
|
|
1732
1767
|
}, [floatingParticipant]);
|
|
@@ -1769,6 +1804,7 @@ function useGridParticipants({ activeVideosSubgridTrigger = ACTIVE_VIDEO_SUBGRID
|
|
|
1769
1804
|
clientViewsInGrid,
|
|
1770
1805
|
clientViewsInPresentationGrid,
|
|
1771
1806
|
clientViewsInSubgrid,
|
|
1807
|
+
spotlightedParticipants,
|
|
1772
1808
|
};
|
|
1773
1809
|
}
|
|
1774
1810
|
|
|
@@ -1985,10 +2021,11 @@ const ParticipantMenuTrigger = React.forwardRef((_a, ref) => {
|
|
|
1985
2021
|
});
|
|
1986
2022
|
ParticipantMenuTrigger.displayName = PopoverTrigger.displayName;
|
|
1987
2023
|
const ParticipantMenuItem = React.forwardRef((_a, ref) => {
|
|
2024
|
+
var _b;
|
|
1988
2025
|
var { children, style, participantAction } = _a, props = __rest(_a, ["children", "style", "participantAction"]);
|
|
1989
2026
|
const { participant, setOpen, maximizedParticipant, setMaximizedParticipant, setFloatingParticipant, floatingParticipant, } = useParticipantMenu();
|
|
1990
|
-
const
|
|
1991
|
-
const spotlightedParticipants =
|
|
2027
|
+
const client = (_b = React.useContext(WherebyContext)) === null || _b === void 0 ? void 0 : _b.getGrid();
|
|
2028
|
+
const { spotlightedParticipants } = useGridParticipants();
|
|
1992
2029
|
const isSpotlighted = spotlightedParticipants.find((p) => p.id === participant.id);
|
|
1993
2030
|
const isMaximized = (maximizedParticipant === null || maximizedParticipant === void 0 ? void 0 : maximizedParticipant.id) === participant.id;
|
|
1994
2031
|
const isFloating = (floatingParticipant === null || floatingParticipant === void 0 ? void 0 : floatingParticipant.id) === participant.id;
|
|
@@ -2008,10 +2045,10 @@ const ParticipantMenuItem = React.forwardRef((_a, ref) => {
|
|
|
2008
2045
|
case "spotlight":
|
|
2009
2046
|
onClick = () => {
|
|
2010
2047
|
if (isSpotlighted) {
|
|
2011
|
-
|
|
2048
|
+
client === null || client === void 0 ? void 0 : client.removeSpotlight(participant.id);
|
|
2012
2049
|
}
|
|
2013
2050
|
else {
|
|
2014
|
-
|
|
2051
|
+
client === null || client === void 0 ? void 0 : client.spotlightParticipant(participant.id);
|
|
2015
2052
|
}
|
|
2016
2053
|
setOpen(false);
|
|
2017
2054
|
};
|
|
@@ -2061,7 +2098,7 @@ function PopInIcon(props) {
|
|
|
2061
2098
|
}
|
|
2062
2099
|
|
|
2063
2100
|
function DefaultParticipantMenu({ participant }) {
|
|
2064
|
-
const spotlightedParticipants =
|
|
2101
|
+
const { spotlightedParticipants } = useGridParticipants();
|
|
2065
2102
|
const isSpotlighted = spotlightedParticipants.find((p) => p.id === participant.id);
|
|
2066
2103
|
const { isHovered, maximizedParticipant, floatingParticipant } = useGridCell();
|
|
2067
2104
|
const isMaximized = (maximizedParticipant === null || maximizedParticipant === void 0 ? void 0 : maximizedParticipant.id) === participant.id;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whereby.com/browser-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.1",
|
|
4
4
|
"description": "Modules for integration Whereby video in web apps",
|
|
5
5
|
"author": "Whereby AS",
|
|
6
6
|
"license": "MIT",
|
|
@@ -68,17 +68,15 @@
|
|
|
68
68
|
"@whereby.com/eslint-config": "0.1.0",
|
|
69
69
|
"@whereby.com/jest-config": "0.1.0",
|
|
70
70
|
"@whereby.com/prettier-config": "0.1.0",
|
|
71
|
-
"@whereby.com/
|
|
72
|
-
"@whereby.com/
|
|
71
|
+
"@whereby.com/rollup-config": "0.1.0",
|
|
72
|
+
"@whereby.com/tsconfig": "0.1.0"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@radix-ui/react-popover": "^1.0.7",
|
|
76
|
-
"@
|
|
77
|
-
"@whereby.com/
|
|
78
|
-
"@whereby.com/core": "0.36.1",
|
|
76
|
+
"@whereby.com/media": "1.33.0",
|
|
77
|
+
"@whereby.com/core": "1.0.1",
|
|
79
78
|
"clsx": "^2.1.1",
|
|
80
79
|
"heresy": "^1.0.4",
|
|
81
|
-
"react-redux": "^9.1.1",
|
|
82
80
|
"runes": "^0.4.3"
|
|
83
81
|
},
|
|
84
82
|
"peerDependencies": {
|