feat(conference.js): add isParticipantConnectionActive

This commit is contained in:
paweldomas 2016-09-16 15:40:24 -05:00
parent 8a43699a89
commit 5daceaead7
1 changed files with 23 additions and 0 deletions

View File

@ -691,6 +691,29 @@ export default {
isConnectionInterrupted () {
return connectionIsInterrupted;
},
/**
* Finds JitsiParticipant for given id.
*
* @param {string} id participant's identifier(MUC nickname).
*
* @returns {JitsiParticipant|null} participant instance for given id or
* null if not found.
*/
getParticipantById (id) {
return room ? room.getParticipantById(id) : null;
},
/**
* Checks whether the user identified by given id is currently connected.
*
* @param {string} id participant's identifier(MUC nickname)
*
* @returns {boolean|null} true if participant's connection is ok or false
* if the user is having connectivity issues.
*/
isParticipantConnectionActive (id) {
let participant = this.getParticipantById(id);
return participant ? participant.isConnectionActive() : null;
},
getMyUserId () {
return this._room
&& this._room.myUserId();