Kaynağa Gözat

feat(rn,flags) add fullscreen.enabled flag

master
Jean-François Alarie 4 yıl önce
ebeveyn
işleme
407021e258
No account linked to committer's email address

+ 6
- 0
react/features/base/flags/constants.js Dosyayı Görüntüle

@@ -56,6 +56,12 @@ export const CHAT_ENABLED = 'chat.enabled';
56 56
  */
57 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 66
  * Flag indicating if the Help button should be enabled.
61 67
  * Default: enabled (true).

+ 11
- 3
react/features/conference/components/native/Conference.js Dosyayı Görüntüle

@@ -5,7 +5,7 @@ import { NativeModules, SafeAreaView, StatusBar } from 'react-native';
5 5
 import LinearGradient from 'react-native-linear-gradient';
6 6
 
7 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 9
 import { Container, LoadingIndicator, TintedView } from '../../../base/react';
10 10
 import { connect } from '../../../base/redux';
11 11
 import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui/constants';
@@ -68,6 +68,11 @@ type Props = AbstractProps & {
68 68
      */
69 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 77
      * The ID of the participant currently on stage (if any)
73 78
      */
@@ -145,12 +150,14 @@ class Conference extends AbstractConference<Props, *> {
145 150
      * @returns {ReactElement}
146 151
      */
147 152
     render() {
153
+        const { _fullscreenEnabled } = this.props;
154
+
148 155
         return (
149 156
             <Container style = { styles.conference }>
150 157
                 <StatusBar
151 158
                     barStyle = 'light-content'
152
-                    hidden = { true }
153
-                    translucent = { true } />
159
+                    hidden = { _fullscreenEnabled }
160
+                    translucent = { _fullscreenEnabled } />
154 161
                 { this._renderContent() }
155 162
             </Container>
156 163
         );
@@ -443,6 +450,7 @@ function _mapStateToProps(state) {
443 450
         _calendarEnabled: isCalendarEnabled(state),
444 451
         _connecting: Boolean(connecting_),
445 452
         _filmstripVisible: isFilmstripVisible(state),
453
+        _fullscreenEnabled: getFeatureFlag(state, FULLSCREEN_ENABLED, true),
446 454
         _largeVideoParticipantId: state['features/large-video'].participantId,
447 455
         _pictureInPictureEnabled: getFeatureFlag(state, PIP_ENABLED),
448 456
         _reducedUI: reducedUI,

+ 3
- 1
react/features/mobile/full-screen/middleware.js Dosyayı Görüntüle

@@ -5,6 +5,7 @@ import { Immersive } from 'react-native-immersive';
5 5
 import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../../base/app';
6 6
 import { getCurrentConference } from '../../base/conference';
7 7
 import { isAnyDialogOpen } from '../../base/dialog/functions';
8
+import { FULLSCREEN_ENABLED, getFeatureFlag } from '../../base/flags';
8 9
 import { Platform } from '../../base/react';
9 10
 import { MiddlewareRegistry, StateListenerRegistry } from '../../base/redux';
10 11
 
@@ -50,8 +51,9 @@ StateListenerRegistry.register(
50 51
         const { enabled: audioOnly } = state['features/base/audio-only'];
51 52
         const conference = getCurrentConference(state);
52 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 58
     /* listener */ fullScreen => _setFullScreen(fullScreen)
57 59
 );

Loading…
İptal
Kaydet