|
@@ -1,14 +1,17 @@
|
1
|
1
|
// @flow
|
2
|
2
|
|
|
3
|
+import UIEvents from '../../../../service/UI/UIEvents';
|
|
4
|
+
|
|
5
|
+import { CALLING, INVITED } from '../../presence-status';
|
|
6
|
+
|
3
|
7
|
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../app';
|
4
|
8
|
import {
|
5
|
9
|
CONFERENCE_WILL_JOIN,
|
6
|
10
|
forEachConference,
|
7
|
11
|
getCurrentConference
|
8
|
12
|
} from '../conference';
|
9
|
|
-import { CALLING, INVITED } from '../../presence-status';
|
|
13
|
+import { JitsiConferenceEvents } from '../lib-jitsi-meet';
|
10
|
14
|
import { MiddlewareRegistry, StateListenerRegistry } from '../redux';
|
11
|
|
-import UIEvents from '../../../../service/UI/UIEvents';
|
12
|
15
|
import { playSound, registerSound, unregisterSound } from '../sounds';
|
13
|
16
|
|
14
|
17
|
import {
|
|
@@ -185,6 +188,42 @@ StateListenerRegistry.register(
|
185
|
188
|
localParticipantIdChanged(LOCAL_PARTICIPANT_DEFAULT_ID));
|
186
|
189
|
});
|
187
|
190
|
|
|
191
|
+/**
|
|
192
|
+ * Registers listeners for participant change events.
|
|
193
|
+ */
|
|
194
|
+StateListenerRegistry.register(
|
|
195
|
+ state => state['features/base/conference'].conference,
|
|
196
|
+ (conference, { dispatch }) => {
|
|
197
|
+ if (conference) {
|
|
198
|
+ // We joined a conference
|
|
199
|
+ conference.on(
|
|
200
|
+ JitsiConferenceEvents.PARTICIPANT_PROPERTY_CHANGED,
|
|
201
|
+ (participant, propertyName, oldValue, newValue) => {
|
|
202
|
+ switch (propertyName) {
|
|
203
|
+ case 'features_screen-sharing':
|
|
204
|
+ store.dispatch(participantUpdated({
|
|
205
|
+ conference,
|
|
206
|
+ id: participant.getId(),
|
|
207
|
+ features: { 'screen-sharing': true }
|
|
208
|
+ }));
|
|
209
|
+ break;
|
|
210
|
+ case 'raisedHand':
|
|
211
|
+ dispatch(participantUpdated({
|
|
212
|
+ conference,
|
|
213
|
+ id: participant.getId(),
|
|
214
|
+ raisedHand: newValue === 'true'
|
|
215
|
+ }));
|
|
216
|
+ break;
|
|
217
|
+ default:
|
|
218
|
+
|
|
219
|
+ // Ignore for now.
|
|
220
|
+ }
|
|
221
|
+
|
|
222
|
+ });
|
|
223
|
+ }
|
|
224
|
+ }
|
|
225
|
+);
|
|
226
|
+
|
188
|
227
|
/**
|
189
|
228
|
* Initializes the local participant and signals that it joined.
|
190
|
229
|
*
|