Show a dialog when Jitsi encounters an error (#22352)
This commit is contained in:
parent
359e0e205f
commit
51ed7784d5
1 changed files with 3 additions and 3 deletions
|
@ -300,12 +300,12 @@ function createJWTToken() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function notifyHangup() {
|
async function notifyHangup(errorMessage?: string) {
|
||||||
if (widgetApi) {
|
if (widgetApi) {
|
||||||
// We send the hangup event before setAlwaysOnScreen, because the latter
|
// We send the hangup event before setAlwaysOnScreen, because the latter
|
||||||
// can cause the receiving side to instantly stop listening.
|
// can cause the receiving side to instantly stop listening.
|
||||||
try {
|
try {
|
||||||
await widgetApi.transport.send(ElementWidgetActions.HangupCall, {});
|
await widgetApi.transport.send(ElementWidgetActions.HangupCall, { errorMessage });
|
||||||
} finally {
|
} finally {
|
||||||
await widgetApi.setAlwaysOnScreen(false);
|
await widgetApi.setAlwaysOnScreen(false);
|
||||||
}
|
}
|
||||||
|
@ -418,7 +418,7 @@ function joinConference(audioDevice?: string, videoDevice?: string) {
|
||||||
if (error.isFatal) {
|
if (error.isFatal) {
|
||||||
// We got disconnected. Since Jitsi Meet might send us back to the
|
// We got disconnected. Since Jitsi Meet might send us back to the
|
||||||
// prejoin screen, we're forced to act as if we hung up entirely.
|
// prejoin screen, we're forced to act as if we hung up entirely.
|
||||||
notifyHangup();
|
notifyHangup(error.message);
|
||||||
meetApi = null;
|
meetApi = null;
|
||||||
closeConference();
|
closeConference();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue