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 84d81ce..e5817e9 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 @@ -136,7 +136,6 @@ }" [activitiesPanelBroadcastingActivity]="false" [showDisconnectionDialog]="false" - (onTokenRequested)="onTokenRequested()" (onRoomCreated)="onRoomCreated($event)" (onParticipantConnected)="onParticipantConnected($event)" (onParticipantLeft)="onParticipantLeft($event)" 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 8efdf95..84a03f8 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 @@ -107,7 +107,8 @@ export class VideoRoomComponent implements OnInit { protected sessionStorageService: SessionStorageService, protected featureConfService: FeatureConfigurationService, protected clipboard: Clipboard, - protected notificationService: NotificationService + protected notificationService: NotificationService, + protected recordingService: RecordingManagerService ) { this.features = this.featureConfService.features; } @@ -243,13 +244,13 @@ export class VideoRoomComponent implements OnInit { */ private async generateParticipantToken() { try { - const { /*token,*/ role } = await this.participantTokenService.generateToken({ + const { token, role } = await this.participantTokenService.generateToken({ roomId: this.roomId, participantName: this.participantName, secret: this.roomSecret }); // The components library needs the token to be set in the 'onTokenRequested' method - // this.participantToken = token; + this.participantToken = token; this.participantRole = role; } catch (error: any) { console.error('Error generating participant token:', error); @@ -297,11 +298,6 @@ export class VideoRoomComponent implements OnInit { }); } - onTokenRequested() { - // Participant token must be set only when requested - this.participantToken = this.participantTokenService.getParticipantToken() || ''; - } - onRoomCreated(room: Room) { room.on( RoomEvent.DataReceived, @@ -352,6 +348,16 @@ 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