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