mirror of https://github.com/OpenVidu/openvidu.git
ov-components: Refactor recording list display logic in RecordingActivityComponent
parent
fc73aca4a2
commit
bcbf24b84d
|
@ -177,12 +177,11 @@
|
|||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (recordingList.length > 0) {
|
||||
<mat-divider></mat-divider>
|
||||
}
|
||||
|
||||
<!-- Recording list -->
|
||||
@if (recordingList.length > 0) {
|
||||
@if (showRecordingList && recordingList.length > 0) {
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<div class="recording-list-container">
|
||||
@for (recording of recordingList; track trackByRecordingId($index, recording)) {
|
||||
<div class="recording-card" [class.recording-active]="recording.status === recStatusEnum.STARTED">
|
||||
|
|
|
@ -386,11 +386,7 @@ export class RecordingActivityComponent implements OnInit, OnDestroy {
|
|||
this.recordingService.recordingStatusObs.pipe(takeUntil(this.destroy$)).subscribe((event: RecordingStatusInfo) => {
|
||||
const { status, recordingList, error } = event;
|
||||
this.recordingStatus = status;
|
||||
if (this.showRecordingList) {
|
||||
this.recordingList = recordingList;
|
||||
} else {
|
||||
this.recordingList = recordingList.filter((rec) => rec.status === RecordingStatus.STARTED);
|
||||
}
|
||||
this.recordingList = recordingList;
|
||||
this.recordingError = error;
|
||||
this.recordingAlive = this.recordingStatus === RecordingStatus.STARTED;
|
||||
if (this.recordingStatus !== RecordingStatus.FAILED) {
|
||||
|
|
Loading…
Reference in New Issue