diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/pre-join/pre-join.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/pre-join/pre-join.component.ts index 168b6a92..5b9bc5e9 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/pre-join/pre-join.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/pre-join/pre-join.component.ts @@ -138,6 +138,10 @@ export class PreJoinComponent implements OnInit, OnDestroy { // Mark tracks as permanent for avoiding to be removed in ngOnDestroy this.shouldRemoveTracksWhenComponentIsDestroyed = false; + + // Assign participant name to the observable if it is defined + if(this.participantName) this.libService.setParticipantName(this.participantName); + this.onReadyToJoin.emit(); } diff --git a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/videoconference/videoconference.component.ts b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/videoconference/videoconference.component.ts index 50bfa747..88358c90 100644 --- a/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/videoconference/videoconference.component.ts +++ b/openvidu-components-angular/projects/openvidu-components-angular/src/lib/components/videoconference/videoconference.component.ts @@ -549,6 +549,8 @@ export class VideoconferenceComponent implements OnDestroy, AfterViewInit { this.prejoinSub = this.libService.prejoin$.subscribe((value: boolean) => { this.showPrejoin = value; if (!this.showPrejoin) { + // Emit token ready if the prejoin page won't be shown + // Ensure we have a participant name before proceeding with the join this.log.d('Prejoin page is hidden, checking participant name'); // Check if we have a participant name already