Bläddra i källkod

propagate FOCUS_LEFT conference error

dev1
isymchych 9 år sedan
förälder
incheckning
cb085214f4
4 ändrade filer med 9 tillägg och 7 borttagningar
  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 Visa fil

856
     conference.room.addListener(XMPPEvents.FOCUS_DISCONNECTED, function (focus, retrySec) {
856
     conference.room.addListener(XMPPEvents.FOCUS_DISCONNECTED, function (focus, retrySec) {
857
         conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.FOCUS_DISCONNECTED, focus, retrySec);
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
 //    FIXME
862
 //    FIXME
860
 //    conference.room.addListener(XMPPEvents.MUC_JOINED, function () {
863
 //    conference.room.addListener(XMPPEvents.MUC_JOINED, function () {
861
 //        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_LEFT);
864
 //        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_LEFT);
933
             conference.eventEmitter.emit(JitsiConferenceEvents.LAST_N_ENDPOINTS_CHANGED,
936
             conference.eventEmitter.emit(JitsiConferenceEvents.LAST_N_ENDPOINTS_CHANGED,
934
                 lastNEndpoints, endpointsEnteringLastN);
937
                 lastNEndpoints, endpointsEnteringLastN);
935
         });
938
         });
936
-    conference.xmpp.addListener(XMPPEvents.PASSWORD_REQUIRED, function () {
937
-        conference.eventEmitter.emit(JitsiConferenceErrors.PASSWORD_REQUIRED);
938
-    });
939
 
939
 
940
     conference.xmpp.addListener(XMPPEvents.START_MUTED_FROM_FOCUS,
940
     conference.xmpp.addListener(XMPPEvents.START_MUTED_FROM_FOCUS,
941
         function (audioMuted, videoMuted) {
941
         function (audioMuted, videoMuted) {

+ 5
- 1
JitsiConferenceErrors.js Visa fil

51
     /**
51
     /**
52
      * Indicates that focus error happened.
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
      * Many more errors TBD here.
60
      * Many more errors TBD here.
57
      */
61
      */

+ 1
- 0
doc/API.md Visa fil

123
         - CONFERENCE_DESTROYED - conference has been destroyed
123
         - CONFERENCE_DESTROYED - conference has been destroyed
124
         - CHAT_ERROR - chat error happened
124
         - CHAT_ERROR - chat error happened
125
         - FOCUS_DISCONNECTED - focus error happened
125
         - FOCUS_DISCONNECTED - focus error happened
126
+        - FOCUS_DISCONNECTED - focus left the conference
126
     2. connection
127
     2. connection
127
         - PASSWORD_REQUIRED - passed when the connection to the server failed. You should try to authenticate with password.
128
         - PASSWORD_REQUIRED - passed when the connection to the server failed. You should try to authenticate with password.
128
         - CONNECTION_ERROR - indicates connection failures.
129
         - CONNECTION_ERROR - indicates connection failures.

+ 0
- 3
modules/xmpp/moderator.js Visa fil

75
     if (resource === 'focus' && !this.xmppService.sessionTerminated) {
75
     if (resource === 'focus' && !this.xmppService.sessionTerminated) {
76
         logger.info(
76
         logger.info(
77
             "Focus has left the room - leaving conference");
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
         this.eventEmitter.emit(XMPPEvents.FOCUS_LEFT);
78
         this.eventEmitter.emit(XMPPEvents.FOCUS_LEFT);
82
     }
79
     }
83
 };
80
 };

Laddar…
Avbryt
Spara