Stop Jitsi if we time out while connecting to a video room (#8659)

pull/28217/head
Robin 2022-05-20 16:25:28 -04:00 committed by GitHub
parent 01a3150d44
commit 79ad065d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -190,6 +190,11 @@ export default class VideoChannelStore extends AsyncStoreWithClient<null> {
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}`);

View File

@ -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",