@whereby.com/core 1.31.1 → 1.31.3

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
@@ -1180,7 +1180,7 @@ function createServices({ apiBaseUrl, signalBaseUrl } = {}) {
1180
1180
  organizationService,
1181
1181
  roomIntegrationService,
1182
1182
  fetchOrganizationFromRoomUrl,
1183
- signalBaseUrl: signalBaseUrl || SIGNAL_BASE_URL || "wss://signal.appearin.net",
1183
+ signalBaseUrl: signalBaseUrl || SIGNAL_BASE_URL,
1184
1184
  };
1185
1185
  }
1186
1186
 
@@ -1314,7 +1314,7 @@ const createReactor = (selectors, callback) => {
1314
1314
  });
1315
1315
  };
1316
1316
 
1317
- const coreVersion = "1.31.1";
1317
+ const coreVersion = "1.31.3";
1318
1318
 
1319
1319
  function decodeRoomName(roomName) {
1320
1320
  if (!roomName) {
@@ -1863,6 +1863,9 @@ const localMediaSlice = toolkit.createSlice({
1863
1863
  builder.addCase(doToggleCamera.fulfilled, (state) => {
1864
1864
  return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
1865
1865
  });
1866
+ builder.addCase(doToggleCamera.rejected, (state) => {
1867
+ return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
1868
+ });
1866
1869
  builder.addCase(doUpdateDeviceList.fulfilled, (state, action) => {
1867
1870
  return Object.assign(Object.assign({}, state), { devices: action.payload.devices });
1868
1871
  });
@@ -2283,7 +2286,7 @@ startAppListening({
2283
2286
  const oldValue = selectCurrentCameraDeviceId(previousState);
2284
2287
  const newValue = selectCurrentCameraDeviceId(currentState);
2285
2288
  const isReady = selectLocalMediaStatus(previousState) === "started";
2286
- return isReady && !!oldValue && !!newValue && oldValue !== newValue;
2289
+ return isReady && selectIsCameraEnabled(currentState) && oldValue !== newValue;
2287
2290
  },
2288
2291
  effect: (_action, { dispatch }) => {
2289
2292
  dispatch(doSetDevice({ audio: false, video: true }));
@@ -2303,7 +2306,7 @@ startAppListening({
2303
2306
  },
2304
2307
  });
2305
2308
  startAppListening({
2306
- matcher: toolkit.isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled),
2309
+ matcher: toolkit.isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled, doToggleCamera.fulfilled),
2307
2310
  effect: (_action, { dispatch, getState }) => {
2308
2311
  const state = getState();
2309
2312
  const stream = selectLocalMediaStream(state);
@@ -2315,6 +2318,7 @@ startAppListening({
2315
2318
  audioTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.audio) || stream.getAudioTracks()[0],
2316
2319
  videoTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.video) || stream.getVideoTracks()[0],
2317
2320
  devices,
2321
+ lastVideoId: selectIsCameraEnabled(state) ? undefined : selectCurrentCameraDeviceId(state),
2318
2322
  });
2319
2323
  dispatch(localStreamMetadataUpdated(deviceData));
2320
2324
  },
package/dist/index.mjs CHANGED
@@ -1178,7 +1178,7 @@ function createServices({ apiBaseUrl, signalBaseUrl } = {}) {
1178
1178
  organizationService,
1179
1179
  roomIntegrationService,
1180
1180
  fetchOrganizationFromRoomUrl,
1181
- signalBaseUrl: signalBaseUrl || SIGNAL_BASE_URL || "wss://signal.appearin.net",
1181
+ signalBaseUrl: signalBaseUrl || SIGNAL_BASE_URL,
1182
1182
  };
1183
1183
  }
1184
1184
 
@@ -1312,7 +1312,7 @@ const createReactor = (selectors, callback) => {
1312
1312
  });
1313
1313
  };
1314
1314
 
1315
- const coreVersion = "1.31.1";
1315
+ const coreVersion = "1.31.3";
1316
1316
 
