@whereby.com/browser-sdk 3.27.0 → 3.29.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.
@@ -172,17 +172,32 @@ const VideoView = React__namespace.forwardRef((_a, ref) => {
172
172
  });
173
173
  VideoView.displayName = "VideoView";
174
174
 
175
- const browserSdkVersion = "3.27.0";
175
+ const browserSdkVersion = "3.29.0";
176
176
 
177
177
  const initialState$1 = {
178
178
  chatMessages: [],
179
179
  fileUploads: [],
180
180
  cloudRecording: undefined,
181
181
  breakout: {
182
+ isAvailable: false,
183
+ error: null,
182
184
  isActive: false,
183
185
  currentGroup: null,
186
+ groups: null,
187
+ enforceAssignment: false,
188
+ autoMoveToGroup: false,
189
+ moveToGroupGracePeriod: null,
190
+ autoMoveToMain: false,
191
+ moveToMainGracePeriod: null,
192
+ breakoutTimerSetting: false,
193
+ breakoutTimerDuration: 0,
194
+ startedAt: null,
195
+ endTime: null,
196
+ moveToGroupAt: null,
197
+ moveToMainAt: null,
184
198
  groupedParticipants: [],
185
199
  participantsInCurrentGroup: [],
200
+ broadcastingParticipants: [],
186
201
  },
187
202
  isCameraEnabled: false,
188
203
  isMicrophoneEnabled: false,
@@ -191,6 +206,7 @@ const initialState$1 = {
191
206
  screenshares: [],
192
207
  connectionStatus: "ready",
193
208
  connectionError: null,
209
+ knockResponse: null,
194
210
  waitingParticipants: [],
195
211
  spotlightedParticipants: [],
196
212
  };
@@ -236,7 +252,7 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
236
252
  client.initialize(roomConfig);
237
253
  return client.joinRoom();
238
254
  }, [client]);
239
- const sendChatMessage = React__namespace.useCallback((text, parentId) => client.sendChatMessage(text, parentId), [client]);
255
+ const sendChatMessage = React__namespace.useCallback((text, parentId, isBroadcast) => client.sendChatMessage(text, parentId, isBroadcast), [client]);
240
256
  const removeChatMessage = React__namespace.useCallback((id, sig) => client.removeChatMessage(id, sig), [client]);
241
257
  const sendFiles = React__namespace.useCallback((files) => client.sendFiles(files), [client]);
242
258
  const downloadFile = React__namespace.useCallback((file) => client.downloadFile(file), [client]);
@@ -252,7 +268,8 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
252
268
  const askToSpeak = React__namespace.useCallback((participantId) => client.askToSpeak(participantId), [client]);
253
269
  const askToTurnOnCamera = React__namespace.useCallback((participantId) => client.askToTurnOnCamera(participantId), [client]);
254
270
  const acceptWaitingParticipant = React__namespace.useCallback((participantId) => client.acceptWaitingParticipant(participantId), [client]);
255
- const rejectWaitingParticipant = React__namespace.useCallback((participantId) => client.rejectWaitingParticipant(participantId), [client]);
271
+ const holdWaitingParticipant = React__namespace.useCallback((participantId, response) => client.holdWaitingParticipant(participantId, response), [client]);
272
+ const rejectWaitingParticipant = React__namespace.useCallback((participantId, response) => client.rejectWaitingParticipant(participantId, response), [client]);
256
273
  const startCloudRecording = React__namespace.useCallback(() => client.startCloudRecording(), [client]);
257
274
  const startLiveCaptions = React__namespace.useCallback(() => client.startLiveCaptions(), [client]);
258
275
  const startLiveTranscription = React__namespace.useCallback(() => client.startLiveTranscription(), [client]);
@@ -271,6 +288,17 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
271
288
  const endMeeting = React__namespace.useCallback((stayBehind) => client.endMeeting(stayBehind), [client]);
272
289
  const joinBreakoutGroup = React__namespace.useCallback((group) => client.joinBreakoutGroup(group), [client]);
273
290
  const joinBreakoutMainRoom = React__namespace.useCallback(() => client.joinBreakoutMainRoom(), [client]);
