feat(conference.js): add isParticipantConnectionActive

pull/938/head
paweldomas 9 years ago
parent 8a43699a89
commit 5daceaead7
  1. 23
      conference.js

@ -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();

Loading…
Cancel
Save