openvidu-components: Fixd bug updating participants array in part. panel

pull/707/head
csantosm 2022-03-10 12:59:55 +01:00
parent 27d70de3cd
commit ab74818579
1 changed files with 4 additions and 2 deletions

View File

@ -47,9 +47,11 @@ export class ParticipantsPanelComponent implements OnInit, OnDestroy {
this.remoteParticipantsSubs = this.participantService.remoteParticipantsObs.subscribe((p: ParticipantAbstractModel[]) => {
// Workaround which forc the objects references update
// After one entirely day trying to make it works, this is the only way
p.forEach((par, index) => {
this.remoteParticipants[index] = Object.create(par);
const remoteParticipantsAux = [];
p.forEach((par) => {
remoteParticipantsAux.push(Object.create(par));
});
this.remoteParticipants = remoteParticipantsAux;
// Mark for re-rendering using an impure pipe 'streamsTypesEnabled'
this.cd.markForCheck();
});