291
+ const startBreakoutSession = React__namespace.useCallback((options) => client.startBreakoutSession(options), [client]);
292
+ const updateBreakoutSession = React__namespace.useCallback((options) => client.updateBreakoutSession(options), [client]);
293
+ const stopBreakoutSession = React__namespace.useCallback(() => client.stopBreakoutSession(), [client]);
294
+ const assignBreakoutParticipants = React__namespace.useCallback((assignments) => client.assignBreakoutParticipants(assignments), [client]);
295
+ const assignAllBreakoutParticipants = React__namespace.useCallback(() => client.assignAllBreakoutParticipants(), [client]);
296
+ const unassignAllBreakoutParticipants = React__namespace.useCallback(() => client.unassignAllBreakoutParticipants(), [client]);
297
+ const shuffleBreakoutParticipants = React__namespace.useCallback(() => client.shuffleBreakoutParticipants(), [client]);
298
+ const extendBreakoutTimer = React__namespace.useCallback((seconds) => client.extendBreakoutTimer(seconds), [client]);
299
+ const stopBreakoutTimer = React__namespace.useCallback(() => client.stopBreakoutTimer(), [client]);
300
+ const broadcastToGroups = React__namespace.useCallback((participantId) => client.broadcastToGroups(participantId), [client]);
301
+ const stopBroadcastToGroups = React__namespace.useCallback((participantId) => client.stopBroadcastToGroups(participantId), [client]);
274
302
  const switchCameraEffect = React__namespace.useCallback((effectId) => __awaiter(this, void 0, void 0, function* () {
275
303
  yield client.switchCameraEffect(effectId);
276
304
  }), [client]);
@@ -294,6 +322,7 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
294
322
  askToSpeak,
295
323
  askToTurnOnCamera,
296
324
  acceptWaitingParticipant,
325
+ holdWaitingParticipant,
297
326
  knock,
298
327
  cancelKnock,
299
328
  joinRoom,
@@ -327,6 +356,17 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
327
356
  removeSpotlight,
328
357
  joinBreakoutGroup,
329
358
  joinBreakoutMainRoom,
359
+ startBreakoutSession,
360
+ updateBreakoutSession,
361
+ stopBreakoutSession,
362
+ assignBreakoutParticipants,
363
+ assignAllBreakoutParticipants,
364
+ unassignAllBreakoutParticipants,
365
+ shuffleBreakoutParticipants,
366
+ extendBreakoutTimer,
367
+ stopBreakoutTimer,
368
+ broadcastToGroups,
369
+ stopBroadcastToGroups,
330
370
  switchCameraEffect,
331
371
  switchCameraEffectCustom,
332
372
  clearCameraEffect,
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { LocalMediaState, LocalMediaOptions, RoomJoinedSuccess, ChatFileShare, RoomConnectionState, NotificationsEventEmitter, ClientView } from '@whereby.com/core';
3
- export { ACCEPTED_FILE_TYPES, BreakoutState as Breakout, ChatFileShare, ChatMessageState as ChatMessage, CloudRecordingState as CloudRecording, FileShareError, FileUpload, LiveStreamState as LiveStreaming, LocalParticipantState as LocalParticipant, MAX_FILES_PER_UPLOAD, MAX_FILE_SIZE, RemoteParticipantState as RemoteParticipant, RoomConnectionState as RoomConnection, ScreenshareState as Screenshare, WaitingParticipantState as WaitingParticipant, getUsableCameraEffectPresets, isAudioDenoiserSupported } from '@whereby.com/core';
2
+ import { LocalMediaState, LocalMediaOptions, RoomJoinedSuccess, ChatFileShare, StartBreakoutSessionOptions, UpdateBreakoutSessionOptions, RoomConnectionState, NotificationsEventEmitter, ClientView } from '@whereby.com/core';
3
+ export { ACCEPTED_FILE_TYPES, BreakoutState as Breakout, ChatFileShare, ChatMessageState as ChatMessage, CloudRecordingState as CloudRecording, FileShareError, FileUpload, KnockResponse, LiveStreamState as LiveStreaming, LocalParticipantState as LocalParticipant, MAX_FILES_PER_UPLOAD, MAX_FILE_SIZE, RemoteParticipantState as RemoteParticipant, RoomConnectionState as RoomConnection, ScreenshareState as Screenshare, WaitingParticipantState as WaitingParticipant, getUsableCameraEffectPresets, isAudioDenoiserSupported } from '@whereby.com/core';
4
4
  import * as _radix_ui_react_popover from '@radix-ui/react-popover';
5
5
  import { PopoverProps } from '@radix-ui/react-popover';
6
6
 