1317
1317
  function decodeRoomName(roomName) {
1318
1318
  if (!roomName) {
@@ -1861,6 +1861,9 @@ const localMediaSlice = createSlice({
1861
1861
  builder.addCase(doToggleCamera.fulfilled, (state) => {
1862
1862
  return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
1863
1863
  });
1864
+ builder.addCase(doToggleCamera.rejected, (state) => {
1865
+ return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
1866
+ });
1864
1867
  builder.addCase(doUpdateDeviceList.fulfilled, (state, action) => {
1865
1868
  return Object.assign(Object.assign({}, state), { devices: action.payload.devices });
1866
1869
  });
@@ -2281,7 +2284,7 @@ startAppListening({
2281
2284
  const oldValue = selectCurrentCameraDeviceId(previousState);
2282
2285
  const newValue = selectCurrentCameraDeviceId(currentState);
2283
2286
  const isReady = selectLocalMediaStatus(previousState) === "started";
2284
- return isReady && !!oldValue && !!newValue && oldValue !== newValue;
2287
+ return isReady && selectIsCameraEnabled(currentState) && oldValue !== newValue;
2285
2288
  },
2286
2289
  effect: (_action, { dispatch }) => {
2287
2290
  dispatch(doSetDevice({ audio: false, video: true }));
@@ -2301,7 +2304,7 @@ startAppListening({
2301
2304
  },
2302
2305
  });
2303
2306
  startAppListening({
2304
- matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled),
2307
+ matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled, doToggleCamera.fulfilled),
2305
2308
  effect: (_action, { dispatch, getState }) => {
2306
2309
  const state = getState();
2307
2310
  const stream = selectLocalMediaStream(state);
@@ -2313,6 +2316,7 @@ startAppListening({
2313
2316
  audioTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.audio) || stream.getAudioTracks()[0],
2314
2317
  videoTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.video) || stream.getVideoTracks()[0],
2315
2318
  devices,
2319
+ lastVideoId: selectIsCameraEnabled(state) ? undefined : selectCurrentCameraDeviceId(state),
2316
2320
  });
2317
2321
  dispatch(localStreamMetadataUpdated(deviceData));
2318
2322
  },
@@ -1178,7 +1178,7 @@ function createServices({ apiBaseUrl, signalBaseUrl } = {}) {
1178
1178
  organizationService,
1179
1179
  roomIntegrationService,
1180
1180
  fetchOrganizationFromRoomUrl,
1181
- signalBaseUrl: signalBaseUrl || SIGNAL_BASE_URL || "wss://signal.appearin.net",
1181
+ signalBaseUrl: signalBaseUrl || SIGNAL_BASE_URL,
1182
1182
  };
1183
1183
  }
1184
1184
 
@@ -1312,7 +1312,7 @@ const createReactor = (selectors, callback) => {
1312
1312
  });
1313
1313
  };
1314
1314
 
1315
- const coreVersion = "1.31.1";
1315
+ const coreVersion = "1.31.3";
1316
1316
 
