mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 03:42:30 +00:00
On Android we go into "immersive mode" when in a conference, this is our way of being full-creen. There are occasions, however, in which Android takes us out of immerfive mode without us (the application / SDK) knowing: when a child activity is started, a modal window shown, etc. In order to be resilient to any possible change in the immersive mode, register a listener which will be called when Android changes it, so we can re-eavluate if we need it and thus re-enable it.
22 lines
472 B
JavaScript
22 lines
472 B
JavaScript
import { ReducerRegistry } from '../../base/redux';
|
|
|
|
import { _SET_IMMERSIVE_LISTENER } from './actionTypes';
|
|
|
|
const INITIAL_STATE = {
|
|
listener: undefined
|
|
};
|
|
|
|
ReducerRegistry.register(
|
|
'features/full-screen',
|
|
(state = INITIAL_STATE, action) => {
|
|
switch (action.type) {
|
|
case _SET_IMMERSIVE_LISTENER:
|
|
return {
|
|
...state,
|
|
listener: action.listener
|
|
};
|
|
}
|
|
|
|
return state;
|
|
});
|