@whereby.com/browser-sdk 3.29.7 → 3.30.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/dist/cdn/v3-react.js +10 -10
- package/dist/react/index.cjs +6 -6
- package/dist/react/index.d.ts +2 -1
- package/dist/react/index.esm.js +6 -6
- package/package.json +6 -6
package/dist/react/index.cjs
CHANGED
|
@@ -172,7 +172,7 @@ const VideoView = React__namespace.forwardRef((_a, ref) => {
|
|
|
172
172
|
});
|
|
173
173
|
VideoView.displayName = "VideoView";
|
|
174
174
|
|
|
175
|
-
const browserSdkVersion = "3.
|
|
175
|
+
const browserSdkVersion = "3.30.0";
|
|
176
176
|
|
|
177
177
|
const initialState$1 = {
|
|
178
178
|
chatMessages: [],
|
|
@@ -231,6 +231,7 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
|
|
|
231
231
|
return {
|
|
232
232
|
displayName: roomConnectionOptions.displayName || "Guest",
|
|
233
233
|
localMediaOptions: roomConnectionOptions.localMedia ? undefined : roomConnectionOptions.localMediaOptions,
|
|
234
|
+
initialMuteStates: roomConnectionOptions.initialMuteStates,
|
|
234
235
|
roomKey,
|
|
235
236
|
roomUrl,
|
|
236
237
|
userAgent: `browser-sdk:${browserSdkVersion}`,
|
|
@@ -378,6 +379,8 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
|
|
|
378
379
|
|
|
379
380
|
const initialState = {
|
|
380
381
|
cameraDeviceError: null,
|
|
382
|
+
isCameraEnabled: false,
|
|
383
|
+
isMicrophoneEnabled: false,
|
|
381
384
|
isStarting: false,
|
|
382
385
|
isSettingCameraDevice: false,
|
|
383
386
|
isSettingMicrophoneDevice: false,
|
|
@@ -1854,15 +1857,11 @@ function calculateSubgridViews({ clientViews, activeVideosSubgridTrigger, should
|
|
|
1854
1857
|
}
|
|
1855
1858
|
function useGridParticipants({ activeVideosSubgridTrigger = ACTIVE_VIDEO_SUBGRID_TRIGGER, stageParticipantLimit = STAGE_PARTICIPANT_LIMIT, forceSubgrid = true, enableSubgrid = true, maximizedParticipant, floatingParticipant, isConstrained = false, } = {}) {
|
|
1856
1859
|
var _a;
|
|
1857
|
-
const [state, setState] = React__namespace.useState({
|
|
1858
|
-
allClientViews: [],
|
|
1859
|
-
spotlightedParticipants: [],
|
|
1860
|
-
numParticipants: 0,
|
|
1861
|
-
});
|
|
1862
1860
|
const client = (_a = React__namespace.useContext(WherebyContext)) === null || _a === void 0 ? void 0 : _a.getGrid();
|
|
1863
1861
|
if (!client) {
|
|
1864
1862
|
throw new Error("useGridParticipants must be used within a WherebyProvider");
|
|
1865
1863
|
}
|
|
1864
|
+
const [state, setState] = React__namespace.useState(() => client.getState());
|
|
1866
1865
|
const handleClientViewChanged = React__namespace.useCallback((clientViews) => {
|
|
1867
1866
|
setState((prevState) => (Object.assign(Object.assign({}, prevState), { allClientViews: clientViews })));
|
|
1868
1867
|
}, [setState]);
|
|
@@ -1876,6 +1875,7 @@ function useGridParticipants({ activeVideosSubgridTrigger = ACTIVE_VIDEO_SUBGRID
|
|
|
1876
1875
|
const unsubscribeClientViews = client.subscribeClientViews(handleClientViewChanged);
|
|
1877
1876
|
const unsubscribeSpotlighted = client.subscribeSpotlightedParticipants(handleSpotlightedParticipantsChanged);
|
|
1878
1877
|
const unsubscribeNumParticipants = client.subscribeNumberOfClientViews(handleNumParticipantsChanged);
|
|
1878
|
+
setState(client.getState());
|
|
1879
1879
|
return () => {
|
|
1880
1880
|
unsubscribeClientViews();
|
|
1881
1881
|
unsubscribeSpotlighted();
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { LocalMediaState, LocalMediaOptions, RoomJoinedSuccess, SendFilesOptions, ChatFileShare, StartBreakoutSessionOptions, UpdateBreakoutSessionOptions, RoomConnectionState, NotificationsEventEmitter, ClientView } from '@whereby.com/core';
|
|
2
|
+
import { LocalMediaState, LocalMediaOptions, InitialMuteStates, RoomJoinedSuccess, SendFilesOptions, ChatFileShare, StartBreakoutSessionOptions, UpdateBreakoutSessionOptions, RoomConnectionState, NotificationsEventEmitter, ClientView } from '@whereby.com/core';
|
|
3
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, SendFilesOptions, 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';
|
|
@@ -50,6 +50,7 @@ type UseLocalMediaOptions = LocalMediaOptions;
|
|
|
50
50
|
interface RoomConnectionOptions {
|
|
51
51
|
displayName?: string;
|
|
52
52
|
localMediaOptions?: LocalMediaOptions;
|
|
53
|
+
initialMuteStates?: InitialMuteStates;
|
|
53
54
|
roomKey?: string;
|
|
54
55
|
localMedia?: UseLocalMediaResult;
|
|
55
56
|
externalId?: string;
|
package/dist/react/index.esm.js
CHANGED
|
@@ -151,7 +151,7 @@ const VideoView = React.forwardRef((_a, ref) => {
|
|
|
151
151
|
});
|
|
152
152
|
VideoView.displayName = "VideoView";
|
|
153
153
|
|
|
154
|
-
const browserSdkVersion = "3.
|
|
154
|
+
const browserSdkVersion = "3.30.0";
|
|
155
155
|
|
|
156
156
|
const initialState$1 = {
|
|
157
157
|
chatMessages: [],
|
|
@@ -210,6 +210,7 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
|
|
|
210
210
|
return {
|
|
211
211
|
displayName: roomConnectionOptions.displayName || "Guest",
|
|
212
212
|
localMediaOptions: roomConnectionOptions.localMedia ? undefined : roomConnectionOptions.localMediaOptions,
|
|
213
|
+
initialMuteStates: roomConnectionOptions.initialMuteStates,
|
|
213
214
|
roomKey,
|
|
214
215
|
roomUrl,
|
|
215
216
|
userAgent: `browser-sdk:${browserSdkVersion}`,
|
|
@@ -357,6 +358,8 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
|
|
|
357
358
|
|
|
358
359
|
const initialState = {
|
|
359
360
|
cameraDeviceError: null,
|
|
361
|
+
isCameraEnabled: false,
|
|
362
|
+
isMicrophoneEnabled: false,
|
|
360
363
|
isStarting: false,
|
|
361
364
|
isSettingCameraDevice: false,
|
|
362
365
|
isSettingMicrophoneDevice: false,
|
|
@@ -1833,15 +1836,11 @@ function calculateSubgridViews({ clientViews, activeVideosSubgridTrigger, should
|
|
|
1833
1836
|
}
|
|
1834
1837
|
function useGridParticipants({ activeVideosSubgridTrigger = ACTIVE_VIDEO_SUBGRID_TRIGGER, stageParticipantLimit = STAGE_PARTICIPANT_LIMIT, forceSubgrid = true, enableSubgrid = true, maximizedParticipant, floatingParticipant, isConstrained = false, } = {}) {
|
|
1835
1838
|
var _a;
|
|
1836
|
-
const [state, setState] = React.useState({
|
|
1837
|
-
allClientViews: [],
|
|
1838
|
-
spotlightedParticipants: [],
|
|
1839
|
-
numParticipants: 0,
|
|
1840
|
-
});
|
|
1841
1839
|
const client = (_a = React.useContext(WherebyContext)) === null || _a === void 0 ? void 0 : _a.getGrid();
|
|
1842
1840
|
if (!client) {
|
|
1843
1841
|
throw new Error("useGridParticipants must be used within a WherebyProvider");
|
|
1844
1842
|
}
|
|
1843
|
+
const [state, setState] = React.useState(() => client.getState());
|
|
1845
1844
|
const handleClientViewChanged = React.useCallback((clientViews) => {
|
|
1846
1845
|
setState((prevState) => (Object.assign(Object.assign({}, prevState), { allClientViews: clientViews })));
|
|
1847
1846
|
}, [setState]);
|
|
@@ -1855,6 +1854,7 @@ function useGridParticipants({ activeVideosSubgridTrigger = ACTIVE_VIDEO_SUBGRID
|
|
|
1855
1854
|
const unsubscribeClientViews = client.subscribeClientViews(handleClientViewChanged);
|
|
1856
1855
|
const unsubscribeSpotlighted = client.subscribeSpotlightedParticipants(handleSpotlightedParticipantsChanged);
|
|
1857
1856
|
const unsubscribeNumParticipants = client.subscribeNumberOfClientViews(handleNumParticipantsChanged);
|
|
1857
|
+
setState(client.getState());
|
|
1858
1858
|
return () => {
|
|
1859
1859
|
unsubscribeClientViews();
|
|
1860
1860
|
unsubscribeSpotlighted();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whereby.com/browser-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.30.0",
|
|
4
4
|
"description": "Modules for integration Whereby video in web apps",
|
|
5
5
|
"author": "Whereby AS",
|
|
6
6
|
"license": "MIT",
|
|
@@ -65,16 +65,16 @@
|
|
|
65
65
|
"typescript": "^5.8.3",
|
|
66
66
|
"eslint-plugin-storybook": "9.0.16",
|
|
67
67
|
"@storybook/addon-docs": "^9.0.16",
|
|
68
|
-
"@whereby.com/eslint-config": "0.1.0",
|
|
69
68
|
"@whereby.com/jest-config": "0.1.0",
|
|
70
69
|
"@whereby.com/prettier-config": "0.1.0",
|
|
71
|
-
"@whereby.com/
|
|
72
|
-
"@whereby.com/
|
|
70
|
+
"@whereby.com/rollup-config": "0.1.1",
|
|
71
|
+
"@whereby.com/eslint-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
|
-
"@whereby.com/media": "
|
|
77
|
-
"@whereby.com/core": "1.
|
|
76
|
+
"@whereby.com/media": "10.0.0",
|
|
77
|
+
"@whereby.com/core": "1.20.0",
|
|
78
78
|
"clsx": "^2.1.1",
|
|
79
79
|
"heresy": "^1.0.4",
|
|
80
80
|
"runes": "^0.4.3"
|