Просмотр исходного кода

propagate FOCUS_LEFT conference error

dev1
isymchych 9 лет назад
Родитель
Сommit
cb085214f4
4 измененных файлов: 9 добавлений и 7 удалений
  1. 3
    3
      JitsiConference.js
  2. 5
    1
      JitsiConferenceErrors.js
  3. 1
    0
      doc/API.md
  4. 0
    3
      modules/xmpp/moderator.js

+ 3
- 3
JitsiConference.js Просмотреть файл

@@ -856,6 +856,9 @@ function setupListeners(conference) {
856 856
     conference.room.addListener(XMPPEvents.FOCUS_DISCONNECTED, function (focus, retrySec) {
857 857
         conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.FOCUS_DISCONNECTED, focus, retrySec);
858 858
     });
859
+    conference.room.addListener(XMPPEvents.FOCUS_LEFT, function () {
860
+        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.FOCUS_LEFT);
861
+    });
859 862
 //    FIXME
860 863
 //    conference.room.addListener(XMPPEvents.MUC_JOINED, function () {
861 864
 //        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_LEFT);
@@ -933,9 +936,6 @@ function setupListeners(conference) {
933 936
             conference.eventEmitter.emit(JitsiConferenceEvents.LAST_N_ENDPOINTS_CHANGED,
934 937
                 lastNEndpoints, endpointsEnteringLastN);
935 938
         });
936
-    conference.xmpp.addListener(XMPPEvents.PASSWORD_REQUIRED, function () {
937
-        conference.eventEmitter.emit(JitsiConferenceErrors.PASSWORD_REQUIRED);
938
-    });
939 939
 
940 940
     conference.xmpp.addListener(XMPPEvents.START_MUTED_FROM_FOCUS,
941 941
         function (audioMuted, videoMuted) {

+ 5
- 1
JitsiConferenceErrors.js Просмотреть файл

@@ -51,7 +51,11 @@ var JitsiConferenceErrors = {
51 51
     /**
52 52
      * Indicates that focus error happened.
53 53
      */
54
-    FOCUS_DISCONNECTED: "conference.focusDisconnected"
54
+    FOCUS_DISCONNECTED: "conference.focusDisconnected",
55
+    /**
56
+     * Indicates that focus left the conference.
57
+     */
58
+    FOCUS_LEFT: "conference.focusLeft"
55 59
     /**
56 60
      * Many more errors TBD here.
57 61
      */

+ 1
- 0
doc/API.md Просмотреть файл

@@ -123,6 +123,7 @@ JitsiMeetJS.setLogLevel(JitsiMeetJS.logLevels.ERROR);
123 123
         - CONFERENCE_DESTROYED - conference has been destroyed
124 124
         - CHAT_ERROR - chat error happened
125 125
         - FOCUS_DISCONNECTED - focus error happened
126
+        - FOCUS_DISCONNECTED - focus left the conference
126 127
     2. connection
127 128
         - PASSWORD_REQUIRED - passed when the connection to the server failed. You should try to authenticate with password.
128 129
         - CONNECTION_ERROR - indicates connection failures.

+ 0
- 3
modules/xmpp/moderator.js Просмотреть файл

@@ -75,9 +75,6 @@ Moderator.prototype.onMucMemberLeft =  function (jid) {
75 75
     if (resource === 'focus' && !this.xmppService.sessionTerminated) {
76 76
         logger.info(
77 77
             "Focus has left the room - leaving conference");
78
-        //hangUp();
79
-        // We'd rather reload to have everything re-initialized
80
-        //FIXME: show some message before reload
81 78
         this.eventEmitter.emit(XMPPEvents.FOCUS_LEFT);
82 79
     }
83 80
 };

Загрузка…
Отмена
Сохранить