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

This commit is contained in:
damencho 2015-12-21 14:46:50 -06:00
parent 7b36a5ea31
commit 5dea92b0dc
4 changed files with 54 additions and 0 deletions

View File

@ -493,6 +493,16 @@ JitsiConference.prototype.getPhonePin = function () {
return null;
}
/**
* 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

View File

@ -495,6 +495,16 @@ JitsiConference.prototype.getPhonePin = function () {
return null;
}
/**
* 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
@ -6543,6 +6553,15 @@ ChatRoom.prototype.getPhonePin = function () {
return this.phonePin;
}
/**
* Returns the connection state for the current session.
*/
ChatRoom.prototype.getConnectionState = function () {
if(!this.session)
return null;
return this.session.getIceConnectionState();
}
module.exports = ChatRoom;
}).call(this,"/modules/xmpp/ChatRoom.js")
@ -8312,6 +8331,14 @@ 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;
}).call(this,"/modules/xmpp/JingleSessionPC.js")

View File

@ -741,4 +741,13 @@ ChatRoom.prototype.getPhonePin = function () {
return this.phonePin;
}
/**
* 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;