Adds method to expose internal state - iceConnectionState, which later will be used by torture.

This commit is contained in:
damencho 2015-12-21 14:51:55 -06:00
parent 9960ce703f
commit 075d69f289
4 changed files with 556 additions and 825 deletions

View File

@ -496,6 +496,16 @@ JitsiConference.prototype.sendTones = function (tones, duration, pause) {
this.dtmfManager.sendTones(tones, duration, pause);
};
/**
* Returns the connection state for the current room. Its ice connection state
* for its session.
*/
JitsiConference.prototype.getConnectionState = function () {
if(this.room)
return this.room.getConnectionState();
return null;
}
/**
* Setups the listeners needed for the conference.
* @param conference the conference

File diff suppressed because it is too large Load Diff

View File

@ -639,4 +639,13 @@ ChatRoom.prototype.getJidBySSRC = function (ssrc) {
return this.session.getSsrcOwner(ssrc);
};
/**
* Returns the connection state for the current session.
*/
ChatRoom.prototype.getConnectionState = function () {
if(!this.session)
return null;
return this.session.getIceConnectionState();
}
module.exports = ChatRoom;

View File

@ -1626,4 +1626,12 @@ JingleSessionPC.prototype.remoteStreamAdded = function (data, times) {
}
}
/**
* Returns the ice connection state for the peer connection.
* @returns the ice connection state for the peer connection.
*/
JingleSessionPC.prototype.getIceConnectionState = function () {
return this.peerconnection.iceConnectionState;
}
module.exports = JingleSessionPC;