@@ -61,6 +61,7 @@ interface RoomConnectionActions {
61
61
  askToSpeak: (participantId: string) => void;
62
62
  askToTurnOnCamera: (participantId: string) => void;
63
63
  acceptWaitingParticipant: (participantId: string) => void;
64
+ holdWaitingParticipant: (participantId: string, response?: string) => void;
64
65
  knock: () => void;
65
66
  cancelKnock: () => void;
66
67
  joinRoom: () => Promise<RoomJoinedSuccess>;
@@ -70,8 +71,8 @@ interface RoomConnectionActions {
70
71
  turnOffParticipantCameras: (clientIds: string[]) => void;
71
72
  kickParticipant: (clientId: string) => void;
72
73
  endMeeting: (stayBehind?: boolean) => void;
73
- rejectWaitingParticipant: (participantId: string) => void;
74
- sendChatMessage: (text: string, parentId?: string) => void;
74
+ rejectWaitingParticipant: (participantId: string, response?: string) => void;
75
+ sendChatMessage: (text: string, parentId?: string, isBroadcast?: boolean) => void;
75
76
  removeChatMessage: (id: string, sig?: string | null) => void;
76
77
  sendFiles: (files: File[]) => void;
77
78
  downloadFile: (file: ChatFileShare) => Promise<Blob>;
@@ -94,6 +95,19 @@ interface RoomConnectionActions {
94
95
  removeSpotlight: (clientId: string) => void;
95
96
  joinBreakoutGroup: (group: string) => void;
96
97
  joinBreakoutMainRoom: () => void;
98
+ startBreakoutSession: (options: StartBreakoutSessionOptions) => void;
99
+ updateBreakoutSession: (options: UpdateBreakoutSessionOptions) => void;
100
+ stopBreakoutSession: () => void;
101
+ assignBreakoutParticipants: (assignments: {
102
+ [clientId: string]: string;
103
+ }) => void;
104
+ assignAllBreakoutParticipants: () => void;
105
+ unassignAllBreakoutParticipants: () => void;
106
+ shuffleBreakoutParticipants: () => void;
107
+ extendBreakoutTimer: (seconds?: number) => void;
108
+ stopBreakoutTimer: () => void;
109
+ broadcastToGroups: (participantId: string) => void;
110
+ stopBroadcastToGroups: (participantId: string) => void;
97
111
  switchCameraEffect: (effectId: string) => Promise<void>;
98
112
  switchCameraEffectCustom: (imageUrl: string) => Promise<void>;
99
113
  clearCameraEffect: () => Promise<void>;
@@ -151,17 +151,32 @@ const VideoView = React.forwardRef((_a, ref) => {
151
151
  });
152
152
  VideoView.displayName = "VideoView";
153
153
 
154
- const browserSdkVersion = "3.27.0";
154
+ const browserSdkVersion = "3.29.0";
155
155
 
156
156
  const initialState$1 = {
157
157
  chatMessages: [],
158
158
  fileUploads: [],
159
159
  cloudRecording: undefined,
160
160
  breakout: {
161
+ isAvailable: false,
162
+ error: null,
161
163
  isActive: false,
162
164
  currentGroup: null,
165
+ groups: null,
166
+ enforceAssignment: false,
167
+ autoMoveToGroup: false,
168
+ moveToGroupGracePeriod: null,
169
+ autoMoveToMain: false,
170
+ moveToMainGracePeriod: null,
171
+ breakoutTimerSetting: false,
172
+ breakoutTimerDuration: 0,
173
+ startedAt: null,
174
+ endTime: null,
175
+ moveToGroupAt: null,
176
+ moveToMainAt: null,
163
177
  groupedParticipants: [],
164
178
  participantsInCurrentGroup: [],
179
+ broadcastingParticipants: [],
165
180
  },
166
181
  isCameraEnabled: false,
167
182
  isMicrophoneEnabled: false,
@@ -170,6 +185,7 @@ const initialState$1 = {
170
185
  screenshares: [],
171
186
  connectionStatus: "ready",
172
187
  connectionError: null,
188
+ knockResponse: null,
173
189
  waitingParticipants: [],
174
190
  spotlightedParticipants: [],
175
191
  };
@@ -215,7 +231,7 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
215
231
  client.initialize(roomConfig);
216
232
  return client.joinRoom();
217
233
  }, [client]);
218
- const sendChatMessage = React.useCallback((text, parentId) => client.sendChatMessage(text, parentId), [client]);
234
+ const sendChatMessage = React.useCallback((text, parentId, isBroadcast) => client.sendChatMessage(text, parentId, isBroadcast), [client]);
219
235
  const removeChatMessage = React.useCallback((id, sig) => client.removeChatMessage(id, sig), [client]);
220
236
  const sendFiles = React.useCallback((files) => client.sendFiles(files), [client]);
221
237
  const downloadFile = React.useCallback((file) => client.downloadFile(file), [client]);
@@ -231,7 +247,8 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
231
247
  const askToSpeak = React.useCallback((participantId) => client.askToSpeak(participantId), [client]);
232
248
  const askToTurnOnCamera = React.useCallback((participantId) => client.askToTurnOnCamera(participantId), [client]);
233
249
  const acceptWaitingParticipant = React.useCallback((participantId) => client.acceptWaitingParticipant(participantId), [client]);
234
- const rejectWaitingParticipant = React.useCallback((participantId) => client.rejectWaitingParticipant(participantId), [client]);
250
+ const holdWaitingParticipant = React.useCallback((participantId, response) => client.holdWaitingParticipant(participantId, response), [client]);
251
+ const rejectWaitingParticipant = React.useCallback((participantId, response) => client.rejectWaitingParticipant(participantId, response), [client]);
235
252
  const startCloudRecording = React.useCallback(() => client.startCloudRecording(), [client]);
236
253
  const startLiveCaptions = React.useCallback(() => client.startLiveCaptions(), [client]);
237
254
  const startLiveTranscription = React.useCallback(() => client.startLiveTranscription(), [client]);
@@ -250,6 +267,17 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
250
267
  const endMeeting = React.useCallback((stayBehind) => client.endMeeting(stayBehind), [client]);
251
268
  const joinBreakoutGroup = React.useCallback((group) => client.joinBreakoutGroup(group), [client]);
252
269
  const joinBreakoutMainRoom = React.useCallback(() => client.joinBreakoutMainRoom(), [client]);
270
+ const startBreakoutSession = React.useCallback((options) => client.startBreakoutSession(options), [client]);
271
+ const updateBreakoutSession = React.useCallback((options) => client.updateBreakoutSession(options), [client]);
272
+ const stopBreakoutSession = React.useCallback(() => client.stopBreakoutSession(), [client]);
273
+ const assignBreakoutParticipants = React.useCallback((assignments) => client.assignBreakoutParticipants(assignments), [client]);
274
+ const assignAllBreakoutParticipants = React.useCallback(() => client.assignAllBreakoutParticipants(), [client]);
275
+ const unassignAllBreakoutParticipants = React.useCallback(() => client.unassignAllBreakoutParticipants(), [client]);
276
+ const shuffleBreakoutParticipants = React.useCallback(() => client.shuffleBreakoutParticipants(), [client]);
277
+ const extendBreakoutTimer = React.useCallback((seconds) => client.extendBreakoutTimer(seconds), [client]);
278
+ const stopBreakoutTimer = React.useCallback(() => client.stopBreakoutTimer(), [client]);
279
+ const broadcastToGroups = React.useCallback((participantId) => client.broadcastToGroups(participantId), [client]);
280
+ const stopBroadcastToGroups = React.useCallback((participantId) => client.stopBroadcastToGroups(participantId), [client]);
253
281
  const switchCameraEffect = React.useCallback((effectId) => __awaiter(this, void 0, void 0, function* () {
254
282
  yield client.switchCameraEffect(effectId);
255
283
  }), [client]);
@@ -273,6 +301,7 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
273
301
  askToSpeak,
274
302
  askToTurnOnCamera,
275
303
  acceptWaitingParticipant,
304
+ holdWaitingParticipant,
276
305
  knock,
277
306
  cancelKnock,
278
307
  joinRoom,
@@ -306,6 +335,17 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
306
335
  removeSpotlight,
307
336
  joinBreakoutGroup,
308
337
  joinBreakoutMainRoom,
338
+ startBreakoutSession,
339
+ updateBreakoutSession,
340
+ stopBreakoutSession,
341
+ assignBreakoutParticipants,
342
+ assignAllBreakoutParticipants,
343
+ unassignAllBreakoutParticipants,
344
+ shuffleBreakoutParticipants,
345
+ extendBreakoutTimer,
346
+ stopBreakoutTimer,
347
+ broadcastToGroups,
348
+ stopBroadcastToGroups,
309
349
  switchCameraEffect,
310
350
  switchCameraEffectCustom,
311
351
  clearCameraEffect,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whereby.com/browser-sdk",
3
- "version": "3.27.0",
3
+ "version": "3.29.0",
4
4
  "description": "Modules for integration Whereby video in web apps",
5
5
  "author": "Whereby AS",
6
6
  "license": "MIT",
@@ -67,14 +67,14 @@
67
67
  "@storybook/addon-docs": "^9.0.16",
68
68
  "@whereby.com/eslint-config": "0.1.0",
69
69
  "@whereby.com/jest-config": "0.1.0",
70
- "@whereby.com/prettier-config": "0.1.0",
71
70
  "@whereby.com/rollup-config": "0.1.1",
71
+ "@whereby.com/prettier-config": "0.1.0",
72
72
  "@whereby.com/tsconfig": "0.1.0"
73
73
  },
74
74
  "dependencies": {
75
75
  "@radix-ui/react-popover": "^1.0.7",
76
- "@whereby.com/media": "9.4.0",
77
- "@whereby.com/core": "1.16.3",
76
+ "@whereby.com/media": "9.6.0",
77
+ "@whereby.com/core": "1.18.0",
78
78
  "clsx": "^2.1.1",
79
79
  "heresy": "^1.0.4",
80
80
  "runes": "^0.4.3"