From 58900c94e7da04c030a6d62741741714adec390c Mon Sep 17 00:00:00 2001 From: juancarmore Date: Thu, 14 Aug 2025 16:59:26 +0200 Subject: [PATCH] frontend: remove participant name from URL handling and store in localStorage --- .../src/lib/pages/meeting/meeting.component.ts | 10 ---------- .../src/lib/services/participant.service.ts | 4 +++- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.ts b/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.ts index da5a985..6db00d3 100644 --- a/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.ts +++ b/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.ts @@ -265,7 +265,6 @@ export class MeetingComponent implements OnInit { try { await this.generateParticipantToken(); - await this.addParticipantNameToUrl(); await this.roomService.loadRoomPreferences(this.roomId); this.showMeeting = true; @@ -322,15 +321,6 @@ export class MeetingComponent implements OnInit { } } - /** - * Add participant name as a query parameter to the URL - */ - private async addParticipantNameToUrl() { - await this.navigationService.updateQueryParamsFromUrl(this.route.snapshot.queryParams, { - 'participant-name': this.participantName - }); - } - onRoomCreated(room: Room) { room.on( RoomEvent.DataReceived, diff --git a/frontend/projects/shared-meet-components/src/lib/services/participant.service.ts b/frontend/projects/shared-meet-components/src/lib/services/participant.service.ts index 8f5f85f..9704321 100644 --- a/frontend/projects/shared-meet-components/src/lib/services/participant.service.ts +++ b/frontend/projects/shared-meet-components/src/lib/services/participant.service.ts @@ -9,6 +9,7 @@ import { LoggerService } from 'openvidu-components-angular'; }) export class ParticipantService { protected readonly PARTICIPANTS_API = `${HttpService.INTERNAL_API_PATH_PREFIX}/participants`; + protected readonly PARTICIPANT_NAME_KEY = 'ovMeet-participantName'; protected participantName?: string; protected participantIdentity?: string; @@ -27,10 +28,11 @@ export class ParticipantService { setParticipantName(participantName: string): void { this.participantName = participantName; + localStorage.setItem(this.PARTICIPANT_NAME_KEY, participantName); } getParticipantName(): string | undefined { - return this.participantName; + return this.participantName || localStorage.getItem(this.PARTICIPANT_NAME_KEY) || undefined; } getParticipantIdentity(): string | undefined {