feat(iFrame): add a method for getting the participants info
This commit is contained in:
parent
7f67f78db6
commit
8dbe3e37b9
|
@ -358,6 +358,19 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the formatted display name of a participant.
|
||||
*
|
||||
* @param {string} participantId - The id of the participant.
|
||||
* @returns {string} The formatted display name.
|
||||
*/
|
||||
_getFormattedDisplayName(participantId) {
|
||||
const { formattedDisplayName }
|
||||
= this._participants[participantId] || {};
|
||||
|
||||
return formattedDisplayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the id of the on stage participant.
|
||||
*
|
||||
|
@ -702,6 +715,23 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
|||
return getCurrentDevices(this._transport);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the conference participants information.
|
||||
*
|
||||
* @returns {Array<Object>} - Returns an array containing participants
|
||||
* information like participant id, display name, avatar URL and email.
|
||||
*/
|
||||
getParticipantsInfo() {
|
||||
const participantIds = Object.keys(this._participants);
|
||||
const participantsInfo = Object.values(this._participants);
|
||||
|
||||
participantsInfo.forEach((participant, idx) => {
|
||||
participant.participantId = participantIds[idx];
|
||||
});
|
||||
|
||||
return participantsInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current video quality setting.
|
||||
*
|
||||
|
@ -831,19 +861,6 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
|||
return email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the formatted display name of a participant.
|
||||
*
|
||||
* @param {string} participantId - The id of the participant.
|
||||
* @returns {string} The formatted display name.
|
||||
*/
|
||||
_getFormattedDisplayName(participantId) {
|
||||
const { formattedDisplayName }
|
||||
= this._participants[participantId] || {};
|
||||
|
||||
return formattedDisplayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the iframe that loads Jitsi Meet.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue