openvidu-components: Emitted event when refresh button is clicked

pull/739/head
csantosm 2022-06-14 12:23:59 +02:00
parent bb23e65897
commit d18d37de82
2 changed files with 17 additions and 2 deletions

View File

@ -38,7 +38,7 @@
</mat-menu>
<div class="refresh-btn">
<button matSuffix mat-icon-button aria-label="Refresh">
<button matSuffix mat-icon-button aria-label="Refresh" (click)="refreshRecordings()">
<mat-icon>refresh</mat-icon>
</button>
</div>

View File

@ -14,20 +14,28 @@ export class AdminDashboardComponent implements OnInit, OnDestroy {
/**
* Provides event notifications that fire when download recording button has been clicked.
* The recording should be downloaded using the REST API.
* @param recordingId
*/
@Output() onDownloadRecordingClicked: EventEmitter<string> = new EventEmitter<string>();
/**
* Provides event notifications that fire when delete recording button has been clicked.
* The recording should be deleted using the REST API.
* @param recordingId
*/
@Output() onDeleteRecordingClicked: EventEmitter<string> = new EventEmitter<string>();
/**
* Provides event notifications that fire when play recording button has been clicked.
* @param recordingId
*/
@Output() onPlayRecordingClicked: EventEmitter<string> = new EventEmitter<string>();
/**
* Provides event notifications that fire when refresh recordings button has been clicked.
*/
@Output() onRefreshRecordingsClicked: EventEmitter<void> = new EventEmitter<void>();
/**
* @internal
*/
@ -116,7 +124,7 @@ export class AdminDashboardComponent implements OnInit, OnDestroy {
* @internal
*/
getThumbnailSrc(recording: RecordingInfo): string {
return !recording.url ? undefined : recording.url.substring(0, recording.url.lastIndexOf('/')) + '/' + recording.id + '.jpg';
return !recording.url ? '' : recording.url.substring(0, recording.url.lastIndexOf('/')) + '/' + recording.id + '.jpg';
}
/**
@ -138,6 +146,13 @@ export class AdminDashboardComponent implements OnInit, OnDestroy {
this.onDownloadRecordingClicked.emit(recordingId);
}
/**
* @internal
*/
refreshRecordings() {
this.onRefreshRecordingsClicked.emit();
}
/**
* @internal
*/