Bladeren bron

Hides call info and invite button in iAmRecorder mode. (#2154)

master
Дамян Минков 7 jaren geleden
bovenliggende
commit
5dbabbe44a
2 gewijzigde bestanden met toevoegingen van 15 en 1 verwijderingen
  1. 11
    1
      react/features/filmstrip/components/Filmstrip.web.js
  2. 4
    0
      react/features/invite/middleware.js

+ 11
- 1
react/features/filmstrip/components/Filmstrip.web.js Bestand weergeven

@@ -32,6 +32,12 @@ class Filmstrip extends Component<*> {
32 32
      * @static
33 33
      */
34 34
     static propTypes = {
35
+        /**
36
+         * Whether invite button rendering should be skipped,
37
+         * by default it is. false
38
+         */
39
+        _hideInviteButton: PropTypes.bool,
40
+
35 41
         /**
36 42
          * Whether or not remote videos are currently being hovered over.
37 43
          */
@@ -110,7 +116,9 @@ class Filmstrip extends Component<*> {
110 116
                         id = 'filmstripLocalVideo'
111 117
                         onMouseOut = { this._onMouseOut }
112 118
                         onMouseOver = { this._onMouseOver }>
113
-                        { this.props.filmstripOnly ? null : <InviteButton /> }
119
+                        { this.props.filmstripOnly
120
+                            || this.props._hideInviteButton
121
+                            ? null : <InviteButton /> }
114 122
                         <div id = 'filmstripLocalVideoThumbnail' />
115 123
                     </div>
116 124
                     <div
@@ -185,12 +193,14 @@ class Filmstrip extends Component<*> {
185 193
  * @private
186 194
  * @returns {{
187 195
  *     _hovered: boolean,
196
+ *     _hideInviteButton: boolean,
188 197
  *     _remoteVideosVisible: boolean
189 198
  * }}
190 199
  */
191 200
 function _mapStateToProps(state) {
192 201
     return {
193 202
         _hovered: state['features/filmstrip'].hovered,
203
+        _hideInviteButton: state['features/base/config'].iAmRecorder,
194 204
         _remoteVideosVisible: shouldRemoteVideosBeVisible(state)
195 205
     };
196 206
 }

+ 4
- 0
react/features/invite/middleware.js Bestand weergeven

@@ -18,6 +18,10 @@ MiddlewareRegistry.register(store => next => action => {
18 18
 
19 19
     switch (action.type) {
20 20
     case CONFERENCE_JOINED:
21
+        // we do not want to show call info in iAmRecorder mode
22
+        if (store.getState()['features/base/config'].iAmRecorder) {
23
+            return result;
24
+        }
21 25
         store.dispatch(setInfoDialogVisibility(true, true));
22 26
         break;
23 27
 

Laden…
Annuleren
Opslaan