ov-components: update onRoomDisconnected event to reference onParticipantLeft for deprecation notice

master
Carlos Santos 2025-05-21 16:02:52 +02:00
parent d3702ab6ac
commit 34eb27dfe3
4 changed files with 10 additions and 1 deletions

View File

@ -82,7 +82,7 @@ export class SessionComponent implements OnInit, OnDestroy {
/**
* Provides event notifications that fire when participant is disconnected from Room.
* @deprecated Use onParticipantLeft instead
* @deprecated Use {@link onParticipantLeft} instead.
*/
@Output() onRoomDisconnected: EventEmitter<void> = new EventEmitter<void>();

View File

@ -96,6 +96,12 @@ export class ToolbarComponent implements OnInit, OnDestroy, AfterViewInit {
}
}
/**
* This event is emitted when the room has been disconnected.
* @deprecated Use {@link onParticipantLeft} instead.
*/
@Output() onRoomDisconnected: EventEmitter<void> = new EventEmitter<void>();
/**
* This event is emitted when the local participant leaves the room.
*/
@ -524,6 +530,7 @@ export class ToolbarComponent implements OnInit, OnDestroy, AfterViewInit {
participantName: this.participantService.getLocalParticipant()?.identity || '',
reason: ParticipantLeftReason.LEAVE
});
this.onRoomDisconnected.emit();
}, false);
} catch (error) {
this.log.e('There was an error disconnecting:', error.code, error.message);

View File

@ -56,6 +56,7 @@
<ov-toolbar
id="default-toolbar"
(onParticipantLeft)="_onParticipantLeft($event)"
(onRoomDisconnected)="onRoomDisconnected.emit()"
(onVideoEnabledChanged)="onVideoEnabledChanged.emit($event)"
(onAudioEnabledChanged)="onAudioEnabledChanged.emit($event)"
(onScreenShareEnabledChanged)="onScreenShareEnabledChanged.emit($event)"

View File

@ -213,6 +213,7 @@ export class VideoconferenceComponent implements OnDestroy, AfterViewInit {
/**
* Provides event notifications that fire when Room is disconnected for the local participant.
* @deprecated Use {@link onParticipantLeft} instead
*/
@Output() onRoomDisconnected: EventEmitter<void> = new EventEmitter<void>();