@whereby.com/core 1.26.0 → 1.26.2

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/index.cjs CHANGED
@@ -1310,7 +1310,7 @@ const createReactor = (selectors, callback) => {
1310
1310
  });
1311
1311
  };
1312
1312
 
1313
- const coreVersion = "1.26.0";
1313
+ const coreVersion = "1.26.2";
1314
1314
 
1315
1315
  function decodeRoomName(roomName) {
1316
1316
  if (!roomName) {
@@ -2581,8 +2581,6 @@ const organizationSlice = toolkit.createSlice({
2581
2581
  return Object.assign(Object.assign({}, state), { isFetching: true });
2582
2582
  });
2583
2583
  builder.addCase(doOrganizationFetch.fulfilled, (state, action) => {
2584
- if (!action.payload)
2585
- return Object.assign(Object.assign({}, state), { isFetching: true });
2586
2584
  return Object.assign(Object.assign({}, state), { isFetching: false, data: action.payload });
2587
2585
  });
2588
2586
  builder.addCase(doOrganizationFetch.rejected, (state) => {
@@ -2591,17 +2589,12 @@ const organizationSlice = toolkit.createSlice({
2591
2589
  },
2592
2590
  });
2593
2591
  const doOrganizationFetch = createAppAsyncThunk("organization/doOrganizationFetch", (_1, _a) => __awaiter(void 0, [_1, _a], void 0, function* (_, { extra, getState }) {
2594
- try {
2595
- const roomUrl = selectAppRoomUrl(getState());
2596
- const organization = yield extra.services.fetchOrganizationFromRoomUrl(roomUrl || "");
2597
- if (!organization) {
2598
- throw new Error("Invalid room url");
2599
- }
2600
- return organization;
2601
- }
2602
- catch (error) {
2603
- console.error(error);
2592
+ const roomUrl = selectAppRoomUrl(getState());
2593
+ const organization = yield extra.services.fetchOrganizationFromRoomUrl(roomUrl || "");
2594
+ if (!organization) {
2595
+ throw new Error("Invalid room url");
2604
2596
  }
2597
+ return organization;
2605
2598
  }));
2606
2599
  const selectOrganizationRaw = (state) => state.organization;
2607
2600
  const selectOrganizationId = (state) => { var _a; return (_a = state.organization.data) === null || _a === void 0 ? void 0 : _a.organizationId; };
@@ -2679,6 +2672,9 @@ const roomConnectionSlice = toolkit.createSlice({
2679
2672
  builder.addCase(signalEvents.roomLeft, (state) => {
2680
2673
  return Object.assign(Object.assign({}, state), { status: "left" });
2681
2674
  });
2675
+ builder.addCase(doOrganizationFetch.rejected, (state) => {
2676
+ return Object.assign(Object.assign({}, state), { status: "disconnected", error: "organization_fetch_failed" });
2677
+ });
2682
2678
  },
2683
2679
  });
2684
2680
  const { connectionStatusChanged, knockResponseReceived } = roomConnectionSlice.actions;
@@ -2703,7 +2699,7 @@ const doKnockRoom = createAppThunk(() => (dispatch, getState) => {
2703
2699
  socket === null || socket === void 0 ? void 0 : socket.emit("knock_room", Object.assign({ avatarUrl: null, config: {
2704
2700
  isAudioEnabled: true,
2705
2701
  isVideoEnabled: true,
2706
- }, deviceCapabilities: { canScreenshare: true }, displayName, isCoLocated: false, isDialIn,
2702
+ }, deviceCapabilities: { canScreenshare: media.hasGetDisplayMedia() }, displayName, isCoLocated: false, isDialIn,
2707
2703
  isAudioRecorder, isDevicePermissionDenied: false, kickFromOtherRooms: false, organizationId,
2708
2704
  roomKey,
2709
2705
  roomName,
@@ -2740,7 +2736,7 @@ const doConnectRoom = createAppThunk(() => (dispatch, getState) => {
2740
2736
  socket === null || socket === void 0 ? void 0 : socket.emit("join_room", Object.assign({ avatarUrl: null, config: {
2741
2737
  isAudioEnabled: isMicrophoneEnabled,
2742
2738
  isVideoEnabled: isCameraEnabled,
2743
- }, deviceCapabilities: { canScreenshare: true }, displayName, isCoLocated: false, isDialIn,
2739
+ }, deviceCapabilities: { canScreenshare: media.hasGetDisplayMedia() }, displayName, isCoLocated: false, isDialIn,
2744
2740
  isAudioRecorder, isDevicePermissionDenied: false, kickFromOtherRooms: false, organizationId,
2745
2741
  roomKey,
2746
2742
  assistantKey,
@@ -6751,6 +6747,7 @@ class RoomConnectionClient extends BaseClient {
6751
6747
  actionCreator: signalEvents.roomJoined,
6752
6748
  effect: ({ payload }) => {
6753
6749
  unsubscribeRoomJoined();
6750
+ unsubscribeOrganizationFetchFailed();
6754
6751
  if ("error" in payload) {
6755
6752
  reject === null || reject === void 0 ? void 0 : reject(payload.error);
6756
6753
  return;
@@ -6758,6 +6755,14 @@ class RoomConnectionClient extends BaseClient {
6758
6755
  resolve === null || resolve === void 0 ? void 0 : resolve(payload);
6759
6756
  },
6760
6757
  }));
6758
+ const unsubscribeOrganizationFetchFailed = this.store.dispatch(toolkit.addListener({
6759
+ actionCreator: doOrganizationFetch.rejected,
6760
+ effect: () => {
6761
+ unsubscribeRoomJoined();
6762
+ unsubscribeOrganizationFetchFailed();
6763
+ reject === null || reject === void 0 ? void 0 : reject("organization_fetch_failed");
6764
+ },
6765
+ }));
6761
6766
  return promise;
6762
6767
  });
6763
6768
  }
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import nodeBtoa from 'btoa';
2
- import { assert, fromLocation, ServerSocket, isFileShareError, getDeviceData, getStream, getUpdatedDevices, replaceTracksInStream, getDisplayMedia, CAMERA_STREAM_ID, RtcManagerDispatcher, setClientProvider, subscribeIssues, isRoomIntegrationErrorCode } from '@whereby.com/media';
2
+ import { assert, fromLocation, ServerSocket, isFileShareError, getDeviceData, getStream, getUpdatedDevices, replaceTracksInStream, hasGetDisplayMedia, getDisplayMedia, CAMERA_STREAM_ID, RtcManagerDispatcher, setClientProvider, subscribeIssues, isRoomIntegrationErrorCode } from '@whereby.com/media';
3
3
  import axios from 'axios';
4
4
  import { EventEmitter } from 'events';
5
5
  import { createListenerMiddleware, addListener, createSlice, createAction, createSelector, createAsyncThunk, isAnyOf, combineReducers, configureStore } from '@reduxjs/toolkit';
@@ -1308,7 +1308,7 @@ const createReactor = (selectors, callback) => {
1308
1308
  });
1309
1309
  };
1310
1310
 
1311
- const coreVersion = "1.26.0";
1311
+ const coreVersion = "1.26.2";
1312
1312
 
1313
1313
  function decodeRoomName(roomName) {
1314
1314
  if (!roomName) {
@@ -2579,8 +2579,6 @@ const organizationSlice = createSlice({
2579
2579
  return Object.assign(Object.assign({}, state), { isFetching: true });
2580
2580
  });
2581
2581
  builder.addCase(doOrganizationFetch.fulfilled, (state, action) => {
2582
- if (!action.payload)
2583
- return Object.assign(Object.assign({}, state), { isFetching: true });
2584
2582
  return Object.assign(Object.assign({}, state), { isFetching: false, data: action.payload });
2585
2583
  });
2586
2584
  builder.addCase(doOrganizationFetch.rejected, (state) => {
@@ -2589,17 +2587,12 @@ const organizationSlice = createSlice({
2589
2587
  },
2590
2588
  });
2591
2589
  const doOrganizationFetch = createAppAsyncThunk("organization/doOrganizationFetch", (_1, _a) => __awaiter(void 0, [_1, _a], void 0, function* (_, { extra, getState }) {
2592
- try {
2593
- const roomUrl = selectAppRoomUrl(getState());
2594
- const organization = yield extra.services.fetchOrganizationFromRoomUrl(roomUrl || "");
2595
- if (!organization) {
2596
- throw new Error("Invalid room url");
2597
- }
2598
- return organization;
2599
- }
2600
- catch (error) {
2601
- console.error(error);
2590
+ const roomUrl = selectAppRoomUrl(getState());
2591
+ const organization = yield extra.services.fetchOrganizationFromRoomUrl(roomUrl || "");
2592
+ if (!organization) {
2593
+ throw new Error("Invalid room url");
2602
2594
  }
2595
+ return organization;
2603
2596
  }));
2604
2597
  const selectOrganizationRaw = (state) => state.organization;
2605
2598
  const selectOrganizationId = (state) => { var _a; return (_a = state.organization.data) === null || _a === void 0 ? void 0 : _a.organizationId; };
@@ -2677,6 +2670,9 @@ const roomConnectionSlice = createSlice({
2677
2670
  builder.addCase(signalEvents.roomLeft, (state) => {
2678
2671
  return Object.assign(Object.assign({}, state), { status: "left" });
2679
2672
  });
2673
+ builder.addCase(doOrganizationFetch.rejected, (state) => {
2674
+ return Object.assign(Object.assign({}, state), { status: "disconnected", error: "organization_fetch_failed" });
2675
+ });
2680
2676
  },
2681
2677
  });
2682
2678
  const { connectionStatusChanged, knockResponseReceived } = roomConnectionSlice.actions;
@@ -2701,7 +2697,7 @@ const doKnockRoom = createAppThunk(() => (dispatch, getState) => {
2701
2697
  socket === null || socket === void 0 ? void 0 : socket.emit("knock_room", Object.assign({ avatarUrl: null, config: {
2702
2698
  isAudioEnabled: true,
2703
2699
  isVideoEnabled: true,
2704
- }, deviceCapabilities: { canScreenshare: true }, displayName, isCoLocated: false, isDialIn,
2700
+ }, deviceCapabilities: { canScreenshare: hasGetDisplayMedia() }, displayName, isCoLocated: false, isDialIn,
2705
2701
  isAudioRecorder, isDevicePermissionDenied: false, kickFromOtherRooms: false, organizationId,
2706
2702
  roomKey,
2707
2703
  roomName,
@@ -2738,7 +2734,7 @@ const doConnectRoom = createAppThunk(() => (dispatch, getState) => {
2738
2734
  socket === null || socket === void 0 ? void 0 : socket.emit("join_room", Object.assign({ avatarUrl: null, config: {
2739
2735
  isAudioEnabled: isMicrophoneEnabled,
2740
2736
  isVideoEnabled: isCameraEnabled,
2741
- }, deviceCapabilities: { canScreenshare: true }, displayName, isCoLocated: false, isDialIn,
2737
+ }, deviceCapabilities: { canScreenshare: hasGetDisplayMedia() }, displayName, isCoLocated: false, isDialIn,
2742
2738
  isAudioRecorder, isDevicePermissionDenied: false, kickFromOtherRooms: false, organizationId,
2743
2739
  roomKey,
2744
2740
  assistantKey,
@@ -6749,6 +6745,7 @@ class RoomConnectionClient extends BaseClient {
6749
6745
  actionCreator: signalEvents.roomJoined,
6750
6746
  effect: ({ payload }) => {
6751
6747
  unsubscribeRoomJoined();
6748
+ unsubscribeOrganizationFetchFailed();
6752
6749
  if ("error" in payload) {
6753
6750
  reject === null || reject === void 0 ? void 0 : reject(payload.error);
6754
6751
  return;
@@ -6756,6 +6753,14 @@ class RoomConnectionClient extends BaseClient {
6756
6753
  resolve === null || resolve === void 0 ? void 0 : resolve(payload);
6757
6754
  },
6758
6755
  }));
6756
+ const unsubscribeOrganizationFetchFailed = this.store.dispatch(addListener({
6757
+ actionCreator: doOrganizationFetch.rejected,
6758
+ effect: () => {
6759
+ unsubscribeRoomJoined();
6760
+ unsubscribeOrganizationFetchFailed();
6761
+ reject === null || reject === void 0 ? void 0 : reject("organization_fetch_failed");
6762
+ },
6763
+ }));
6759
6764
  return promise;
6760
6765
  });
6761
6766
  }
@@ -1,5 +1,5 @@
1
1
  import nodeBtoa from 'btoa';
2
- import { assert, fromLocation, ServerSocket, isFileShareError, getDeviceData, getStream, getUpdatedDevices, replaceTracksInStream, getDisplayMedia, CAMERA_STREAM_ID, RtcManagerDispatcher, setClientProvider, subscribeIssues, isRoomIntegrationErrorCode } from '@whereby.com/media';
2
+ import { assert, fromLocation, ServerSocket, isFileShareError, getDeviceData, getStream, getUpdatedDevices, replaceTracksInStream, hasGetDisplayMedia, getDisplayMedia, CAMERA_STREAM_ID, RtcManagerDispatcher, setClientProvider, subscribeIssues, isRoomIntegrationErrorCode } from '@whereby.com/media';
3
3
  import axios from 'axios';
4
4
  import { EventEmitter } from 'events';
5
5
  import { createListenerMiddleware, addListener, createSlice, createAction, createSelector, createAsyncThunk, isAnyOf, combineReducers, configureStore } from '@reduxjs/toolkit';
@@ -1308,7 +1308,7 @@ const createReactor = (selectors, callback) => {
1308
1308
  });
1309
1309
  };
1310
1310
 
1311
- const coreVersion = "1.26.0";
1311
+ const coreVersion = "1.26.2";
1312
1312
 
1313
1313
  function decodeRoomName(roomName) {
1314
1314
  if (!roomName) {
@@ -2579,8 +2579,6 @@ const organizationSlice = createSlice({
2579
2579
  return Object.assign(Object.assign({}, state), { isFetching: true });
2580
2580
  });
2581
2581
  builder.addCase(doOrganizationFetch.fulfilled, (state, action) => {
2582
- if (!action.payload)
2583
- return Object.assign(Object.assign({}, state), { isFetching: true });
2584
2582
  return Object.assign(Object.assign({}, state), { isFetching: false, data: action.payload });
2585
2583
  });
2586
2584
  builder.addCase(doOrganizationFetch.rejected, (state) => {
@@ -2589,17 +2587,12 @@ const organizationSlice = createSlice({
2589
2587
  },
2590
2588
  });
2591
2589
  const doOrganizationFetch = createAppAsyncThunk("organization/doOrganizationFetch", (_1, _a) => __awaiter(void 0, [_1, _a], void 0, function* (_, { extra, getState }) {
2592
- try {
2593
- const roomUrl = selectAppRoomUrl(getState());
2594
- const organization = yield extra.services.fetchOrganizationFromRoomUrl(roomUrl || "");
2595
- if (!organization) {
2596
- throw new Error("Invalid room url");
2597
- }
2598
- return organization;
2599
- }
2600
- catch (error) {
2601
- console.error(error);
2590
+ const roomUrl = selectAppRoomUrl(getState());
2591
+ const organization = yield extra.services.fetchOrganizationFromRoomUrl(roomUrl || "");
2592
+ if (!organization) {
2593
+ throw new Error("Invalid room url");
2602
2594
  }
2595
+ return organization;
2603
2596
  }));
2604
2597
  const selectOrganizationRaw = (state) => state.organization;
2605
2598
  const selectOrganizationId = (state) => { var _a; return (_a = state.organization.data) === null || _a === void 0 ? void 0 : _a.organizationId; };
@@ -2677,6 +2670,9 @@ const roomConnectionSlice = createSlice({
2677
2670
  builder.addCase(signalEvents.roomLeft, (state) => {
2678
2671
  return Object.assign(Object.assign({}, state), { status: "left" });
2679
2672
  });
2673
+ builder.addCase(doOrganizationFetch.rejected, (state) => {
2674
+ return Object.assign(Object.assign({}, state), { status: "disconnected", error: "organization_fetch_failed" });
2675
+ });
2680
2676
  },
2681
2677
  });
2682
2678
  const { connectionStatusChanged, knockResponseReceived } = roomConnectionSlice.actions;
@@ -2701,7 +2697,7 @@ const doKnockRoom = createAppThunk(() => (dispatch, getState) => {
2701
2697
  socket === null || socket === void 0 ? void 0 : socket.emit("knock_room", Object.assign({ avatarUrl: null, config: {
2702
2698
  isAudioEnabled: true,
2703
2699
  isVideoEnabled: true,
2704
- }, deviceCapabilities: { canScreenshare: true }, displayName, isCoLocated: false, isDialIn,
2700
+ }, deviceCapabilities: { canScreenshare: hasGetDisplayMedia() }, displayName, isCoLocated: false, isDialIn,
2705
2701
  isAudioRecorder, isDevicePermissionDenied: false, kickFromOtherRooms: false, organizationId,
2706
2702
  roomKey,
2707
2703
  roomName,
@@ -2738,7 +2734,7 @@ const doConnectRoom = createAppThunk(() => (dispatch, getState) => {
2738
2734
  socket === null || socket === void 0 ? void 0 : socket.emit("join_room", Object.assign({ avatarUrl: null, config: {
2739
2735
  isAudioEnabled: isMicrophoneEnabled,
2740
2736
  isVideoEnabled: isCameraEnabled,
2741
- }, deviceCapabilities: { canScreenshare: true }, displayName, isCoLocated: false, isDialIn,
2737
+ }, deviceCapabilities: { canScreenshare: hasGetDisplayMedia() }, displayName, isCoLocated: false, isDialIn,
2742
2738
  isAudioRecorder, isDevicePermissionDenied: false, kickFromOtherRooms: false, organizationId,
2743
2739
  roomKey,
2744
2740
  assistantKey,
@@ -6749,6 +6745,7 @@ class RoomConnectionClient extends BaseClient {
6749
6745
  actionCreator: signalEvents.roomJoined,
6750
6746
  effect: ({ payload }) => {
6751
6747
  unsubscribeRoomJoined();
6748
+ unsubscribeOrganizationFetchFailed();
6752
6749
  if ("error" in payload) {
6753
6750
  reject === null || reject === void 0 ? void 0 : reject(payload.error);
6754
6751
  return;
@@ -6756,6 +6753,14 @@ class RoomConnectionClient extends BaseClient {
6756
6753
  resolve === null || resolve === void 0 ? void 0 : resolve(payload);
6757
6754
  },
6758
6755
  }));
6756
+ const unsubscribeOrganizationFetchFailed = this.store.dispatch(addListener({
6757
+ actionCreator: doOrganizationFetch.rejected,
6758
+ effect: () => {
6759
+ unsubscribeRoomJoined();
6760
+ unsubscribeOrganizationFetchFailed();
6761
+ reject === null || reject === void 0 ? void 0 : reject("organization_fetch_failed");
6762
+ },
6763
+ }));
6759
6764
  return promise;
6760
6765
  });
6761
6766
  }
@@ -76,7 +76,7 @@ const createReactor = (selectors, callback) => {
76
76
  });
77
77
  };
78
78
 
79
- const coreVersion = "1.26.0";
79
+ const coreVersion = "1.26.2";
80
80
 
81
81
  function decodeRoomName(roomName) {
82
82
  if (!roomName) {
@@ -1369,8 +1369,6 @@ const organizationSlice = toolkit.createSlice({
1369
1369
  return Object.assign(Object.assign({}, state), { isFetching: true });
1370
1370
  });
1371
1371
  builder.addCase(doOrganizationFetch.fulfilled, (state, action) => {
1372
- if (!action.payload)
1373
- return Object.assign(Object.assign({}, state), { isFetching: true });
1374
1372
  return Object.assign(Object.assign({}, state), { isFetching: false, data: action.payload });
1375
1373
  });
1376
1374
  builder.addCase(doOrganizationFetch.rejected, (state) => {
@@ -1379,17 +1377,12 @@ const organizationSlice = toolkit.createSlice({
1379
1377
  },
1380
1378
  });
1381
1379
  const doOrganizationFetch = createAppAsyncThunk("organization/doOrganizationFetch", (_1, _a) => __awaiter(void 0, [_1, _a], void 0, function* (_, { extra, getState }) {
1382
- try {
1383
- const roomUrl = selectAppRoomUrl(getState());
1384
- const organization = yield extra.services.fetchOrganizationFromRoomUrl(roomUrl || "");
1385
- if (!organization) {
1386
- throw new Error("Invalid room url");
1387
- }
1388
- return organization;
1389
- }
1390
- catch (error) {
1391
- console.error(error);
1380
+ const roomUrl = selectAppRoomUrl(getState());
1381
+ const organization = yield extra.services.fetchOrganizationFromRoomUrl(roomUrl || "");
1382
+ if (!organization) {
1383
+ throw new Error("Invalid room url");
1392
1384
  }
1385
+ return organization;
1393
1386
  }));
1394
1387
  const selectOrganizationRaw = (state) => state.organization;
1395
1388
  const selectOrganizationId = (state) => { var _a; return (_a = state.organization.data) === null || _a === void 0 ? void 0 : _a.organizationId; };
@@ -1467,6 +1460,9 @@ const roomConnectionSlice = toolkit.createSlice({
1467
1460
  builder.addCase(signalEvents.roomLeft, (state) => {
1468
1461
  return Object.assign(Object.assign({}, state), { status: "left" });
1469
1462
  });
1463
+ builder.addCase(doOrganizationFetch.rejected, (state) => {
1464
+ return Object.assign(Object.assign({}, state), { status: "disconnected", error: "organization_fetch_failed" });
1465
+ });
1470
1466
  },
1471
1467
  });
1472
1468
  const { connectionStatusChanged, knockResponseReceived } = roomConnectionSlice.actions;
@@ -1491,7 +1487,7 @@ const doKnockRoom = createAppThunk(() => (dispatch, getState) => {
1491
1487
  socket === null || socket === void 0 ? void 0 : socket.emit("knock_room", Object.assign({ avatarUrl: null, config: {
1492
1488
  isAudioEnabled: true,
1493
1489
  isVideoEnabled: true,
1494
- }, deviceCapabilities: { canScreenshare: true }, displayName, isCoLocated: false, isDialIn,
1490
+ }, deviceCapabilities: { canScreenshare: media.hasGetDisplayMedia() }, displayName, isCoLocated: false, isDialIn,
1495
1491
  isAudioRecorder, isDevicePermissionDenied: false, kickFromOtherRooms: false, organizationId,
1496
1492
  roomKey,
1497
1493
  roomName,
@@ -1528,7 +1524,7 @@ const doConnectRoom = createAppThunk(() => (dispatch, getState) => {
1528
1524
  socket === null || socket === void 0 ? void 0 : socket.emit("join_room", Object.assign({ avatarUrl: null, config: {
1529
1525
  isAudioEnabled: isMicrophoneEnabled,
1530
1526
  isVideoEnabled: isCameraEnabled,
1531
- }, deviceCapabilities: { canScreenshare: true }, displayName, isCoLocated: false, isDialIn,
1527
+ }, deviceCapabilities: { canScreenshare: media.hasGetDisplayMedia() }, displayName, isCoLocated: false, isDialIn,
1532
1528
  isAudioRecorder, isDevicePermissionDenied: false, kickFromOtherRooms: false, organizationId,
1533
1529
  roomKey,
1534
1530
  assistantKey,
@@ -3573,7 +3573,7 @@ interface OrganizationState {
3573
3573
  }
3574
3574
  declare const organizationSliceInitialState: OrganizationState;
3575
3575
  declare const organizationSlice: _reduxjs_toolkit.Slice<OrganizationState, {}, "organization", "organization", _reduxjs_toolkit.SliceSelectors<OrganizationState>>;
3576
- declare const doOrganizationFetch: _reduxjs_toolkit.AsyncThunk<Organization | undefined, undefined, ThunkConfig>;
3576
+ declare const doOrganizationFetch: _reduxjs_toolkit.AsyncThunk<Organization, undefined, ThunkConfig>;
3577
3577
  declare const selectOrganizationRaw: (state: RootState) => OrganizationState;
3578
3578
  declare const selectOrganizationId: (state: RootState) => string | undefined;
3579
3579
  declare const selectOrganizationPreferences: (state: RootState) => OrganizationPreferences | null | undefined;
@@ -3573,7 +3573,7 @@ interface OrganizationState {
3573
3573
  }
3574
3574
  declare const organizationSliceInitialState: OrganizationState;
3575
3575
  declare const organizationSlice: _reduxjs_toolkit.Slice<OrganizationState, {}, "organization", "organization", _reduxjs_toolkit.SliceSelectors<OrganizationState>>;
3576
- declare const doOrganizationFetch: _reduxjs_toolkit.AsyncThunk<Organization | undefined, undefined, ThunkConfig>;
3576
+ declare const doOrganizationFetch: _reduxjs_toolkit.AsyncThunk<Organization, undefined, ThunkConfig>;
3577
3577
  declare const selectOrganizationRaw: (state: RootState) => OrganizationState;
3578
3578
  declare const selectOrganizationId: (state: RootState) => string | undefined;
3579
3579
  declare const selectOrganizationPreferences: (state: RootState) => OrganizationPreferences | null | undefined;
@@ -3573,7 +3573,7 @@ interface OrganizationState {
3573
3573
  }
3574
3574
  declare const organizationSliceInitialState: OrganizationState;
3575
3575
  declare const organizationSlice: _reduxjs_toolkit.Slice<OrganizationState, {}, "organization", "organization", _reduxjs_toolkit.SliceSelectors<OrganizationState>>;
3576
- declare const doOrganizationFetch: _reduxjs_toolkit.AsyncThunk<Organization | undefined, undefined, ThunkConfig>;
3576
+ declare const doOrganizationFetch: _reduxjs_toolkit.AsyncThunk<Organization, undefined, ThunkConfig>;
3577
3577
  declare const selectOrganizationRaw: (state: RootState) => OrganizationState;
3578
3578
  declare const selectOrganizationId: (state: RootState) => string | undefined;
3579
3579
  declare const selectOrganizationPreferences: (state: RootState) => OrganizationPreferences | null | undefined;
@@ -1,5 +1,5 @@
1
1
  import { createAsyncThunk, createListenerMiddleware, addListener, createSlice, createAction, createSelector, isAnyOf, combineReducers, configureStore } from '@reduxjs/toolkit';
2
- import { ServerSocket, isFileShareError, getDeviceData, getStream, getUpdatedDevices, replaceTracksInStream, getDisplayMedia, CAMERA_STREAM_ID, RtcManagerDispatcher, setClientProvider, subscribeIssues, isRoomIntegrationErrorCode, assert, fromLocation } from '@whereby.com/media';
2
+ import { ServerSocket, isFileShareError, getDeviceData, getStream, getUpdatedDevices, replaceTracksInStream, hasGetDisplayMedia, getDisplayMedia, CAMERA_STREAM_ID, RtcManagerDispatcher, setClientProvider, subscribeIssues, isRoomIntegrationErrorCode, assert, fromLocation } from '@whereby.com/media';
3
3
  import { EventEmitter } from 'events';
4
4
  import { v4 } from 'uuid';
5
5
  import nodeBtoa from 'btoa';
@@ -74,7 +74,7 @@ const createReactor = (selectors, callback) => {
74
74
  });
75
75
  };
76
76
 
77
- const coreVersion = "1.26.0";
77
+ const coreVersion = "1.26.2";
78
78
 
79
79
  function decodeRoomName(roomName) {
80
80
  if (!roomName) {
@@ -1367,8 +1367,6 @@ const organizationSlice = createSlice({
1367
1367
  return Object.assign(Object.assign({}, state), { isFetching: true });
1368
1368
  });
1369
1369
  builder.addCase(doOrganizationFetch.fulfilled, (state, action) => {
1370
- if (!action.payload)
1371
- return Object.assign(Object.assign({}, state), { isFetching: true });
1372
1370
  return Object.assign(Object.assign({}, state), { isFetching: false, data: action.payload });
1373
1371
  });
1374
1372
  builder.addCase(doOrganizationFetch.rejected, (state) => {
@@ -1377,17 +1375,12 @@ const organizationSlice = createSlice({
1377
1375
  },
1378
1376
  });
1379
1377
  const doOrganizationFetch = createAppAsyncThunk("organization/doOrganizationFetch", (_1, _a) => __awaiter(void 0, [_1, _a], void 0, function* (_, { extra, getState }) {
1380
- try {
1381
- const roomUrl = selectAppRoomUrl(getState());
1382
- const organization = yield extra.services.fetchOrganizationFromRoomUrl(roomUrl || "");
1383
- if (!organization) {
1384
- throw new Error("Invalid room url");
1385
- }
1386
- return organization;
1387
- }
1388
- catch (error) {
1389
- console.error(error);
1378
+ const roomUrl = selectAppRoomUrl(getState());
1379
+ const organization = yield extra.services.fetchOrganizationFromRoomUrl(roomUrl || "");
1380
+ if (!organization) {
1381
+ throw new Error("Invalid room url");
1390
1382
  }
1383
+ return organization;
1391
1384
  }));
1392
1385
  const selectOrganizationRaw = (state) => state.organization;
1393
1386
  const selectOrganizationId = (state) => { var _a; return (_a = state.organization.data) === null || _a === void 0 ? void 0 : _a.organizationId; };
@@ -1465,6 +1458,9 @@ const roomConnectionSlice = createSlice({
1465
1458
  builder.addCase(signalEvents.roomLeft, (state) => {
1466
1459
  return Object.assign(Object.assign({}, state), { status: "left" });
1467
1460
  });
1461
+ builder.addCase(doOrganizationFetch.rejected, (state) => {
1462
+ return Object.assign(Object.assign({}, state), { status: "disconnected", error: "organization_fetch_failed" });
1463
+ });
1468
1464
  },
1469
1465
  });
1470
1466
  const { connectionStatusChanged, knockResponseReceived } = roomConnectionSlice.actions;
@@ -1489,7 +1485,7 @@ const doKnockRoom = createAppThunk(() => (dispatch, getState) => {
1489
1485
  socket === null || socket === void 0 ? void 0 : socket.emit("knock_room", Object.assign({ avatarUrl: null, config: {
1490
1486
  isAudioEnabled: true,
1491
1487
  isVideoEnabled: true,
1492
- }, deviceCapabilities: { canScreenshare: true }, displayName, isCoLocated: false, isDialIn,
1488
+ }, deviceCapabilities: { canScreenshare: hasGetDisplayMedia() }, displayName, isCoLocated: false, isDialIn,
1493
1489
  isAudioRecorder, isDevicePermissionDenied: false, kickFromOtherRooms: false, organizationId,
1494
1490
  roomKey,
1495
1491
  roomName,
@@ -1526,7 +1522,7 @@ const doConnectRoom = createAppThunk(() => (dispatch, getState) => {
1526
1522
  socket === null || socket === void 0 ? void 0 : socket.emit("join_room", Object.assign({ avatarUrl: null, config: {
1527
1523
  isAudioEnabled: isMicrophoneEnabled,
1528
1524
  isVideoEnabled: isCameraEnabled,
1529
- }, deviceCapabilities: { canScreenshare: true }, displayName, isCoLocated: false, isDialIn,
1525
+ }, deviceCapabilities: { canScreenshare: hasGetDisplayMedia() }, displayName, isCoLocated: false, isDialIn,
1530
1526
  isAudioRecorder, isDevicePermissionDenied: false, kickFromOtherRooms: false, organizationId,
1531
1527
  roomKey,
1532
1528
  assistantKey,
@@ -1,5 +1,5 @@
1
1
  import { createAsyncThunk, createListenerMiddleware, addListener, createSlice, createAction, createSelector, isAnyOf, combineReducers, configureStore } from '@reduxjs/toolkit';
2
- import { ServerSocket, isFileShareError, getDeviceData, getStream, getUpdatedDevices, replaceTracksInStream, getDisplayMedia, CAMERA_STREAM_ID, RtcManagerDispatcher, setClientProvider, subscribeIssues, isRoomIntegrationErrorCode, assert, fromLocation } from '@whereby.com/media';
2
+ import { ServerSocket, isFileShareError, getDeviceData, getStream, getUpdatedDevices, replaceTracksInStream, hasGetDisplayMedia, getDisplayMedia, CAMERA_STREAM_ID, RtcManagerDispatcher, setClientProvider, subscribeIssues, isRoomIntegrationErrorCode, assert, fromLocation } from '@whereby.com/media';
3
3
  import { EventEmitter } from 'events';
4
4
  import { v4 } from 'uuid';
5
5
  import nodeBtoa from 'btoa';
@@ -74,7 +74,7 @@ const createReactor = (selectors, callback) => {
74
74
  });
75
75
  };
76
76
 
77
- const coreVersion = "1.26.0";
77
+ const coreVersion = "1.26.2";
78
78
 
79
79
  function decodeRoomName(roomName) {
80
80
  if (!roomName) {
@@ -1367,8 +1367,6 @@ const organizationSlice = createSlice({
1367
1367
  return Object.assign(Object.assign({}, state), { isFetching: true });
1368
1368
  });
1369
1369
  builder.addCase(doOrganizationFetch.fulfilled, (state, action) => {
1370
- if (!action.payload)
1371
- return Object.assign(Object.assign({}, state), { isFetching: true });
1372
1370
  return Object.assign(Object.assign({}, state), { isFetching: false, data: action.payload });
1373
1371
  });
1374
1372
  builder.addCase(doOrganizationFetch.rejected, (state) => {
@@ -1377,17 +1375,12 @@ const organizationSlice = createSlice({
1377
1375
  },
1378
1376
  });
1379
1377
  const doOrganizationFetch = createAppAsyncThunk("organization/doOrganizationFetch", (_1, _a) => __awaiter(void 0, [_1, _a], void 0, function* (_, { extra, getState }) {
1380
- try {
1381
- const roomUrl = selectAppRoomUrl(getState());
1382
- const organization = yield extra.services.fetchOrganizationFromRoomUrl(roomUrl || "");
1383
- if (!organization) {
1384
- throw new Error("Invalid room url");
1385
- }
1386
- return organization;
1387
- }
1388
- catch (error) {
1389
- console.error(error);
1378
+ const roomUrl = selectAppRoomUrl(getState());
1379
+ const organization = yield extra.services.fetchOrganizationFromRoomUrl(roomUrl || "");
1380
+ if (!organization) {
1381
+ throw new Error("Invalid room url");
1390
1382
  }
1383
+ return organization;
1391
1384
  }));
1392
1385
  const selectOrganizationRaw = (state) => state.organization;
1393
1386
  const selectOrganizationId = (state) => { var _a; return (_a = state.organization.data) === null || _a === void 0 ? void 0 : _a.organizationId; };
@@ -1465,6 +1458,9 @@ const roomConnectionSlice = createSlice({
1465
1458
  builder.addCase(signalEvents.roomLeft, (state) => {
1466
1459
  return Object.assign(Object.assign({}, state), { status: "left" });
1467
1460
  });
1461
+ builder.addCase(doOrganizationFetch.rejected, (state) => {
1462
+ return Object.assign(Object.assign({}, state), { status: "disconnected", error: "organization_fetch_failed" });
1463
+ });
1468
1464
  },
1469
1465
  });
1470
1466
  const { connectionStatusChanged, knockResponseReceived } = roomConnectionSlice.actions;
@@ -1489,7 +1485,7 @@ const doKnockRoom = createAppThunk(() => (dispatch, getState) => {
1489
1485
  socket === null || socket === void 0 ? void 0 : socket.emit("knock_room", Object.assign({ avatarUrl: null, config: {
1490
1486
  isAudioEnabled: true,
1491
1487
  isVideoEnabled: true,
1492
- }, deviceCapabilities: { canScreenshare: true }, displayName, isCoLocated: false, isDialIn,
1488
+ }, deviceCapabilities: { canScreenshare: hasGetDisplayMedia() }, displayName, isCoLocated: false, isDialIn,
1493
1489
  isAudioRecorder, isDevicePermissionDenied: false, kickFromOtherRooms: false, organizationId,
1494
1490
  roomKey,
1495
1491
  roomName,
@@ -1526,7 +1522,7 @@ const doConnectRoom = createAppThunk(() => (dispatch, getState) => {
1526
1522
  socket === null || socket === void 0 ? void 0 : socket.emit("join_room", Object.assign({ avatarUrl: null, config: {
1527
1523
  isAudioEnabled: isMicrophoneEnabled,
1528
1524
  isVideoEnabled: isCameraEnabled,
1529
- }, deviceCapabilities: { canScreenshare: true }, displayName, isCoLocated: false, isDialIn,
1525
+ }, deviceCapabilities: { canScreenshare: hasGetDisplayMedia() }, displayName, isCoLocated: false, isDialIn,
1530
1526
  isAudioRecorder, isDevicePermissionDenied: false, kickFromOtherRooms: false, organizationId,
1531
1527
  roomKey,
1532
1528
  assistantKey,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@whereby.com/core",
3
3
  "description": "Core library for whereby.com sdk",
4
4
  "author": "Whereby AS",
5
- "version": "1.26.0",
5
+ "version": "1.26.2",
6
6
  "license": "MIT",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -58,16 +58,16 @@
58
58
  "eslint": "^9.29.0",
59
59
  "prettier": "^3.5.3",
60
60
  "typescript": "^5.8.3",
61
+ "@whereby.com/eslint-config": "0.1.0",
61
62
  "@whereby.com/jest-config": "0.1.0",
62
63
  "@whereby.com/prettier-config": "0.1.0",
63
64
  "@whereby.com/rollup-config": "0.1.1",
64
- "@whereby.com/tsconfig": "0.1.0",
65
- "@whereby.com/eslint-config": "0.1.0"
65
+ "@whereby.com/tsconfig": "0.1.0"
66
66
  },
67
67
  "dependencies": {
68
68
  "@reduxjs/toolkit": "^2.2.3",
69
- "@whereby.com/media": "11.3.1",
70
- "@whereby.com/audio-denoiser": "1.0.29",
69
+ "@whereby.com/media": "11.3.2",
70
+ "@whereby.com/audio-denoiser": "1.0.30",
71
71
  "@whereby.com/camera-effects": "1.1.3",
72
72
  "axios": "^1.11.0",
73
73
  "btoa": "^1.2.1",