@whereby.com/browser-sdk 3.36.1 → 3.37.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 +31 -8
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.esm.js +31 -8
- package/package.json +2 -2
package/dist/react/index.cjs
CHANGED
|
@@ -126,6 +126,8 @@ const VideoView = React__namespace.forwardRef((_a, ref) => {
|
|
|
126
126
|
const client = (_b = React__namespace.useContext(WherebyContext)) === null || _b === void 0 ? void 0 : _b.getRoomConnection();
|
|
127
127
|
const videoEl = React__namespace.useRef(null);
|
|
128
128
|
const audioEl = useAudioElement({ muted, stream });
|
|
129
|
+
const onVideoResizeRef = React__namespace.useRef(onVideoResize);
|
|
130
|
+
onVideoResizeRef.current = onVideoResize;
|
|
129
131
|
React__namespace.useImperativeHandle(ref, () => {
|
|
130
132
|
return Object.assign(videoEl.current, {
|
|
131
133
|
captureAspectRatio: () => {
|
|
@@ -146,17 +148,16 @@ const VideoView = React__namespace.forwardRef((_a, ref) => {
|
|
|
146
148
|
return;
|
|
147
149
|
}
|
|
148
150
|
const resizeObserver = new ResizeObserver(core.debounce(() => {
|
|
151
|
+
var _a;
|
|
149
152
|
if (videoEl.current && (stream === null || stream === void 0 ? void 0 : stream.id)) {
|
|
150
153
|
const width = videoEl.current.clientWidth;
|
|
151
154
|
const height = videoEl.current.clientHeight;
|
|
152
155
|
client === null || client === void 0 ? void 0 : client.reportStreamResolution(stream.id, width, height);
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
});
|
|
159
|
-
}
|
|
156
|
+
(_a = onVideoResizeRef.current) === null || _a === void 0 ? void 0 : _a.call(onVideoResizeRef, {
|
|
157
|
+
width,
|
|
158
|
+
height,
|
|
159
|
+
stream,
|
|
160
|
+
});
|
|
160
161
|
}
|
|
161
162
|
}, { delay: 1000, edges: true }));
|
|
162
163
|
resizeObserver.observe(videoEl.current);
|
|
@@ -164,6 +165,26 @@ const VideoView = React__namespace.forwardRef((_a, ref) => {
|
|
|
164
165
|
resizeObserver.disconnect();
|
|
165
166
|
};
|
|
166
167
|
}, [stream]);
|
|
168
|
+
React__namespace.useEffect(() => {
|
|
169
|
+
const video = videoEl.current;
|
|
170
|
+
if (!video) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
const handleSourceResize = () => {
|
|
174
|
+
var _a;
|
|
175
|
+
if (stream === null || stream === void 0 ? void 0 : stream.id) {
|
|
176
|
+
(_a = onVideoResizeRef.current) === null || _a === void 0 ? void 0 : _a.call(onVideoResizeRef, {
|
|
177
|
+
width: video.clientWidth,
|
|
178
|
+
height: video.clientHeight,
|
|
179
|
+
stream,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
video.addEventListener("resize", handleSourceResize);
|
|
184
|
+
return () => {
|
|
185
|
+
video.removeEventListener("resize", handleSourceResize);
|
|
186
|
+
};
|
|
187
|
+
}, [stream]);
|
|
167
188
|
React__namespace.useEffect(() => {
|
|
168
189
|
if (!videoEl.current) {
|
|
169
190
|
return;
|
|
@@ -181,7 +202,7 @@ const VideoView = React__namespace.forwardRef((_a, ref) => {
|
|
|
181
202
|
});
|
|
182
203
|
VideoView.displayName = "VideoView";
|
|
183
204
|
|
|
184
|
-
const browserSdkVersion = "3.
|
|
205
|
+
const browserSdkVersion = "3.37.0";
|
|
185
206
|
|
|
186
207
|
const initialState$1 = {
|
|
187
208
|
chatMessages: [],
|
|
@@ -209,6 +230,7 @@ const initialState$1 = {
|
|
|
209
230
|
broadcastingParticipants: [],
|
|
210
231
|
},
|
|
211
232
|
remoteParticipantQualityReport: {},
|
|
233
|
+
localParticipantQualityReport: {},
|
|
212
234
|
isAudioOnlyModeEnabled: false,
|
|
213
235
|
isCameraEnabled: false,
|
|
214
236
|
isMicrophoneEnabled: false,
|
|
@@ -222,6 +244,7 @@ const initialState$1 = {
|
|
|
222
244
|
enabled: [],
|
|
223
245
|
running: [],
|
|
224
246
|
},
|
|
247
|
+
roomSessionId: null,
|
|
225
248
|
screenshares: [],
|
|
226
249
|
connectionStatus: "ready",
|
|
227
250
|
connectionError: null,
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as _whereby_com_core from '@whereby.com/core';
|
|
3
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';
|
|
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, 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
|
|
package/dist/react/index.esm.js
CHANGED
|
@@ -105,6 +105,8 @@ const VideoView = React.forwardRef((_a, ref) => {
|
|
|
105
105
|
const client = (_b = React.useContext(WherebyContext)) === null || _b === void 0 ? void 0 : _b.getRoomConnection();
|
|
106
106
|
const videoEl = React.useRef(null);
|
|
107
107
|
const audioEl = useAudioElement({ muted, stream });
|
|
108
|
+
const onVideoResizeRef = React.useRef(onVideoResize);
|
|
109
|
+
onVideoResizeRef.current = onVideoResize;
|
|
108
110
|
React.useImperativeHandle(ref, () => {
|
|
109
111
|
return Object.assign(videoEl.current, {
|
|
110
112
|
captureAspectRatio: () => {
|
|
@@ -125,17 +127,16 @@ const VideoView = React.forwardRef((_a, ref) => {
|
|
|
125
127
|
return;
|
|
126
128
|
}
|
|
127
129
|
const resizeObserver = new ResizeObserver(debounce(() => {
|
|
130
|
+
var _a;
|
|
128
131
|
if (videoEl.current && (stream === null || stream === void 0 ? void 0 : stream.id)) {
|
|
129
132
|
const width = videoEl.current.clientWidth;
|
|
130
133
|
const height = videoEl.current.clientHeight;
|
|
131
134
|
client === null || client === void 0 ? void 0 : client.reportStreamResolution(stream.id, width, height);
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
});
|
|
138
|
-
}
|
|
135
|
+
(_a = onVideoResizeRef.current) === null || _a === void 0 ? void 0 : _a.call(onVideoResizeRef, {
|
|
136
|
+
width,
|
|
137
|
+
height,
|
|
138
|
+
stream,
|
|
139
|
+
});
|
|
139
140
|
}
|
|
140
141
|
}, { delay: 1000, edges: true }));
|
|
141
142
|
resizeObserver.observe(videoEl.current);
|
|
@@ -143,6 +144,26 @@ const VideoView = React.forwardRef((_a, ref) => {
|
|
|
143
144
|
resizeObserver.disconnect();
|
|
144
145
|
};
|
|
145
146
|
}, [stream]);
|
|
147
|
+
React.useEffect(() => {
|
|
148
|
+
const video = videoEl.current;
|
|
149
|
+
if (!video) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const handleSourceResize = () => {
|
|
153
|
+
var _a;
|
|
154
|
+
if (stream === null || stream === void 0 ? void 0 : stream.id) {
|
|
155
|
+
(_a = onVideoResizeRef.current) === null || _a === void 0 ? void 0 : _a.call(onVideoResizeRef, {
|
|
156
|
+
width: video.clientWidth,
|
|
157
|
+
height: video.clientHeight,
|
|
158
|
+
stream,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
video.addEventListener("resize", handleSourceResize);
|
|
163
|
+
return () => {
|
|
164
|
+
video.removeEventListener("resize", handleSourceResize);
|
|
165
|
+
};
|
|
166
|
+
}, [stream]);
|
|
146
167
|
React.useEffect(() => {
|
|
147
168
|
if (!videoEl.current) {
|
|
148
169
|
return;
|
|
@@ -160,7 +181,7 @@ const VideoView = React.forwardRef((_a, ref) => {
|
|
|
160
181
|
});
|
|
161
182
|
VideoView.displayName = "VideoView";
|
|
162
183
|
|
|
163
|
-
const browserSdkVersion = "3.
|
|
184
|
+
const browserSdkVersion = "3.37.0";
|
|
164
185
|
|
|
165
186
|
const initialState$1 = {
|
|
166
187
|
chatMessages: [],
|
|
@@ -188,6 +209,7 @@ const initialState$1 = {
|
|
|
188
209
|
broadcastingParticipants: [],
|
|
189
210
|
},
|
|
190
211
|
remoteParticipantQualityReport: {},
|
|
212
|
+
localParticipantQualityReport: {},
|
|
191
213
|
isAudioOnlyModeEnabled: false,
|
|
192
214
|
isCameraEnabled: false,
|
|
193
215
|
isMicrophoneEnabled: false,
|
|
@@ -201,6 +223,7 @@ const initialState$1 = {
|
|
|
201
223
|
enabled: [],
|
|
202
224
|
running: [],
|
|
203
225
|
},
|
|
226
|
+
roomSessionId: null,
|
|
204
227
|
screenshares: [],
|
|
205
228
|
connectionStatus: "ready",
|
|
206
229
|
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.37.0",
|
|
4
4
|
"description": "Modules for integration Whereby video in web apps",
|
|
5
5
|
"author": "Whereby AS",
|
|
6
6
|
"license": "MIT",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@radix-ui/react-popover": "^1.0.7",
|
|
76
76
|
"@whereby.com/media": "11.3.2",
|
|
77
|
-
"@whereby.com/core": "1.
|
|
77
|
+
"@whereby.com/core": "1.27.0",
|
|
78
78
|
"clsx": "^2.1.1",
|
|
79
79
|
"heresy": "^1.0.4",
|
|
80
80
|
"runes": "^0.4.3",
|