@whereby.com/browser-sdk 3.26.7 → 3.28.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,7 +172,7 @@ const VideoView = React__namespace.forwardRef((_a, ref) => {
172
172
  });
173
173
  VideoView.displayName = "VideoView";
174
174
 
175
- const browserSdkVersion = "3.26.7";
175
+ const browserSdkVersion = "3.28.0";
176
176
 
177
177
  const initialState$1 = {
178
178
  chatMessages: [],
@@ -191,6 +191,7 @@ const initialState$1 = {
191
191
  screenshares: [],
192
192
  connectionStatus: "ready",
193
193
  connectionError: null,
194
+ knockResponse: null,
194
195
  waitingParticipants: [],
195
196
  spotlightedParticipants: [],
196
197
  };
@@ -252,7 +253,8 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
252
253
  const askToSpeak = React__namespace.useCallback((participantId) => client.askToSpeak(participantId), [client]);
253
254
  const askToTurnOnCamera = React__namespace.useCallback((participantId) => client.askToTurnOnCamera(participantId), [client]);
254
255
  const acceptWaitingParticipant = React__namespace.useCallback((participantId) => client.acceptWaitingParticipant(participantId), [client]);
255
- const rejectWaitingParticipant = React__namespace.useCallback((participantId) => client.rejectWaitingParticipant(participantId), [client]);
256
+ const holdWaitingParticipant = React__namespace.useCallback((participantId, response) => client.holdWaitingParticipant(participantId, response), [client]);
257
+ const rejectWaitingParticipant = React__namespace.useCallback((participantId, response) => client.rejectWaitingParticipant(participantId, response), [client]);
256
258
  const startCloudRecording = React__namespace.useCallback(() => client.startCloudRecording(), [client]);
257
259
  const startLiveCaptions = React__namespace.useCallback(() => client.startLiveCaptions(), [client]);
258
260
  const startLiveTranscription = React__namespace.useCallback(() => client.startLiveTranscription(), [client]);
@@ -294,6 +296,7 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
294
296
  askToSpeak,
295
297
  askToTurnOnCamera,
296
298
  acceptWaitingParticipant,
299
+ holdWaitingParticipant,
297
300
  knock,
298
301
  cancelKnock,
299
302
  joinRoom,
@@ -2273,7 +2276,7 @@ function renderCellView({ cellView, enableParticipantMenu, render }) {
2273
2276
  enableParticipantMenu ? React__namespace.createElement(DefaultParticipantMenu, { participant: participant }) : null)))));
2274
2277
  }
2275
2278
  }
