@whereby.com/browser-sdk 3.10.12 → 3.11.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.
@@ -150,10 +150,16 @@ const VideoView = React__namespace.forwardRef((_a, ref) => {
150
150
  });
151
151
  VideoView.displayName = "VideoView";
152
152
 
153
- const selectRoomConnectionState = toolkit.createSelector(core.selectChatMessages, core.selectCloudRecordingRaw, core.selectLocalParticipantRaw, core.selectLocalMediaStream, core.selectRemoteParticipants, core.selectScreenshares, core.selectRoomConnectionStatus, core.selectStreamingRaw, core.selectWaitingParticipants, core.selectNotificationsEmitter, core.selectSpotlightedClientViews, (chatMessages, cloudRecording, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews) => {
153
+ const selectRoomConnectionState = toolkit.createSelector(core.selectChatMessages, core.selectCloudRecordingRaw, core.selectBreakoutCurrentGroup, core.selectBreakoutActive, core.selectBreakoutGroupedParticipants, core.selectAllClientViewsInCurrentGroup, core.selectLocalParticipantRaw, core.selectLocalMediaStream, core.selectRemoteParticipants, core.selectScreenshares, core.selectRoomConnectionStatus, core.selectStreamingRaw, core.selectWaitingParticipants, core.selectNotificationsEmitter, core.selectSpotlightedClientViews, (chatMessages, cloudRecording, breakoutCurrentGroup, breakoutActive, breakoutGroupedParticipants, clientViewsInCurrentGroup, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews) => {
154
154
  const state = {
155
155
  chatMessages,
156
156
  cloudRecording: cloudRecording.isRecording ? { status: "recording" } : undefined,
157
+ breakout: {
158
+ isActive: breakoutActive,
159
+ currentGroup: breakoutCurrentGroup,
160
+ groupedParticipants: breakoutGroupedParticipants,
161
+ participantsInCurrentGroup: clientViewsInCurrentGroup,
162
+ },
157
163
  connectionStatus,
158
164
  events: notificationsEmitter,
159
165
  liveStream: streaming.isStreaming
@@ -172,7 +178,7 @@ const selectRoomConnectionState = toolkit.createSelector(core.selectChatMessages
172
178
  return state;
173
179
  });
174
180
 
175
- const browserSdkVersion = "3.10.12";
181
+ const browserSdkVersion = "3.11.1";
176
182
 
177
183
  const defaultRoomConnectionOptions = {
178
184
  localMediaOptions: {
@@ -225,6 +231,8 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
225
231
  const removeSpotlight = React__namespace.useCallback((participantId) => dispatch(core.doRemoveSpotlight({ id: participantId })), [dispatch]);
226
232
  const kickParticipant = React__namespace.useCallback((participantId) => dispatch(core.doKickParticipant({ clientId: participantId })), [dispatch]);
227
233
  const endMeeting = React__namespace.useCallback((stayBehind) => dispatch(core.doEndMeeting({ stayBehind })), [dispatch]);
234
+ const joinBreakoutGroup = React__namespace.useCallback((group) => dispatch(core.doBreakoutJoin({ group })), [dispatch]);
235
+ const joinBreakoutMainRoom = React__namespace.useCallback(() => dispatch(core.doBreakoutJoin({ group: "" })), [dispatch]);
228
236
  const { events } = roomConnectionState, state = __rest(roomConnectionState, ["events"]);
229
237
  return {
230
238
  state,
@@ -254,6 +262,8 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
254
262
  toggleMicrophone,
255
263
  spotlightParticipant,
256
264
  removeSpotlight,
265
+ joinBreakoutGroup,
266
+ joinBreakoutMainRoom,
257
267
  },
258
268
  };
259
269
  }
@@ -87,10 +87,26 @@ type LiveStreamState = {
87
87
  status: "streaming";
88
88
  startedAt?: number;
89
89
  };
90
+ type BreakoutState = {
91
+ isActive: boolean;
92
+ currentGroup: {
93
+ id: string | null;
94
+ name: string;
95
+ } | null;
96
+ groupedParticipants: {
97
+ clients: ClientView[];
98
+ group: {
99
+ id: string;
100
+ name: string;
101
+ } | null;
102
+ }[];
103
+ participantsInCurrentGroup: ClientView[];
104
+ };
90
105
  interface RoomConnectionState {
91
106
  connectionStatus: ConnectionStatus;
92
107
  chatMessages: ChatMessage[];
93
108
  cloudRecording?: CloudRecordingState;
109
+ breakout: BreakoutState;
94
110
  events?: NotificationsEventEmitter;
95
111
  liveStream?: LiveStreamState;
96
112
  localScreenshareStatus?: LocalScreenshareStatus;
@@ -135,6 +151,8 @@ interface RoomConnectionActions {
135
151
  toggleMicrophone: (enabled?: boolean) => void;
136
152
  spotlightParticipant: (clientId: string) => void;
137
153
  removeSpotlight: (clientId: string) => void;
154
+ joinBreakoutGroup: (group: string) => void;
155
+ joinBreakoutMainRoom: () => void;
138
156
  }
139
157
 
140
158
  type RoomConnectionRef = {
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { createStoreHook, createDispatchHook, createSelectorHook, Provider as Provider$1 } from 'react-redux';
3
- import { createServices, createStore, selectCurrentSpeakerDeviceId, debounce, doRtcReportStreamResolution, selectChatMessages, selectCloudRecordingRaw, 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, selectCameraDeviceError, selectCameraDevices, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsLocalMediaStarting, selectMicrophoneDeviceError, selectMicrophoneDevices, selectSpeakerDevices, selectLocalMediaStartError, doStartLocalMedia, doStopLocalMedia, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, selectAllClientViews, selectNumParticipants } from '@whereby.com/core';
3
+ 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';
4
4
  import { createSelector } from '@reduxjs/toolkit';
5
5
  import runes from 'runes';
6
6
  import * as PopoverPrimitive from '@radix-ui/react-popover';
@@ -128,10 +128,16 @@ const VideoView = React.forwardRef((_a, ref) => {
128
128
  });
129
129
  VideoView.displayName = "VideoView";
130
130
 
131
- const selectRoomConnectionState = createSelector(selectChatMessages, selectCloudRecordingRaw, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, (chatMessages, cloudRecording, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews) => {
131
+ const selectRoomConnectionState = createSelector(selectChatMessages, selectCloudRecordingRaw, selectBreakoutCurrentGroup, selectBreakoutActive, selectBreakoutGroupedParticipants, selectAllClientViewsInCurrentGroup, selectLocalParticipantRaw, selectLocalMediaStream, selectRemoteParticipants, selectScreenshares, selectRoomConnectionStatus, selectStreamingRaw, selectWaitingParticipants, selectNotificationsEmitter, selectSpotlightedClientViews, (chatMessages, cloudRecording, breakoutCurrentGroup, breakoutActive, breakoutGroupedParticipants, clientViewsInCurrentGroup, localParticipant, localMediaStream, remoteParticipants, screenshares, connectionStatus, streaming, waitingParticipants, notificationsEmitter, spotlightedClientViews) => {
132
132
  const state = {
133
133
  chatMessages,
134
134
  cloudRecording: cloudRecording.isRecording ? { status: "recording" } : undefined,
135
+ breakout: {
136
+ isActive: breakoutActive,
137
+ currentGroup: breakoutCurrentGroup,
138
+ groupedParticipants: breakoutGroupedParticipants,
139
+ participantsInCurrentGroup: clientViewsInCurrentGroup,
140
+ },
135
141
  connectionStatus,
136
142
  events: notificationsEmitter,
137
143
  liveStream: streaming.isStreaming
@@ -150,7 +156,7 @@ const selectRoomConnectionState = createSelector(selectChatMessages, selectCloud
150
156
  return state;
151
157
  });
152
158
 
153
- const browserSdkVersion = "3.10.12";
159
+ const browserSdkVersion = "3.11.1";
154
160
 
155
161
  const defaultRoomConnectionOptions = {
156
162
  localMediaOptions: {
@@ -203,6 +209,8 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
203
209
  const removeSpotlight = React.useCallback((participantId) => dispatch(doRemoveSpotlight({ id: participantId })), [dispatch]);
204
210
  const kickParticipant = React.useCallback((participantId) => dispatch(doKickParticipant({ clientId: participantId })), [dispatch]);
205
211
  const endMeeting = React.useCallback((stayBehind) => dispatch(doEndMeeting({ stayBehind })), [dispatch]);
212
+ const joinBreakoutGroup = React.useCallback((group) => dispatch(doBreakoutJoin({ group })), [dispatch]);
213
+ const joinBreakoutMainRoom = React.useCallback(() => dispatch(doBreakoutJoin({ group: "" })), [dispatch]);
206
214
  const { events } = roomConnectionState, state = __rest(roomConnectionState, ["events"]);
207
215
  return {
208
216
  state,
@@ -232,6 +240,8 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
232
240
  toggleMicrophone,
233
241
  spotlightParticipant,
234
242
  removeSpotlight,
243
+ joinBreakoutGroup,
244
+ joinBreakoutMainRoom,
235
245
  },
236
246
  };
237
247
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whereby.com/browser-sdk",
3
- "version": "3.10.12",
3
+ "version": "3.11.1",
4
4
  "description": "Modules for integration Whereby video in web apps",
5
5
  "author": "Whereby AS",
6
6
  "license": "MIT",
@@ -80,7 +80,7 @@
80
80
  "dependencies": {
81
81
  "@radix-ui/react-popover": "^1.0.7",
82
82
  "@reduxjs/toolkit": "^2.2.3",
83
- "@whereby.com/core": "0.31.4",
83
+ "@whereby.com/core": "0.32.1",
84
84
  "clsx": "^2.1.1",
85
85
  "heresy": "^1.0.4",
86
86
  "react-redux": "^9.1.1",