diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/settings-panel/settings-panel.component.html b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/settings-panel/settings-panel.component.html index f4673e74..2d592122 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/settings-panel/settings-panel.component.html +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/settings-panel/settings-panel.component.html @@ -25,6 +25,7 @@
{{ 'PANEL.SETTINGS.GENERAL' | translate }}
{{ 'PANEL.SETTINGS.VIDEO' | translate }} diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/settings-panel/settings-panel.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/settings-panel/settings-panel.component.ts index 88031c05..85c960f7 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/settings-panel/settings-panel.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/panel/settings-panel/settings-panel.component.ts @@ -23,9 +23,13 @@ export class SettingsPanelComponent implements OnInit { @Output() onLangChanged = new EventEmitter(); settingsOptions: typeof PanelSettingsOptions = PanelSettingsOptions; selectedOption: PanelSettingsOptions = PanelSettingsOptions.GENERAL; + showCameraButton: boolean = true; + showMicrophoneButton: boolean = true; showCaptions: boolean = true; panelSubscription: Subscription; isMobile: boolean = false; + private cameraButtonSub: Subscription; + private microphoneButtonSub: Subscription; private captionsSubs: Subscription; constructor( private panelService: PanelService, @@ -39,6 +43,9 @@ export class SettingsPanelComponent implements OnInit { } ngOnDestroy() { + if (this.panelSubscription) this.panelSubscription.unsubscribe(); + if (this.cameraButtonSub) this.cameraButtonSub.unsubscribe(); + if (this.microphoneButtonSub) this.microphoneButtonSub.unsubscribe(); if (this.captionsSubs) this.captionsSubs.unsubscribe(); } @@ -50,9 +57,9 @@ export class SettingsPanelComponent implements OnInit { } private subscribeToDirectives() { - this.captionsSubs = this.libService.captionsButton$.subscribe((value: boolean) => { - this.showCaptions = value; - }); + this.cameraButtonSub = this.libService.cameraButton$.subscribe((value: boolean) => (this.showCameraButton = value)); + this.microphoneButtonSub = this.libService.microphoneButton$.subscribe((value: boolean) => (this.showMicrophoneButton = value)); + this.captionsSubs = this.libService.captionsButton$.subscribe((value: boolean) => (this.showCaptions = value)); } private subscribeToPanelToggling() { diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/pre-join/pre-join.component.html b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/pre-join/pre-join.component.html index fe4e0fa5..e9d51825 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/pre-join/pre-join.component.html +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/pre-join/pre-join.component.html @@ -24,7 +24,7 @@
-
+
-
+
{ + this.showCameraButton = value; + }); + this.microphoneButtonSub = this.libService.microphoneButton$.subscribe((value: boolean) => { + this.showMicrophoneButton = value; + }); this.displayLogoSub = this.libService.displayLogo$.subscribe((value: boolean) => { this.showLogo = value; // this.cd.markForCheck(); diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/toolbar/toolbar.component.html b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/toolbar/toolbar.component.html index 6d639552..60406bcd 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/toolbar/toolbar.component.html +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/toolbar/toolbar.component.html @@ -32,6 +32,7 @@