ov-components: emit room created event after participant connection

master
Carlos Santos 2025-03-07 13:04:06 +01:00
parent 9b4f330c4a
commit 3defad20cc
1 changed files with 2 additions and 1 deletions

View File

@ -185,7 +185,6 @@ export class SessionComponent implements OnInit, OnDestroy {
async ngOnInit() {
this.room = this.openviduService.getRoom();
this.onRoomCreated.emit(this.room);
// this.subscribeToCaptionLanguage();
this.subcribeToActiveSpeakersChanged();
@ -208,6 +207,8 @@ export class SessionComponent implements OnInit, OnDestroy {
}
try {
await this.participantService.connect();
// Send room created after participant connect for avoiding to send incomplete room payload
this.onRoomCreated.emit(this.room);
this.cd.markForCheck();
this.loading = false;
this.onParticipantCreated.emit(this.participantService.getLocalParticipant());