handle FOCUS_DISCONNECTED error

This commit is contained in:
isymchych 2016-01-13 17:11:28 +02:00
parent 996eabf5d3
commit 2d7d350db6
3 changed files with 10 additions and 2 deletions

View File

@ -5,7 +5,7 @@ var RTC = require("./modules/RTC/RTC");
var XMPPEvents = require("./service/xmpp/XMPPEvents");
var AuthenticationEvents = require("./service/authentication/AuthenticationEvents");
var RTCEvents = require("./service/RTC/RTCEvents");
var DSEvents = require("../../service/desktopsharing/DesktopSharingEventTypes");
var DSEvents = require("./service/desktopsharing/DesktopSharingEventTypes");
var EventEmitter = require("events");
var JitsiConferenceEvents = require("./JitsiConferenceEvents");
var JitsiConferenceErrors = require("./JitsiConferenceErrors");
@ -817,6 +817,9 @@ function setupListeners(conference) {
conference.room.addListener(XMPPEvents.CHAT_ERROR_RECEIVED, function (err, msg) {
conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.CHAT_ERROR, err, msg);
});
conference.room.addListener(XMPPEvents.FOCUS_DISCONNECTED, function (focus, retrySec) {
conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, JitsiConferenceErrors.FOCUS_DISCONNECTED, focus, retrySec);
});
// FIXME
// conference.room.addListener(XMPPEvents.MUC_JOINED, function () {
// conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_LEFT);

View File

@ -47,7 +47,11 @@ var JitsiConferenceErrors = {
/**
* Indicates that chat error occured.
*/
CHAT_ERROR: "conference.chatError"
CHAT_ERROR: "conference.chatError",
/**
* Indicates that focus error happened.
*/
FOCUS_DISCONNECTED: "conference.focusDisconnected"
/**
* Many more errors TBD here.
*/

View File

@ -116,6 +116,7 @@ JitsiMeetJS.setLogLevel(JitsiMeetJS.logLevels.ERROR);
- JINGLE_FATAL_ERROR - error in jingle
- CONFERENCE_DESTROYED - conference has been destroyed
- CHAT_ERROR - chat error happened
- FOCUS_DISCONNECTED - focus error happened
2. connection
- PASSWORD_REQUIRED - passed when the connection to the server failed. You should try to authenticate with password.
- CONNECTION_ERROR - indicates connection failures.