Przeglądaj źródła

[RN] No VideoQualityLabel in Picture-in-Picture

master
Lyubo Marinov 7 lat temu
rodzic
commit
024671165a

+ 31
- 13
react/features/large-video/components/Labels.native.js Wyświetl plik

9
     isNarrowAspectRatio,
9
     isNarrowAspectRatio,
10
     makeAspectRatioAware
10
     makeAspectRatioAware
11
 } from '../../base/responsive-ui';
11
 } from '../../base/responsive-ui';
12
-import { isFilmstripVisible } from '../../filmstrip';
13
 
12
 
14
-import AbstractLabels, { type Props } from './AbstractLabels';
13
+import AbstractLabels, {
14
+    _abstractMapStateToProps,
15
+    type Props as AbstractLabelsProps
16
+} from './AbstractLabels';
15
 import styles from './styles';
17
 import styles from './styles';
16
 
18
 
19
+/**
20
+ * The type of the React {@code Component} props of {@link Labels}.
21
+ */
22
+type Props = AbstractLabelsProps & {
23
+
24
+    /**
25
+     * The indicator which determines whether the UI is reduced (to accommodate
26
+     * smaller display areas).
27
+     *
28
+     * @private
29
+     */
30
+    _reducedUI: boolean
31
+};
32
+
17
 /**
33
 /**
18
  * A container that renders the conference indicators, if any.
34
  * A container that renders the conference indicators, if any.
19
  */
35
  */
25
      */
41
      */
26
     render() {
42
     render() {
27
         const wide = !isNarrowAspectRatio(this);
43
         const wide = !isNarrowAspectRatio(this);
28
-        const { _filmstripVisible } = this.props;
44
+        const { _filmstripVisible, _reducedUI } = this.props;
29
 
45
 
30
         return (
46
         return (
31
             <View
47
             <View
42
                     this._renderRecordingLabel(
58
                     this._renderRecordingLabel(
43
                         JitsiRecordingConstants.mode.STREAM)
59
                         JitsiRecordingConstants.mode.STREAM)
44
                 }
60
                 }
45
-                {
46
-                    this._renderVideoQualityLabel()
61
+                {/*
62
+                  * Emil, Lyubomir, Nichole, and Zoli said that the Labels
63
+                  * should not be rendered in Picture-in-Picture. Saul argued
64
+                  * that the recording Labels should be rendered. As a temporary
65
+                  * compromise, don't render the VideoQualityLabel at least
66
+                  * because it's not that important.
67
+                  */
68
+                    _reducedUI || this._renderVideoQualityLabel()
47
                 }
69
                 }
48
             </View>
70
             </View>
49
         );
71
         );
61
  * @param {Object} state - The redux state.
83
  * @param {Object} state - The redux state.
62
  * @private
84
  * @private
63
  * @returns {{
85
  * @returns {{
64
- *     _filmstripVisible: boolean
86
+ *     _filmstripVisible: boolean,
87
+ *     _reducedUI: boolean
65
  * }}
88
  * }}
66
  */
89
  */
67
 function _mapStateToProps(state) {
90
 function _mapStateToProps(state) {
68
     return {
91
     return {
69
-        /**
70
-         * The indicator which determines whether the filmstrip is visible.
71
-         *
72
-         * @private
73
-         * @type {boolean}
74
-         */
75
-        _filmstripVisible: isFilmstripVisible(state)
92
+        ..._abstractMapStateToProps(state),
93
+        _reducedUI: state['features/base/responsive-ui'].reducedUI
76
     };
94
     };
77
 }
95
 }
78
 
96
 

Ładowanie…
Anuluj
Zapisz