From fb101bc2c7131b22e566364df6f5e6208d42d492 Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Fri, 28 Apr 2023 17:50:11 +0200 Subject: [PATCH] openvidu-components: Emitted event for updating recording list Non moderators participants didn't update their recording list because they didn't know when a recording has been deleted or stopped. Now all standard participants know all recording events using custom signals and emitted an event to the application with the aim of updating the recording list. --- .../activities-panel.component.html | 1 + .../activities-panel.component.ts | 11 +++++++ .../recording-activity.component.html | 1 + .../recording-activity.component.ts | 29 ++++++++++++++++++- .../components/session/session.component.ts | 14 ++++----- .../videoconference.component.html | 1 + .../videoconference.component.ts | 15 ++++++++++ .../src/lib/models/signal.model.ts | 3 +- .../lib/services/openvidu/openvidu.service.ts | 11 +++++-- .../services/recording/recording.service.ts | 11 +++++-- .../src/app/openvidu-call/call.component.html | 3 +- .../src/app/openvidu-call/call.component.ts | 6 ++++ 12 files changed, 92 insertions(+), 14 deletions(-) diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/activities-panel/activities-panel.component.html b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/activities-panel/activities-panel.component.html index 3038ad0d0..5c73cbbf6 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/activities-panel/activities-panel.component.html +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/activities-panel/activities-panel.component.html @@ -15,6 +15,7 @@ (onStartRecordingClicked)="_onStartRecordingClicked()" (onStopRecordingClicked)="_onStopRecordingClicked()" (onDeleteRecordingClicked)="_onDeleteRecordingClicked($event)" + (onForceRecordingUpdate)="_onForceRecordingUpdate()" > = new EventEmitter(); + /** + * Provides event notifications that fire when a participant needs update the recordings information + * (usually when recording is stopped by the session moderator or recording panel is opened). + * The recordings should be updated using the REST API. + */ + @Output() onForceRecordingUpdate: EventEmitter = new EventEmitter(); + /** * Provides event notifications that fire when start broadcasting button has been clicked. * The broadcasting should be started using the REST API. @@ -112,6 +119,10 @@ export class ActivitiesPanelComponent implements OnInit { this.onStopBroadcastingClicked.emit(); } + _onForceRecordingUpdate() { + this.onForceRecordingUpdate.emit(); + } + private subscribeToPanelToggling() { this.panelSubscription = this.panelService.panelOpenedObs.subscribe((ev: PanelEvent) => { if (ev.type === PanelType.ACTIVITIES && !!ev.expand) { diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/activities-panel/recording-activity/recording-activity.component.html b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/activities-panel/recording-activity/recording-activity.component.html index 9b723b1d4..93e7da77a 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/activities-panel/recording-activity/recording-activity.component.html +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/panel/activities-panel/recording-activity/recording-activity.component.html @@ -117,6 +117,7 @@