Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

audio-mode: don't change the mode unless there is no active conference

Saúl Ibarra Corretgé7289e59ca973
diff --git a/react/features/mobile/audio-mode/middleware.js b/react/features/mobile/audio-mode/middleware.js
index 2550913eae..010c13e189 100644
--- a/react/features/mobile/audio-mode/middleware.js
+++ b/react/features/mobile/audio-mode/middleware.js
@@ -7,7 +7,8 @@ import {
CONFERENCE_FAILED,
CONFERENCE_LEFT,
CONFERENCE_JOINED,
- SET_AUDIO_ONLY
+ SET_AUDIO_ONLY,
+ getCurrentConference
} from '../../base/conference';
import { MiddlewareRegistry } from '../../base/redux';
@@ -31,9 +32,15 @@ MiddlewareRegistry.register(({ getState }) => next => action => {
switch (action.type) {
case APP_WILL_MOUNT:
case CONFERENCE_FAILED:
- case CONFERENCE_LEFT:
- mode = AudioMode.DEFAULT;
+ case CONFERENCE_LEFT: {
+ const conference = getCurrentConference(getState());
+
+ if (typeof conference === 'undefined') {
+ mode = AudioMode.DEFAULT;
+ }
+
break;
+ }
/*
* NOTE: We moved the audio mode setting from CONFERENCE_WILL_JOIN to