diff --git a/react/features/base/flags/constants.js b/react/features/base/flags/constants.js index 3523cec87..e126d9b7b 100644 --- a/react/features/base/flags/constants.js +++ b/react/features/base/flags/constants.js @@ -11,7 +11,7 @@ export const ADD_PEOPLE_ENABLED = 'add-people.enabled'; * Used by apps that do not use Jitsi audio. * Default: disabled (false) */ -export const ANDROID_AUDIO_FOCUS_DISABLED = 'android.audio-focus.disabled'; +export const AUDIO_FOCUS_DISABLED = 'audio-focus.disabled'; /** * Flag indicating if the audio mute button should be displayed. diff --git a/react/features/mobile/audio-mode/middleware.js b/react/features/mobile/audio-mode/middleware.js index 2ed61c19f..51f45e1fb 100644 --- a/react/features/mobile/audio-mode/middleware.js +++ b/react/features/mobile/audio-mode/middleware.js @@ -1,5 +1,5 @@ // @flow -import { NativeEventEmitter, NativeModules, Platform } from 'react-native'; +import { NativeEventEmitter, NativeModules } from 'react-native'; import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../../base/app'; import { SET_AUDIO_ONLY } from '../../base/audio-only'; @@ -9,7 +9,7 @@ import { CONFERENCE_JOINED, getCurrentConference } from '../../base/conference'; -import { getFeatureFlag, ANDROID_AUDIO_FOCUS_DISABLED } from '../../base/flags'; +import { getFeatureFlag, AUDIO_FOCUS_DISABLED } from '../../base/flags'; import { MiddlewareRegistry } from '../../base/redux'; import { _SET_AUDIOMODE_DEVICES, _SET_AUDIOMODE_SUBSCRIPTIONS } from './actionTypes'; @@ -140,8 +140,8 @@ function _updateAudioMode({ getState }, next, action) { const { enabled: audioOnly } = state['features/base/audio-only']; let mode; - if (Platform.OS === 'android' && getFeatureFlag(state, ANDROID_AUDIO_FOCUS_DISABLED, false)) { - mode = AudioMode.DEFAULT; + if (getFeatureFlag(state, AUDIO_FOCUS_DISABLED, false)) { + return result; } else if (conference) { mode = audioOnly ? AudioMode.AUDIO_CALL : AudioMode.VIDEO_CALL; } else {