2276
- function Grid({ renderParticipant, renderFloatingParticipant, stageParticipantLimit, gridGap, videoGridGap, enableSubgrid, enableParticipantMenu, enableConstrainedGrid, }) {
2279
+ function Grid({ renderParticipant, renderSubgridParticipant, renderFloatingParticipant, stageParticipantLimit, gridGap, videoGridGap, enableSubgrid, enableParticipantMenu, enableConstrainedGrid, }) {
2277
2280
  const gridRef = React__namespace.useRef(null);
2278
2281
  const { containerFrame, cellViewsFloating, cellViewsVideoGrid, cellViewsInPresentationGrid, cellViewsInSubgrid, clientAspectRatios, videoStage, setContainerBounds, setClientAspectRatios, maximizedParticipant, setMaximizedParticipant, isConstrained, floatingParticipant, setFloatingParticipant, } = useGrid({
2279
2282
  activeVideosSubgridTrigger: 12,
@@ -2295,10 +2298,10 @@ function Grid({ renderParticipant, renderFloatingParticipant, stageParticipantLi
2295
2298
  enableParticipantMenu }, (renderParticipant ? { render: ({ participant }) => renderParticipant({ participant }) } : {})))), [cellViewsInPresentationGrid]);
2296
2299
  const gridContent = React__namespace.useMemo(() => cellViewsVideoGrid.map((cellView) => renderCellView(Object.assign({ cellView,
2297
2300
  enableParticipantMenu }, (renderParticipant ? { render: ({ participant }) => renderParticipant({ participant }) } : {})))), [cellViewsVideoGrid]);
2298
- const subgridContent = React__namespace.useMemo(() => cellViewsInSubgrid.map((cellView) => renderCellView({
2299
- cellView,
2300
- enableParticipantMenu,
2301
- })), [cellViewsInSubgrid]);
2301
+ const subgridContent = React__namespace.useMemo(() => cellViewsInSubgrid.map((cellView) => renderCellView(Object.assign({ cellView,
2302
+ enableParticipantMenu }, (renderSubgridParticipant
2303
+ ? { render: ({ participant }) => renderSubgridParticipant({ participant }) }
2304
+ : {})))), [cellViewsInSubgrid]);
2302
2305
  React__namespace.useEffect(() => {
2303
2306
  if (!gridRef.current) {
2304
2307
  return;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
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';
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,7 +71,7 @@ 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
+ rejectWaitingParticipant: (participantId: string, response?: string) => void;
74
75
  sendChatMessage: (text: string, parentId?: string) => void;
75
76
  removeChatMessage: (id: string, sig?: string | null) => void;
76
77
  sendFiles: (files: File[]) => void;
@@ -122,6 +123,9 @@ interface GridProps {
122
123
  renderParticipant?: ({ participant }: {
123
124
  participant: ClientView;
124
125
  }) => React.ReactNode;
126
+ renderSubgridParticipant?: ({ participant }: {
127
+ participant: ClientView;
128
+ }) => React.ReactNode;
125
129
  renderFloatingParticipant?: ({ participant }: {
126
130
  participant: ClientView;
127
131
  }) => React.ReactNode;
@@ -132,7 +136,7 @@ interface GridProps {
132
136
  enableParticipantMenu?: boolean;
133
137
  enableConstrainedGrid?: boolean;
134
138
  }
135
- declare function Grid({ renderParticipant, renderFloatingParticipant, stageParticipantLimit, gridGap, videoGridGap, enableSubgrid, enableParticipantMenu, enableConstrainedGrid, }: GridProps): React.JSX.Element;
139
+ declare function Grid({ renderParticipant, renderSubgridParticipant, renderFloatingParticipant, stageParticipantLimit, gridGap, videoGridGap, enableSubgrid, enableParticipantMenu, enableConstrainedGrid, }: GridProps): React.JSX.Element;
136
140
 
137
141
  declare const ParticipantMenu: (props: PopoverProps) => React.JSX.Element;
138
142
  declare const ParticipantMenuContent: React.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_popover.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -151,7 +151,7 @@ const VideoView = React.forwardRef((_a, ref) => {
151
151
  });
152
152
  VideoView.displayName = "VideoView";
153
153
 
154
- const browserSdkVersion = "3.26.7";
154
+ const browserSdkVersion = "3.28.0";
155
155
 
156
156
  const initialState$1 = {
157
157
  chatMessages: [],
@@ -170,6 +170,7 @@ const initialState$1 = {
170
170
  screenshares: [],
171
171
  connectionStatus: "ready",
172
172
  connectionError: null,
173
+ knockResponse: null,
173
174
  waitingParticipants: [],
174
175
  spotlightedParticipants: [],
175
176
  };
@@ -231,7 +232,8 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
231
232
  const askToSpeak = React.useCallback((participantId) => client.askToSpeak(participantId), [client]);
232
233
  const askToTurnOnCamera = React.useCallback((participantId) => client.askToTurnOnCamera(participantId), [client]);
233
234
  const acceptWaitingParticipant = React.useCallback((participantId) => client.acceptWaitingParticipant(participantId), [client]);
234
- const rejectWaitingParticipant = React.useCallback((participantId) => client.rejectWaitingParticipant(participantId), [client]);
235
+ const holdWaitingParticipant = React.useCallback((participantId, response) => client.holdWaitingParticipant(participantId, response), [client]);
236
+ const rejectWaitingParticipant = React.useCallback((participantId, response) => client.rejectWaitingParticipant(participantId, response), [client]);
235
237
  const startCloudRecording = React.useCallback(() => client.startCloudRecording(), [client]);
236
238
  const startLiveCaptions = React.useCallback(() => client.startLiveCaptions(), [client]);
237
239
  const startLiveTranscription = React.useCallback(() => client.startLiveTranscription(), [client]);
@@ -273,6 +275,7 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
273
275
  askToSpeak,
274
276
  askToTurnOnCamera,
275
277
  acceptWaitingParticipant,
278
+ holdWaitingParticipant,
276
279
  knock,
277
280
  cancelKnock,
278
281
  joinRoom,
@@ -2252,7 +2255,7 @@ function renderCellView({ cellView, enableParticipantMenu, render }) {
2252
2255
  enableParticipantMenu ? React.createElement(DefaultParticipantMenu, { participant: participant }) : null)))));
2253
2256
  }
2254
2257
  }
