@whereby.com/browser-sdk 3.12.17 → 3.12.19
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 +5 -0
- package/dist/cdn/v3-embed.js +6 -6
- package/dist/cdn/v3-react.js +2 -2
- package/dist/embed/index.d.ts +2 -1
- package/dist/react/index.cjs +5 -30
- package/dist/react/index.d.ts +5 -4
- package/dist/react/index.esm.js +5 -30
- package/package.json +28 -18
package/dist/embed/index.d.ts
CHANGED
package/dist/react/index.cjs
CHANGED
|
@@ -51,7 +51,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
51
51
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
52
52
|
PERFORMANCE OF THIS SOFTWARE.
|
|
53
53
|
***************************************************************************** */
|
|
54
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
54
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
function __rest(s, e) {
|
|
@@ -183,7 +183,7 @@ const selectRoomConnectionState = toolkit.createSelector(core.selectChatMessages
|
|
|
183
183
|
return state;
|
|
184
184
|
});
|
|
185
185
|
|
|
186
|
-
const browserSdkVersion = "3.12.
|
|
186
|
+
const browserSdkVersion = "3.12.19";
|
|
187
187
|
|
|
188
188
|
const defaultRoomConnectionOptions = {
|
|
189
189
|
localMediaOptions: {
|
|
@@ -322,32 +322,10 @@ function useLocalMedia(optionsOrStream = { audio: true, video: true }) {
|
|
|
322
322
|
|
|
323
323
|
const VIDEO_CONTROLS_MIN_WIDTH$1 = 7 * 60;
|
|
324
324
|
var layoutConstants = {
|
|
325
|
-
MIN_WINDOW_HEIGHT: 320,
|
|
326
|
-
MIN_WINDOW_WIDTH: 320,
|
|
327
|
-
DESKTOP_BREAKPOINT: 1025,
|
|
328
325
|
TABLET_BREAKPOINT: 750,
|
|
329
|
-
PHONE_BREAKPOINT: 500,
|
|
330
|
-
TOP_TOOLBAR_HEIGHT: 40 + 8 * 2,
|
|
331
326
|
BOTTOM_TOOLBAR_HEIGHT: 70 + 4 * 3,
|
|
332
|
-
SIDEBAR_WIDTH: 375,
|
|
333
327
|
VIDEO_CONTROLS_MIN_WIDTH: VIDEO_CONTROLS_MIN_WIDTH$1,
|
|
334
|
-
|
|
335
|
-
FLOATING_VIDEO_CONTROLS_BOTTOM_MARGIN: 20,
|
|
336
|
-
WATERMARK_BAR_HEIGHT: 32,
|
|
337
|
-
BREAKOUT_STAGE_BACKDROP_HEADER_HEIGHT: 20 + 8,
|
|
338
|
-
BREAKOUT_STAGE_BACKDROP_FOOTER_HEIGHT: 8 + 40 + 8,
|
|
339
|
-
SUBGRID_EMPTY_STAGE_MAX_WIDTH: 800,
|
|
340
|
-
GROUPS_CELL_MARGIN: 8,
|
|
341
|
-
GROUPS_CELL_PADDING: 12,
|
|
342
|
-
GROUPS_CELL_NAV_HEIGHT: 48 + 8,
|
|
343
|
-
GROUPS_CELL_AVATAR_WRAPPER_BOTTOM_MARGIN: 8,
|
|
344
|
-
GROUPS_CELL_AVATAR_GRID_GAP: 8,
|
|
345
|
-
GROUPS_CELL_MIN_WIDTH: 360,
|
|
346
|
-
GROUPS_CELL_MAX_WIDTH: 600,
|
|
347
|
-
GROUPS_ROW_HEIGHT: 72,
|
|
348
|
-
GROUPS_ROW_GAP: 1,
|
|
349
|
-
FOLDABLE_SCREEN_STAGE_PADDING: 8,
|
|
350
|
-
};
|
|
328
|
+
SUBGRID_EMPTY_STAGE_MAX_WIDTH: 800};
|
|
351
329
|
|
|
352
330
|
function makeOrigin({ top = 0, left = 0 } = {}) {
|
|
353
331
|
return {
|
|
@@ -1032,7 +1010,7 @@ function fitSupersizedContent({ bounds, aspectRatio, minGridContainerBounds, has
|
|
|
1032
1010
|
let isPortrait = maxHorizontalSupersizedContentWidth <= maxVerticalSupersizedContentHeight;
|
|
1033
1011
|
let horizontalCorrection = 0;
|
|
1034
1012
|
let verticalCorrection = 0;
|
|
1035
|
-
|
|
1013
|
+
{
|
|
1036
1014
|
const horizontalContentBounds = fitToBounds(aspectRatio, {
|
|
1037
1015
|
width: maxHorizontalSupersizedContentWidth,
|
|
1038
1016
|
height,
|
|
@@ -1056,9 +1034,6 @@ function fitSupersizedContent({ bounds, aspectRatio, minGridContainerBounds, has
|
|
|
1056
1034
|
horizontalCorrection = Math.max(wastedSpace, 0);
|
|
1057
1035
|
}
|
|
1058
1036
|
}
|
|
1059
|
-
else if (hasPresentationGrid) {
|
|
1060
|
-
isPortrait = maxHorizontalSupersizedContentWidth / maxVerticalSupersizedContentHeight >= 5;
|
|
1061
|
-
}
|
|
1062
1037
|
const supersizedContentBounds = {
|
|
1063
1038
|
width: isPortrait ? width : maxHorizontalSupersizedContentWidth - horizontalCorrection,
|
|
1064
1039
|
height: isPortrait ? maxVerticalSupersizedContentHeight - verticalCorrection : height,
|
|
@@ -1269,7 +1244,7 @@ function calculateVideosContainerLayout({ containerBounds, containerOrigin, grid
|
|
|
1269
1244
|
});
|
|
1270
1245
|
const supersizedContentLayout = fitSupersizedContent({
|
|
1271
1246
|
bounds: containerBounds,
|
|
1272
|
-
aspectRatio: supersizedContentAspectRatio
|
|
1247
|
+
aspectRatio: supersizedContentAspectRatio,
|
|
1273
1248
|
minGridContainerBounds,
|
|
1274
1249
|
hasPresentationGrid,
|
|
1275
1250
|
});
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { LocalMediaOptions,
|
|
2
|
+
import { LocalMediaOptions, ConnectionStatus, ChatMessage as ChatMessage$1, ClientView, NotificationsEventEmitter, LocalParticipant, RemoteParticipant, Screenshare } from '@whereby.com/core';
|
|
3
3
|
import { RoleName } from '@whereby.com/media';
|
|
4
4
|
import * as _radix_ui_react_popover from '@radix-ui/react-popover';
|
|
5
5
|
import { PopoverProps } from '@radix-ui/react-popover';
|
|
@@ -170,7 +170,7 @@ type GridCellSelfProps = {
|
|
|
170
170
|
type GridCellProps = GridCellSelfProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
171
171
|
declare const GridCell: React.ForwardRefExoticComponent<Omit<GridCellProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
172
172
|
declare const GridVideoView: React.ForwardRefExoticComponent<Omit<VideoViewProps, "ref" | "stream"> & {
|
|
173
|
-
stream?: MediaStream
|
|
173
|
+
stream?: MediaStream;
|
|
174
174
|
} & React.RefAttributes<WherebyVideoElement>>;
|
|
175
175
|
interface GridProps {
|
|
176
176
|
renderParticipant?: ({ participant }: {
|
|
@@ -192,7 +192,8 @@ declare const ParticipantMenu: (props: PopoverProps) => React.JSX.Element;
|
|
|
192
192
|
declare const ParticipantMenuContent: React.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_popover.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
193
193
|
declare const ParticipantMenuTrigger: React.ForwardRefExoticComponent<Omit<_radix_ui_react_popover.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
194
194
|
declare const ParticipantMenuItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
195
|
-
participantAction?: "maximize" | "spotlight" | "float"
|
|
195
|
+
participantAction?: "maximize" | "spotlight" | "float";
|
|
196
196
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
197
197
|
|
|
198
|
-
export {
|
|
198
|
+
export { GridCell, GridVideoView, ParticipantMenu, ParticipantMenuContent, ParticipantMenuItem, ParticipantMenuTrigger, Grid as VideoGrid, VideoView, Provider as WherebyProvider, useLocalMedia, useRoomConnection };
|
|
199
|
+
export type { BreakoutState as Breakout, ChatMessageState as ChatMessage, CloudRecordingState as CloudRecording, LiveStreamState as LiveStreaming, LocalParticipantState as LocalParticipant, RemoteParticipantState as RemoteParticipant, RoomConnectionState as RoomConnection, RoomConnectionActions, RoomConnectionOptions, ScreenshareState as Screenshare, UseLocalMediaResult, WaitingParticipantState as WaitingParticipant };
|
package/dist/react/index.esm.js
CHANGED
|
@@ -30,7 +30,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
30
30
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
31
31
|
PERFORMANCE OF THIS SOFTWARE.
|
|
32
32
|
***************************************************************************** */
|
|
33
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
33
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
function __rest(s, e) {
|
|
@@ -162,7 +162,7 @@ const selectRoomConnectionState = createSelector(selectChatMessages, selectCloud
|
|
|
162
162
|
return state;
|
|
163
163
|
});
|
|
164
164
|
|
|
165
|
-
const browserSdkVersion = "3.12.
|
|
165
|
+
const browserSdkVersion = "3.12.19";
|
|
166
166
|
|
|
167
167
|
const defaultRoomConnectionOptions = {
|
|
168
168
|
localMediaOptions: {
|
|
@@ -301,32 +301,10 @@ function useLocalMedia(optionsOrStream = { audio: true, video: true }) {
|
|
|
301
301
|
|
|
302
302
|
const VIDEO_CONTROLS_MIN_WIDTH$1 = 7 * 60;
|
|
303
303
|
var layoutConstants = {
|
|
304
|
-
MIN_WINDOW_HEIGHT: 320,
|
|
305
|
-
MIN_WINDOW_WIDTH: 320,
|
|
306
|
-
DESKTOP_BREAKPOINT: 1025,
|
|
307
304
|
TABLET_BREAKPOINT: 750,
|
|
308
|
-
PHONE_BREAKPOINT: 500,
|
|
309
|
-
TOP_TOOLBAR_HEIGHT: 40 + 8 * 2,
|
|
310
305
|
BOTTOM_TOOLBAR_HEIGHT: 70 + 4 * 3,
|
|
311
|
-
SIDEBAR_WIDTH: 375,
|
|
312
306
|
VIDEO_CONTROLS_MIN_WIDTH: VIDEO_CONTROLS_MIN_WIDTH$1,
|
|
313
|
-
|
|
314
|
-
FLOATING_VIDEO_CONTROLS_BOTTOM_MARGIN: 20,
|
|
315
|
-
WATERMARK_BAR_HEIGHT: 32,
|
|
316
|
-
BREAKOUT_STAGE_BACKDROP_HEADER_HEIGHT: 20 + 8,
|
|
317
|
-
BREAKOUT_STAGE_BACKDROP_FOOTER_HEIGHT: 8 + 40 + 8,
|
|
318
|
-
SUBGRID_EMPTY_STAGE_MAX_WIDTH: 800,
|
|
319
|
-
GROUPS_CELL_MARGIN: 8,
|
|
320
|
-
GROUPS_CELL_PADDING: 12,
|
|
321
|
-
GROUPS_CELL_NAV_HEIGHT: 48 + 8,
|
|
322
|
-
GROUPS_CELL_AVATAR_WRAPPER_BOTTOM_MARGIN: 8,
|
|
323
|
-
GROUPS_CELL_AVATAR_GRID_GAP: 8,
|
|
324
|
-
GROUPS_CELL_MIN_WIDTH: 360,
|
|
325
|
-
GROUPS_CELL_MAX_WIDTH: 600,
|
|
326
|
-
GROUPS_ROW_HEIGHT: 72,
|
|
327
|
-
GROUPS_ROW_GAP: 1,
|
|
328
|
-
FOLDABLE_SCREEN_STAGE_PADDING: 8,
|
|
329
|
-
};
|
|
307
|
+
SUBGRID_EMPTY_STAGE_MAX_WIDTH: 800};
|
|
330
308
|
|
|
331
309
|
function makeOrigin({ top = 0, left = 0 } = {}) {
|
|
332
310
|
return {
|
|
@@ -1011,7 +989,7 @@ function fitSupersizedContent({ bounds, aspectRatio, minGridContainerBounds, has
|
|
|
1011
989
|
let isPortrait = maxHorizontalSupersizedContentWidth <= maxVerticalSupersizedContentHeight;
|
|
1012
990
|
let horizontalCorrection = 0;
|
|
1013
991
|
let verticalCorrection = 0;
|
|
1014
|
-
|
|
992
|
+
{
|
|
1015
993
|
const horizontalContentBounds = fitToBounds(aspectRatio, {
|
|
1016
994
|
width: maxHorizontalSupersizedContentWidth,
|
|
1017
995
|
height,
|
|
@@ -1035,9 +1013,6 @@ function fitSupersizedContent({ bounds, aspectRatio, minGridContainerBounds, has
|
|
|
1035
1013
|
horizontalCorrection = Math.max(wastedSpace, 0);
|
|
1036
1014
|
}
|
|
1037
1015
|
}
|
|
1038
|
-
else if (hasPresentationGrid) {
|
|
1039
|
-
isPortrait = maxHorizontalSupersizedContentWidth / maxVerticalSupersizedContentHeight >= 5;
|
|
1040
|
-
}
|
|
1041
1016
|
const supersizedContentBounds = {
|
|
1042
1017
|
width: isPortrait ? width : maxHorizontalSupersizedContentWidth - horizontalCorrection,
|
|
1043
1018
|
height: isPortrait ? maxVerticalSupersizedContentHeight - verticalCorrection : height,
|
|
@@ -1248,7 +1223,7 @@ function calculateVideosContainerLayout({ containerBounds, containerOrigin, grid
|
|
|
1248
1223
|
});
|
|
1249
1224
|
const supersizedContentLayout = fitSupersizedContent({
|
|
1250
1225
|
bounds: containerBounds,
|
|
1251
|
-
aspectRatio: supersizedContentAspectRatio
|
|
1226
|
+
aspectRatio: supersizedContentAspectRatio,
|
|
1252
1227
|
minGridContainerBounds,
|
|
1253
1228
|
hasPresentationGrid,
|
|
1254
1229
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whereby.com/browser-sdk",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.19",
|
|
4
4
|
"description": "Modules for integration Whereby video in web apps",
|
|
5
5
|
"author": "Whereby AS",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,20 +40,6 @@
|
|
|
40
40
|
"dist/**/*.d.ts",
|
|
41
41
|
"dist/**/*.cjs"
|
|
42
42
|
],
|
|
43
|
-
"scripts": {
|
|
44
|
-
"clean": "rimraf dist node_modules .turbo",
|
|
45
|
-
"prebuild": "rimraf dist",
|
|
46
|
-
"build": "rollup -c rollup.config.js",
|
|
47
|
-
"build:storybook": "storybook build",
|
|
48
|
-
"dev": "storybook dev -p 6006",
|
|
49
|
-
"test": "yarn test:lint && yarn test:unit",
|
|
50
|
-
"test:lint": "eslint src/",
|
|
51
|
-
"test:unit": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js",
|
|
52
|
-
"test:unit:watch": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js --watch",
|
|
53
|
-
"test:attw": "attw --pack . -f table --ignore-rules fallback-condition unexpected-module-syntax",
|
|
54
|
-
"storybook": "storybook dev -p 6006",
|
|
55
|
-
"build-storybook": "storybook build"
|
|
56
|
-
},
|
|
57
43
|
"devDependencies": {
|
|
58
44
|
"@storybook/addon-actions": "^8.0.10",
|
|
59
45
|
"@storybook/addon-essentials": "^8.0.10",
|
|
@@ -75,12 +61,21 @@
|
|
|
75
61
|
"tslib": "^2.4.1",
|
|
76
62
|
"uuid": "^9.0.1",
|
|
77
63
|
"vite": "^5.0.13",
|
|
78
|
-
"yalc": "^1.0.0-pre.53"
|
|
64
|
+
"yalc": "^1.0.0-pre.53",
|
|
65
|
+
"eslint": "^9.29.0",
|
|
66
|
+
"prettier": "^3.5.3",
|
|
67
|
+
"typescript": "^5.8.3",
|
|
68
|
+
"@whereby.com/eslint-config": "0.1.0",
|
|
69
|
+
"@whereby.com/jest-config": "0.1.0",
|
|
70
|
+
"@whereby.com/prettier-config": "0.1.0",
|
|
71
|
+
"@whereby.com/rollup-config": "0.1.0",
|
|
72
|
+
"@whereby.com/tsconfig": "0.1.0"
|
|
79
73
|
},
|
|
80
74
|
"dependencies": {
|
|
81
75
|
"@radix-ui/react-popover": "^1.0.7",
|
|
82
76
|
"@reduxjs/toolkit": "^2.2.3",
|
|
83
|
-
"@whereby.com/
|
|
77
|
+
"@whereby.com/media": "1.30.0",
|
|
78
|
+
"@whereby.com/core": "0.34.0",
|
|
84
79
|
"clsx": "^2.1.1",
|
|
85
80
|
"heresy": "^1.0.4",
|
|
86
81
|
"react-redux": "^9.1.1",
|
|
@@ -97,5 +92,20 @@
|
|
|
97
92
|
},
|
|
98
93
|
"publishConfig": {
|
|
99
94
|
"access": "public"
|
|
95
|
+
},
|
|
96
|
+
"prettier": "@whereby.com/prettier-config",
|
|
97
|
+
"scripts": {
|
|
98
|
+
"clean": "rimraf dist node_modules .turbo",
|
|
99
|
+
"prebuild": "rimraf dist",
|
|
100
|
+
"build": "rollup -c rollup.config.js",
|
|
101
|
+
"build:storybook": "storybook build",
|
|
102
|
+
"dev": "storybook dev -p 6006",
|
|
103
|
+
"test": "pnpm test:lint && pnpm test:unit",
|
|
104
|
+
"test:lint": "eslint src/",
|
|
105
|
+
"test:unit": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js",
|
|
106
|
+
"test:unit:watch": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js --watch",
|
|
107
|
+
"test:attw": "attw --pack . -f table --ignore-rules fallback-condition unexpected-module-syntax",
|
|
108
|
+
"storybook": "storybook dev -p 6006",
|
|
109
|
+
"build-storybook": "storybook build"
|
|
100
110
|
}
|
|
101
|
-
}
|
|
111
|
+
}
|