@whereby.com/browser-sdk 3.36.2 → 3.38.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/README.md +41 -0
- package/dist/cdn/v3-react.js +10 -10
- package/dist/react/index.cjs +14 -4
- package/dist/react/index.d.ts +4 -3
- package/dist/react/index.esm.js +11 -5
- package/package.json +3 -3
package/dist/react/index.cjs
CHANGED
|
@@ -27,13 +27,17 @@ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
|
27
27
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(PopoverPrimitive);
|
|
28
28
|
|
|
29
29
|
const WherebyContext = React__namespace.createContext(null);
|
|
30
|
-
function Provider({ children }) {
|
|
31
|
-
const client = React__namespace.useMemo(() => new core.WherebyClient(), []);
|
|
30
|
+
function Provider({ children, client: externalClient }) {
|
|
31
|
+
const client = React__namespace.useMemo(() => externalClient !== null && externalClient !== void 0 ? externalClient : new core.WherebyClient(), [externalClient]);
|
|
32
|
+
const ownsClient = !externalClient;
|
|
32
33
|
React__namespace.useEffect(() => {
|
|
34
|
+
if (!ownsClient) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
33
37
|
return () => {
|
|
34
38
|
client.destroy();
|
|
35
39
|
};
|
|
36
|
-
}, [client]);
|
|
40
|
+
}, [client, ownsClient]);
|
|
37
41
|
return React__namespace.createElement(WherebyContext.Provider, { value: client }, children);
|
|
38
42
|
}
|
|
39
43
|
|
|
@@ -202,7 +206,7 @@ const VideoView = React__namespace.forwardRef((_a, ref) => {
|
|
|
202
206
|
});
|
|
203
207
|
VideoView.displayName = "VideoView";
|
|
204
208
|
|
|
205
|
-
const browserSdkVersion = "3.
|
|
209
|
+
const browserSdkVersion = "3.38.0";
|
|
206
210
|
|
|
207
211
|
const initialState$1 = {
|
|
208
212
|
chatMessages: [],
|
|
@@ -230,6 +234,7 @@ const initialState$1 = {
|
|
|
230
234
|
broadcastingParticipants: [],
|
|
231
235
|
},
|
|
232
236
|
remoteParticipantQualityReport: {},
|
|
237
|
+
localParticipantQualityReport: {},
|
|
233
238
|
isAudioOnlyModeEnabled: false,
|
|
234
239
|
isCameraEnabled: false,
|
|
235
240
|
isMicrophoneEnabled: false,
|
|
@@ -243,6 +248,7 @@ const initialState$1 = {
|
|
|
243
248
|
enabled: [],
|
|
244
249
|
running: [],
|
|
245
250
|
},
|
|
251
|
+
roomSessionId: null,
|
|
246
252
|
screenshares: [],
|
|
247
253
|
connectionStatus: "ready",
|
|
248
254
|
connectionError: null,
|
|
@@ -2865,6 +2871,10 @@ Object.defineProperty(exports, "ROOM_INTEGRATION_PICKER_MESSAGES", {
|
|
|
2865
2871
|
enumerable: true,
|
|
2866
2872
|
get: function () { return core.ROOM_INTEGRATION_PICKER_MESSAGES; }
|
|
2867
2873
|
});
|
|
2874
|
+
Object.defineProperty(exports, "WherebyClient", {
|
|
2875
|
+
enumerable: true,
|
|
2876
|
+
get: function () { return core.WherebyClient; }
|
|
2877
|
+
});
|
|
2868
2878
|
Object.defineProperty(exports, "getUsableCameraEffectPresets", {
|
|
2869
2879
|
enumerable: true,
|
|
2870
2880
|
get: function () { return core.getUsableCameraEffectPresets; }
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as _whereby_com_core from '@whereby.com/core';
|
|
3
|
-
import { LocalMediaState, LocalMediaOptions, InitialMuteStates, RoomJoinedSuccess, SendFilesOptions, ChatFileShare, ToggleAudioOnlyModeOptions, RoomIntegrationProps, StartBreakoutSessionOptions, UpdateBreakoutSessionOptions, RoomConnectionState, NotificationsEventEmitter, ClientView, RoomIntegrationSessionView, RoomIntegration, RoomIntegrationPickerResult } from '@whereby.com/core';
|
|
4
|
-
export { ACCEPTED_FILE_TYPES, BreakoutState as Breakout, CallQualityLevel, ChatFileShare, ChatMessageState as ChatMessage, CloudRecordingState as CloudRecording, FileShareError, FileUpload, KnockResponse, LiveStreamState as LiveStreaming, LocalParticipantState as LocalParticipant, MAX_FILES_PER_UPLOAD, MAX_FILE_SIZE, ROOM_INTEGRATION_PICKER_MESSAGES, RemoteParticipantState as RemoteParticipant, RemoteParticipantQualityReport, RoomConnectionState as RoomConnection, RoomIntegration, RoomIntegrationContent, RoomIntegrationError, RoomIntegrationErrorDetail, RoomIntegrationPickerResult, RoomIntegrationProps, RoomIntegrationSession, RoomIntegrationSessionView, RoomIntegrationsState as RoomIntegrations, ScreenshareState as Screenshare, SendFilesOptions, ToggleAudioOnlyModeOptions, WaitingParticipantState as WaitingParticipant, YouTubeContentMetadata, getUsableCameraEffectPresets, isAudioDenoiserSupported, roomIntegrationContent, roomIntegrationContentTagName, roomIntegrationPickerUrl } from '@whereby.com/core';
|
|
3
|
+
import { WherebyClient, LocalMediaState, LocalMediaOptions, InitialMuteStates, RoomJoinedSuccess, SendFilesOptions, ChatFileShare, ToggleAudioOnlyModeOptions, RoomIntegrationProps, StartBreakoutSessionOptions, UpdateBreakoutSessionOptions, RoomConnectionState, NotificationsEventEmitter, ClientView, RoomIntegrationSessionView, RoomIntegration, RoomIntegrationPickerResult } from '@whereby.com/core';
|
|
4
|
+
export { ACCEPTED_FILE_TYPES, BreakoutState as Breakout, CPUQualityLevel, CallQualityLevel, ChatFileShare, ChatMessageState as ChatMessage, CloudRecordingState as CloudRecording, FileShareError, FileUpload, KnockResponse, LiveStreamState as LiveStreaming, LocalParticipantState as LocalParticipant, LocalParticipantQualityReport, MAX_FILES_PER_UPLOAD, MAX_FILE_SIZE, ROOM_INTEGRATION_PICKER_MESSAGES, RemoteParticipantState as RemoteParticipant, RemoteParticipantQualityReport, RoomConnectionState as RoomConnection, RoomIntegration, RoomIntegrationContent, RoomIntegrationError, RoomIntegrationErrorDetail, RoomIntegrationPickerResult, RoomIntegrationProps, RoomIntegrationSession, RoomIntegrationSessionView, RoomIntegrationsState as RoomIntegrations, ScreenshareState as Screenshare, SendFilesOptions, ToggleAudioOnlyModeOptions, WaitingParticipantState as WaitingParticipant, WherebyClient, YouTubeContentMetadata, getUsableCameraEffectPresets, isAudioDenoiserSupported, roomIntegrationContent, roomIntegrationContentTagName, roomIntegrationPickerUrl } from '@whereby.com/core';
|
|
5
5
|
import * as _radix_ui_react_popover from '@radix-ui/react-popover';
|
|
6
6
|
import { PopoverProps } from '@radix-ui/react-popover';
|
|
7
7
|
|
|
8
8
|
interface ProviderProps {
|
|
9
9
|
children: React.ReactNode;
|
|
10
|
+
client?: WherebyClient;
|
|
10
11
|
}
|
|
11
|
-
declare function Provider({ children }: ProviderProps): React.JSX.Element;
|
|
12
|
+
declare function Provider({ children, client: externalClient }: ProviderProps): React.JSX.Element;
|
|
12
13
|
|
|
13
14
|
interface VideoViewSelfProps {
|
|
14
15
|
stream: MediaStream;
|
package/dist/react/index.esm.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { WherebyClient, CURRENT_SPEAKER_CHANGED, debounce, ROOM_INTEGRATION_PICKER_MESSAGES, roomIntegrationPickerUrl } from '@whereby.com/core';
|
|
3
|
-
export { ACCEPTED_FILE_TYPES, MAX_FILES_PER_UPLOAD, MAX_FILE_SIZE, ROOM_INTEGRATION_PICKER_MESSAGES, getUsableCameraEffectPresets, isAudioDenoiserSupported, roomIntegrationContent, roomIntegrationContentTagName, roomIntegrationPickerUrl } from '@whereby.com/core';
|
|
3
|
+
export { ACCEPTED_FILE_TYPES, MAX_FILES_PER_UPLOAD, MAX_FILE_SIZE, ROOM_INTEGRATION_PICKER_MESSAGES, WherebyClient, getUsableCameraEffectPresets, isAudioDenoiserSupported, roomIntegrationContent, roomIntegrationContentTagName, roomIntegrationPickerUrl } from '@whereby.com/core';
|
|
4
4
|
import adapterRaw from 'webrtc-adapter';
|
|
5
5
|
import runes from 'runes';
|
|
6
6
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
7
7
|
|
|
8
8
|
const WherebyContext = React.createContext(null);
|
|
9
|
-
function Provider({ children }) {
|
|
10
|
-
const client = React.useMemo(() => new WherebyClient(), []);
|
|
9
|
+
function Provider({ children, client: externalClient }) {
|
|
10
|
+
const client = React.useMemo(() => externalClient !== null && externalClient !== void 0 ? externalClient : new WherebyClient(), [externalClient]);
|
|
11
|
+
const ownsClient = !externalClient;
|
|
11
12
|
React.useEffect(() => {
|
|
13
|
+
if (!ownsClient) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
12
16
|
return () => {
|
|
13
17
|
client.destroy();
|
|
14
18
|
};
|
|
15
|
-
}, [client]);
|
|
19
|
+
}, [client, ownsClient]);
|
|
16
20
|
return React.createElement(WherebyContext.Provider, { value: client }, children);
|
|
17
21
|
}
|
|
18
22
|
|
|
@@ -181,7 +185,7 @@ const VideoView = React.forwardRef((_a, ref) => {
|
|
|
181
185
|
});
|
|
182
186
|
VideoView.displayName = "VideoView";
|
|
183
187
|
|
|
184
|
-
const browserSdkVersion = "3.
|
|
188
|
+
const browserSdkVersion = "3.38.0";
|
|
185
189
|
|
|
186
190
|
const initialState$1 = {
|
|
187
191
|
chatMessages: [],
|
|
@@ -209,6 +213,7 @@ const initialState$1 = {
|
|
|
209
213
|
broadcastingParticipants: [],
|
|
210
214
|
},
|
|
211
215
|
remoteParticipantQualityReport: {},
|
|
216
|
+
localParticipantQualityReport: {},
|
|
212
217
|
isAudioOnlyModeEnabled: false,
|
|
213
218
|
isCameraEnabled: false,
|
|
214
219
|
isMicrophoneEnabled: false,
|
|
@@ -222,6 +227,7 @@ const initialState$1 = {
|
|
|
222
227
|
enabled: [],
|
|
223
228
|
running: [],
|
|
224
229
|
},
|
|
230
|
+
roomSessionId: null,
|
|
225
231
|
screenshares: [],
|
|
226
232
|
connectionStatus: "ready",
|
|
227
233
|
connectionError: null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whereby.com/browser-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.38.0",
|
|
4
4
|
"description": "Modules for integration Whereby video in web apps",
|
|
5
5
|
"author": "Whereby AS",
|
|
6
6
|
"license": "MIT",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@radix-ui/react-popover": "^1.0.7",
|
|
76
|
-
"@whereby.com/media": "11.3.
|
|
77
|
-
"@whereby.com/core": "1.
|
|
76
|
+
"@whereby.com/media": "11.3.3",
|
|
77
|
+
"@whereby.com/core": "1.27.1",
|
|
78
78
|
"clsx": "^2.1.1",
|
|
79
79
|
"heresy": "^1.0.4",
|
|
80
80
|
"runes": "^0.4.3",
|