diff --git a/src/stores/VideoChannelStore.ts b/src/stores/VideoChannelStore.ts index 9ab521b50f..0e249ac02f 100644 --- a/src/stores/VideoChannelStore.ts +++ b/src/stores/VideoChannelStore.ts @@ -190,6 +190,11 @@ export default class VideoChannelStore extends AsyncStoreWithClient { messaging.off(`action:${ElementWidgetActions.UnmuteVideo}`, this.onUnmuteVideo); messaging.off(`action:${ElementWidgetActions.HangupCall}`, this.onHangup); + if (messaging.transport.ready) { + // The messaging still exists, which means Jitsi might still be going in the background + messaging.transport.send(ElementWidgetActions.ForceHangupCall, {}); + } + this.emit(VideoChannelEvent.Disconnect, roomId); throw new Error(`Failed to join call in room ${roomId}: ${e}`); diff --git a/src/stores/widgets/ElementWidgetActions.ts b/src/stores/widgets/ElementWidgetActions.ts index 117c4b47f3..df82bf3b1f 100644 --- a/src/stores/widgets/ElementWidgetActions.ts +++ b/src/stores/widgets/ElementWidgetActions.ts @@ -21,6 +21,7 @@ export enum ElementWidgetActions { WidgetReady = "io.element.widget_ready", JoinCall = "io.element.join", HangupCall = "im.vector.hangup", + ForceHangupCall = "io.element.force_hangup", CallParticipants = "io.element.participants", MuteAudio = "io.element.mute_audio", UnmuteAudio = "io.element.unmute_audio",