@whereby.com/core 0.15.0 → 0.15.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
@@ -45,7 +45,7 @@ const createReactor = (selectors, callback) => {
45
45
  });
46
46
  };
47
47
 
48
- const coreVersion = "0.15.0";
48
+ const coreVersion = "0.15.2";
49
49
 
50
50
  const initialState$e = {
51
51
  isNodeSdk: false,
@@ -55,28 +55,21 @@ const initialState$e = {
55
55
  displayName: null,
56
56
  userAgent: `core:${coreVersion}`,
57
57
  externalId: null,
58
- isLoaded: false,
59
58
  };
60
59
  const appSlice = toolkit.createSlice({
61
60
  name: "app",
62
61
  initialState: initialState$e,
63
62
  reducers: {
64
- doAppConfigure: (state, action) => {
63
+ doAppStart: (state, action) => {
65
64
  const url = new URL(action.payload.roomUrl);
66
- return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: url.pathname, initialConfig: Object.assign({}, action.payload), isLoaded: true });
67
- },
68
- doAppStart: (state) => {
69
- return Object.assign(Object.assign({}, state), { isActive: true });
65
+ return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: url.pathname, initialConfig: Object.assign({}, action.payload), isActive: true });
70
66
  },
71
67
  doAppStop: (state) => {
72
68
  return Object.assign(Object.assign({}, state), { isActive: false });
73
69
  },
74
- doAppReset: (state) => {
75
- return Object.assign(Object.assign({}, state), { isLoaded: false });
76
- },
77
70
  },
78
71
  });
79
- const { doAppConfigure, doAppStop, doAppReset, doAppStart } = appSlice.actions;
72
+ const { doAppStop, doAppStart } = appSlice.actions;
80
73
  const selectAppRaw = (state) => state.app;
81
74
  const selectAppIsActive = (state) => state.app.isActive;
82
75
  const selectAppRoomName = (state) => state.app.roomName;
@@ -86,20 +79,6 @@ const selectAppUserAgent = (state) => state.app.userAgent;
86
79
  const selectAppExternalId = (state) => state.app.externalId;
87
80
  const selectAppIsNodeSdk = (state) => state.app.isNodeSdk;
88
81
  const selectAppInitialConfig = (state) => state.app.initialConfig;
89
- const selectAppIsLoaded = (state) => state.app.isLoaded;
90
- const selectShouldReloadApp = toolkit.createSelector(selectAppIsLoaded, selectAppInitialConfig, (appIsLoaded, appInitialConfig) => {
91
- return !appIsLoaded && appInitialConfig;
92
- });
93
- startAppListening({
94
- actionCreator: doAppReset,
95
- effect: (_, { dispatch, getState }) => {
96
- const state = getState();
97
- const appInitialConfig = selectAppInitialConfig(state);
98
- if (appInitialConfig) {
99
- dispatch(doAppConfigure(appInitialConfig));
100
- }
101
- },
102
- });
103
82
 
