From 80b7a5a006bd4f763389da124970bbe6e29ed8b2 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Mon, 2 Oct 2023 15:01:28 +0200 Subject: [PATCH] fix(ui): fix call stop ev --- frontend/app/player/web/assist/Call.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/app/player/web/assist/Call.ts b/frontend/app/player/web/assist/Call.ts index 6710a9cdd..03f4c0134 100644 --- a/frontend/app/player/web/assist/Call.ts +++ b/frontend/app/player/web/assist/Call.ts @@ -38,7 +38,10 @@ export default class Call { private peerID: string, private getAssistVersion: () => number ) { - socket.on('call_end', this.onRemoteCallEnd); + socket.on('call_end', (d) => { + console.log(d, socket.id) + this.onRemoteCallEnd() + }); socket.on('videofeed', ({ streamId, enabled }) => { console.log(streamId, enabled); console.log(this.videoStreams); @@ -150,9 +153,9 @@ export default class Call { } private handleCallEnd() { - this.callArgs && this.callArgs.onCallEnd(); - this.callConnection[0] && this.callConnection[0].close(); + if (this.store.get().calling !== CallingState.NoCall) this.callArgs && this.callArgs.onCallEnd(); this.store.update({ calling: CallingState.NoCall }); + this.callConnection[0] && this.callConnection[0].close(); this.callArgs = null; // TODO: We have it separated, right? (check) //this.toggleAnnotation(false)