frontend: update recordings URL handling and navigation logic

This commit is contained in:
juancarmore 2026-02-12 11:01:17 +01:00
parent 0e77aba428
commit 04563a009f
4 changed files with 12 additions and 5 deletions

View File

@ -46,7 +46,7 @@ export const extractRoomParamsGuard: CanActivateFn = (route: ActivatedRouteSnaps
// If the showOnlyRecordings flag is set, redirect to the recordings page for the room
if (showOnlyRecordings === 'true') {
return navigationService.createRedirectionTo(`room/${roomId}/recordings`, { secret });
return navigationService.createRedirectionTo(`room/${roomId}/recordings`);
}
return true;

View File

@ -212,7 +212,15 @@ export class MeetingComponent implements OnInit {
async onViewRecordingsClicked() {
const basePath = this.runtimeConfigService.basePath;
const basePathForUrl = basePath.endsWith('/') ? basePath.slice(0, -1) : basePath;
window.open(`${basePathForUrl}/room/${this.roomId()}/recordings?secret=${this.roomSecret()}`, '_blank');
let recordingsUrl = `${basePathForUrl}/room/${this.roomId()}/recordings`;
// Append room secret as query param if it exists
const secret = this.roomSecret();
if (secret) {
recordingsUrl += `?secret=${secret}`;
}
window.open(recordingsUrl, '_blank');
}
onParticipantConnected(event: any): void {

View File

@ -132,11 +132,11 @@ export class ViewRecordingComponent implements OnInit {
}
goBack(): void {
// Try to go back in browser history, otherwise navigate to recordings
// Try to go back in browser history, otherwise navigate to room recordings
if (window.history.length > 1) {
window.history.back();
} else {
this.router.navigate(['/recordings']);
this.router.navigate([`room/${this.recording?.roomId}/recordings`]);
}
}
}

View File

@ -12,7 +12,6 @@ import { RecordingShareDialogComponent } from '../components/recording-share-dia
})
export class RecordingService {
protected readonly RECORDINGS_API = `${HttpService.API_PATH_PREFIX}/recordings`;
// protected readonly INTERNAL_RECORDINGS_API = `${HttpService.INTERNAL_API_PATH_PREFIX}/recordings`;
protected log;