Browse Source

feat(video-quality): hide if recorder or interfaceConfig specified it (#2166)

master
virtuacoplenny 7 years ago
parent
commit
03e68b0e4b

+ 10
- 2
interface_config.js View File

@@ -136,12 +136,20 @@ var interfaceConfig = {
136 136
      *
137 137
      * @type {number}
138 138
      */
139
-    CONNECTION_INDICATOR_AUTO_HIDE_TIMEOUT: 5000
139
+    CONNECTION_INDICATOR_AUTO_HIDE_TIMEOUT: 5000,
140 140
 
141 141
     /**
142 142
      * The name of the application connected to the "Add people" search service.
143 143
      */
144
-    // ADD_PEOPLE_APP_NAME: ""
144
+    // ADD_PEOPLE_APP_NAME: "",
145
+
146
+    /**
147
+     * If true, hides the video quality label indicating the resolution status
148
+     * of the current large video.
149
+     *
150
+     * @type {boolean}
151
+     */
152
+    VIDEO_QUALITY_LABEL_DISABLED: false
145 153
 };
146 154
 
147 155
 /* eslint-enable no-unused-vars, no-var, max-len */

+ 29
- 3
react/features/conference/components/Conference.web.js View File

@@ -31,6 +31,12 @@ class Conference extends Component<*> {
31 31
      * @static
32 32
      */
33 33
     static propTypes = {
34
+        /**
35
+         * Whether or not the current local user is recording the conference.
36
+         *
37
+         */
38
+        _isRecording: PropTypes.bool,
39
+
34 40
         dispatch: PropTypes.func
35 41
     };
36 42
 
@@ -92,14 +98,18 @@ class Conference extends Component<*> {
92 98
      * @returns {ReactElement}
93 99
      */
94 100
     render() {
95
-        const { filmStripOnly } = interfaceConfig;
101
+        const { filmStripOnly, VIDEO_QUALITY_LABEL_DISABLED } = interfaceConfig;
102
+        const hideVideoQualityLabel = filmStripOnly
103
+            || VIDEO_QUALITY_LABEL_DISABLED
104
+            || this.props._isRecording;
96 105
 
97 106
         return (
98 107
             <div
99 108
                 id = 'videoconference_page'
100 109
                 onMouseMove = { this._onShowToolbar }>
101 110
                 <div id = 'videospace'>
102
-                    <LargeVideo />
111
+                    <LargeVideo
112
+                        hideVideoQualityLabel = { hideVideoQualityLabel } />
103 113
                     <Filmstrip filmstripOnly = { filmStripOnly } />
104 114
                 </div>
105 115
 
@@ -132,4 +142,20 @@ class Conference extends Component<*> {
132 142
     }
133 143
 }
134 144
 
135
-export default reactReduxConnect()(Conference);
145
+/**
146
+ * Maps (parts of) the Redux state to the associated props for the
147
+ * {@code Conference} component.
148
+ *
149
+ * @param {Object} state - The Redux state.
150
+ * @private
151
+ * @returns {{
152
+ *     _isRecording: boolean
153
+ * }}
154
+ */
155
+function _mapStateToProps(state) {
156
+    return {
157
+        _isRecording: state['features/base/config'].iAmRecorder
158
+    };
159
+}
160
+
161
+export default reactReduxConnect(_mapStateToProps)(Conference);

+ 10
- 1
react/features/large-video/components/LargeVideo.web.js View File

@@ -1,5 +1,6 @@
1 1
 /* @flow */
2 2
 
3
+import PropTypes from 'prop-types';
3 4
 import React, { Component } from 'react';
4 5
 
5 6
 import { Watermarks } from '../../base/react';
@@ -15,6 +16,13 @@ declare var interfaceConfig: Object;
15 16
  * @extends Component
16 17
  */
17 18
 export default class LargeVideo extends Component<*> {
19
+    static propTypes = {
20
+        /**
21
+         * True if the {@code VideoQualityLabel} should not be displayed.
22
+         */
23
+        hideVideoQualityLabel: PropTypes.bool
24
+    };
25
+
18 26
     /**
19 27
      * Implements React's {@link Component#render()}.
20 28
      *
@@ -68,7 +76,8 @@ export default class LargeVideo extends Component<*> {
68 76
                     </div>
69 77
                 </div>
70 78
                 <span id = 'localConnectionMessage' />
71
-                { interfaceConfig.filmStripOnly ? null : <VideoQualityLabel /> }
79
+                { this.props.hideVideoQualityLabel
80
+                    ? null : <VideoQualityLabel /> }
72 81
                 <RecordingLabel />
73 82
             </div>
74 83
         );

Loading…
Cancel
Save