@whereby.com/core 1.0.1 → 1.1.0

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
@@ -1147,7 +1147,7 @@ const createReactor = (selectors, callback) => {
1147
1147
  });
1148
1148
  };
1149
1149
 
1150
- const coreVersion = "1.0.1";
1150
+ const coreVersion = "1.1.0";
1151
1151
 
1152
1152
  const initialState = {
1153
1153
  isNodeSdk: false,
@@ -2177,6 +2177,7 @@ const doSendChatMessage = createRoomConnectedThunk((payload) => (_, getState) =>
2177
2177
  const selectChatMessages = (state) => state.chat.chatMessages;
2178
2178
 
2179
2179
  const initialCloudRecordingState = {
2180
+ isInitiator: false,
2180
2181
  isRecording: false,
2181
2182
  error: null,
2182
2183
  startedAt: undefined,
@@ -2186,19 +2187,19 @@ const cloudRecordingSlice = toolkit.createSlice({
2186
2187
  initialState: initialCloudRecordingState,
2187
2188
  reducers: {
2188
2189
  recordingRequestStarted: (state) => {
2189
- return Object.assign(Object.assign({}, state), { status: "requested" });
2190
+ return Object.assign(Object.assign({}, state), { isInitiator: true, status: "requested" });
2190
2191
  },
2191
2192
  },
2192
2193
  extraReducers: (builder) => {
2193
2194
  builder.addCase(signalEvents.cloudRecordingStopped, (state) => {
2194
- return Object.assign(Object.assign({}, state), { isRecording: false, status: undefined });
2195
+ return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: undefined });
2195
2196
  });
2196
2197
  builder.addCase(signalEvents.cloudRecordingStarted, (state, action) => {
2197
2198
  const { payload } = action;
2198
2199
  if (!payload.error) {
2199
2200
  return state;
2200
2201
  }
2201
- return Object.assign(Object.assign({}, state), { isRecording: false, status: "error", error: payload.error });
2202
+ return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: "error", error: payload.error });
2202
2203
  });
2203
2204
  builder.addCase(signalEvents.newClient, (state, { payload }) => {
2204
2205
  var _a;
@@ -2232,6 +2233,8 @@ const doStopCloudRecording = createRoomConnectedThunk(() => (dispatch, getState)
2232
2233
  });
2233
2234
  const selectCloudRecordingRaw = (state) => state.cloudRecording;
2234
2235
  const selectCloudRecordingStatus = (state) => state.cloudRecording.status;
2236
+ const selectIsCloudRecording = (state) => state.cloudRecording.isRecording;
2237
+ const selectCloudRecordingIsInitiator = (state) => state.cloudRecording.isInitiator;
2235
2238
 
2236
2239
  const selectRoomConnectionSessionId = (state) => { var _a; return (_a = state.roomConnection.session) === null || _a === void 0 ? void 0 : _a.id; };
2237
2240
  const selectRoomConnectionStatus = (state) => state.roomConnection.status;
@@ -3771,20 +3774,23 @@ startAppListening({
3771
3774
  },
3772
3775
  });
3773
3776
 
3777
+ function createRtcAnalyticsCustomEvent(parameters) {
3778
+ return parameters;
3779
+ }
3774
3780
  const rtcAnalyticsCustomEvents = {
3775
- audioEnabled: {
3781
+ audioEnabled: createRtcAnalyticsCustomEvent({
3776
3782
  actions: [doEnableAudio.fulfilled],
3777
3783
  rtcEventName: "audioEnabled",
3778
3784
  getValue: (state) => selectIsMicrophoneEnabled(state),
3779
3785
  getOutput: (value) => ({ enabled: value }),
3780
- },
3781
- videoEnabled: {
3786
+ }),
3787
+ videoEnabled: createRtcAnalyticsCustomEvent({
3782
3788
  actions: [doEnableVideo.fulfilled],
3783
3789
  rtcEventName: "videoEnabled",
3784
3790
  getValue: (state) => selectIsCameraEnabled(state),
3785
3791
  getOutput: (value) => ({ enabled: value }),
3786
- },
3787
- localStream: {
3792
+ }),
3793
+ localStream: createRtcAnalyticsCustomEvent({
3788
3794
  actions: [doSetDevice.fulfilled],
3789
3795
  rtcEventName: "localStream",
3790
3796
  getValue: (state) => {
@@ -3792,8 +3798,8 @@ const rtcAnalyticsCustomEvents = {
3792
3798
  return (_a = selectLocalMediaStream(state)) === null || _a === void 0 ? void 0 : _a.getTracks().map((track) => ({ id: track.id, kind: track.kind, label: track.label }));
3793
3799
  },
3794
3800
  getOutput: (value) => ({ stream: value }),
3795
- },
3796
- localScreenshareStream: {
3801
+ }),
3802
+ localScreenshareStream: createRtcAnalyticsCustomEvent({
3797
3803
  actions: [doStartScreenshare.fulfilled],
3798
3804
  rtcEventName: "localScreenshareStream",
3799
3805
  getValue: (state) => {
@@ -3801,14 +3807,14 @@ const rtcAnalyticsCustomEvents = {
3801
3807
  return (_a = selectLocalScreenshareStream(state)) === null || _a === void 0 ? void 0 : _a.getTracks().map((track) => ({ id: track.id, kind: track.kind, label: track.label }));
3802
3808
  },
3803
3809
  getOutput: (value) => ({ tracks: value }),
3804
- },
3805
- localScreenshareStreamStopped: {
3810
+ }),
3811
+ localScreenshareStreamStopped: createRtcAnalyticsCustomEvent({
3806
3812
  actions: [stopScreenshare],
3807
3813
  rtcEventName: "localScreenshareStream",
3808
3814
  getValue: () => () => null,
3809
3815
  getOutput: () => ({}),
3810
- },
3811
- displayName: {
3816
+ }),
3817
+ displayName: createRtcAnalyticsCustomEvent({
3812
3818
  actions: [setDisplayName],
3813
3819
  rtcEventName: "displayName",
3814
3820
  getValue: (state) => {
@@ -3817,38 +3823,47 @@ const rtcAnalyticsCustomEvents = {
3817
3823
  return (prefs === null || prefs === void 0 ? void 0 : prefs.hideInsightsDisplayNames) ? "[[redacted]]" : displayName;
3818
3824
  },
3819
3825
  getOutput: (value) => ({ displayName: value }),
3820
- },
3821
- clientId: {
3826
+ }),
3827
+ clientId: createRtcAnalyticsCustomEvent({
3822
3828
  actions: null,
3823
3829
  rtcEventName: "clientId",
3824
3830
  getValue: (state) => selectSelfId(state),
3825
3831
  getOutput: (value) => ({ clientId: value }),
3826
- },
3827
- deviceId: {
3832
+ }),
3833
+ deviceId: createRtcAnalyticsCustomEvent({
3828
3834
  actions: null,
3829
3835
  rtcEventName: "deviceId",
3830
3836
  getValue: (state) => selectDeviceId(state),
3831
3837
  getOutput: (value) => ({ deviceId: value }),
3832
- },
3833
- externalId: {
3838
+ }),
3839
+ externalId: createRtcAnalyticsCustomEvent({
3834
3840
  actions: null,
3835
3841
  rtcEventName: "externalId",
3836
3842
  getValue: (state) => selectAppExternalId(state),
3837
3843
  getOutput: (value) => ({ externalId: value }),
3838
- },
3839
- organizationId: {
3844
+ }),
3845
+ organizationId: createRtcAnalyticsCustomEvent({
3840
3846
  actions: null,
3841
3847
  rtcEventName: "organizationId",
3842
3848
  getValue: (state) => selectOrganizationId(state),
3843
3849
  getOutput: (value) => ({ organizationId: value }),
3844
- },
3845
- signalConnectionStatus: {
3850
+ }),
3851
+ signalConnectionStatus: createRtcAnalyticsCustomEvent({
3846
3852
  actions: null,
3847
3853
  rtcEventName: "signalConnectionStatus",
3848
3854
  getValue: (state) => selectSignalStatus(state),
3849
3855
  getOutput: (value) => ({ status: value }),
3850
- },
3851
- roomSessionId: {
3856
+ }),
3857
+ recording: createRtcAnalyticsCustomEvent({
3858
+ actions: [signalEvents.newClient],
3859
+ rtcEventName: "recording",
3860
+ getValue: (state) => ({
3861
+ local: false,
3862
+ cloud: !!(selectIsCloudRecording(state) && selectCloudRecordingIsInitiator(state)),
3863
+ }),
3864
+ getOutput: (value) => value,
3865
+ }),
3866
+ roomSessionId: createRtcAnalyticsCustomEvent({
3852
3867
  actions: [
3853
3868
  signalEvents.newClient,
3854
3869
  signalEvents.roomJoined,
@@ -3858,19 +3873,19 @@ const rtcAnalyticsCustomEvents = {
3858
3873
  rtcEventName: "roomSessionId",
3859
3874
  getValue: (state) => selectRoomConnectionSessionId(state),
3860
3875
  getOutput: (value) => ({ roomSessionId: value }),
3861
- },
3862
- rtcConnectionStatus: {
3876
+ }),
3877
+ rtcConnectionStatus: createRtcAnalyticsCustomEvent({
3863
3878
  actions: null,
3864
3879
  rtcEventName: "rtcConnectionStatus",
3865
3880
  getValue: (state) => selectRtcStatus(state),
3866
3881
  getOutput: (value) => ({ status: value }),
3867
- },
3868
- userRole: {
3882
+ }),
3883
+ userRole: createRtcAnalyticsCustomEvent({
3869
3884
  actions: null,
3870
3885
  rtcEventName: "userRole",
3871
3886
  getValue: (state) => selectAuthorizationRoleName(state),
3872
3887
  getOutput: (value) => ({ userRole: value }),
3873
- },
3888
+ }),
3874
3889
  };
3875
3890
  const rtcCustomEventActions = Object.values(rtcAnalyticsCustomEvents)
3876
3891
  .flatMap(({ actions }) => { var _a; return (_a = actions === null || actions === void 0 ? void 0 : actions.map((action) => action)) !== null && _a !== void 0 ? _a : null; })
package/dist/index.d.cts CHANGED
@@ -578,6 +578,7 @@ interface LocalParticipantState$1 extends LocalParticipant {
578
578
  }
579
579
 
580
580
  interface CloudRecordingState$1 {
581
+ isInitiator: boolean;
581
582
  isRecording: boolean;
582
583
  error: unknown;
583
584
  status?: "recording" | "requested" | "error";
package/dist/index.d.mts CHANGED
@@ -578,6 +578,7 @@ interface LocalParticipantState$1 extends LocalParticipant {
578
578
  }
579
579
 
580
580
  interface CloudRecordingState$1 {
581
+ isInitiator: boolean;
581
582
  isRecording: boolean;
582
583
  error: unknown;
583
584
  status?: "recording" | "requested" | "error";
package/dist/index.d.ts CHANGED
@@ -578,6 +578,7 @@ interface LocalParticipantState$1 extends LocalParticipant {
578
578
  }
579
579
 
580
580
  interface CloudRecordingState$1 {
581
+ isInitiator: boolean;
581
582
  isRecording: boolean;
582
583
  error: unknown;
583
584
  status?: "recording" | "requested" | "error";
package/dist/index.mjs CHANGED
@@ -1145,7 +1145,7 @@ const createReactor = (selectors, callback) => {
1145
1145
  });
1146
1146
  };
1147
1147
 
1148
- const coreVersion = "1.0.1";
1148
+ const coreVersion = "1.1.0";
1149
1149
 
1150
1150
  const initialState = {
1151
1151
  isNodeSdk: false,
@@ -2175,6 +2175,7 @@ const doSendChatMessage = createRoomConnectedThunk((payload) => (_, getState) =>
2175
2175
  const selectChatMessages = (state) => state.chat.chatMessages;
2176
2176
 
2177
2177
  const initialCloudRecordingState = {
2178
+ isInitiator: false,
2178
2179
  isRecording: false,
2179
2180
  error: null,
2180
2181
  startedAt: undefined,
@@ -2184,19 +2185,19 @@ const cloudRecordingSlice = createSlice({
2184
2185
  initialState: initialCloudRecordingState,
2185
2186
  reducers: {
2186
2187
  recordingRequestStarted: (state) => {
2187
- return Object.assign(Object.assign({}, state), { status: "requested" });
2188
+ return Object.assign(Object.assign({}, state), { isInitiator: true, status: "requested" });
2188
2189
  },
2189
2190
  },
2190
2191
  extraReducers: (builder) => {
2191
2192
  builder.addCase(signalEvents.cloudRecordingStopped, (state) => {
2192
- return Object.assign(Object.assign({}, state), { isRecording: false, status: undefined });
2193
+ return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: undefined });
2193
2194
  });
2194
2195
  builder.addCase(signalEvents.cloudRecordingStarted, (state, action) => {
2195
2196
  const { payload } = action;
2196
2197
  if (!payload.error) {
2197
2198
  return state;
2198
2199
  }
2199
- return Object.assign(Object.assign({}, state), { isRecording: false, status: "error", error: payload.error });
2200
+ return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: "error", error: payload.error });
2200
2201
  });
2201
2202
  builder.addCase(signalEvents.newClient, (state, { payload }) => {
2202
2203
  var _a;
@@ -2230,6 +2231,8 @@ const doStopCloudRecording = createRoomConnectedThunk(() => (dispatch, getState)
2230
2231
  });
2231
2232
  const selectCloudRecordingRaw = (state) => state.cloudRecording;
2232
2233
  const selectCloudRecordingStatus = (state) => state.cloudRecording.status;
2234
+ const selectIsCloudRecording = (state) => state.cloudRecording.isRecording;
2235
+ const selectCloudRecordingIsInitiator = (state) => state.cloudRecording.isInitiator;
2233
2236
 
2234
2237
  const selectRoomConnectionSessionId = (state) => { var _a; return (_a = state.roomConnection.session) === null || _a === void 0 ? void 0 : _a.id; };
2235
2238
  const selectRoomConnectionStatus = (state) => state.roomConnection.status;
@@ -3769,20 +3772,23 @@ startAppListening({
3769
3772
  },
3770
3773
  });
3771
3774
 
3775
+ function createRtcAnalyticsCustomEvent(parameters) {
3776
+ return parameters;
3777
+ }
3772
3778
  const rtcAnalyticsCustomEvents = {
3773
- audioEnabled: {
3779
+ audioEnabled: createRtcAnalyticsCustomEvent({
3774
3780
  actions: [doEnableAudio.fulfilled],
3775
3781
  rtcEventName: "audioEnabled",
3776
3782
  getValue: (state) => selectIsMicrophoneEnabled(state),
3777
3783
  getOutput: (value) => ({ enabled: value }),
3778
- },
3779
- videoEnabled: {
3784
+ }),
3785
+ videoEnabled: createRtcAnalyticsCustomEvent({
3780
3786
  actions: [doEnableVideo.fulfilled],
3781
3787
  rtcEventName: "videoEnabled",
3782
3788
  getValue: (state) => selectIsCameraEnabled(state),
3783
3789
  getOutput: (value) => ({ enabled: value }),
3784
- },
3785
- localStream: {
3790
+ }),
3791
+ localStream: createRtcAnalyticsCustomEvent({
3786
3792
  actions: [doSetDevice.fulfilled],
3787
3793
  rtcEventName: "localStream",
3788
3794
  getValue: (state) => {
@@ -3790,8 +3796,8 @@ const rtcAnalyticsCustomEvents = {
3790
3796
  return (_a = selectLocalMediaStream(state)) === null || _a === void 0 ? void 0 : _a.getTracks().map((track) => ({ id: track.id, kind: track.kind, label: track.label }));
3791
3797
  },
3792
3798
  getOutput: (value) => ({ stream: value }),
3793
- },
3794
- localScreenshareStream: {
3799
+ }),
3800
+ localScreenshareStream: createRtcAnalyticsCustomEvent({
3795
3801
  actions: [doStartScreenshare.fulfilled],
3796
3802
  rtcEventName: "localScreenshareStream",
3797
3803
  getValue: (state) => {
@@ -3799,14 +3805,14 @@ const rtcAnalyticsCustomEvents = {
3799
3805
  return (_a = selectLocalScreenshareStream(state)) === null || _a === void 0 ? void 0 : _a.getTracks().map((track) => ({ id: track.id, kind: track.kind, label: track.label }));
3800
3806
  },
3801
3807
  getOutput: (value) => ({ tracks: value }),
3802
- },
3803
- localScreenshareStreamStopped: {
3808
+ }),
3809
+ localScreenshareStreamStopped: createRtcAnalyticsCustomEvent({
3804
3810
  actions: [stopScreenshare],
3805
3811
  rtcEventName: "localScreenshareStream",
3806
3812
  getValue: () => () => null,
3807
3813
  getOutput: () => ({}),
3808
- },
3809
- displayName: {
3814
+ }),
3815
+ displayName: createRtcAnalyticsCustomEvent({
3810
3816
  actions: [setDisplayName],
3811
3817
  rtcEventName: "displayName",
3812
3818
  getValue: (state) => {
@@ -3815,38 +3821,47 @@ const rtcAnalyticsCustomEvents = {
3815
3821
  return (prefs === null || prefs === void 0 ? void 0 : prefs.hideInsightsDisplayNames) ? "[[redacted]]" : displayName;
3816
3822
  },
3817
3823
  getOutput: (value) => ({ displayName: value }),
3818
- },
3819
- clientId: {
3824
+ }),
3825
+ clientId: createRtcAnalyticsCustomEvent({
3820
3826
  actions: null,
3821
3827
  rtcEventName: "clientId",
3822
3828
  getValue: (state) => selectSelfId(state),
3823
3829
  getOutput: (value) => ({ clientId: value }),
3824
- },
3825
- deviceId: {
3830
+ }),
3831
+ deviceId: createRtcAnalyticsCustomEvent({
3826
3832
  actions: null,
3827
3833
  rtcEventName: "deviceId",
3828
3834
  getValue: (state) => selectDeviceId(state),
3829
3835
  getOutput: (value) => ({ deviceId: value }),
3830
- },
3831
- externalId: {
3836
+ }),
3837
+ externalId: createRtcAnalyticsCustomEvent({
3832
3838
  actions: null,
3833
3839
  rtcEventName: "externalId",
3834
3840
  getValue: (state) => selectAppExternalId(state),
3835
3841
  getOutput: (value) => ({ externalId: value }),
3836
- },
3837
- organizationId: {
3842
+ }),
3843
+ organizationId: createRtcAnalyticsCustomEvent({
3838
3844
  actions: null,
3839
3845
  rtcEventName: "organizationId",
3840
3846
  getValue: (state) => selectOrganizationId(state),
3841
3847
  getOutput: (value) => ({ organizationId: value }),
3842
- },
3843
- signalConnectionStatus: {
3848
+ }),
3849
+ signalConnectionStatus: createRtcAnalyticsCustomEvent({
3844
3850
  actions: null,
3845
3851
  rtcEventName: "signalConnectionStatus",
3846
3852
  getValue: (state) => selectSignalStatus(state),
3847
3853
  getOutput: (value) => ({ status: value }),
3848
- },
3849
- roomSessionId: {
3854
+ }),
3855
+ recording: createRtcAnalyticsCustomEvent({
3856
+ actions: [signalEvents.newClient],
3857
+ rtcEventName: "recording",
3858
+ getValue: (state) => ({
3859
+ local: false,
3860
+ cloud: !!(selectIsCloudRecording(state) && selectCloudRecordingIsInitiator(state)),
3861
+ }),
3862
+ getOutput: (value) => value,
3863
+ }),
3864
+ roomSessionId: createRtcAnalyticsCustomEvent({
3850
3865
  actions: [
3851
3866
  signalEvents.newClient,
3852
3867
  signalEvents.roomJoined,
@@ -3856,19 +3871,19 @@ const rtcAnalyticsCustomEvents = {
3856
3871
  rtcEventName: "roomSessionId",
3857
3872
  getValue: (state) => selectRoomConnectionSessionId(state),
3858
3873
  getOutput: (value) => ({ roomSessionId: value }),
3859
- },
3860
- rtcConnectionStatus: {
3874
+ }),
3875
+ rtcConnectionStatus: createRtcAnalyticsCustomEvent({
3861
3876
  actions: null,
3862
3877
  rtcEventName: "rtcConnectionStatus",
3863
3878
  getValue: (state) => selectRtcStatus(state),
3864
3879
  getOutput: (value) => ({ status: value }),
3865
- },
3866
- userRole: {
3880
+ }),
3881
+ userRole: createRtcAnalyticsCustomEvent({
3867
3882
  actions: null,
3868
3883
  rtcEventName: "userRole",
3869
3884
  getValue: (state) => selectAuthorizationRoleName(state),
3870
3885
  getOutput: (value) => ({ userRole: value }),
3871
- },
3886
+ }),
3872
3887
  };
3873
3888
  const rtcCustomEventActions = Object.values(rtcAnalyticsCustomEvents)
3874
3889
  .flatMap(({ actions }) => { var _a; return (_a = actions === null || actions === void 0 ? void 0 : actions.map((action) => action)) !== null && _a !== void 0 ? _a : null; })
@@ -1145,7 +1145,7 @@ const createReactor = (selectors, callback) => {
1145
1145
  });
1146
1146
  };
1147
1147
 
1148
- const coreVersion = "1.0.1";
1148
+ const coreVersion = "1.1.0";
1149
1149
 
1150
1150
  const initialState = {
1151
1151
  isNodeSdk: false,
@@ -2175,6 +2175,7 @@ const doSendChatMessage = createRoomConnectedThunk((payload) => (_, getState) =>
2175
2175
  const selectChatMessages = (state) => state.chat.chatMessages;
2176
2176
 
2177
2177
  const initialCloudRecordingState = {
2178
+ isInitiator: false,
2178
2179
  isRecording: false,
2179
2180
  error: null,
2180
2181
  startedAt: undefined,
@@ -2184,19 +2185,19 @@ const cloudRecordingSlice = createSlice({
2184
2185
  initialState: initialCloudRecordingState,
2185
2186
  reducers: {
2186
2187
  recordingRequestStarted: (state) => {
2187
- return Object.assign(Object.assign({}, state), { status: "requested" });
2188
+ return Object.assign(Object.assign({}, state), { isInitiator: true, status: "requested" });
2188
2189
  },
2189
2190
  },
2190
2191
  extraReducers: (builder) => {
2191
2192
  builder.addCase(signalEvents.cloudRecordingStopped, (state) => {
2192
- return Object.assign(Object.assign({}, state), { isRecording: false, status: undefined });
2193
+ return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: undefined });
2193
2194
  });
2194
2195
  builder.addCase(signalEvents.cloudRecordingStarted, (state, action) => {
2195
2196
  const { payload } = action;
2196
2197
  if (!payload.error) {
2197
2198
  return state;
2198
2199
  }
2199
- return Object.assign(Object.assign({}, state), { isRecording: false, status: "error", error: payload.error });
2200
+ return Object.assign(Object.assign({}, state), { isInitiator: false, isRecording: false, status: "error", error: payload.error });
2200
2201
  });
2201
2202
  builder.addCase(signalEvents.newClient, (state, { payload }) => {
2202
2203
  var _a;
@@ -2230,6 +2231,8 @@ const doStopCloudRecording = createRoomConnectedThunk(() => (dispatch, getState)
2230
2231
  });
2231
2232
  const selectCloudRecordingRaw = (state) => state.cloudRecording;
2232
2233
  const selectCloudRecordingStatus = (state) => state.cloudRecording.status;
2234
+ const selectIsCloudRecording = (state) => state.cloudRecording.isRecording;
2235
+ const selectCloudRecordingIsInitiator = (state) => state.cloudRecording.isInitiator;
2233
2236
 
2234
2237
  const selectRoomConnectionSessionId = (state) => { var _a; return (_a = state.roomConnection.session) === null || _a === void 0 ? void 0 : _a.id; };
2235
2238
  const selectRoomConnectionStatus = (state) => state.roomConnection.status;
@@ -3769,20 +3772,23 @@ startAppListening({
3769
3772
  },
3770
3773
  });
3771
3774
 
3775
+ function createRtcAnalyticsCustomEvent(parameters) {
3776
+ return parameters;
3777
+ }
3772
3778
  const rtcAnalyticsCustomEvents = {
3773
- audioEnabled: {
3779
+ audioEnabled: createRtcAnalyticsCustomEvent({
3774
3780
  actions: [doEnableAudio.fulfilled],
3775
3781
  rtcEventName: "audioEnabled",
3776
3782
  getValue: (state) => selectIsMicrophoneEnabled(state),
3777
3783
  getOutput: (value) => ({ enabled: value }),
3778
- },
3779
- videoEnabled: {
3784
+ }),
3785
+ videoEnabled: createRtcAnalyticsCustomEvent({
3780
3786
  actions: [doEnableVideo.fulfilled],
3781
3787
  rtcEventName: "videoEnabled",
3782
3788
  getValue: (state) => selectIsCameraEnabled(state),
3783
3789
  getOutput: (value) => ({ enabled: value }),
3784
- },
3785
- localStream: {
3790
+ }),
3791
+ localStream: createRtcAnalyticsCustomEvent({
3786
3792
  actions: [doSetDevice.fulfilled],
3787
3793
  rtcEventName: "localStream",
3788
3794
  getValue: (state) => {
@@ -3790,8 +3796,8 @@ const rtcAnalyticsCustomEvents = {
3790
3796
  return (_a = selectLocalMediaStream(state)) === null || _a === void 0 ? void 0 : _a.getTracks().map((track) => ({ id: track.id, kind: track.kind, label: track.label }));
3791
3797
  },
3792
3798
  getOutput: (value) => ({ stream: value }),
3793
- },
3794
- localScreenshareStream: {
3799
+ }),
3800
+ localScreenshareStream: createRtcAnalyticsCustomEvent({
3795
3801
  actions: [doStartScreenshare.fulfilled],
3796
3802
  rtcEventName: "localScreenshareStream",
3797
3803
  getValue: (state) => {
@@ -3799,14 +3805,14 @@ const rtcAnalyticsCustomEvents = {
3799
3805
  return (_a = selectLocalScreenshareStream(state)) === null || _a === void 0 ? void 0 : _a.getTracks().map((track) => ({ id: track.id, kind: track.kind, label: track.label }));
3800
3806
  },
3801
3807
  getOutput: (value) => ({ tracks: value }),
3802
- },
3803
- localScreenshareStreamStopped: {
3808
+ }),
3809
+ localScreenshareStreamStopped: createRtcAnalyticsCustomEvent({
3804
3810
  actions: [stopScreenshare],
3805
3811
  rtcEventName: "localScreenshareStream",
3806
3812
  getValue: () => () => null,
3807
3813
  getOutput: () => ({}),
3808
- },
3809
- displayName: {
3814
+ }),
3815
+ displayName: createRtcAnalyticsCustomEvent({
3810
3816
  actions: [setDisplayName],
3811
3817
  rtcEventName: "displayName",
3812
3818
  getValue: (state) => {
@@ -3815,38 +3821,47 @@ const rtcAnalyticsCustomEvents = {
3815
3821
  return (prefs === null || prefs === void 0 ? void 0 : prefs.hideInsightsDisplayNames) ? "[[redacted]]" : displayName;
3816
3822
  },
3817
3823
  getOutput: (value) => ({ displayName: value }),
3818
- },
3819
- clientId: {
3824
+ }),
3825
+ clientId: createRtcAnalyticsCustomEvent({
3820
3826
  actions: null,
3821
3827
  rtcEventName: "clientId",
3822
3828
  getValue: (state) => selectSelfId(state),
3823
3829
  getOutput: (value) => ({ clientId: value }),
3824
- },
3825
- deviceId: {
3830
+ }),
3831
+ deviceId: createRtcAnalyticsCustomEvent({
3826
3832
  actions: null,
3827
3833
  rtcEventName: "deviceId",
3828
3834
  getValue: (state) => selectDeviceId(state),
3829
3835
  getOutput: (value) => ({ deviceId: value }),
3830
- },
3831
- externalId: {
3836
+ }),
3837
+ externalId: createRtcAnalyticsCustomEvent({
3832
3838
  actions: null,
3833
3839
  rtcEventName: "externalId",
3834
3840
  getValue: (state) => selectAppExternalId(state),
3835
3841
  getOutput: (value) => ({ externalId: value }),
3836
- },
3837
- organizationId: {
3842
+ }),
3843
+ organizationId: createRtcAnalyticsCustomEvent({
3838
3844
  actions: null,
3839
3845
  rtcEventName: "organizationId",
3840
3846
  getValue: (state) => selectOrganizationId(state),
3841
3847
  getOutput: (value) => ({ organizationId: value }),
3842
- },
3843
- signalConnectionStatus: {
3848
+ }),
3849
+ signalConnectionStatus: createRtcAnalyticsCustomEvent({
3844
3850
  actions: null,
3845
3851
  rtcEventName: "signalConnectionStatus",
3846
3852
  getValue: (state) => selectSignalStatus(state),
3847
3853
  getOutput: (value) => ({ status: value }),
3848
- },
3849
- roomSessionId: {
3854
+ }),
3855
+ recording: createRtcAnalyticsCustomEvent({
3856
+ actions: [signalEvents.newClient],
3857
+ rtcEventName: "recording",
3858
+ getValue: (state) => ({
3859
+ local: false,
3860
+ cloud: !!(selectIsCloudRecording(state) && selectCloudRecordingIsInitiator(state)),
3861
+ }),
3862
+ getOutput: (value) => value,
3863
+ }),
3864
+ roomSessionId: createRtcAnalyticsCustomEvent({
3850
3865
  actions: [
3851
3866
  signalEvents.newClient,
3852
3867
  signalEvents.roomJoined,
@@ -3856,19 +3871,19 @@ const rtcAnalyticsCustomEvents = {
3856
3871
  rtcEventName: "roomSessionId",
3857
3872
  getValue: (state) => selectRoomConnectionSessionId(state),
3858
3873
  getOutput: (value) => ({ roomSessionId: value }),
3859
- },
3860
- rtcConnectionStatus: {
3874
+ }),
3875
+ rtcConnectionStatus: createRtcAnalyticsCustomEvent({
3861
3876
  actions: null,
3862
3877
  rtcEventName: "rtcConnectionStatus",
3863
3878
  getValue: (state) => selectRtcStatus(state),
3864
3879
  getOutput: (value) => ({ status: value }),
3865
- },
3866
- userRole: {
3880
+ }),
3881
+ userRole: createRtcAnalyticsCustomEvent({
3867
3882
  actions: null,
3868
3883
  rtcEventName: "userRole",
3869
3884
  getValue: (state) => selectAuthorizationRoleName(state),
3870
3885
  getOutput: (value) => ({ userRole: value }),
3871
- },
3886
+ }),
3872
3887
  };
3873
3888
  const rtcCustomEventActions = Object.values(rtcAnalyticsCustomEvents)
3874
3889
  .flatMap(({ actions }) => { var _a; return (_a = actions === null || actions === void 0 ? void 0 : actions.map((action) => action)) !== null && _a !== void 0 ? _a : null; })