Bläddra i källkod

added propagation of few errors

dev1
isymchych 9 år sedan
förälder
incheckning
a02143da30
3 ändrade filer med 41 tillägg och 1 borttagningar
  1. 15
    0
      JitsiConference.js
  2. 21
    1
      JitsiConferenceErrors.js
  3. 5
    0
      doc/API.md

+ 15
- 0
JitsiConference.js Visa fil

801
     conference.room.addListener(XMPPEvents.BRIDGE_DOWN, function () {
801
     conference.room.addListener(XMPPEvents.BRIDGE_DOWN, function () {
802
         conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.VIDEOBRIDGE_NOT_AVAILABLE);
802
         conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.VIDEOBRIDGE_NOT_AVAILABLE);
803
     });
803
     });
804
+    conference.room.addListener(XMPPEvents.RESERVATION_ERROR, function (code, msg) {
805
+        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.RESERVATION_ERROR, code, msg);
806
+    });
807
+    conference.room.addListener(XMPPEvents.GRACEFUL_SHUTDOWN, function () {
808
+        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.GRACEFUL_SHUTDOWN);
809
+    });
810
+    conference.room.addListener(XMPPEvents.JINGLE_FATAL_ERROR, function () {
811
+        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.JINGLE_FATAL_ERROR);
812
+    });
813
+    conference.room.addListener(XMPPEvents.MUC_DESTROYED, function (reason) {
814
+        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.CONFERENCE_DESTROYED, reason);
815
+    });
816
+    conference.room.addListener(XMPPEvents.CHAT_ERROR_RECEIVED, function (err, msg) {
817
+        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.CHAT_ERROR, err, msg);
818
+    });
804
 //    FIXME
819
 //    FIXME
805
 //    conference.room.addListener(XMPPEvents.MUC_JOINED, function () {
820
 //    conference.room.addListener(XMPPEvents.MUC_JOINED, function () {
806
 //        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_LEFT);
821
 //        conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_LEFT);

+ 21
- 1
JitsiConferenceErrors.js Visa fil

27
     /**
27
     /**
28
      * Indicates that there is no available videobridge.
28
      * Indicates that there is no available videobridge.
29
      */
29
      */
30
-    VIDEOBRIDGE_NOT_AVAILABLE: "conference.videobridgeNotAvailable"
30
+    VIDEOBRIDGE_NOT_AVAILABLE: "conference.videobridgeNotAvailable",
31
+    /**
32
+     * Indicates that reservation system returned error.
33
+     */
34
+    RESERVATION_ERROR: "conference.reservationError",
35
+    /**
36
+     * Indicates that graceful shutdown happened.
37
+     */
38
+    GRACEFUL_SHUTDOWN: "conference.gracefulShutdown",
39
+    /**
40
+     * Indicates that jingle fatal error happened.
41
+     */
42
+    JINGLE_FATAL_ERROR: "conference.jingleFatalError",
43
+    /**
44
+     * Indicates that conference has been destroyed.
45
+     */
46
+    CONFERENCE_DESTROYED: "conference.destroyed",
47
+    /**
48
+     * Indicates that chat error occured.
49
+     */
50
+    CHAT_ERROR: "conference.chatError"
31
     /**
51
     /**
32
      * Many more errors TBD here.
52
      * Many more errors TBD here.
33
      */
53
      */

+ 5
- 0
doc/API.md Visa fil

111
         - PASSWORD_REQUIRED - that error can be passed when the connection to the conference failed. You should try to join the conference with password.
111
         - PASSWORD_REQUIRED - that error can be passed when the connection to the conference failed. You should try to join the conference with password.
112
         - PASSWORD_NOT_SUPPORTED - indicates that conference cannot be locked
112
         - PASSWORD_NOT_SUPPORTED - indicates that conference cannot be locked
113
         - VIDEOBRIDGE_NOT_AVAILABLE - video bridge issues.
113
         - VIDEOBRIDGE_NOT_AVAILABLE - video bridge issues.
114
+        - RESERVATION_ERROR - error in reservation system
115
+        - GRACEFUL_SHUTDOWN - graceful shutdown
116
+        - JINGLE_FATAL_ERROR - error in jingle
117
+        - CONFERENCE_DESTROYED - conference has been destroyed
118
+        - CHAT_ERROR - chat error happened
114
     2. connection
119
     2. connection
115
         - PASSWORD_REQUIRED - passed when the connection to the server failed. You should try to authenticate with password.
120
         - PASSWORD_REQUIRED - passed when the connection to the server failed. You should try to authenticate with password.
116
         - CONNECTION_ERROR - indicates connection failures.
121
         - CONNECTION_ERROR - indicates connection failures.

Laddar…
Avbryt
Spara