Browse Source

[RN] Fix ios audio issue with locked rooms

master
Bettenbuk Zoltan 7 years ago
parent
commit
180141cefb
1 changed files with 11 additions and 2 deletions
  1. 11
    2
      react/features/mobile/audio-mode/middleware.js

+ 11
- 2
react/features/mobile/audio-mode/middleware.js View File

6
 import {
6
 import {
7
     CONFERENCE_FAILED,
7
     CONFERENCE_FAILED,
8
     CONFERENCE_LEFT,
8
     CONFERENCE_LEFT,
9
-    CONFERENCE_WILL_JOIN,
9
+    CONFERENCE_JOINED,
10
     SET_AUDIO_ONLY
10
     SET_AUDIO_ONLY
11
 } from '../../base/conference';
11
 } from '../../base/conference';
12
 import { MiddlewareRegistry } from '../../base/redux';
12
 import { MiddlewareRegistry } from '../../base/redux';
32
             mode = AudioMode.DEFAULT;
32
             mode = AudioMode.DEFAULT;
33
             break;
33
             break;
34
 
34
 
35
-        case CONFERENCE_WILL_JOIN:
35
+        /*
36
+         * NOTE: We moved the audio mode setting from CONFERENCE_WILL_JOIN to
37
+         * CONFERENCE_JOINED because in case of a locked room, the app goes
38
+         * through CONFERENCE_FAILED state and gets to CONFERENCE_JOINED only
39
+         * after a correct password, so we want to make sure we have the correct
40
+         * audio mode set up when we finally get to the conf, but also make sure
41
+         * that the app is in the right audio mode if the user leaves the
42
+         * conference after the password prompt appears.
43
+         */
44
+        case CONFERENCE_JOINED:
36
         case SET_AUDIO_ONLY: {
45
         case SET_AUDIO_ONLY: {
37
             if (getState()['features/base/conference'].conference
46
             if (getState()['features/base/conference'].conference
38
                     || action.conference) {
47
                     || action.conference) {

Loading…
Cancel
Save