From 48897f676919bd55380c6d7a6a6c85cf42b9c500 Mon Sep 17 00:00:00 2001 From: juancarmore Date: Mon, 21 Jul 2025 18:47:19 +0200 Subject: [PATCH] frontend: enhance recording view functionality and update URL handling in VideoRoomComponent --- .../video-room/video-room.component.html | 2 +- .../pages/video-room/video-room.component.ts | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/frontend/projects/shared-meet-components/src/lib/pages/video-room/video-room.component.html b/frontend/projects/shared-meet-components/src/lib/pages/video-room/video-room.component.html index e5817e9..8d09e15 100644 --- a/frontend/projects/shared-meet-components/src/lib/pages/video-room/video-room.component.html +++ b/frontend/projects/shared-meet-components/src/lib/pages/video-room/video-room.component.html @@ -118,6 +118,7 @@ [toolbarScreenshareButton]="features().showScreenShare" [toolbarLeaveButton]="!features().canModerateRoom" [toolbarRecordingButton]="features().canRecordRoom" + [toolbarViewRecordingsButton]="features().showRecordings" [toolbarBroadcastingButton]="false" [toolbarChatPanelButton]="features().showChat" [toolbarBackgroundEffectsButton]="features().showBackgrounds" @@ -126,7 +127,6 @@ [toolbarFullscreenButton]="features().showFullscreen" [toolbarActivitiesPanelButton]="features().showRecordings" [activitiesPanelRecordingActivity]="features().showRecordings" - [toolbarViewRecordingsButton]="true" [recordingActivityReadOnly]="!features().canRecordRoom" [recordingActivityShowControls]="{ play: false, diff --git a/frontend/projects/shared-meet-components/src/lib/pages/video-room/video-room.component.ts b/frontend/projects/shared-meet-components/src/lib/pages/video-room/video-room.component.ts index 84a03f8..c392760 100644 --- a/frontend/projects/shared-meet-components/src/lib/pages/video-room/video-room.component.ts +++ b/frontend/projects/shared-meet-components/src/lib/pages/video-room/video-room.component.ts @@ -348,16 +348,6 @@ export class VideoRoomComponent implements OnInit { await this.navigationService.navigateTo('disconnected', { reason: leftReason }); } - async onViewRecordingsClicked(recordingId?: any) { - if (recordingId) { - const privateAccess = true; - const { url } = await this.recordingService.generateRecordingUrl(recordingId, privateAccess); - window.open(url, '_blank'); - } else { - window.open(`/room/${this.roomId}/recordings`, '_blank'); - } - } - /** * Maps ParticipantLeftReason to LeftEventReason. * This method translates the technical reasons for a participant leaving the room @@ -429,4 +419,14 @@ export class VideoRoomComponent implements OnInit { console.error(error); } } + + async onViewRecordingsClicked(recordingId?: any) { + if (recordingId) { + const privateAccess = await this.authService.isUserAuthenticated(); + const { url } = await this.recordingService.generateRecordingUrl(recordingId, privateAccess); + window.open(url, '_blank'); + } else { + window.open(`/room/${this.roomId}/recordings?secret=${this.roomSecret}`, '_blank'); + } + } }