ov-components: assign participant name to observable on ready to join

master
Carlos Santos 2025-05-21 11:07:57 +02:00
parent 02b594e405
commit 146aeed893
2 changed files with 6 additions and 0 deletions

View File

@ -138,6 +138,10 @@ export class PreJoinComponent implements OnInit, OnDestroy {
// Mark tracks as permanent for avoiding to be removed in ngOnDestroy // Mark tracks as permanent for avoiding to be removed in ngOnDestroy
this.shouldRemoveTracksWhenComponentIsDestroyed = false; this.shouldRemoveTracksWhenComponentIsDestroyed = false;
// Assign participant name to the observable if it is defined
if(this.participantName) this.libService.setParticipantName(this.participantName);
this.onReadyToJoin.emit(); this.onReadyToJoin.emit();
} }

View File

@ -549,6 +549,8 @@ export class VideoconferenceComponent implements OnDestroy, AfterViewInit {
this.prejoinSub = this.libService.prejoin$.subscribe((value: boolean) => { this.prejoinSub = this.libService.prejoin$.subscribe((value: boolean) => {
this.showPrejoin = value; this.showPrejoin = value;
if (!this.showPrejoin) { 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 // Ensure we have a participant name before proceeding with the join
this.log.d('Prejoin page is hidden, checking participant name'); this.log.d('Prejoin page is hidden, checking participant name');
// Check if we have a participant name already // Check if we have a participant name already