104
83
  function createSignalEventAction(name) {
105
84
  return toolkit.createAction(`signalConnection/event/${name}`);
@@ -147,7 +126,7 @@ const authorizationSlice = toolkit.createSlice({
147
126
  },
148
127
  },
149
128
  extraReducers: (builder) => {
150
- builder.addCase(doAppConfigure, (state, action) => {
129
+ builder.addCase(doAppStart, (state, action) => {
151
130
  return Object.assign(Object.assign({}, state), { roomKey: action.payload.roomKey });
152
131
  });
153
132
  builder.addCase(signalEvents.roomJoined, (state, action) => {
@@ -356,9 +335,6 @@ const doSignalDisconnect = createAppThunk(() => (dispatch, getState) => {
356
335
  socket === null || socket === void 0 ? void 0 : socket.disconnect();
357
336
  dispatch(socketDisconnected());
358
337
  }
359
- else {
360
- doAppReset();
361
- }
362
338
  });
363
339
  const selectSignalConnectionRaw = (state) => state.signalConnection;
364
340
  const selectSignalIsIdentifyingDevice = (state) => state.signalConnection.isIdentifyingDevice;
@@ -399,12 +375,6 @@ startAppListening({
399
375
  dispatch(doSignalDisconnect());
400
376
  },
401
377
  });
402
- startAppListening({
403
- actionCreator: socketDisconnected,
404
- effect: (_, { dispatch }) => {
405
- dispatch(doAppReset());
406
- },
407
- });
408
378
 
409
379
  const initialState$a = {
410
380
  chatMessages: [],
@@ -679,7 +649,7 @@ const localMediaSlice = toolkit.createSlice({
679
649
  },
680
650
  },
681
651
  extraReducers: (builder) => {
682
- builder.addCase(doAppConfigure, (state, action) => {
652
+ builder.addCase(doAppStart, (state, action) => {
683
653
  return Object.assign(Object.assign({}, state), { options: action.payload.localMediaOptions });
684
654
  });
685
655
  builder.addCase(doSetDevice.pending, (state, action) => {
@@ -1106,7 +1076,7 @@ const localParticipantSlice = toolkit.createSlice({
1106
1076
  },
1107
1077
  },
1108
1078
  extraReducers: (builder) => {
1109
- builder.addCase(doAppConfigure, (state, action) => {
1079
+ builder.addCase(doAppStart, (state, action) => {
1110
1080
  return Object.assign(Object.assign({}, state), { displayName: action.payload.displayName });
1111
1081
  });
1112
1082
  builder.addCase(doEnableAudio.fulfilled, (state, action) => {
@@ -1442,7 +1412,12 @@ const remoteParticipantsSlice = toolkit.createSlice({
1442
1412
  });
1443
1413
  });
1444
1414
  builder.addCase(signalEvents.clientMetadataReceived, (state, action) => {
1445
- const { clientId, displayName } = action.payload.payload;
1415
+ const { error, payload } = action.payload;
1416
+ if (error || !payload) {
1417
+ console.warn(error || "Client metadata error received");
1418
+ return state;
1419
+ }
1420
+ const { clientId, displayName } = payload;
1446
1421
  return updateParticipant(state, clientId, {
1447
1422
  displayName,
1448
1423
  });
@@ -1560,6 +1535,9 @@ const roomConnectionSlice = toolkit.createSlice({
1560
1535
  return Object.assign(Object.assign({}, state), { status: "connected", session: (_b = (_a = action.payload.room) === null || _a === void 0 ? void 0 : _a.session) !== null && _b !== void 0 ? _b : null });
1561
1536
  });
1562
1537
  builder.addCase(signalEvents.disconnect, (state) => {
1538
+ if (["kicked", "left"].includes(state.status)) {
1539
+ return Object.assign({}, state);
1540
+ }
1563
1541
  return Object.assign(Object.assign({}, state), { status: "disconnected" });
1564
1542
  });
1565
1543
  builder.addCase(signalEvents.newClient, (state, action) => {
@@ -2260,7 +2238,7 @@ const appReducer = toolkit.combineReducers({
2260
2238
  });
2261
2239
  const rootReducer = (state, action) => {
2262
2240
  var _a;
2263
- if (doAppReset.match(action)) {
2241
+ if (doAppStart.match(action)) {
2264
2242
  const resetState = {
2265
2243
  app: Object.assign(Object.assign({}, appSlice.getInitialState()), { initialConfig: (_a = state === null || state === void 0 ? void 0 : state.app) === null || _a === void 0 ? void 0 : _a.initialConfig }),
2266
2244
  localMedia: Object.assign(Object.assign({}, localMediaSlice.getInitialState()), state === null || state === void 0 ? void 0 : state.localMedia),
@@ -3329,8 +3307,6 @@ exports.deviceCredentialsSlice = deviceCredentialsSlice;
3329
3307
  exports.deviceIdentified = deviceIdentified;
3330
3308
  exports.deviceIdentifying = deviceIdentifying;
3331
3309
  exports.doAcceptWaitingParticipant = doAcceptWaitingParticipant;
3332
- exports.doAppConfigure = doAppConfigure;
3333
- exports.doAppReset = doAppReset;
3334
3310
  exports.doAppStart = doAppStart;
3335
3311
  exports.doAppStop = doAppStop;
3336
3312
  exports.doConnectRoom = doConnectRoom;
@@ -3406,7 +3382,6 @@ exports.selectAppDisplayName = selectAppDisplayName;
3406
3382
  exports.selectAppExternalId = selectAppExternalId;
3407
3383
  exports.selectAppInitialConfig = selectAppInitialConfig;
3408
3384
  exports.selectAppIsActive = selectAppIsActive;
3409
- exports.selectAppIsLoaded = selectAppIsLoaded;
3410
3385
  exports.selectAppIsNodeSdk = selectAppIsNodeSdk;
3411
3386
  exports.selectAppRaw = selectAppRaw;
3412
3387
  exports.selectAppRoomName = selectAppRoomName;
@@ -3486,7 +3461,6 @@ exports.selectShouldFetchDeviceCredentials = selectShouldFetchDeviceCredentials;
3486
3461
  exports.selectShouldFetchOrganization = selectShouldFetchOrganization;
3487
3462
  exports.selectShouldIdentifyDevice = selectShouldIdentifyDevice;
3488
3463
  exports.selectShouldInitializeRtc = selectShouldInitializeRtc;
3489
- exports.selectShouldReloadApp = selectShouldReloadApp;
3490
3464
  exports.selectSignalConnectionDeviceIdentified = selectSignalConnectionDeviceIdentified;
3491
3465
  exports.selectSignalConnectionRaw = selectSignalConnectionRaw;
3492
3466
  exports.selectSignalConnectionSocket = selectSignalConnectionSocket;
package/dist/index.d.cts CHANGED
@@ -481,10 +481,9 @@ interface AppState {
481
481
  userAgent: string | null;
482
482
  externalId: string | null;
483
483
  initialConfig?: AppConfig;
484
- isLoaded: boolean;
485
484
  }
486
485
  declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
487
- doAppConfigure: (state: {
486
+ doAppStart: (state: {
488
487
  isNodeSdk: boolean;
489
488
  isActive: boolean;
490
489
  roomUrl: string | null;
@@ -504,7 +503,6 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
504
503
  userAgent?: string | undefined;
505
504
  externalId: string | null;
506
505
  } | undefined;
507
- isLoaded: boolean;
508
506
  }, action: PayloadAction<AppConfig>) => {
509
507
  roomName: string;
510
508
  initialConfig: {
@@ -516,7 +514,7 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
516
514
  userAgent?: string | undefined;
517
515
  externalId: string | null;
518
516
  };
519
- isLoaded: true;
517
+ isActive: true;
520
518
  isNodeSdk: boolean;
521
519
  displayName: string;
522
520
  localMediaOptions?: LocalMediaOptions | undefined;
@@ -524,50 +522,6 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
524
522
  roomUrl: string;
525
523
  userAgent: string | null;
526
524
  externalId: string | null;
527
- isActive: boolean;
528
- };
529
- doAppStart: (state: {
530
- isNodeSdk: boolean;
531
- isActive: boolean;
532
- roomUrl: string | null;
533
- roomName: string | null;
534
- displayName: string | null;
535
- userAgent: string | null;
536
- externalId: string | null;
537
- initialConfig?: {
538
- isNodeSdk?: boolean | undefined;
539
- displayName: string;
540
- localMediaOptions?: {
541
- audio: boolean;
542
- video: boolean;
543
- } | undefined;
544
- roomKey: string | null;
545
- roomUrl: string;
546
- userAgent?: string | undefined;
547
- externalId: string | null;
548
- } | undefined;
549
- isLoaded: boolean;
550
- }) => {
551
- isActive: true;
552
- isNodeSdk: boolean;
553
- roomUrl: string | null;
554
- roomName: string | null;
555
- displayName: string | null;
556
- userAgent: string | null;
557
- externalId: string | null;
558
- initialConfig?: {
559
- isNodeSdk?: boolean | undefined;
560
- displayName: string;
561
- localMediaOptions?: {
562
- audio: boolean;
563
- video: boolean;
564
- } | undefined;
565
- roomKey: string | null;
566
- roomUrl: string;
567
- userAgent?: string | undefined;
568
- externalId: string | null;
569
- } | undefined;
570
- isLoaded: boolean;
571
525
  };
572
526
  doAppStop: (state: {
573
527
  isNodeSdk: boolean;
@@ -589,7 +543,6 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
589
543
  userAgent?: string | undefined;
590
544
  externalId: string | null;
591
545
  } | undefined;
592
- isLoaded: boolean;
593
546
  }) => {
594
547
  isActive: false;
595
548
  isNodeSdk: boolean;
@@ -610,56 +563,10 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
610
563
  userAgent?: string | undefined;
611
564
  externalId: string | null;
612
565
  } | undefined;
613
- isLoaded: boolean;
614
- };
615
- doAppReset: (state: {
616
- isNodeSdk: boolean;
617
- isActive: boolean;
618
- roomUrl: string | null;
619
- roomName: string | null;
620
- displayName: string | null;
621
- userAgent: string | null;
622
- externalId: string | null;
623
- initialConfig?: {
624
- isNodeSdk?: boolean | undefined;
625
- displayName: string;
626
- localMediaOptions?: {
627
- audio: boolean;
628
- video: boolean;
629
- } | undefined;
630
- roomKey: string | null;
631
- roomUrl: string;
632
- userAgent?: string | undefined;
633
- externalId: string | null;
634
- } | undefined;
635
- isLoaded: boolean;
636
- }) => {
637
- isLoaded: false;
638
- isNodeSdk: boolean;
639
- isActive: boolean;
640
- roomUrl: string | null;
641
- roomName: string | null;
642
- displayName: string | null;
643
- userAgent: string | null;
644
- externalId: string | null;
645
- initialConfig?: {
646
- isNodeSdk?: boolean | undefined;
647
- displayName: string;
648
- localMediaOptions?: {
649
- audio: boolean;
650
- video: boolean;
651
- } | undefined;
652
- roomKey: string | null;
653
- roomUrl: string;
654
- userAgent?: string | undefined;
655
- externalId: string | null;
656
- } | undefined;
657
566
  };
658
567
  }, "app", "app", _reduxjs_toolkit.SliceSelectors<AppState>>;
659
- declare const doAppConfigure: _reduxjs_toolkit.ActionCreatorWithPayload<AppConfig, "app/doAppConfigure">;
660
568
  declare const doAppStop: _reduxjs_toolkit.ActionCreatorWithoutPayload<"app/doAppStop">;
661
- declare const doAppReset: _reduxjs_toolkit.ActionCreatorWithoutPayload<"app/doAppReset">;
662
- declare const doAppStart: _reduxjs_toolkit.ActionCreatorWithoutPayload<"app/doAppStart">;
569
+ declare const doAppStart: _reduxjs_toolkit.ActionCreatorWithPayload<AppConfig, "app/doAppStart">;
663
570
  declare const selectAppRaw: (state: RootState) => AppState;
664
571
  declare const selectAppIsActive: (state: RootState) => boolean;
665
572
  declare const selectAppRoomName: (state: RootState) => string | null;
@@ -669,46 +576,6 @@ declare const selectAppUserAgent: (state: RootState) => string | null;
669
576
  declare const selectAppExternalId: (state: RootState) => string | null;
670
577
  declare const selectAppIsNodeSdk: (state: RootState) => boolean;
671
578
  declare const selectAppInitialConfig: (state: RootState) => AppConfig | undefined;
672
- declare const selectAppIsLoaded: (state: RootState) => boolean;
673
- declare const selectShouldReloadApp: ((state: {
674
- app: AppState;
675
- authorization: AuthorizationState;
676
- chat: ChatState;
677
- cloudRecording: CloudRecordingState;
678
- deviceCredentials: DeviceCredentialsState;
679
- localMedia: LocalMediaState;
680
- localParticipant: LocalParticipantState;
681
- localScreenshare: LocalScreenshareState;
682
- organization: OrganizationState;
683
- remoteParticipants: RemoteParticipantState;
684
- room: RoomState;
685
- roomConnection: RoomConnectionState;
686
- rtcAnalytics: rtcAnalyticsState;
687
- rtcConnection: RtcConnectionState;
688
- signalConnection: SignalConnectionState;
689
- streaming: StreamingState;
690
- waitingParticipants: WaitingParticipantsState;
691
- }) => false | AppConfig | undefined) & {
692
- clearCache: () => void;
693
- resultsCount: () => number;
694
- resetResultsCount: () => void;
695
- } & {
696
- resultFunc: (resultFuncArgs_0: boolean, resultFuncArgs_1: AppConfig | undefined) => false | AppConfig | undefined;
697
- memoizedResultFunc: ((resultFuncArgs_0: boolean, resultFuncArgs_1: AppConfig | undefined) => false | AppConfig | undefined) & {
698
- clearCache: () => void;
699
- resultsCount: () => number;
700
- resetResultsCount: () => void;
701
- };
702
- lastResult: () => false | AppConfig | undefined;
703
- dependencies: [(state: RootState) => boolean, (state: RootState) => AppConfig | undefined];
704
- recomputations: () => number;
705
- resetRecomputations: () => void;
706
- dependencyRecomputations: () => number;
707
- resetDependencyRecomputations: () => void;
708
- } & {
709
- argsMemoize: typeof reselect.weakMapMemoize;
710
- memoize: typeof reselect.weakMapMemoize;
711
- };
712
579
 
713
580
  interface AuthorizationState {
714
581
  roomKey: string | null;
@@ -5934,4 +5801,4 @@ declare function parseRoomUrlAndSubdomain(roomAttribute?: string, subdomainAttri
5934
5801
 
5935
5802
  declare function parseUnverifiedRoomKeyData(roomKey: string): any;
5936
5803
 
5937
- export { ApiClient, type AppDispatch, type AppReducer, type AppStartListening, type AppState, type AppThunk, type AuthorizationState, type ChatMessage, type ChatState, type CloudRecordingState, type ConnectionStatus, Credentials, CredentialsService, type DeviceCredentialsState, type LocalMediaOptions, type LocalMediaState, LocalParticipant, type LocalParticipantState, type LocalScreenshareState, OrganizationApiClient, OrganizationService, OrganizationServiceCache, type OrganizationState, type RemoteParticipant, type RemoteParticipantData, type RemoteParticipantState, type RoomConnectionState, RoomService, type RoomState, type RootState, type RtcConnectionState, type Screenshare, type SignalConnectionState, type Store, type StreamState, type StreamingState, type ThunkConfig, type WaitingParticipant, type WaitingParticipantsState, addAppListener, appSlice, authorizationSlice, chatSlice, cloudRecordingSlice, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createReactor, createServices, createStore, createWebRtcEmitter, debounce, deviceBusy, deviceCredentialsSlice, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppConfigure, doAppReset, doAppStart, doAppStop, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRequestAudioEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSetDevice, doSetDisplayName, doSetLocalParticipant, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doStartCloudRecording, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, getAudioTrack, getFakeMediaStream, getVideoTrack, initialCloudRecordingState, initialLocalMediaState, isAcceptingStreams, listenerMiddleware, localMediaSlice, localMediaStopped, localParticipantSlice, localScreenshareSlice, localStreamMetadataUpdated, observeStore, organizationSlice, parseRoomUrlAndSubdomain, parseUnverifiedRoomKeyData, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, resolutionReported, roomConnectionSlice, roomSlice, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, type rtcAnalyticsState, rtcConnectionSlice, rtcDisconnected, rtcDispatcherCreated, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAppDisplayName, selectAppExternalId, selectAppInitialConfig, selectAppIsActive, selectAppIsLoaded, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAuthorizationRoleName, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsCameraEnabled, selectIsCloudRecording, selectIsLocalMediaStarting, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantClientClaim, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectOrganizationId, selectOrganizationRaw, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldReloadApp, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, startAppListening, stopScreenshare, streamStatusUpdated, streamingSlice, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, updateReportedValues, waitingParticipantsSlice };
5804
+ export { ApiClient, type AppConfig, type AppDispatch, type AppReducer, type AppStartListening, type AppState, type AppThunk, type AuthorizationState, type ChatMessage, type ChatState, type CloudRecordingState, type ConnectionStatus, Credentials, CredentialsService, type DeviceCredentialsState, type LocalMediaOptions, type LocalMediaState, LocalParticipant, type LocalParticipantState, type LocalScreenshareState, OrganizationApiClient, OrganizationService, OrganizationServiceCache, type OrganizationState, type RemoteParticipant, type RemoteParticipantData, type RemoteParticipantState, type RoomConnectionState, RoomService, type RoomState, type RootState, type RtcConnectionState, type Screenshare, type SignalConnectionState, type Store, type StreamState, type StreamingState, type ThunkConfig, type WaitingParticipant, type WaitingParticipantsState, addAppListener, appSlice, authorizationSlice, chatSlice, cloudRecordingSlice, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createReactor, createServices, createStore, createWebRtcEmitter, debounce, deviceBusy, deviceCredentialsSlice, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRequestAudioEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSetDevice, doSetDisplayName, doSetLocalParticipant, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doStartCloudRecording, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, getAudioTrack, getFakeMediaStream, getVideoTrack, initialCloudRecordingState, initialLocalMediaState, isAcceptingStreams, listenerMiddleware, localMediaSlice, localMediaStopped, localParticipantSlice, localScreenshareSlice, localStreamMetadataUpdated, observeStore, organizationSlice, parseRoomUrlAndSubdomain, parseUnverifiedRoomKeyData, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, resolutionReported, roomConnectionSlice, roomSlice, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, type rtcAnalyticsState, rtcConnectionSlice, rtcDisconnected, rtcDispatcherCreated, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAppDisplayName, selectAppExternalId, selectAppInitialConfig, selectAppIsActive, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAuthorizationRoleName, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsCameraEnabled, selectIsCloudRecording, selectIsLocalMediaStarting, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantClientClaim, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectOrganizationId, selectOrganizationRaw, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, startAppListening, stopScreenshare, streamStatusUpdated, streamingSlice, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, updateReportedValues, waitingParticipantsSlice };
package/dist/index.d.mts CHANGED
@@ -481,10 +481,9 @@ interface AppState {
481
481
  userAgent: string | null;
482
482
  externalId: string | null;
483
483
  initialConfig?: AppConfig;
484
- isLoaded: boolean;
485
484
  }
486
485
  declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
487
- doAppConfigure: (state: {
486
+ doAppStart: (state: {
488
487
  isNodeSdk: boolean;
489
488
  isActive: boolean;
490
489
  roomUrl: string | null;
@@ -504,7 +503,6 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
504
503
  userAgent?: string | undefined;
505
504
  externalId: string | null;
506
505
  } | undefined;
507
- isLoaded: boolean;
508
506
  }, action: PayloadAction<AppConfig>) => {
509
507
  roomName: string;
510
508
  initialConfig: {
@@ -516,7 +514,7 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
516
514
  userAgent?: string | undefined;
517
515
  externalId: string | null;
518
516
  };
519
- isLoaded: true;
517
+ isActive: true;
520
518
  isNodeSdk: boolean;
521
519
  displayName: string;
522
520
  localMediaOptions?: LocalMediaOptions | undefined;
@@ -524,50 +522,6 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
524
522
  roomUrl: string;
525
523
  userAgent: string | null;
526
524
  externalId: string | null;
527
- isActive: boolean;
528
- };
529
- doAppStart: (state: {
530
- isNodeSdk: boolean;
531
- isActive: boolean;
532
- roomUrl: string | null;
533
- roomName: string | null;
534
- displayName: string | null;
535
- userAgent: string | null;
536
- externalId: string | null;
537
- initialConfig?: {
538
- isNodeSdk?: boolean | undefined;
539
- displayName: string;
540
- localMediaOptions?: {
541
- audio: boolean;
542
- video: boolean;
543
- } | undefined;
544
- roomKey: string | null;
545
- roomUrl: string;
546
- userAgent?: string | undefined;
547
- externalId: string | null;
548
- } | undefined;
549
- isLoaded: boolean;
550
- }) => {
551
- isActive: true;
552
- isNodeSdk: boolean;
553
- roomUrl: string | null;
554
- roomName: string | null;
555
- displayName: string | null;
556
- userAgent: string | null;
557
- externalId: string | null;
558
- initialConfig?: {
559
- isNodeSdk?: boolean | undefined;
560
- displayName: string;
561
- localMediaOptions?: {
562
- audio: boolean;
563
- video: boolean;
564
- } | undefined;
565
- roomKey: string | null;
566
- roomUrl: string;
567
- userAgent?: string | undefined;
568
- externalId: string | null;
569
- } | undefined;
570
- isLoaded: boolean;
571
525
  };
572
526
  doAppStop: (state: {
573
527
  isNodeSdk: boolean;
@@ -589,7 +543,6 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
589
543
  userAgent?: string | undefined;
590
544
  externalId: string | null;
591
545
  } | undefined;
592
- isLoaded: boolean;
593
546
  }) => {
594
547
  isActive: false;
595
548
  isNodeSdk: boolean;
@@ -610,56 +563,10 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
610
563
  userAgent?: string | undefined;
611
564
  externalId: string | null;
612
565
  } | undefined;
613
- isLoaded: boolean;
614
- };
615
- doAppReset: (state: {
616
- isNodeSdk: boolean;
617
- isActive: boolean;
618
- roomUrl: string | null;
619
- roomName: string | null;
620
- displayName: string | null;
621
- userAgent: string | null;
622
- externalId: string | null;
623
- initialConfig?: {
624
- isNodeSdk?: boolean | undefined;
625
- displayName: string;
626
- localMediaOptions?: {
627
- audio: boolean;
628
- video: boolean;
629
- } | undefined;
630
- roomKey: string | null;
631
- roomUrl: string;
632
- userAgent?: string | undefined;
633
- externalId: string | null;
634
- } | undefined;
635
- isLoaded: boolean;
636
- }) => {
637
- isLoaded: false;
638
- isNodeSdk: boolean;
639
- isActive: boolean;
640
- roomUrl: string | null;
641
- roomName: string | null;
642
- displayName: string | null;
643
- userAgent: string | null;
644
- externalId: string | null;
645
- initialConfig?: {
646
- isNodeSdk?: boolean | undefined;
647
- displayName: string;
648
- localMediaOptions?: {
649
- audio: boolean;
650
- video: boolean;
651
- } | undefined;
652
- roomKey: string | null;
653
- roomUrl: string;
654
- userAgent?: string | undefined;
655
- externalId: string | null;
656
- } | undefined;
657
566
  };
658
567
  }, "app", "app", _reduxjs_toolkit.SliceSelectors<AppState>>;
659
- declare const doAppConfigure: _reduxjs_toolkit.ActionCreatorWithPayload<AppConfig, "app/doAppConfigure">;
660
568
  declare const doAppStop: _reduxjs_toolkit.ActionCreatorWithoutPayload<"app/doAppStop">;
661
- declare const doAppReset: _reduxjs_toolkit.ActionCreatorWithoutPayload<"app/doAppReset">;
662
- declare const doAppStart: _reduxjs_toolkit.ActionCreatorWithoutPayload<"app/doAppStart">;
569
+ declare const doAppStart: _reduxjs_toolkit.ActionCreatorWithPayload<AppConfig, "app/doAppStart">;
663
570
  declare const selectAppRaw: (state: RootState) => AppState;
664
571
  declare const selectAppIsActive: (state: RootState) => boolean;
665
572
  declare const selectAppRoomName: (state: RootState) => string | null;
@@ -669,46 +576,6 @@ declare const selectAppUserAgent: (state: RootState) => string | null;
669
576
  declare const selectAppExternalId: (state: RootState) => string | null;
670
577
  declare const selectAppIsNodeSdk: (state: RootState) => boolean;
671
578
  declare const selectAppInitialConfig: (state: RootState) => AppConfig | undefined;
672
- declare const selectAppIsLoaded: (state: RootState) => boolean;
673
- declare const selectShouldReloadApp: ((state: {
674
- app: AppState;
675
- authorization: AuthorizationState;
676
- chat: ChatState;
677
- cloudRecording: CloudRecordingState;
678
- deviceCredentials: DeviceCredentialsState;
679
- localMedia: LocalMediaState;
680
- localParticipant: LocalParticipantState;
681
- localScreenshare: LocalScreenshareState;
682
- organization: OrganizationState;
683
- remoteParticipants: RemoteParticipantState;
684
- room: RoomState;
685
- roomConnection: RoomConnectionState;
686
- rtcAnalytics: rtcAnalyticsState;
687
- rtcConnection: RtcConnectionState;
688
- signalConnection: SignalConnectionState;
689
- streaming: StreamingState;
690
- waitingParticipants: WaitingParticipantsState;
691
- }) => false | AppConfig | undefined) & {
692
- clearCache: () => void;
693
- resultsCount: () => number;
694
- resetResultsCount: () => void;
695
- } & {
696
- resultFunc: (resultFuncArgs_0: boolean, resultFuncArgs_1: AppConfig | undefined) => false | AppConfig | undefined;
697
- memoizedResultFunc: ((resultFuncArgs_0: boolean, resultFuncArgs_1: AppConfig | undefined) => false | AppConfig | undefined) & {
698
- clearCache: () => void;
699
- resultsCount: () => number;
700
- resetResultsCount: () => void;
701
- };
702
- lastResult: () => false | AppConfig | undefined;
703
- dependencies: [(state: RootState) => boolean, (state: RootState) => AppConfig | undefined];
704
- recomputations: () => number;
705
- resetRecomputations: () => void;
706
- dependencyRecomputations: () => number;
707
- resetDependencyRecomputations: () => void;
708
- } & {
709
- argsMemoize: typeof reselect.weakMapMemoize;
710
- memoize: typeof reselect.weakMapMemoize;
711
- };
712
579
 
713
580
  interface AuthorizationState {
714
581
  roomKey: string | null;
@@ -5934,4 +5801,4 @@ declare function parseRoomUrlAndSubdomain(roomAttribute?: string, subdomainAttri
5934
5801
 
5935
5802
  declare function parseUnverifiedRoomKeyData(roomKey: string): any;
5936
5803
 
5937
- export { ApiClient, type AppDispatch, type AppReducer, type AppStartListening, type AppState, type AppThunk, type AuthorizationState, type ChatMessage, type ChatState, type CloudRecordingState, type ConnectionStatus, Credentials, CredentialsService, type DeviceCredentialsState, type LocalMediaOptions, type LocalMediaState, LocalParticipant, type LocalParticipantState, type LocalScreenshareState, OrganizationApiClient, OrganizationService, OrganizationServiceCache, type OrganizationState, type RemoteParticipant, type RemoteParticipantData, type RemoteParticipantState, type RoomConnectionState, RoomService, type RoomState, type RootState, type RtcConnectionState, type Screenshare, type SignalConnectionState, type Store, type StreamState, type StreamingState, type ThunkConfig, type WaitingParticipant, type WaitingParticipantsState, addAppListener, appSlice, authorizationSlice, chatSlice, cloudRecordingSlice, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createReactor, createServices, createStore, createWebRtcEmitter, debounce, deviceBusy, deviceCredentialsSlice, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppConfigure, doAppReset, doAppStart, doAppStop, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRequestAudioEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSetDevice, doSetDisplayName, doSetLocalParticipant, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doStartCloudRecording, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, getAudioTrack, getFakeMediaStream, getVideoTrack, initialCloudRecordingState, initialLocalMediaState, isAcceptingStreams, listenerMiddleware, localMediaSlice, localMediaStopped, localParticipantSlice, localScreenshareSlice, localStreamMetadataUpdated, observeStore, organizationSlice, parseRoomUrlAndSubdomain, parseUnverifiedRoomKeyData, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, resolutionReported, roomConnectionSlice, roomSlice, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, type rtcAnalyticsState, rtcConnectionSlice, rtcDisconnected, rtcDispatcherCreated, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAppDisplayName, selectAppExternalId, selectAppInitialConfig, selectAppIsActive, selectAppIsLoaded, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAuthorizationRoleName, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsCameraEnabled, selectIsCloudRecording, selectIsLocalMediaStarting, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantClientClaim, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectOrganizationId, selectOrganizationRaw, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldReloadApp, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, startAppListening, stopScreenshare, streamStatusUpdated, streamingSlice, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, updateReportedValues, waitingParticipantsSlice };
5804
+ export { ApiClient, type AppConfig, type AppDispatch, type AppReducer, type AppStartListening, type AppState, type AppThunk, type AuthorizationState, type ChatMessage, type ChatState, type CloudRecordingState, type ConnectionStatus, Credentials, CredentialsService, type DeviceCredentialsState, type LocalMediaOptions, type LocalMediaState, LocalParticipant, type LocalParticipantState, type LocalScreenshareState, OrganizationApiClient, OrganizationService, OrganizationServiceCache, type OrganizationState, type RemoteParticipant, type RemoteParticipantData, type RemoteParticipantState, type RoomConnectionState, RoomService, type RoomState, type RootState, type RtcConnectionState, type Screenshare, type SignalConnectionState, type Store, type StreamState, type StreamingState, type ThunkConfig, type WaitingParticipant, type WaitingParticipantsState, addAppListener, appSlice, authorizationSlice, chatSlice, cloudRecordingSlice, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createReactor, createServices, createStore, createWebRtcEmitter, debounce, deviceBusy, deviceCredentialsSlice, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRequestAudioEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSetDevice, doSetDisplayName, doSetLocalParticipant, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doStartCloudRecording, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, getAudioTrack, getFakeMediaStream, getVideoTrack, initialCloudRecordingState, initialLocalMediaState, isAcceptingStreams, listenerMiddleware, localMediaSlice, localMediaStopped, localParticipantSlice, localScreenshareSlice, localStreamMetadataUpdated, observeStore, organizationSlice, parseRoomUrlAndSubdomain, parseUnverifiedRoomKeyData, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, resolutionReported, roomConnectionSlice, roomSlice, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, type rtcAnalyticsState, rtcConnectionSlice, rtcDisconnected, rtcDispatcherCreated, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAppDisplayName, selectAppExternalId, selectAppInitialConfig, selectAppIsActive, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAuthorizationRoleName, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsCameraEnabled, selectIsCloudRecording, selectIsLocalMediaStarting, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantClientClaim, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectOrganizationId, selectOrganizationRaw, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, startAppListening, stopScreenshare, streamStatusUpdated, streamingSlice, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, updateReportedValues, waitingParticipantsSlice };
package/dist/index.d.ts CHANGED
@@ -481,10 +481,9 @@ interface AppState {
481
481
  userAgent: string | null;
482
482
  externalId: string | null;
483
483
  initialConfig?: AppConfig;
484
- isLoaded: boolean;
485
484
  }
486
485
  declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
487
- doAppConfigure: (state: {
486
+ doAppStart: (state: {
488
487
  isNodeSdk: boolean;
489
488
  isActive: boolean;
490
489
  roomUrl: string | null;
@@ -504,7 +503,6 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
504
503
  userAgent?: string | undefined;
505
504
  externalId: string | null;
506
505
  } | undefined;
507
- isLoaded: boolean;
508
506
  }, action: PayloadAction<AppConfig>) => {
509
507
  roomName: string;
510
508
  initialConfig: {
@@ -516,7 +514,7 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
516
514
  userAgent?: string | undefined;
517
515
  externalId: string | null;
518
516
  };
519
- isLoaded: true;
517
+ isActive: true;
520
518
  isNodeSdk: boolean;
521
519
  displayName: string;
522
520
  localMediaOptions?: LocalMediaOptions | undefined;
@@ -524,50 +522,6 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
524
522
  roomUrl: string;
525
523
  userAgent: string | null;
526
524
  externalId: string | null;
527
- isActive: boolean;
528
- };
529
- doAppStart: (state: {
530
- isNodeSdk: boolean;
531
- isActive: boolean;
532
- roomUrl: string | null;
533
- roomName: string | null;
534
- displayName: string | null;
535
- userAgent: string | null;
536
- externalId: string | null;
537
- initialConfig?: {
538
- isNodeSdk?: boolean | undefined;
539
- displayName: string;
540
- localMediaOptions?: {
541
- audio: boolean;
542
- video: boolean;
543
- } | undefined;
544
- roomKey: string | null;
545
- roomUrl: string;
546
- userAgent?: string | undefined;
547
- externalId: string | null;
548
- } | undefined;
549
- isLoaded: boolean;
550
- }) => {
551
- isActive: true;
552
- isNodeSdk: boolean;
553
- roomUrl: string | null;
554
- roomName: string | null;
555
- displayName: string | null;
556
- userAgent: string | null;
557
- externalId: string | null;
558
- initialConfig?: {
559
- isNodeSdk?: boolean | undefined;
560
- displayName: string;
561
- localMediaOptions?: {
562
- audio: boolean;
563
- video: boolean;
564
- } | undefined;
565
- roomKey: string | null;
566
- roomUrl: string;
567
- userAgent?: string | undefined;
568
- externalId: string | null;
569
- } | undefined;
570
- isLoaded: boolean;
571
525
  };
572
526
  doAppStop: (state: {
573
527
  isNodeSdk: boolean;
@@ -589,7 +543,6 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
589
543
  userAgent?: string | undefined;
590
544
  externalId: string | null;
591
545
  } | undefined;
592
- isLoaded: boolean;
593
546
  }) => {
594
547
  isActive: false;
595
548
  isNodeSdk: boolean;
@@ -610,56 +563,10 @@ declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
610
563
  userAgent?: string | undefined;
611
564
  externalId: string | null;
612
565
  } | undefined;
613
- isLoaded: boolean;
614
- };
615
- doAppReset: (state: {
616
- isNodeSdk: boolean;
617
- isActive: boolean;
618
- roomUrl: string | null;
619
- roomName: string | null;
620
- displayName: string | null;
621
- userAgent: string | null;
622
- externalId: string | null;
623
- initialConfig?: {
624
- isNodeSdk?: boolean | undefined;
625
- displayName: string;
626
- localMediaOptions?: {
627
- audio: boolean;
628
- video: boolean;
629
- } | undefined;
630
- roomKey: string | null;
631
- roomUrl: string;
632
- userAgent?: string | undefined;
633
- externalId: string | null;
634
- } | undefined;
635
- isLoaded: boolean;
636
- }) => {
637
- isLoaded: false;
638
- isNodeSdk: boolean;
639
- isActive: boolean;
640
- roomUrl: string | null;
641
- roomName: string | null;
642
- displayName: string | null;
643
- userAgent: string | null;
644
- externalId: string | null;
645
- initialConfig?: {
646
- isNodeSdk?: boolean | undefined;
647
- displayName: string;
648
- localMediaOptions?: {
649
- audio: boolean;
650
- video: boolean;
651
- } | undefined;
652
- roomKey: string | null;
653
- roomUrl: string;
654
- userAgent?: string | undefined;
655
- externalId: string | null;
656
- } | undefined;
657
566
  };
658
567
  }, "app", "app", _reduxjs_toolkit.SliceSelectors<AppState>>;
659
- declare const doAppConfigure: _reduxjs_toolkit.ActionCreatorWithPayload<AppConfig, "app/doAppConfigure">;
660
568
  declare const doAppStop: _reduxjs_toolkit.ActionCreatorWithoutPayload<"app/doAppStop">;
661
- declare const doAppReset: _reduxjs_toolkit.ActionCreatorWithoutPayload<"app/doAppReset">;
662
- declare const doAppStart: _reduxjs_toolkit.ActionCreatorWithoutPayload<"app/doAppStart">;
569
+ declare const doAppStart: _reduxjs_toolkit.ActionCreatorWithPayload<AppConfig, "app/doAppStart">;
663
570
  declare const selectAppRaw: (state: RootState) => AppState;
664
571
  declare const selectAppIsActive: (state: RootState) => boolean;
665
572
  declare const selectAppRoomName: (state: RootState) => string | null;
@@ -669,46 +576,6 @@ declare const selectAppUserAgent: (state: RootState) => string | null;
669
576
  declare const selectAppExternalId: (state: RootState) => string | null;
670
577
  declare const selectAppIsNodeSdk: (state: RootState) => boolean;
671
578
  declare const selectAppInitialConfig: (state: RootState) => AppConfig | undefined;
672
- declare const selectAppIsLoaded: (state: RootState) => boolean;
673
- declare const selectShouldReloadApp: ((state: {
674
- app: AppState;
675
- authorization: AuthorizationState;
676
- chat: ChatState;
677
- cloudRecording: CloudRecordingState;
678
- deviceCredentials: DeviceCredentialsState;
679
- localMedia: LocalMediaState;
680
- localParticipant: LocalParticipantState;
681
- localScreenshare: LocalScreenshareState;
682
- organization: OrganizationState;
683
- remoteParticipants: RemoteParticipantState;
684
- room: RoomState;
685
- roomConnection: RoomConnectionState;
686
- rtcAnalytics: rtcAnalyticsState;
687
- rtcConnection: RtcConnectionState;
688
- signalConnection: SignalConnectionState;
689
- streaming: StreamingState;
690
- waitingParticipants: WaitingParticipantsState;
691
- }) => false | AppConfig | undefined) & {
692
- clearCache: () => void;
693
- resultsCount: () => number;
694
- resetResultsCount: () => void;
695
- } & {
696
- resultFunc: (resultFuncArgs_0: boolean, resultFuncArgs_1: AppConfig | undefined) => false | AppConfig | undefined;
697
- memoizedResultFunc: ((resultFuncArgs_0: boolean, resultFuncArgs_1: AppConfig | undefined) => false | AppConfig | undefined) & {
698
- clearCache: () => void;
699
- resultsCount: () => number;
700
- resetResultsCount: () => void;
701
- };
702
- lastResult: () => false | AppConfig | undefined;
703
- dependencies: [(state: RootState) => boolean, (state: RootState) => AppConfig | undefined];
704
- recomputations: () => number;
705
- resetRecomputations: () => void;
706
- dependencyRecomputations: () => number;
707
- resetDependencyRecomputations: () => void;
708
- } & {
709
- argsMemoize: typeof reselect.weakMapMemoize;
710
- memoize: typeof reselect.weakMapMemoize;
711
- };
712
579
 
713
580
  interface AuthorizationState {
714
581
  roomKey: string | null;
@@ -5934,4 +5801,4 @@ declare function parseRoomUrlAndSubdomain(roomAttribute?: string, subdomainAttri
5934
5801
 
5935
5802
  declare function parseUnverifiedRoomKeyData(roomKey: string): any;
5936
5803
 
5937
- export { ApiClient, type AppDispatch, type AppReducer, type AppStartListening, type AppState, type AppThunk, type AuthorizationState, type ChatMessage, type ChatState, type CloudRecordingState, type ConnectionStatus, Credentials, CredentialsService, type DeviceCredentialsState, type LocalMediaOptions, type LocalMediaState, LocalParticipant, type LocalParticipantState, type LocalScreenshareState, OrganizationApiClient, OrganizationService, OrganizationServiceCache, type OrganizationState, type RemoteParticipant, type RemoteParticipantData, type RemoteParticipantState, type RoomConnectionState, RoomService, type RoomState, type RootState, type RtcConnectionState, type Screenshare, type SignalConnectionState, type Store, type StreamState, type StreamingState, type ThunkConfig, type WaitingParticipant, type WaitingParticipantsState, addAppListener, appSlice, authorizationSlice, chatSlice, cloudRecordingSlice, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createReactor, createServices, createStore, createWebRtcEmitter, debounce, deviceBusy, deviceCredentialsSlice, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppConfigure, doAppReset, doAppStart, doAppStop, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRequestAudioEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSetDevice, doSetDisplayName, doSetLocalParticipant, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doStartCloudRecording, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, getAudioTrack, getFakeMediaStream, getVideoTrack, initialCloudRecordingState, initialLocalMediaState, isAcceptingStreams, listenerMiddleware, localMediaSlice, localMediaStopped, localParticipantSlice, localScreenshareSlice, localStreamMetadataUpdated, observeStore, organizationSlice, parseRoomUrlAndSubdomain, parseUnverifiedRoomKeyData, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, resolutionReported, roomConnectionSlice, roomSlice, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, type rtcAnalyticsState, rtcConnectionSlice, rtcDisconnected, rtcDispatcherCreated, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAppDisplayName, selectAppExternalId, selectAppInitialConfig, selectAppIsActive, selectAppIsLoaded, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAuthorizationRoleName, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsCameraEnabled, selectIsCloudRecording, selectIsLocalMediaStarting, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantClientClaim, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectOrganizationId, selectOrganizationRaw, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldReloadApp, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, startAppListening, stopScreenshare, streamStatusUpdated, streamingSlice, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, updateReportedValues, waitingParticipantsSlice };
5804
+ export { ApiClient, type AppConfig, type AppDispatch, type AppReducer, type AppStartListening, type AppState, type AppThunk, type AuthorizationState, type ChatMessage, type ChatState, type CloudRecordingState, type ConnectionStatus, Credentials, CredentialsService, type DeviceCredentialsState, type LocalMediaOptions, type LocalMediaState, LocalParticipant, type LocalParticipantState, type LocalScreenshareState, OrganizationApiClient, OrganizationService, OrganizationServiceCache, type OrganizationState, type RemoteParticipant, type RemoteParticipantData, type RemoteParticipantState, type RoomConnectionState, RoomService, type RoomState, type RootState, type RtcConnectionState, type Screenshare, type SignalConnectionState, type Store, type StreamState, type StreamingState, type ThunkConfig, type WaitingParticipant, type WaitingParticipantsState, addAppListener, appSlice, authorizationSlice, chatSlice, cloudRecordingSlice, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createReactor, createServices, createStore, createWebRtcEmitter, debounce, deviceBusy, deviceCredentialsSlice, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRequestAudioEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSetDevice, doSetDisplayName, doSetLocalParticipant, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doStartCloudRecording, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, getAudioTrack, getFakeMediaStream, getVideoTrack, initialCloudRecordingState, initialLocalMediaState, isAcceptingStreams, listenerMiddleware, localMediaSlice, localMediaStopped, localParticipantSlice, localScreenshareSlice, localStreamMetadataUpdated, observeStore, organizationSlice, parseRoomUrlAndSubdomain, parseUnverifiedRoomKeyData, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, resolutionReported, roomConnectionSlice, roomSlice, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, type rtcAnalyticsState, rtcConnectionSlice, rtcDisconnected, rtcDispatcherCreated, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAppDisplayName, selectAppExternalId, selectAppInitialConfig, selectAppIsActive, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAuthorizationRoleName, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsCameraEnabled, selectIsCloudRecording, selectIsLocalMediaStarting, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantClientClaim, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectOrganizationId, selectOrganizationRaw, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, startAppListening, stopScreenshare, streamStatusUpdated, streamingSlice, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, updateReportedValues, waitingParticipantsSlice };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { createAsyncThunk, createListenerMiddleware, addListener, createSlice, createSelector, createAction, isAnyOf, combineReducers, configureStore } from '@reduxjs/toolkit';
1
+ import { createAsyncThunk, createListenerMiddleware, addListener, createSlice, createAction, createSelector, isAnyOf, combineReducers, configureStore } from '@reduxjs/toolkit';
2
2
  import { ServerSocket, getDeviceData, getStream, getUpdatedDevices, RtcManagerDispatcher, assert, fromLocation } from '@whereby.com/media';
3
3
  import { Chrome111 } from 'mediasoup-client/lib/handlers/Chrome111.js';
4
4
  import nodeBtoa from 'btoa';
@@ -43,7 +43,7 @@ const createReactor = (selectors, callback) => {
43
43
  });
44
44
  };
45
45
 
46
- const coreVersion = "0.15.0";
46
+ const coreVersion = "0.15.2";
47
47
 
48
48
  const initialState$e = {
49
49
  isNodeSdk: false,
@@ -53,28 +53,21 @@ const initialState$e = {
53
53
  displayName: null,
54
54
  userAgent: `core:${coreVersion}`,
55
55
  externalId: null,
56
- isLoaded: false,
57
56
  };
58
57
  const appSlice = createSlice({
59
58
  name: "app",
60
59
  initialState: initialState$e,
61
60
  reducers: {
62
- doAppConfigure: (state, action) => {
61
+ doAppStart: (state, action) => {
63
62
  const url = new URL(action.payload.roomUrl);
64
- return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: url.pathname, initialConfig: Object.assign({}, action.payload), isLoaded: true });
65
- },
66
- doAppStart: (state) => {
67
- return Object.assign(Object.assign({}, state), { isActive: true });
63
+ return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: url.pathname, initialConfig: Object.assign({}, action.payload), isActive: true });
68
64
  },
69
65
  doAppStop: (state) => {
70
66
  return Object.assign(Object.assign({}, state), { isActive: false });
71
67
  },
72
- doAppReset: (state) => {
73
- return Object.assign(Object.assign({}, state), { isLoaded: false });
74
- },
75
68
  },
76
69
  });
77
- const { doAppConfigure, doAppStop, doAppReset, doAppStart } = appSlice.actions;
70
+ const { doAppStop, doAppStart } = appSlice.actions;
78
71
  const selectAppRaw = (state) => state.app;
79
72
  const selectAppIsActive = (state) => state.app.isActive;
80
73
  const selectAppRoomName = (state) => state.app.roomName;
@@ -84,20 +77,6 @@ const selectAppUserAgent = (state) => state.app.userAgent;
84
77
  const selectAppExternalId = (state) => state.app.externalId;
85
78
  const selectAppIsNodeSdk = (state) => state.app.isNodeSdk;
86
79
  const selectAppInitialConfig = (state) => state.app.initialConfig;
87
- const selectAppIsLoaded = (state) => state.app.isLoaded;
88
- const selectShouldReloadApp = createSelector(selectAppIsLoaded, selectAppInitialConfig, (appIsLoaded, appInitialConfig) => {
89
- return !appIsLoaded && appInitialConfig;
90
- });
91
- startAppListening({
92
- actionCreator: doAppReset,
93
- effect: (_, { dispatch, getState }) => {
94
- const state = getState();
95
- const appInitialConfig = selectAppInitialConfig(state);
96
- if (appInitialConfig) {
97
- dispatch(doAppConfigure(appInitialConfig));
98
- }
99
- },
100
- });
101
80
 
102
81
  function createSignalEventAction(name) {
103
82
  return createAction(`signalConnection/event/${name}`);
@@ -145,7 +124,7 @@ const authorizationSlice = createSlice({
145
124
  },
146
125
  },
147
126
  extraReducers: (builder) => {
148
- builder.addCase(doAppConfigure, (state, action) => {
127
+ builder.addCase(doAppStart, (state, action) => {
149
128
  return Object.assign(Object.assign({}, state), { roomKey: action.payload.roomKey });
150
129
  });
151
130
  builder.addCase(signalEvents.roomJoined, (state, action) => {
@@ -354,9 +333,6 @@ const doSignalDisconnect = createAppThunk(() => (dispatch, getState) => {
354
333
  socket === null || socket === void 0 ? void 0 : socket.disconnect();
355
334
  dispatch(socketDisconnected());
356
335
  }
357
- else {
358
- doAppReset();
359
- }
360
336
  });
361
337
  const selectSignalConnectionRaw = (state) => state.signalConnection;
362
338
  const selectSignalIsIdentifyingDevice = (state) => state.signalConnection.isIdentifyingDevice;
@@ -397,12 +373,6 @@ startAppListening({
397
373
  dispatch(doSignalDisconnect());
398
374
  },
399
375
  });
400
- startAppListening({
401
- actionCreator: socketDisconnected,
402
- effect: (_, { dispatch }) => {
403
- dispatch(doAppReset());
404
- },
405
- });
406
376
 
407
377
  const initialState$a = {
408
378
  chatMessages: [],
@@ -677,7 +647,7 @@ const localMediaSlice = createSlice({
677
647
  },
678
648
  },
679
649
  extraReducers: (builder) => {
680
- builder.addCase(doAppConfigure, (state, action) => {
650
+ builder.addCase(doAppStart, (state, action) => {
681
651
  return Object.assign(Object.assign({}, state), { options: action.payload.localMediaOptions });
682
652
  });
683
653
  builder.addCase(doSetDevice.pending, (state, action) => {
@@ -1104,7 +1074,7 @@ const localParticipantSlice = createSlice({
1104
1074
  },
1105
1075
  },
1106
1076
  extraReducers: (builder) => {
1107
- builder.addCase(doAppConfigure, (state, action) => {
1077
+ builder.addCase(doAppStart, (state, action) => {
1108
1078
  return Object.assign(Object.assign({}, state), { displayName: action.payload.displayName });
1109
1079
  });
1110
1080
  builder.addCase(doEnableAudio.fulfilled, (state, action) => {
@@ -1440,7 +1410,12 @@ const remoteParticipantsSlice = createSlice({
1440
1410
  });
1441
1411
  });
1442
1412
  builder.addCase(signalEvents.clientMetadataReceived, (state, action) => {
1443
- const { clientId, displayName } = action.payload.payload;
1413
+ const { error, payload } = action.payload;
1414
+ if (error || !payload) {
1415
+ console.warn(error || "Client metadata error received");
1416
+ return state;
1417
+ }
1418
+ const { clientId, displayName } = payload;
1444
1419
  return updateParticipant(state, clientId, {
1445
1420
  displayName,
1446
1421
  });
@@ -1558,6 +1533,9 @@ const roomConnectionSlice = createSlice({
1558
1533
  return Object.assign(Object.assign({}, state), { status: "connected", session: (_b = (_a = action.payload.room) === null || _a === void 0 ? void 0 : _a.session) !== null && _b !== void 0 ? _b : null });
1559
1534
  });
1560
1535
  builder.addCase(signalEvents.disconnect, (state) => {
1536
+ if (["kicked", "left"].includes(state.status)) {
1537
+ return Object.assign({}, state);
1538
+ }
1561
1539
  return Object.assign(Object.assign({}, state), { status: "disconnected" });
1562
1540
  });
1563
1541
  builder.addCase(signalEvents.newClient, (state, action) => {
@@ -2258,7 +2236,7 @@ const appReducer = combineReducers({
2258
2236
  });
2259
2237
  const rootReducer = (state, action) => {
2260
2238
  var _a;
2261
- if (doAppReset.match(action)) {
2239
+ if (doAppStart.match(action)) {
2262
2240
  const resetState = {
2263
2241
  app: Object.assign(Object.assign({}, appSlice.getInitialState()), { initialConfig: (_a = state === null || state === void 0 ? void 0 : state.app) === null || _a === void 0 ? void 0 : _a.initialConfig }),
2264
2242
  localMedia: Object.assign(Object.assign({}, localMediaSlice.getInitialState()), state === null || state === void 0 ? void 0 : state.localMedia),
@@ -3301,4 +3279,4 @@ function createServices() {
3301
3279
  };
3302
3280
  }
3303
3281
 
3304
- export { ApiClient, Credentials, CredentialsService, LocalParticipant, OrganizationApiClient, OrganizationService, OrganizationServiceCache, RoomService, addAppListener, appSlice, authorizationSlice, chatSlice, cloudRecordingSlice, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createReactor, createServices, createStore, createWebRtcEmitter, debounce, deviceBusy, deviceCredentialsSlice, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppConfigure, doAppReset, doAppStart, doAppStop, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRequestAudioEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSetDevice, doSetDisplayName, doSetLocalParticipant, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doStartCloudRecording, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, getAudioTrack, getFakeMediaStream, getVideoTrack, initialCloudRecordingState, initialLocalMediaState, isAcceptingStreams, listenerMiddleware, localMediaSlice, localMediaStopped, localParticipantSlice, localScreenshareSlice, localStreamMetadataUpdated, observeStore, organizationSlice, parseRoomUrlAndSubdomain, parseUnverifiedRoomKeyData, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, resolutionReported, roomConnectionSlice, roomSlice, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcConnectionSlice, rtcDisconnected, rtcDispatcherCreated, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAppDisplayName, selectAppExternalId, selectAppInitialConfig, selectAppIsActive, selectAppIsLoaded, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAuthorizationRoleName, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsCameraEnabled, selectIsCloudRecording, selectIsLocalMediaStarting, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantClientClaim, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectOrganizationId, selectOrganizationRaw, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldReloadApp, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, startAppListening, stopScreenshare, streamStatusUpdated, streamingSlice, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, updateReportedValues, waitingParticipantsSlice };
3282
+ export { ApiClient, Credentials, CredentialsService, LocalParticipant, OrganizationApiClient, OrganizationService, OrganizationServiceCache, RoomService, addAppListener, appSlice, authorizationSlice, chatSlice, cloudRecordingSlice, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createReactor, createServices, createStore, createWebRtcEmitter, debounce, deviceBusy, deviceCredentialsSlice, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRequestAudioEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSetDevice, doSetDisplayName, doSetLocalParticipant, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doStartCloudRecording, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, getAudioTrack, getFakeMediaStream, getVideoTrack, initialCloudRecordingState, initialLocalMediaState, isAcceptingStreams, listenerMiddleware, localMediaSlice, localMediaStopped, localParticipantSlice, localScreenshareSlice, localStreamMetadataUpdated, observeStore, organizationSlice, parseRoomUrlAndSubdomain, parseUnverifiedRoomKeyData, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, resolutionReported, roomConnectionSlice, roomSlice, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcConnectionSlice, rtcDisconnected, rtcDispatcherCreated, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAppDisplayName, selectAppExternalId, selectAppInitialConfig, selectAppIsActive, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAuthorizationRoleName, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsCameraEnabled, selectIsCloudRecording, selectIsLocalMediaStarting, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantClientClaim, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectOrganizationId, selectOrganizationRaw, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, startAppListening, stopScreenshare, streamStatusUpdated, streamingSlice, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, updateReportedValues, waitingParticipantsSlice };
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": "0.15.0",
5
+ "version": "0.15.2",
6
6
  "license": "MIT",
7
7
  "scripts": {
8
8
  "build": "rimraf dist && rollup -c rollup.config.js",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@reduxjs/toolkit": "^2.2.3",
53
- "@whereby.com/media": "1.4.0",
53
+ "@whereby.com/media": "1.4.1",
54
54
  "axios": "^1.2.3",
55
55
  "btoa": "^1.2.1",
56
56
  "events": "^3.3.0"