1317
1317
  function decodeRoomName(roomName) {
1318
1318
  if (!roomName) {
@@ -1861,6 +1861,9 @@ const localMediaSlice = createSlice({
1861
1861
  builder.addCase(doToggleCamera.fulfilled, (state) => {
1862
1862
  return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
1863
1863
  });
1864
+ builder.addCase(doToggleCamera.rejected, (state) => {
1865
+ return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
1866
+ });
1864
1867
  builder.addCase(doUpdateDeviceList.fulfilled, (state, action) => {
1865
1868
  return Object.assign(Object.assign({}, state), { devices: action.payload.devices });
1866
1869
  });
@@ -2281,7 +2284,7 @@ startAppListening({
2281
2284
  const oldValue = selectCurrentCameraDeviceId(previousState);
2282
2285
  const newValue = selectCurrentCameraDeviceId(currentState);
2283
2286
  const isReady = selectLocalMediaStatus(previousState) === "started";
2284
- return isReady && !!oldValue && !!newValue && oldValue !== newValue;
2287
+ return isReady && selectIsCameraEnabled(currentState) && oldValue !== newValue;
2285
2288
  },
2286
2289
  effect: (_action, { dispatch }) => {
2287
2290
  dispatch(doSetDevice({ audio: false, video: true }));
@@ -2301,7 +2304,7 @@ startAppListening({
2301
2304
  },
2302
2305
  });
2303
2306
  startAppListening({
2304
- matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled),
2307
+ matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled, doToggleCamera.fulfilled),
2305
2308
  effect: (_action, { dispatch, getState }) => {
2306
2309
  const state = getState();
2307
2310
  const stream = selectLocalMediaStream(state);
@@ -2313,6 +2316,7 @@ startAppListening({
2313
2316
  audioTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.audio) || stream.getAudioTracks()[0],
2314
2317
  videoTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.video) || stream.getVideoTracks()[0],
2315
2318
  devices,
2319
+ lastVideoId: selectIsCameraEnabled(state) ? undefined : selectCurrentCameraDeviceId(state),
2316
2320
  });
2317
2321
  dispatch(localStreamMetadataUpdated(deviceData));
2318
2322
  },
@@ -76,7 +76,7 @@ const createReactor = (selectors, callback) => {
76
76
  });
77
77
  };
78
78
 
79
- const coreVersion = "1.31.1";
79
+ const coreVersion = "1.31.3";
80
80
 
81
81
  function decodeRoomName(roomName) {
82
82
  if (!roomName) {
@@ -644,6 +644,9 @@ const localMediaSlice = toolkit.createSlice({
644
644
  builder.addCase(doToggleCamera.fulfilled, (state) => {
645
645
  return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
646
646
  });
647
+ builder.addCase(doToggleCamera.rejected, (state) => {
648
+ return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
649
+ });
647
650
  builder.addCase(doUpdateDeviceList.fulfilled, (state, action) => {
648
651
  return Object.assign(Object.assign({}, state), { devices: action.payload.devices });
649
652
  });
@@ -1064,7 +1067,7 @@ startAppListening({
1064
1067
  const oldValue = selectCurrentCameraDeviceId(previousState);
1065
1068
  const newValue = selectCurrentCameraDeviceId(currentState);
1066
1069
  const isReady = selectLocalMediaStatus(previousState) === "started";
1067
- return isReady && !!oldValue && !!newValue && oldValue !== newValue;
1070
+ return isReady && selectIsCameraEnabled(currentState) && oldValue !== newValue;
1068
1071
  },
1069
1072
  effect: (_action, { dispatch }) => {
1070
1073
  dispatch(doSetDevice({ audio: false, video: true }));
@@ -1084,7 +1087,7 @@ startAppListening({
1084
1087
  },
1085
1088
  });
1086
1089
  startAppListening({
1087
- matcher: toolkit.isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled),
1090
+ matcher: toolkit.isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled, doToggleCamera.fulfilled),
1088
1091
  effect: (_action, { dispatch, getState }) => {
1089
1092
  const state = getState();
1090
1093
  const stream = selectLocalMediaStream(state);
@@ -1096,6 +1099,7 @@ startAppListening({
1096
1099
  audioTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.audio) || stream.getAudioTracks()[0],
1097
1100
  videoTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.video) || stream.getVideoTracks()[0],
1098
1101
  devices,
1102
+ lastVideoId: selectIsCameraEnabled(state) ? undefined : selectCurrentCameraDeviceId(state),
1099
1103
  });
1100
1104
  dispatch(localStreamMetadataUpdated(deviceData));
1101
1105
  },
@@ -5681,7 +5685,7 @@ function createServices({ apiBaseUrl, signalBaseUrl } = {}) {
5681
5685
  organizationService,
5682
5686
  roomIntegrationService,
5683
5687
  fetchOrganizationFromRoomUrl,
5684
- signalBaseUrl: signalBaseUrl || SIGNAL_BASE_URL || "wss://signal.appearin.net",
5688
+ signalBaseUrl: signalBaseUrl || SIGNAL_BASE_URL,
5685
5689
  };
5686
5690
  }
5687
5691
 
@@ -5,7 +5,7 @@ import { AxiosRequestConfig } from 'axios';
5
5
  import { EventEmitter } from 'events';
6
6
  import * as redux from 'redux';
7
7
  import * as _whereby_com_media from '@whereby.com/media';
8
- import { LiveCaptionEvent, RoleName, ChatMessage as ChatMessage$1, ChatFileShare, FileShareErrorCode, BreakoutConfig, RoomMode, getDeviceData, SignalClient, RtcStreamAddedPayload, AudioEnableRequest, VideoEnableRequest, ScreenshareEnableRequest, KnockResponse, RoomIntegrationProps, RoomIntegrationErrorCode, RoomIntegrationSessionEvent, RtcManagerCreatedPayload, RtcClientConnectionStatusChangedPayload, RtcMediaQualityChangedPayload, RtcManager, RtcManagerDispatcher, RtcEvents, AudioEnabledEvent, AudioEnableRequestedEvent, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, ChatMessageRemoved, ChatMessageError, ClientLeftEvent, ClientKickedEvent, ClientMetadataReceivedEvent, ClientUnableToJoinEvent, CloudRecordingStartedEvent, KnockerLeftEvent, KnockAcceptedEvent, KnockOnHoldEvent, KnockRejectedEvent, NewClientEvent, RoomIntegrationStartedEvent, RoomIntegrationStoppedEvent, RoomIntegrationPropsUpdatedEvent, RoomIntegrationEnabledEvent, RoomIntegrationDisabledEvent, RoomJoinedEvent, RoomKnockedEvent, RoomLockedEvent, RoomSessionEndedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, ScreenshareEnableRequestedEvent, SpotlightAddedEvent, SpotlightRemovedEvent, VideoEnabledEvent, VideoEnableRequestedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, LiveCaptionsStartedEvent, LiveCaptionsStoppedEvent, ServerSocket, Spotlight } from '@whereby.com/media';
8
+ import { LiveCaptionEvent, RoleName, ChatMessage as ChatMessage$1, ChatFileShare, FileShareErrorCode, BreakoutConfig, RoomMode, getDeviceData, SignalClient, AudioEnableRequest, ScreenshareEnableRequest, VideoEnableRequest, RtcStreamAddedPayload, KnockResponse, RoomIntegrationProps, RoomIntegrationErrorCode, RoomIntegrationSessionEvent, RtcManagerCreatedPayload, RtcClientConnectionStatusChangedPayload, RtcMediaQualityChangedPayload, RtcManager, RtcManagerDispatcher, RtcEvents, AudioEnabledEvent, AudioEnableRequestedEvent, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, ChatMessageRemoved, ChatMessageError, ClientLeftEvent, ClientKickedEvent, ClientMetadataReceivedEvent, ClientUnableToJoinEvent, CloudRecordingStartedEvent, KnockerLeftEvent, KnockAcceptedEvent, KnockOnHoldEvent, KnockRejectedEvent, NewClientEvent, RoomIntegrationStartedEvent, RoomIntegrationStoppedEvent, RoomIntegrationPropsUpdatedEvent, RoomIntegrationEnabledEvent, RoomIntegrationDisabledEvent, RoomJoinedEvent, RoomKnockedEvent, RoomLockedEvent, RoomSessionEndedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, ScreenshareEnableRequestedEvent, SpotlightAddedEvent, SpotlightRemovedEvent, VideoEnabledEvent, VideoEnableRequestedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, LiveCaptionsStartedEvent, LiveCaptionsStoppedEvent, ServerSocket, Spotlight } from '@whereby.com/media';
9
9
  import * as immer from 'immer';
10
10
  import * as reselect from 'reselect';
11
11
  import { Setup, Params } from '@whereby.com/camera-effects';
@@ -5,7 +5,7 @@ import { AxiosRequestConfig } from 'axios';
5
5
  import { EventEmitter } from 'events';
6
6
  import * as redux from 'redux';
7
7
  import * as _whereby_com_media from '@whereby.com/media';
8
- import { LiveCaptionEvent, RoleName, ChatMessage as ChatMessage$1, ChatFileShare, FileShareErrorCode, BreakoutConfig, RoomMode, getDeviceData, SignalClient, RtcStreamAddedPayload, AudioEnableRequest, VideoEnableRequest, ScreenshareEnableRequest, KnockResponse, RoomIntegrationProps, RoomIntegrationErrorCode, RoomIntegrationSessionEvent, RtcManagerCreatedPayload, RtcClientConnectionStatusChangedPayload, RtcMediaQualityChangedPayload, RtcManager, RtcManagerDispatcher, RtcEvents, AudioEnabledEvent, AudioEnableRequestedEvent, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, ChatMessageRemoved, ChatMessageError, ClientLeftEvent, ClientKickedEvent, ClientMetadataReceivedEvent, ClientUnableToJoinEvent, CloudRecordingStartedEvent, KnockerLeftEvent, KnockAcceptedEvent, KnockOnHoldEvent, KnockRejectedEvent, NewClientEvent, RoomIntegrationStartedEvent, RoomIntegrationStoppedEvent, RoomIntegrationPropsUpdatedEvent, RoomIntegrationEnabledEvent, RoomIntegrationDisabledEvent, RoomJoinedEvent, RoomKnockedEvent, RoomLockedEvent, RoomSessionEndedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, ScreenshareEnableRequestedEvent, SpotlightAddedEvent, SpotlightRemovedEvent, VideoEnabledEvent, VideoEnableRequestedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, LiveCaptionsStartedEvent, LiveCaptionsStoppedEvent, ServerSocket, Spotlight } from '@whereby.com/media';
8
+ import { LiveCaptionEvent, RoleName, ChatMessage as ChatMessage$1, ChatFileShare, FileShareErrorCode, BreakoutConfig, RoomMode, getDeviceData, SignalClient, AudioEnableRequest, ScreenshareEnableRequest, VideoEnableRequest, RtcStreamAddedPayload, KnockResponse, RoomIntegrationProps, RoomIntegrationErrorCode, RoomIntegrationSessionEvent, RtcManagerCreatedPayload, RtcClientConnectionStatusChangedPayload, RtcMediaQualityChangedPayload, RtcManager, RtcManagerDispatcher, RtcEvents, AudioEnabledEvent, AudioEnableRequestedEvent, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, ChatMessageRemoved, ChatMessageError, ClientLeftEvent, ClientKickedEvent, ClientMetadataReceivedEvent, ClientUnableToJoinEvent, CloudRecordingStartedEvent, KnockerLeftEvent, KnockAcceptedEvent, KnockOnHoldEvent, KnockRejectedEvent, NewClientEvent, RoomIntegrationStartedEvent, RoomIntegrationStoppedEvent, RoomIntegrationPropsUpdatedEvent, RoomIntegrationEnabledEvent, RoomIntegrationDisabledEvent, RoomJoinedEvent, RoomKnockedEvent, RoomLockedEvent, RoomSessionEndedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, ScreenshareEnableRequestedEvent, SpotlightAddedEvent, SpotlightRemovedEvent, VideoEnabledEvent, VideoEnableRequestedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, LiveCaptionsStartedEvent, LiveCaptionsStoppedEvent, ServerSocket, Spotlight } from '@whereby.com/media';
9
9
  import * as immer from 'immer';
10
10
  import * as reselect from 'reselect';
11
11
  import { Setup, Params } from '@whereby.com/camera-effects';
@@ -5,7 +5,7 @@ import { AxiosRequestConfig } from 'axios';
5
5
  import { EventEmitter } from 'events';
6
6
  import * as redux from 'redux';
7
7
  import * as _whereby_com_media from '@whereby.com/media';
8
- import { LiveCaptionEvent, RoleName, ChatMessage as ChatMessage$1, ChatFileShare, FileShareErrorCode, BreakoutConfig, RoomMode, getDeviceData, SignalClient, RtcStreamAddedPayload, AudioEnableRequest, VideoEnableRequest, ScreenshareEnableRequest, KnockResponse, RoomIntegrationProps, RoomIntegrationErrorCode, RoomIntegrationSessionEvent, RtcManagerCreatedPayload, RtcClientConnectionStatusChangedPayload, RtcMediaQualityChangedPayload, RtcManager, RtcManagerDispatcher, RtcEvents, AudioEnabledEvent, AudioEnableRequestedEvent, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, ChatMessageRemoved, ChatMessageError, ClientLeftEvent, ClientKickedEvent, ClientMetadataReceivedEvent, ClientUnableToJoinEvent, CloudRecordingStartedEvent, KnockerLeftEvent, KnockAcceptedEvent, KnockOnHoldEvent, KnockRejectedEvent, NewClientEvent, RoomIntegrationStartedEvent, RoomIntegrationStoppedEvent, RoomIntegrationPropsUpdatedEvent, RoomIntegrationEnabledEvent, RoomIntegrationDisabledEvent, RoomJoinedEvent, RoomKnockedEvent, RoomLockedEvent, RoomSessionEndedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, ScreenshareEnableRequestedEvent, SpotlightAddedEvent, SpotlightRemovedEvent, VideoEnabledEvent, VideoEnableRequestedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, LiveCaptionsStartedEvent, LiveCaptionsStoppedEvent, ServerSocket, Spotlight } from '@whereby.com/media';
8
+ import { LiveCaptionEvent, RoleName, ChatMessage as ChatMessage$1, ChatFileShare, FileShareErrorCode, BreakoutConfig, RoomMode, getDeviceData, SignalClient, AudioEnableRequest, ScreenshareEnableRequest, VideoEnableRequest, RtcStreamAddedPayload, KnockResponse, RoomIntegrationProps, RoomIntegrationErrorCode, RoomIntegrationSessionEvent, RtcManagerCreatedPayload, RtcClientConnectionStatusChangedPayload, RtcMediaQualityChangedPayload, RtcManager, RtcManagerDispatcher, RtcEvents, AudioEnabledEvent, AudioEnableRequestedEvent, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, ChatMessageRemoved, ChatMessageError, ClientLeftEvent, ClientKickedEvent, ClientMetadataReceivedEvent, ClientUnableToJoinEvent, CloudRecordingStartedEvent, KnockerLeftEvent, KnockAcceptedEvent, KnockOnHoldEvent, KnockRejectedEvent, NewClientEvent, RoomIntegrationStartedEvent, RoomIntegrationStoppedEvent, RoomIntegrationPropsUpdatedEvent, RoomIntegrationEnabledEvent, RoomIntegrationDisabledEvent, RoomJoinedEvent, RoomKnockedEvent, RoomLockedEvent, RoomSessionEndedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, ScreenshareEnableRequestedEvent, SpotlightAddedEvent, SpotlightRemovedEvent, VideoEnabledEvent, VideoEnableRequestedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, LiveCaptionsStartedEvent, LiveCaptionsStoppedEvent, ServerSocket, Spotlight } from '@whereby.com/media';
9
9
  import * as immer from 'immer';
10
10
  import * as reselect from 'reselect';
11
11
  import { Setup, Params } from '@whereby.com/camera-effects';
@@ -74,7 +74,7 @@ const createReactor = (selectors, callback) => {
74
74
  });
75
75
  };
76
76
 
77
- const coreVersion = "1.31.1";
77
+ const coreVersion = "1.31.3";
78
78
 
79
79
  function decodeRoomName(roomName) {
80
80
  if (!roomName) {
@@ -642,6 +642,9 @@ const localMediaSlice = createSlice({
642
642
  builder.addCase(doToggleCamera.fulfilled, (state) => {
643
643
  return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
644
644
  });
645
+ builder.addCase(doToggleCamera.rejected, (state) => {
646
+ return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
647
+ });
645
648
  builder.addCase(doUpdateDeviceList.fulfilled, (state, action) => {
646
649
  return Object.assign(Object.assign({}, state), { devices: action.payload.devices });
647
650
  });
@@ -1062,7 +1065,7 @@ startAppListening({
1062
1065
  const oldValue = selectCurrentCameraDeviceId(previousState);
1063
1066
  const newValue = selectCurrentCameraDeviceId(currentState);
1064
1067
  const isReady = selectLocalMediaStatus(previousState) === "started";
1065
- return isReady && !!oldValue && !!newValue && oldValue !== newValue;
1068
+ return isReady && selectIsCameraEnabled(currentState) && oldValue !== newValue;
1066
1069
  },
1067
1070
  effect: (_action, { dispatch }) => {
1068
1071
  dispatch(doSetDevice({ audio: false, video: true }));
@@ -1082,7 +1085,7 @@ startAppListening({
1082
1085
  },
1083
1086
  });
1084
1087
  startAppListening({
1085
- matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled),
1088
+ matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled, doToggleCamera.fulfilled),
1086
1089
  effect: (_action, { dispatch, getState }) => {
1087
1090
  const state = getState();
1088
1091
  const stream = selectLocalMediaStream(state);
@@ -1094,6 +1097,7 @@ startAppListening({
1094
1097
  audioTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.audio) || stream.getAudioTracks()[0],
1095
1098
  videoTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.video) || stream.getVideoTracks()[0],
1096
1099
  devices,
1100
+ lastVideoId: selectIsCameraEnabled(state) ? undefined : selectCurrentCameraDeviceId(state),
1097
1101
  });
1098
1102
  dispatch(localStreamMetadataUpdated(deviceData));
1099
1103
  },
@@ -5679,7 +5683,7 @@ function createServices({ apiBaseUrl, signalBaseUrl } = {}) {
5679
5683
  organizationService,
5680
5684
  roomIntegrationService,
5681
5685
  fetchOrganizationFromRoomUrl,
5682
- signalBaseUrl: signalBaseUrl || SIGNAL_BASE_URL || "wss://signal.appearin.net",
5686
+ signalBaseUrl: signalBaseUrl || SIGNAL_BASE_URL,
5683
5687
  };
5684
5688
  }
5685
5689
 
@@ -74,7 +74,7 @@ const createReactor = (selectors, callback) => {
74
74
  });
75
75
  };
76
76
 
77
- const coreVersion = "1.31.1";
77
+ const coreVersion = "1.31.3";
78
78
 
79
79
  function decodeRoomName(roomName) {
80
80
  if (!roomName) {
@@ -642,6 +642,9 @@ const localMediaSlice = createSlice({
642
642
  builder.addCase(doToggleCamera.fulfilled, (state) => {
643
643
  return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
644
644
  });
645
+ builder.addCase(doToggleCamera.rejected, (state) => {
646
+ return Object.assign(Object.assign({}, state), { isTogglingCamera: false });
647
+ });
645
648
  builder.addCase(doUpdateDeviceList.fulfilled, (state, action) => {
646
649
  return Object.assign(Object.assign({}, state), { devices: action.payload.devices });
647
650
  });
@@ -1062,7 +1065,7 @@ startAppListening({
1062
1065
  const oldValue = selectCurrentCameraDeviceId(previousState);
1063
1066
  const newValue = selectCurrentCameraDeviceId(currentState);
1064
1067
  const isReady = selectLocalMediaStatus(previousState) === "started";
1065
- return isReady && !!oldValue && !!newValue && oldValue !== newValue;
1068
+ return isReady && selectIsCameraEnabled(currentState) && oldValue !== newValue;
1066
1069
  },
1067
1070
  effect: (_action, { dispatch }) => {
1068
1071
  dispatch(doSetDevice({ audio: false, video: true }));
@@ -1082,7 +1085,7 @@ startAppListening({
1082
1085
  },
1083
1086
  });
1084
1087
  startAppListening({
1085
- matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled),
1088
+ matcher: isAnyOf(doStartLocalMedia.fulfilled, doUpdateDeviceList.fulfilled, doSetDevice.fulfilled, doSetDevice.rejected, doSwitchLocalStream.fulfilled, doSwitchLocalStream.rejected, doLocalStreamEffect.fulfilled, doToggleCamera.fulfilled),
1086
1089
  effect: (_action, { dispatch, getState }) => {
1087
1090
  const state = getState();
1088
1091
  const stream = selectLocalMediaStream(state);
@@ -1094,6 +1097,7 @@ startAppListening({
1094
1097
  audioTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.audio) || stream.getAudioTracks()[0],
1095
1098
  videoTrack: (beforeEffectTracks === null || beforeEffectTracks === void 0 ? void 0 : beforeEffectTracks.video) || stream.getVideoTracks()[0],
1096
1099
  devices,
1100
+ lastVideoId: selectIsCameraEnabled(state) ? undefined : selectCurrentCameraDeviceId(state),
1097
1101
  });
1098
1102
  dispatch(localStreamMetadataUpdated(deviceData));
1099
1103
  },
@@ -5679,7 +5683,7 @@ function createServices({ apiBaseUrl, signalBaseUrl } = {}) {
5679
5683
  organizationService,
5680
5684
  roomIntegrationService,
5681
5685
  fetchOrganizationFromRoomUrl,
5682
- signalBaseUrl: signalBaseUrl || SIGNAL_BASE_URL || "wss://signal.appearin.net",
5686
+ signalBaseUrl: signalBaseUrl || SIGNAL_BASE_URL,
5683
5687
  };
5684
5688
  }
5685
5689
 
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.31.1",
5
+ "version": "1.31.3",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -71,10 +71,10 @@
71
71
  },
72
72
  "dependencies": {
73
73
  "@reduxjs/toolkit": "^2.2.3",
74
- "@whereby.com/media": "11.3.4",
75
- "@whereby.com/audio-denoiser": "1.0.32",
74
+ "@whereby.com/media": "11.3.5",
75
+ "@whereby.com/audio-denoiser": "1.0.33",
76
76
  "@whereby.com/camera-effects": "1.1.4",
77
- "axios": "^1.11.0",
77
+ "axios": "^1.21.1",
78
78
  "btoa": "^1.2.1",
79
79
  "events": "^3.3.0"
80
80
  },