CONNECTION_INTERRUPTED event will now be generated if we've ever been in stable state(we can go into "unstable" state after muting video and connection problems screen will not be displayed).

(cherry picked from commit f559bd1ba4)

# Conflicts:
#	modules/xmpp/JingleSessionPC.js
This commit is contained in:
paweldomas 2015-11-11 11:14:41 -06:00
parent bc68f0af9a
commit 1ab67c2f72
1 changed files with 7 additions and 1 deletions
modules/xmpp

View File

@ -86,7 +86,10 @@ JingleSessionPC.prototype.doInitialize = function () {
this.hadstuncandidate = false;
this.hadturncandidate = false;
this.lasticecandidate = false;
// True if reconnect is in progress
this.isreconnect = false;
// Set to true if the connection was ever stable
this.wasstable = false;
this.peerconnection = new TraceablePeerConnection(
this.connection.jingle.ice_config,
@ -116,6 +119,9 @@ JingleSessionPC.prototype.doInitialize = function () {
};
this.peerconnection.onsignalingstatechange = function (event) {
if (!(self && self.peerconnection)) return;
if (self.peerconnection.signalingState === 'stable') {
self.wasstable = true;
}
self.updateModifySourcesQueue();
};
/**
@ -140,7 +146,7 @@ JingleSessionPC.prototype.doInitialize = function () {
case 'disconnected':
self.isreconnect = true;
// Informs interested parties that the connection has been interrupted.
if (self.peerconnection.signalingState === 'stable')
if (self.wasstable)
self.room.eventEmitter.emit(XMPPEvents.CONNECTION_INTERRUPTED);
break;
case 'failed':