|
@@ -14,6 +14,7 @@ import { playSound, registerSound, unregisterSound } from '../sounds';
|
14
|
14
|
import {
|
15
|
15
|
localParticipantIdChanged,
|
16
|
16
|
localParticipantJoined,
|
|
17
|
+ localParticipantLeft,
|
17
|
18
|
participantLeft,
|
18
|
19
|
participantUpdated
|
19
|
20
|
} from './actions';
|
|
@@ -57,7 +58,8 @@ MiddlewareRegistry.register(store => next => action => {
|
57
|
58
|
|
58
|
59
|
case APP_WILL_UNMOUNT:
|
59
|
60
|
_unregisterSounds(store);
|
60
|
|
- break;
|
|
61
|
+
|
|
62
|
+ return _localParticipantLeft(store, next, action);
|
61
|
63
|
|
62
|
64
|
case CONFERENCE_WILL_JOIN:
|
63
|
65
|
store.dispatch(localParticipantIdChanged(action.conference.myUserId()));
|
|
@@ -202,6 +204,25 @@ function _localParticipantJoined({ getState, dispatch }, next, action) {
|
202
|
204
|
return result;
|
203
|
205
|
}
|
204
|
206
|
|
|
207
|
+/**
|
|
208
|
+ * Signals that the local participant has left.
|
|
209
|
+ *
|
|
210
|
+ * @param {Store} store - The redux store.
|
|
211
|
+ * @param {Dispatch} next - The redux {@code dispatch} function to dispatch the
|
|
212
|
+ * specified {@code action} into the specified {@code store}.
|
|
213
|
+ * @param {Action} action - The redux action which is being dispatched in the
|
|
214
|
+ * specified {@code store}.
|
|
215
|
+ * @private
|
|
216
|
+ * @returns {Object} The value returned by {@code next(action)}.
|
|
217
|
+ */
|
|
218
|
+function _localParticipantLeft({ dispatch }, next, action) {
|
|
219
|
+ const result = next(action);
|
|
220
|
+
|
|
221
|
+ dispatch(localParticipantLeft());
|
|
222
|
+
|
|
223
|
+ return result;
|
|
224
|
+}
|
|
225
|
+
|
205
|
226
|
/**
|
206
|
227
|
* Plays sounds when participants join/leave conference.
|
207
|
228
|
*
|