diff --git a/meet-ce/frontend/projects/shared-meet-components/src/lib/components/meeting-lobby/meeting-lobby.component.html b/meet-ce/frontend/projects/shared-meet-components/src/lib/components/meeting-lobby/meeting-lobby.component.html index 2dcac213..0f44ff22 100644 --- a/meet-ce/frontend/projects/shared-meet-components/src/lib/components/meeting-lobby/meeting-lobby.component.html +++ b/meet-ce/frontend/projects/shared-meet-components/src/lib/components/meeting-lobby/meeting-lobby.component.html @@ -49,8 +49,8 @@ } - - @if (isE2EEEnabled()) { + + @if (showE2EEKeyInput()) { Encryption Key this.lobbyService.state().backButtonText); protected isE2EEEnabled = computed(() => this.lobbyService.state().hasRoomE2EEEnabled); protected participantForm = computed(() => this.lobbyService.state().participantForm); + /** + * Computed signal to determine if the E2EE key input should be shown. + * When E2EE key is provided via URL query param, the control is disabled and should not be displayed. + */ + protected showE2EEKeyInput = computed(() => { + const form = this.lobbyService.state().participantForm; + const e2eeKeyControl = form.get('e2eeKey'); + return this.isE2EEEnabled() && e2eeKeyControl?.enabled; + }); async onFormSubmit(): Promise { await this.lobbyService.submitAccess(); diff --git a/meet-ce/frontend/projects/shared-meet-components/src/lib/services/meeting/meeting-lobby.service.ts b/meet-ce/frontend/projects/shared-meet-components/src/lib/services/meeting/meeting-lobby.service.ts index ec2720ef..1bd2981a 100644 --- a/meet-ce/frontend/projects/shared-meet-components/src/lib/services/meeting/meeting-lobby.service.ts +++ b/meet-ce/frontend/projects/shared-meet-components/src/lib/services/meeting/meeting-lobby.service.ts @@ -86,13 +86,15 @@ export class MeetingLobbyService { /** * Computed signal for E2EE key - optimized to avoid repeated form access + * Uses getRawValue() to get the value even when the control is disabled (e.g., when set from URL param) */ readonly e2eeKeyValue = computed(() => { - const { valid, value } = this._state().participantForm; - if (!valid || !value.e2eeKey?.trim()) { + const form = this._state().participantForm; + const rawValue = form.getRawValue(); + if (!form.valid || !rawValue.e2eeKey?.trim()) { return ''; } - return value.e2eeKey.trim(); + return rawValue.e2eeKey.trim(); }); /**