Browse Source

feat(rn,flags) add fullscreen.enabled flag

master
Jean-François Alarie 4 years ago
parent
commit
407021e258
No account linked to committer's email address

+ 6
- 0
react/features/base/flags/constants.js View File

56
  */
56
  */
57
 export const FILMSTRIP_ENABLED = 'filmstrip.enabled';
57
 export const FILMSTRIP_ENABLED = 'filmstrip.enabled';
58
 
58
 
59
+/**
60
+ * Flag indicating if fullscreen (immersive) mode should be enabled.
61
+ * Default: enabled (true).
62
+ */
63
+export const FULLSCREEN_ENABLED = 'fullscreen.enabled';
64
+
59
 /**
65
 /**
60
  * Flag indicating if the Help button should be enabled.
66
  * Flag indicating if the Help button should be enabled.
61
  * Default: enabled (true).
67
  * Default: enabled (true).

+ 11
- 3
react/features/conference/components/native/Conference.js View File

5
 import LinearGradient from 'react-native-linear-gradient';
5
 import LinearGradient from 'react-native-linear-gradient';
6
 
6
 
7
 import { appNavigate } from '../../../app/actions';
7
 import { appNavigate } from '../../../app/actions';
8
-import { PIP_ENABLED, getFeatureFlag } from '../../../base/flags';
8
+import { PIP_ENABLED, FULLSCREEN_ENABLED, getFeatureFlag } from '../../../base/flags';
9
 import { Container, LoadingIndicator, TintedView } from '../../../base/react';
9
 import { Container, LoadingIndicator, TintedView } from '../../../base/react';
10
 import { connect } from '../../../base/redux';
10
 import { connect } from '../../../base/redux';
11
 import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants';
11
 import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants';
68
      */
68
      */
69
     _filmstripVisible: boolean,
69
     _filmstripVisible: boolean,
70
 
70
 
71
+    /**
72
+     * The indicator which determines whether fullscreen (immersive) mode is enabled.
73
+     */
74
+    _fullscreenEnabled: boolean,
75
+
71
     /**
76
     /**
72
      * The ID of the participant currently on stage (if any)
77
      * The ID of the participant currently on stage (if any)
73
      */
78
      */
145
      * @returns {ReactElement}
150
      * @returns {ReactElement}
146
      */
151
      */
147
     render() {
152
     render() {
153
+        const { _fullscreenEnabled } = this.props;
154
+
148
         return (
155
         return (
149
             <Container style = { styles.conference }>
156
             <Container style = { styles.conference }>
150
                 <StatusBar
157
                 <StatusBar
151
                     barStyle = 'light-content'
158
                     barStyle = 'light-content'
152
-                    hidden = { true }
153
-                    translucent = { true } />
159
+                    hidden = { _fullscreenEnabled }
160
+                    translucent = { _fullscreenEnabled } />
154
                 { this._renderContent() }
161
                 { this._renderContent() }
155
             </Container>
162
             </Container>
156
         );
163
         );
443
         _calendarEnabled: isCalendarEnabled(state),
450
         _calendarEnabled: isCalendarEnabled(state),
444
         _connecting: Boolean(connecting_),
451
         _connecting: Boolean(connecting_),
445
         _filmstripVisible: isFilmstripVisible(state),
452
         _filmstripVisible: isFilmstripVisible(state),
453
+        _fullscreenEnabled: getFeatureFlag(state, FULLSCREEN_ENABLED, true),
446
         _largeVideoParticipantId: state['features/large-video'].participantId,
454
         _largeVideoParticipantId: state['features/large-video'].participantId,
447
         _pictureInPictureEnabled: getFeatureFlag(state, PIP_ENABLED),
455
         _pictureInPictureEnabled: getFeatureFlag(state, PIP_ENABLED),
448
         _reducedUI: reducedUI,
456
         _reducedUI: reducedUI,

+ 3
- 1
react/features/mobile/full-screen/middleware.js View File

5
 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../../base/app';
5
 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../../base/app';
6
 import { getCurrentConference } from '../../base/conference';
6
 import { getCurrentConference } from '../../base/conference';
7
 import { isAnyDialogOpen } from '../../base/dialog/functions';
7
 import { isAnyDialogOpen } from '../../base/dialog/functions';
8
+import { FULLSCREEN_ENABLED, getFeatureFlag } from '../../base/flags';
8
 import { Platform } from '../../base/react';
9
 import { Platform } from '../../base/react';
9
 import { MiddlewareRegistry, StateListenerRegistry } from '../../base/redux';
10
 import { MiddlewareRegistry, StateListenerRegistry } from '../../base/redux';
10
 
11
 
50
         const { enabled: audioOnly } = state['features/base/audio-only'];
51
         const { enabled: audioOnly } = state['features/base/audio-only'];
51
         const conference = getCurrentConference(state);
52
         const conference = getCurrentConference(state);
52
         const dialogOpen = isAnyDialogOpen(state);
53
         const dialogOpen = isAnyDialogOpen(state);
54
+        const fullscreenEnabled = getFeatureFlag(state, FULLSCREEN_ENABLED, true);
53
 
55
 
54
-        return conference ? !audioOnly && !dialogOpen : false;
56
+        return conference ? !audioOnly && !dialogOpen && fullscreenEnabled : false;
55
     },
57
     },
56
     /* listener */ fullScreen => _setFullScreen(fullScreen)
58
     /* listener */ fullScreen => _setFullScreen(fullScreen)
57
 );
59
 );

Loading…
Cancel
Save