@whereby.com/browser-sdk 3.14.11 → 3.15.1

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.
@@ -65,6 +65,16 @@ function __rest(s, e) {
65
65
  return t;
66
66
  }
67
67
 
68
+ function __awaiter(thisArg, _arguments, P, generator) {
69
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
70
+ return new (P || (P = Promise))(function (resolve, reject) {
71
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
72
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
73
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
74
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
75
+ });
76
+ }
77
+
68
78
  typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
69
79
  var e = new Error(message);
70
80
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
@@ -159,7 +169,7 @@ const VideoView = React__namespace.forwardRef((_a, ref) => {
159
169
  });
160
170
  VideoView.displayName = "VideoView";
161
171
 
162
- const browserSdkVersion = "3.14.11";
172
+ const browserSdkVersion = "3.15.1";
163
173
 
164
174
  const initialState$1 = {
165
175
  chatMessages: [],
@@ -244,6 +254,12 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
244
254
  const endMeeting = React__namespace.useCallback((stayBehind) => client.endMeeting(stayBehind), [client]);
245
255
  const joinBreakoutGroup = React__namespace.useCallback((group) => client.joinBreakoutGroup(group), [client]);
246
256
  const joinBreakoutMainRoom = React__namespace.useCallback(() => client.joinBreakoutMainRoom(), [client]);
257
+ const switchCameraEffect = React__namespace.useCallback((effectId) => __awaiter(this, void 0, void 0, function* () {
258
+ yield client.switchCameraEffect(effectId);
259
+ }), [client]);
260
+ const clearCameraEffect = React__namespace.useCallback(() => __awaiter(this, void 0, void 0, function* () {
261
+ yield client.clearCameraEffect();
262
+ }), [client]);
247
263
  const { events } = roomConnectionState, state = __rest(roomConnectionState, ["events"]);
248
264
  return {
249
265
  state,
@@ -275,6 +291,8 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
275
291
  removeSpotlight,
276
292
  joinBreakoutGroup,
277
293
  joinBreakoutMainRoom,
294
+ switchCameraEffect,
295
+ clearCameraEffect,
278
296
  },
279
297
  };
280
298
  }
@@ -82,6 +82,8 @@ interface RoomConnectionActions {
82
82
  removeSpotlight: (clientId: string) => void;
83
83
  joinBreakoutGroup: (group: string) => void;
84
84
  joinBreakoutMainRoom: () => void;
85
+ switchCameraEffect: (effectId: string) => Promise<void>;
86
+ clearCameraEffect: () => Promise<void>;
85
87
  }
86
88
 
87
89
  type RoomConnectionRef = {
@@ -43,6 +43,16 @@ function __rest(s, e) {
43
43
  return t;
44
44
  }
45
45
 
46
+ function __awaiter(thisArg, _arguments, P, generator) {
47
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
48
+ return new (P || (P = Promise))(function (resolve, reject) {
49
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
50
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
51
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
52
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
53
+ });
54
+ }
55
+
46
56
  typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
47
57
  var e = new Error(message);
48
58
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
@@ -137,7 +147,7 @@ const VideoView = React.forwardRef((_a, ref) => {
137
147
  });
138
148
  VideoView.displayName = "VideoView";
139
149
 
140
- const browserSdkVersion = "3.14.11";
150
+ const browserSdkVersion = "3.15.1";
141
151
 
142
152
  const initialState$1 = {
143
153
  chatMessages: [],
@@ -222,6 +232,12 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
222
232
  const endMeeting = React.useCallback((stayBehind) => client.endMeeting(stayBehind), [client]);
223
233
  const joinBreakoutGroup = React.useCallback((group) => client.joinBreakoutGroup(group), [client]);
224
234
  const joinBreakoutMainRoom = React.useCallback(() => client.joinBreakoutMainRoom(), [client]);
235
+ const switchCameraEffect = React.useCallback((effectId) => __awaiter(this, void 0, void 0, function* () {
236
+ yield client.switchCameraEffect(effectId);
237
+ }), [client]);
238
+ const clearCameraEffect = React.useCallback(() => __awaiter(this, void 0, void 0, function* () {
239
+ yield client.clearCameraEffect();
240
+ }), [client]);
225
241
  const { events } = roomConnectionState, state = __rest(roomConnectionState, ["events"]);
226
242
  return {
227
243
  state,
@@ -253,6 +269,8 @@ function useRoomConnection(roomUrl, roomConnectionOptions = defaultRoomConnectio
253
269
  removeSpotlight,
254
270
  joinBreakoutGroup,
255
271
  joinBreakoutMainRoom,
272
+ switchCameraEffect,
273
+ clearCameraEffect,
256
274
  },
257
275
  };
258
276
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whereby.com/browser-sdk",
3
- "version": "3.14.11",
3
+ "version": "3.15.1",
4
4
  "description": "Modules for integration Whereby video in web apps",
5
5
  "author": "Whereby AS",
6
6
  "license": "MIT",
@@ -65,16 +65,17 @@
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/camera-effects": "1.0.0",
68
69
  "@whereby.com/eslint-config": "0.1.0",
69
70
  "@whereby.com/jest-config": "0.1.0",
70
71
  "@whereby.com/prettier-config": "0.1.0",
71
- "@whereby.com/rollup-config": "0.1.0",
72
+ "@whereby.com/rollup-config": "0.1.1",
72
73
  "@whereby.com/tsconfig": "0.1.0"
73
74
  },
74
75
  "dependencies": {
75
76
  "@radix-ui/react-popover": "^1.0.7",
76
- "@whereby.com/media": "2.5.4",
77
- "@whereby.com/core": "1.2.9",
77
+ "@whereby.com/media": "2.5.5",
78
+ "@whereby.com/core": "1.3.1",
78
79
  "clsx": "^2.1.1",
79
80
  "heresy": "^1.0.4",
80
81
  "runes": "^0.4.3"