frontend: update recordings URL handling and navigation logic
This commit is contained in:
parent
0e77aba428
commit
04563a009f
@ -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;
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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`]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user