mirror of https://github.com/OpenVidu/openvidu.git
ov-components: simplify disconnect logic by removing callback. The participantLeft event will be fired by LK event handler
parent
94f2e3e573
commit
bd711b57f3
|
@ -518,13 +518,7 @@ export class ToolbarComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
*/
|
||||
async disconnect() {
|
||||
try {
|
||||
await this.openviduService.disconnectRoom(() =>
|
||||
this.onParticipantLeft.emit({
|
||||
roomName: this.openviduService.getRoomName(),
|
||||
participantName: this.participantService.getLocalParticipant()?.identity || '',
|
||||
reason: ParticipantLeftReason.LEAVE
|
||||
})
|
||||
);
|
||||
await this.openviduService.disconnectRoom();
|
||||
} catch (error) {
|
||||
this.log.e('There was an error disconnecting:', error.code, error.message);
|
||||
this.actionService.openDialog(this.translateService.translate('ERRORS.DISCONNECT'), error?.error || error?.message || error);
|
||||
|
|
Loading…
Reference in New Issue