Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 79ad065

Browse files
authored
Stop Jitsi if we time out while connecting to a video room (#8659)
1 parent 01a3150 commit 79ad065

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/stores/VideoChannelStore.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ export default class VideoChannelStore extends AsyncStoreWithClient<null> {
190190
messaging.off(`action:${ElementWidgetActions.UnmuteVideo}`, this.onUnmuteVideo);
191191
messaging.off(`action:${ElementWidgetActions.HangupCall}`, this.onHangup);
192192

193+
if (messaging.transport.ready) {
194+
// The messaging still exists, which means Jitsi might still be going in the background
195+
messaging.transport.send(ElementWidgetActions.ForceHangupCall, {});
196+
}
197+
193198
this.emit(VideoChannelEvent.Disconnect, roomId);
194199

195200
throw new Error(`Failed to join call in room ${roomId}: ${e}`);

src/stores/widgets/ElementWidgetActions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export enum ElementWidgetActions {
2121
WidgetReady = "io.element.widget_ready",
2222
JoinCall = "io.element.join",
2323
HangupCall = "im.vector.hangup",
24+
ForceHangupCall = "io.element.force_hangup",
2425
CallParticipants = "io.element.participants",
2526
MuteAudio = "io.element.mute_audio",
2627
UnmuteAudio = "io.element.unmute_audio",

0 commit comments

Comments
 (0)