Преглед на файлове

Merge pull request #8 from isymchych/handle-focus-left

propagate FOCUS_LEFT conference error
master
Paweł Domas преди 9 години
родител
ревизия
2af2465282
променени са 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 Целия файл

@@ -867,6 +867,9 @@ function setupListeners(conference) {
867 867
     conference.room.addListener(XMPPEvents.FOCUS_DISCONNECTED, function (focus, retrySec) {
868 868
         conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.FOCUS_DISCONNECTED, focus, retrySec);
869 869
     });
870
+    conference.room.addListener(XMPPEvents.FOCUS_LEFT, function () {
871
+        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.FOCUS_LEFT);
872
+    });
870 873
 //    FIXME
871 874
 //    conference.room.addListener(XMPPEvents.MUC_JOINED, function () {
872 875
 //        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_LEFT);
@@ -944,9 +947,6 @@ function setupListeners(conference) {
944 947
             conference.eventEmitter.emit(JitsiConferenceEvents.LAST_N_ENDPOINTS_CHANGED,
945 948
                 lastNEndpoints, endpointsEnteringLastN);
946 949
         });
947
-    conference.xmpp.addListener(XMPPEvents.PASSWORD_REQUIRED, function () {
948
-        conference.eventEmitter.emit(JitsiConferenceErrors.PASSWORD_REQUIRED);
949
-    });
950 950
 
951 951
     conference.xmpp.addListener(XMPPEvents.START_MUTED_FROM_FOCUS,
952 952
         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
 };

Loading…
Отказ
Запис