diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/session/session.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/session/session.component.ts index 9851e390..89b6f8ea 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/session/session.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/session/session.component.ts @@ -39,9 +39,9 @@ export class SessionComponent implements OnInit { @ContentChild('panel', { read: TemplateRef }) panelTemplate: TemplateRef; @ContentChild('layout', { read: TemplateRef }) layoutTemplate: TemplateRef; - @Output() _session = new EventEmitter(); - @Output() _publisher = new EventEmitter(); - @Output() _error = new EventEmitter(); + @Output() onSessionCreated = new EventEmitter(); + // @Output() _publisher = new EventEmitter(); + // @Output() _error = new EventEmitter(); session: Session; sessionScreen: Session; @@ -103,6 +103,7 @@ export class SessionComponent implements OnInit { this.subscribeToNicknameChanged(); this.chatService.subscribeToChat(); this.subscribeToReconnection(); + this.onSessionCreated.emit(this.session); await this.connectToSession(); // Workaround, firefox does not have audio when publisher join with muted camera @@ -110,8 +111,6 @@ export class SessionComponent implements OnInit { // this.openviduService.publishVideo(this.localUserService.getMyCameraPublisher(), true); // this.openviduService.publishVideo(this.localUserService.getMyCameraPublisher(), false); // } - - this._session.emit(this.session); } ngOnDestroy() { @@ -178,7 +177,7 @@ export class SessionComponent implements OnInit { await this.openviduService.publish(this.participantService.getMyCameraPublisher()); } } catch (error) { - this._error.emit({ error: error.error, messgae: error.message, code: error.code, status: error.status }); + // this._error.emit({ error: error.error, messgae: error.message, code: error.code, status: error.status }); this.log.e('There was an error connecting to the session:', error.code, error.message); this.actionService.openDialog('There was an error connecting to the session:', error?.error || error?.message); } diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.html b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.html index 6e785bb5..905fec7e 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.html +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.html @@ -15,7 +15,7 @@
- + diff --git a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.ts b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.ts index e3d19ff0..e102a9c0 100644 --- a/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.ts +++ b/openvidu-components-angular/projects/openvidu-angular/src/lib/components/videoconference/videoconference.component.ts @@ -266,6 +266,9 @@ export class VideoconferenceComponent implements OnInit, OnDestroy, AfterViewIni onChatPanelButtonClicked() { this.onToolbarChatPanelButtonClicked.emit(); } + _onSessionCreated(event: any) { + this.onSessionCreated.emit(event); + } private handlePublisherError(e: any) { let message: string;