ソースを参照

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

+ 5
- 1
JitsiConferenceErrors.js ファイルの表示

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 ファイルの表示

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 ファイルの表示

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
 };

読み込み中…
キャンセル
保存