|
|
@@ -11,6 +11,7 @@ import JitsiMeetJS, {
|
|
11
|
11
|
JitsiConferenceEvents,
|
|
12
|
12
|
JitsiRecordingConstants
|
|
13
|
13
|
} from '../base/lib-jitsi-meet';
|
|
|
14
|
+import { getParticipantDisplayName } from '../base/participants';
|
|
14
|
15
|
import { MiddlewareRegistry, StateListenerRegistry } from '../base/redux';
|
|
15
|
16
|
import {
|
|
16
|
17
|
playSound,
|
|
|
@@ -24,6 +25,7 @@ import {
|
|
24
|
25
|
hidePendingRecordingNotification,
|
|
25
|
26
|
showPendingRecordingNotification,
|
|
26
|
27
|
showRecordingError,
|
|
|
28
|
+ showStartedRecordingNotification,
|
|
27
|
29
|
showStoppedRecordingNotification,
|
|
28
|
30
|
updateRecordingSessionData
|
|
29
|
31
|
} from './actions';
|
|
|
@@ -131,7 +133,7 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
|
131
|
133
|
|
|
132
|
134
|
const updatedSessionData
|
|
133
|
135
|
= getSessionById(getState(), action.sessionData.id);
|
|
134
|
|
- const { mode } = updatedSessionData;
|
|
|
136
|
+ const { initiator, mode, terminator } = updatedSessionData;
|
|
135
|
137
|
const { PENDING, OFF, ON } = JitsiRecordingConstants.status;
|
|
136
|
138
|
|
|
137
|
139
|
if (updatedSessionData.status === PENDING
|
|
|
@@ -142,6 +144,10 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
|
142
|
144
|
|
|
143
|
145
|
if (updatedSessionData.status === ON
|
|
144
|
146
|
&& (!oldSessionData || oldSessionData.status !== ON)) {
|
|
|
147
|
+ const initiatorName = initiator && getParticipantDisplayName(getState, initiator.getId());
|
|
|
148
|
+
|
|
|
149
|
+ initiatorName && dispatch(showStartedRecordingNotification(mode, initiatorName));
|
|
|
150
|
+
|
|
145
|
151
|
let soundID;
|
|
146
|
152
|
|
|
147
|
153
|
if (mode === JitsiRecordingConstants.mode.FILE) {
|
|
|
@@ -156,7 +162,8 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
|
156
|
162
|
}
|
|
157
|
163
|
} else if (updatedSessionData.status === OFF
|
|
158
|
164
|
&& (!oldSessionData || oldSessionData.status !== OFF)) {
|
|
159
|
|
- dispatch(showStoppedRecordingNotification(mode));
|
|
|
165
|
+ dispatch(showStoppedRecordingNotification(
|
|
|
166
|
+ mode, terminator && getParticipantDisplayName(getState, terminator.getId())));
|
|
160
|
167
|
let duration = 0, soundOff, soundOn;
|
|
161
|
168
|
|
|
162
|
169
|
if (oldSessionData && oldSessionData.timestamp) {
|