openvidu-components: Avoided subscribe to recording events if disabled

pull/739/head
csantosm 2022-06-22 14:01:50 +02:00
parent fd45988bfc
commit 6269db8978
1 changed files with 5 additions and 5 deletions

View File

@ -91,8 +91,7 @@ export class SessionComponent implements OnInit {
protected panelService: PanelService, protected panelService: PanelService,
private recordingService: RecordingService, private recordingService: RecordingService,
private translateService: TranslateService, private translateService: TranslateService,
private platformService: PlatformService, private platformService: PlatformService
private cd: ChangeDetectorRef
) { ) {
this.log = this.loggerSrv.get('SessionComponent'); this.log = this.loggerSrv.get('SessionComponent');
} }
@ -159,9 +158,10 @@ export class SessionComponent implements OnInit {
this.subscribeToNicknameChanged(); this.subscribeToNicknameChanged();
this.chatService.subscribeToChat(); this.chatService.subscribeToChat();
this.subscribeToReconnection(); this.subscribeToReconnection();
// if(RecordingEnabled){ const recordingEnabled = this.libService.recordingButton.getValue() && this.libService.recordingActivity.getValue();
if (recordingEnabled) {
this.subscribeToRecordingEvents(); this.subscribeToRecordingEvents();
// } }
this.onSessionCreated.emit(this.session); this.onSessionCreated.emit(this.session);
await this.connectToSession(); await this.connectToSession();