ov-components: rename participant created event to participant connected and update documentation

master
Carlos Santos 2025-03-07 13:42:50 +01:00
parent dee470609c
commit 272eb9002c
3 changed files with 12 additions and 5 deletions

View File

@ -85,9 +85,9 @@ export class SessionComponent implements OnInit, OnDestroy {
@Output() onRoomDisconnected: EventEmitter<void> = new EventEmitter<void>(); @Output() onRoomDisconnected: EventEmitter<void> = new EventEmitter<void>();
/** /**
* Provides event notifications that fire when local participant is created and connected to the Room. * Provides event notifications that fire when local participant is connected to the Room.
*/ */
@Output() onParticipantCreated: EventEmitter<ParticipantModel> = new EventEmitter<ParticipantModel>(); @Output() onParticipantConnected: EventEmitter<ParticipantModel> = new EventEmitter<ParticipantModel>();
room: Room; room: Room;
sideMenu: MatSidenav; sideMenu: MatSidenav;
@ -210,7 +210,7 @@ export class SessionComponent implements OnInit, OnDestroy {
this.onRoomCreated.emit(this.room); this.onRoomCreated.emit(this.room);
this.cd.markForCheck(); this.cd.markForCheck();
this.loading = false; this.loading = false;
this.onParticipantCreated.emit(this.participantService.getLocalParticipant()); this.onParticipantConnected.emit(this.participantService.getLocalParticipant());
} catch (error) { } catch (error) {
this.log.e('There was an error connecting to the room:', error.code, error.message); this.log.e('There was an error connecting to the room:', error.code, error.message);
this.actionService.openDialog(this.translateService.translate('ERRORS.SESSION'), error?.error || error?.message || error); this.actionService.openDialog(this.translateService.translate('ERRORS.SESSION'), error?.error || error?.message || error);

View File

@ -27,7 +27,8 @@
(onRoomReconnecting)="onRoomDisconnected.emit()" (onRoomReconnecting)="onRoomDisconnected.emit()"
(onRoomDisconnected)="onRoomDisconnected.emit()" (onRoomDisconnected)="onRoomDisconnected.emit()"
(onRoomReconnected)="onRoomReconnected.emit()" (onRoomReconnected)="onRoomReconnected.emit()"
(onParticipantCreated)="onParticipantCreated.emit($event)" (onParticipantConnected)="onParticipantCreated.emit($event)"
(onParticipantConnected)="onParticipantConnected.emit($event)"
> >
<ng-template #toolbar> <ng-template #toolbar>
<ng-container *ngIf="openviduAngularToolbarTemplate"> <ng-container *ngIf="openviduAngularToolbarTemplate">

View File

@ -341,10 +341,16 @@ export class VideoconferenceComponent implements OnDestroy, AfterViewInit {
/** /**
* Provides event notifications that fire when local participant is created and connected to the Room. * Provides event notifications that fire when local participant is created and connected to the Room.
* It provides the {@link ParticipantModel} payload as event data. * @deprecated Use `onParticipantConnected` instead
*/ */
@Output() onParticipantCreated: EventEmitter<ParticipantModel> = new EventEmitter<ParticipantModel>(); @Output() onParticipantCreated: EventEmitter<ParticipantModel> = new EventEmitter<ParticipantModel>();
/**
* Provides event notifications that fire when local participant is connected to the Room.
* It provides the {@link ParticipantModel} payload as event data.
*/
@Output() onParticipantConnected: EventEmitter<ParticipantModel> = new EventEmitter<ParticipantModel>();
/** /**
* @internal * @internal
*/ */