diff --git a/react/features/background/index.js b/react/features/background/index.js index 200d25492..4cdf36b5e 100644 --- a/react/features/background/index.js +++ b/react/features/background/index.js @@ -1,2 +1,3 @@ +export * from './actionTypes'; import './middleware'; import './reducer'; diff --git a/react/features/full-screen/middleware.js b/react/features/full-screen/middleware.js index 2c8e86d0d..a76e55a8e 100644 --- a/react/features/full-screen/middleware.js +++ b/react/features/full-screen/middleware.js @@ -3,6 +3,7 @@ import { StatusBar } from 'react-native'; import { Immersive } from 'react-native-immersive'; +import { APP_STATE_CHANGED } from '../background'; import { CONFERENCE_FAILED, CONFERENCE_LEFT, @@ -23,9 +24,20 @@ import { MiddlewareRegistry } from '../base/redux'; * @returns {Function} */ MiddlewareRegistry.register(store => next => action => { - let fullScreen; + let fullScreen = null; switch (action.type) { + case APP_STATE_CHANGED: { + // Check if we just came back from the background and reenable full + // screen mode if necessary. + if (action.appState === 'active') { + const conference = store.getState()['features/base/conference']; + + fullScreen = conference ? !conference.audioOnly : false; + } + break; + } + case CONFERENCE_WILL_JOIN: { const conference = store.getState()['features/base/conference']; @@ -37,10 +49,6 @@ MiddlewareRegistry.register(store => next => action => { case CONFERENCE_LEFT: fullScreen = false; break; - - default: - fullScreen = null; - break; } if (fullScreen !== null) {