|
@@ -101,7 +101,7 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>
|
101
|
101
|
(recorderSession: any) => {
|
102
|
102
|
if (recorderSession) {
|
103
|
103
|
recorderSession.getID() && dispatch(updateRecordingSessionData(recorderSession));
|
104
|
|
- recorderSession.getError() && _showRecordingErrorNotification(recorderSession, dispatch);
|
|
104
|
+ recorderSession.getError() && _showRecordingErrorNotification(recorderSession, dispatch, getState);
|
105
|
105
|
}
|
106
|
106
|
|
107
|
107
|
return;
|
|
@@ -133,7 +133,8 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>
|
133
|
133
|
dispatch(updateLocalRecordingStatus(true, onlySelf));
|
134
|
134
|
sendAnalytics(createRecordingEvent('started', `local${onlySelf ? '.self' : ''}`));
|
135
|
135
|
if (typeof APP !== 'undefined') {
|
136
|
|
- APP.API.notifyRecordingStatusChanged(true, 'local');
|
|
136
|
+ APP.API.notifyRecordingStatusChanged(
|
|
137
|
+ true, 'local', undefined, isRecorderTranscriptionsRunning(getState()));
|
137
|
138
|
}
|
138
|
139
|
} catch (err: any) {
|
139
|
140
|
logger.error('Capture failed', err);
|
|
@@ -154,7 +155,8 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>
|
154
|
155
|
};
|
155
|
156
|
|
156
|
157
|
if (typeof APP !== 'undefined') {
|
157
|
|
- APP.API.notifyRecordingStatusChanged(false, 'local', err.message);
|
|
158
|
+ APP.API.notifyRecordingStatusChanged(
|
|
159
|
+ false, 'local', err.message, isRecorderTranscriptionsRunning(getState()));
|
158
|
160
|
}
|
159
|
161
|
|
160
|
162
|
dispatch(showErrorNotification(props, NOTIFICATION_TIMEOUT_TYPE.MEDIUM));
|
|
@@ -172,7 +174,8 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>
|
172
|
174
|
dispatch(playSound(RECORDING_OFF_SOUND_ID));
|
173
|
175
|
}
|
174
|
176
|
if (typeof APP !== 'undefined') {
|
175
|
|
- APP.API.notifyRecordingStatusChanged(false, 'local');
|
|
177
|
+ APP.API.notifyRecordingStatusChanged(
|
|
178
|
+ false, 'local', undefined, isRecorderTranscriptionsRunning(getState()));
|
176
|
179
|
}
|
177
|
180
|
}
|
178
|
181
|
break;
|
|
@@ -237,7 +240,8 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>
|
237
|
240
|
}
|
238
|
241
|
|
239
|
242
|
if (typeof APP !== 'undefined') {
|
240
|
|
- APP.API.notifyRecordingStatusChanged(true, mode);
|
|
243
|
+ APP.API.notifyRecordingStatusChanged(
|
|
244
|
+ true, mode, undefined, isRecorderTranscriptionsRunning(state));
|
241
|
245
|
}
|
242
|
246
|
}
|
243
|
247
|
} else if (updatedSessionData?.status === OFF && oldSessionData?.status !== OFF) {
|
|
@@ -269,7 +273,8 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>
|
269
|
273
|
}
|
270
|
274
|
|
271
|
275
|
if (typeof APP !== 'undefined') {
|
272
|
|
- APP.API.notifyRecordingStatusChanged(false, mode);
|
|
276
|
+ APP.API.notifyRecordingStatusChanged(
|
|
277
|
+ false, mode, undefined, isRecorderTranscriptionsRunning(state));
|
273
|
278
|
}
|
274
|
279
|
}
|
275
|
280
|
}
|
|
@@ -312,14 +317,15 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => async action =>
|
312
|
317
|
* in recording session.
|
313
|
318
|
*
|
314
|
319
|
* @private
|
315
|
|
- * @param {Object} recorderSession - The recorder session model from the
|
|
320
|
+ * @param {Object} session - The recorder session model from the
|
316
|
321
|
* lib.
|
317
|
322
|
* @param {Dispatch} dispatch - The Redux Dispatch function.
|
|
323
|
+ * @param {Function} getState - The Redux getState function.
|
318
|
324
|
* @returns {void}
|
319
|
325
|
*/
|
320
|
|
-function _showRecordingErrorNotification(recorderSession: any, dispatch: IStore['dispatch']) {
|
321
|
|
- const mode = recorderSession.getMode();
|
322
|
|
- const error = recorderSession.getError();
|
|
326
|
+function _showRecordingErrorNotification(session: any, dispatch: IStore['dispatch'], getState: IStore['getState']) {
|
|
327
|
+ const mode = session.getMode();
|
|
328
|
+ const error = session.getError();
|
323
|
329
|
const isStreamMode = mode === JitsiMeetJS.constants.recording.mode.STREAM;
|
324
|
330
|
|
325
|
331
|
switch (error) {
|
|
@@ -367,6 +373,6 @@ function _showRecordingErrorNotification(recorderSession: any, dispatch: IStore[
|
367
|
373
|
}
|
368
|
374
|
|
369
|
375
|
if (typeof APP !== 'undefined') {
|
370
|
|
- APP.API.notifyRecordingStatusChanged(false, mode, error);
|
|
376
|
+ APP.API.notifyRecordingStatusChanged(false, mode, error, isRecorderTranscriptionsRunning(getState()));
|
371
|
377
|
}
|
372
|
378
|
}
|