2255
- function Grid({ renderParticipant, renderFloatingParticipant, stageParticipantLimit, gridGap, videoGridGap, enableSubgrid, enableParticipantMenu, enableConstrainedGrid, }) {
2258
+ function Grid({ renderParticipant, renderSubgridParticipant, renderFloatingParticipant, stageParticipantLimit, gridGap, videoGridGap, enableSubgrid, enableParticipantMenu, enableConstrainedGrid, }) {
2256
2259
  const gridRef = React.useRef(null);
2257
2260
  const { containerFrame, cellViewsFloating, cellViewsVideoGrid, cellViewsInPresentationGrid, cellViewsInSubgrid, clientAspectRatios, videoStage, setContainerBounds, setClientAspectRatios, maximizedParticipant, setMaximizedParticipant, isConstrained, floatingParticipant, setFloatingParticipant, } = useGrid({
2258
2261
  activeVideosSubgridTrigger: 12,
@@ -2274,10 +2277,10 @@ function Grid({ renderParticipant, renderFloatingParticipant, stageParticipantLi
2274
2277
  enableParticipantMenu }, (renderParticipant ? { render: ({ participant }) => renderParticipant({ participant }) } : {})))), [cellViewsInPresentationGrid]);
2275
2278
  const gridContent = React.useMemo(() => cellViewsVideoGrid.map((cellView) => renderCellView(Object.assign({ cellView,
2276
2279
  enableParticipantMenu }, (renderParticipant ? { render: ({ participant }) => renderParticipant({ participant }) } : {})))), [cellViewsVideoGrid]);
2277
- const subgridContent = React.useMemo(() => cellViewsInSubgrid.map((cellView) => renderCellView({
2278
- cellView,
2279
- enableParticipantMenu,
2280
- })), [cellViewsInSubgrid]);
2280
+ const subgridContent = React.useMemo(() => cellViewsInSubgrid.map((cellView) => renderCellView(Object.assign({ cellView,
2281
+ enableParticipantMenu }, (renderSubgridParticipant
2282
+ ? { render: ({ participant }) => renderSubgridParticipant({ participant }) }
2283
+ : {})))), [cellViewsInSubgrid]);
2281
2284
  React.useEffect(() => {
2282
2285
  if (!gridRef.current) {
2283
2286
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whereby.com/browser-sdk",
3
- "version": "3.26.7",
3
+ "version": "3.28.0",
4
4
  "description": "Modules for integration Whereby video in web apps",
5
5
  "author": "Whereby AS",
6
6
  "license": "MIT",
@@ -66,15 +66,15 @@
66
66
  "eslint-plugin-storybook": "9.0.16",
67
67
  "@storybook/addon-docs": "^9.0.16",
68
68
  "@whereby.com/eslint-config": "0.1.0",
69
- "@whereby.com/prettier-config": "0.1.0",
70
69
  "@whereby.com/jest-config": "0.1.0",
70
+ "@whereby.com/prettier-config": "0.1.0",
71
71
  "@whereby.com/rollup-config": "0.1.1",
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.5.0",
77
+ "@whereby.com/core": "1.17.0",
78
78
  "clsx": "^2.1.1",
79
79
  "heresy": "^1.0.4",
80
80
  "runes": "^0.4.3"