ov-components: Added getParticipantByIdentity to participantService

master
CSantosM 2026-01-22 12:31:00 +01:00
parent b321d5bb69
commit 465403f8cb
1 changed files with 13 additions and 0 deletions

View File

@ -460,6 +460,19 @@ export class ParticipantService {
}
}
/**
* Returns the participant with the given identity.
* @param identity
* @returns
*/
getParticipantByIdentity(identity: string): ParticipantModel | undefined {
if (this.localParticipant?.identity === identity) {
return this.localParticipant;
}
return this.remoteParticipants.find((p) => p.identity === identity);
}
/* ------------------------------ Remote Participants ------------------------------ */
/**