frontend: enhance recording view functionality and update URL handling in VideoRoomComponent

This commit is contained in:
juancarmore 2025-07-21 18:47:19 +02:00
parent 4ca7f82d15
commit 48897f6769
2 changed files with 11 additions and 11 deletions

View File

@ -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,

View File

@ -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');
}
}
}