diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.ts index 8c6242a2..e1e421c2 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/layout/layout.component.ts @@ -49,14 +49,13 @@ export class LayoutComponent implements OnInit, OnDestroy, AfterViewInit { protected subscribeToParticipants() { this.localParticipantSubs = this.participantService.localParticipantObs.subscribe((p) => { - // We need to update the object reference doing a deep copy for update the view - this.localParticipant = Object.assign(Object.create(p), p) + this.localParticipant = p; this.layoutService.update(); this.cd.markForCheck(); }); this.remoteParticipantsSubs = this.participantService.remoteParticipantsObs.subscribe((participants) => { - this.remoteParticipants = [...participants]; + this.remoteParticipants = participants; this.layoutService.update(); this.cd.markForCheck(); }); diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/participants-panel/participant-panel-item/participant-panel-item.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/participants-panel/participant-panel-item/participant-panel-item.component.ts index dcea75f2..9f89df78 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/participants-panel/participant-panel-item/participant-panel-item.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/participants-panel/participant-panel-item/participant-panel-item.component.ts @@ -1,17 +1,20 @@ -import { Component, Input } from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input } from '@angular/core'; import { ParticipantAbstractModel } from '../../../../models/participant.model'; @Component({ selector: 'ov-participant-panel-item', templateUrl: './participant-panel-item.component.html', - styleUrls: ['./participant-panel-item.component.css'] + styleUrls: ['./participant-panel-item.component.css'], + changeDetection: ChangeDetectionStrategy.OnPush + }) export class ParticipantPanelItemComponent { @Input() - set participant( p: ParticipantAbstractModel) { + set participant(p: ParticipantAbstractModel) { this._participant = p; } + _participant: ParticipantAbstractModel; constructor() {} diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/participants-panel/participants-panel/participants-panel.component.css b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/participants-panel/participants-panel/participants-panel.component.css index e0ec0517..e381b608 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/participants-panel/participants-panel/participants-panel.component.css +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/participants-panel/participants-panel/participants-panel.component.css @@ -27,6 +27,8 @@ } .scrollable { + height: calc(100% - 60px); + max-height: calc(100% - 60px); overflow: auto; } diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/participants-panel/participants-panel/participants-panel.component.html b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/participants-panel/participants-panel/participants-panel.component.html index 3f0bc91e..abfae45c 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/participants-panel/participants-panel/participants-panel.component.html +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/participants-panel/participants-panel/participants-panel.component.html @@ -8,14 +8,14 @@