diff --git a/client/src/app/shared/components/jitsi/jitsi.component.html b/client/src/app/shared/components/jitsi/jitsi.component.html index f3b817fa1..534e6a1ab 100644 --- a/client/src/app/shared/components/jitsi/jitsi.component.html +++ b/client/src/app/shared/components/jitsi/jitsi.component.html @@ -61,7 +61,7 @@ matTooltip="{{ 'Exit live conference and continue livestream' | translate }}" *ngIf="videoStreamUrl && canSeeLiveStream && !isJitsiDialogOpen" > - meeting_room + meeting_room @@ -85,7 +85,7 @@ *ngIf="enableJitsi && isAccessPermitted" class="quick-icon indicator" mat-mini-fab - (click)="enterConversation()" + (click)="enterConferenceRoom()" matTooltip="{{ 'Enter live conference' | translate }}" > + + + live_help + + - {{ 'Live conference' | translate }} + {{ 'Live conference' | translate }} + {{ 'Help desk' | translate }} @@ -248,7 +261,7 @@ 0; } + public get canAccessSupport(): boolean { + return this.isSupportEnabled && this.enableJitsi && !!this.defaultRoomName; + } + private isOnCurrentLos: boolean; public canSeeLiveStream: boolean; @@ -174,7 +182,7 @@ export class JitsiComponent extends BaseViewComponentDirective implements OnInit } public get jitsiMeetUrl(): string { - return `https://${this.jitsiDomain}/${this.roomName}`; + return `https://${this.jitsiDomain}/${this.actualRoomName}`; } /** @@ -339,7 +347,7 @@ export class JitsiComponent extends BaseViewComponentDirective implements OnInit this.constantsService.get('Settings').subscribe(settings => { if (settings) { this.jitsiDomain = settings.JITSI_DOMAIN; - this.roomName = settings.JITSI_ROOM_NAME; + this.defaultRoomName = settings.JITSI_ROOM_NAME; this.roomPassword = settings.JITSI_ROOM_PASSWORD; this.constantsLoaded.resolve(); } @@ -352,7 +360,7 @@ export class JitsiComponent extends BaseViewComponentDirective implements OnInit .get('general_system_conference_auto_connect') .subscribe(autoconnect => (this.autoconnect = autoconnect)), this.configService.get('general_system_conference_show').subscribe(show => { - this.enableJitsi = show && !!this.jitsiDomain && !!this.roomName; + this.enableJitsi = show && !!this.jitsiDomain && !!this.defaultRoomName; if (this.enableJitsi && this.autoconnect) { this.startJitsi(); } else { @@ -392,6 +400,9 @@ export class JitsiComponent extends BaseViewComponentDirective implements OnInit } else { this.isApplausBarUsed = false; } + }), + this.configService.get('general_system_conference_enable_helpdesk').subscribe(enabled => { + this.isSupportEnabled = enabled; }) ); @@ -425,19 +436,22 @@ export class JitsiComponent extends BaseViewComponentDirective implements OnInit private startJitsi(): void { if (!this.isJitsiActiveInAnotherTab && this.enableJitsi && !this.isJitsiActive && this.jitsiNode) { - this.enterConversation(); + this.enterConferenceRoom(); } } - public async enterConversation(): Promise { + private async enterConversation(): Promise { await this.operator.loaded; try { await this.userMediaPermService.requestMediaAccess(); this.storageMap.set(this.RTC_LOGGED_STORAGE_KEY, true).subscribe(() => {}); this.setConferenceState(ConferenceState.jitsi); this.setOptions(); + if (this.api) { + this.api.dispose(); + this.api = undefined; + } this.api = new JitsiMeetExternalAPI(this.jitsiDomain, this.options); - const jitsiname = this.userRepo.getShortName(this.operator.user); this.api.executeCommand('displayName', jitsiname); this.loadApiCallbacks(); @@ -503,7 +517,7 @@ export class JitsiComponent extends BaseViewComponentDirective implements OnInit operatorClosIndex <= this.nextSpeakerAmount && !this.isJitsiActive ) { - this.enterConversation(); + this.enterConferenceRoom(); } } else { this.isOnCurrentLos = false; @@ -563,6 +577,7 @@ export class JitsiComponent extends BaseViewComponentDirective implements OnInit } public async stopJitsi(): Promise { + this.connectToHelpDesk = false; if (this.isJitsiActive) { this.api.executeCommand('hangup'); this.clearMembers(); @@ -578,7 +593,7 @@ export class JitsiComponent extends BaseViewComponentDirective implements OnInit private setOptions(): void { this.options = { - roomName: this.roomName, + roomName: this.actualRoomName, parentNode: this.jitsiNode.nativeElement, configOverwrite: this.configOverwrite, interfaceConfigOverwrite: this.interfaceConfigOverwrite @@ -617,6 +632,18 @@ export class JitsiComponent extends BaseViewComponentDirective implements OnInit this.storageMap.set(this.STREAM_RUNNING_STORAGE_KEY, true).subscribe(() => {}); } + public enterConferenceRoom(): void { + this.actualRoomName = this.defaultRoomName; + this.connectToHelpDesk = false; + this.enterConversation(); + } + + public enterSupportRoom(): void { + this.actualRoomName = `${this.defaultRoomName}-SUPPORT`; + this.connectToHelpDesk = true; + this.enterConversation(); + } + private onLiveStreamAvailable(liveStreamUrl: string): void { this.videoStreamUrl = liveStreamUrl; // this is the "dead" state; you would see the jitsi state; but are not connected diff --git a/server/openslides/core/config_variables.py b/server/openslides/core/config_variables.py index 03fe0a8e6..a9fb506c7 100644 --- a/server/openslides/core/config_variables.py +++ b/server/openslides/core/config_variables.py @@ -169,6 +169,20 @@ def get_config_variables(): subgroup="Live conference", ) + yield ConfigVariable( + name="general_system_conference_enable_helpdesk", + default_value=False, + input_type="boolean", + label="Enable help desk", + help_text=""" + Shows a help icon in the conference bar. + Users can connect to a dedicated conference. + The conference host has to manually ensure the coverage of the help desk. + """, + weight=148, + subgroup="Live conference", + ) + # Applause yield ConfigVariable(