|
@@ -1702,11 +1702,7 @@ export default {
|
1702
|
1702
|
_setupListeners() {
|
1703
|
1703
|
// add local streams when joined to the conference
|
1704
|
1704
|
room.on(JitsiConferenceEvents.CONFERENCE_JOINED, () => {
|
1705
|
|
- APP.store.dispatch(conferenceJoined(room));
|
1706
|
|
-
|
1707
|
|
- APP.UI.mucJoined();
|
1708
|
|
- APP.API.notifyConferenceJoined(APP.conference.roomName);
|
1709
|
|
- APP.UI.markVideoInterrupted(false);
|
|
1705
|
+ this._onConferenceJoined();
|
1710
|
1706
|
});
|
1711
|
1707
|
|
1712
|
1708
|
room.on(
|
|
@@ -2334,6 +2330,62 @@ export default {
|
2334
|
2330
|
});
|
2335
|
2331
|
},
|
2336
|
2332
|
|
|
2333
|
+ /**
|
|
2334
|
+ * Callback invoked when the conference has been successfully joined.
|
|
2335
|
+ * Initializes the UI and various other features.
|
|
2336
|
+ *
|
|
2337
|
+ * @private
|
|
2338
|
+ * @returns {void}
|
|
2339
|
+ */
|
|
2340
|
+ _onConferenceJoined() {
|
|
2341
|
+ if (APP.logCollector) {
|
|
2342
|
+ // Start the LogCollector's periodic "store logs" task
|
|
2343
|
+ APP.logCollector.start();
|
|
2344
|
+ APP.logCollectorStarted = true;
|
|
2345
|
+
|
|
2346
|
+ // Make an attempt to flush in case a lot of logs have been
|
|
2347
|
+ // cached, before the collector was started.
|
|
2348
|
+ APP.logCollector.flush();
|
|
2349
|
+
|
|
2350
|
+ // This event listener will flush the logs, before
|
|
2351
|
+ // the statistics module (CallStats) is stopped.
|
|
2352
|
+ //
|
|
2353
|
+ // NOTE The LogCollector is not stopped, because this event can
|
|
2354
|
+ // be triggered multiple times during single conference
|
|
2355
|
+ // (whenever statistics module is stopped). That includes
|
|
2356
|
+ // the case when Jicofo terminates the single person left in the
|
|
2357
|
+ // room. It will then restart the media session when someone
|
|
2358
|
+ // eventually join the room which will start the stats again.
|
|
2359
|
+ APP.conference.addConferenceListener(
|
|
2360
|
+ JitsiConferenceEvents.BEFORE_STATISTICS_DISPOSED,
|
|
2361
|
+ () => {
|
|
2362
|
+ if (APP.logCollector) {
|
|
2363
|
+ APP.logCollector.flush();
|
|
2364
|
+ }
|
|
2365
|
+ }
|
|
2366
|
+ );
|
|
2367
|
+ }
|
|
2368
|
+
|
|
2369
|
+ APP.UI.initConference();
|
|
2370
|
+
|
|
2371
|
+ APP.UI.addListener(
|
|
2372
|
+ UIEvents.LANG_CHANGED,
|
|
2373
|
+ language => APP.translation.setLanguage(language));
|
|
2374
|
+
|
|
2375
|
+ APP.keyboardshortcut.init();
|
|
2376
|
+
|
|
2377
|
+ if (config.requireDisplayName
|
|
2378
|
+ && !APP.conference.getLocalDisplayName()) {
|
|
2379
|
+ APP.UI.promptDisplayName();
|
|
2380
|
+ }
|
|
2381
|
+
|
|
2382
|
+ APP.store.dispatch(conferenceJoined(room));
|
|
2383
|
+
|
|
2384
|
+ APP.UI.mucJoined();
|
|
2385
|
+ APP.API.notifyConferenceJoined(APP.conference.roomName);
|
|
2386
|
+ APP.UI.markVideoInterrupted(false);
|
|
2387
|
+ },
|
|
2388
|
+
|
2337
|
2389
|
/**
|
2338
|
2390
|
* Adds any room listener.
|
2339
|
2391
|
* @param {string} eventName one of the JitsiConferenceEvents
|