feat(conference.js): add isParticipantConnectionActive
This commit is contained in:
parent
8a43699a89
commit
5daceaead7
|
@ -691,6 +691,29 @@ export default {
|
||||||
isConnectionInterrupted () {
|
isConnectionInterrupted () {
|
||||||
return connectionIsInterrupted;
|
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 () {
|
getMyUserId () {
|
||||||
return this._room
|
return this._room
|
||||||
&& this._room.myUserId();
|
&& this._room.myUserId();
|
||||||
|
|
Loading…
Reference in New Issue