Browse Source

fix(virtual-background): Check if virtual background is disabled on premeeting.

j8
tudordan7 4 years ago
parent
commit
c765e08aa1

+ 10
- 3
react/features/base/premeeting/components/web/PreMeetingScreen.js View File

57
     /**
57
     /**
58
      * The video track to render as preview (if omitted, the default local track will be rendered).
58
      * The video track to render as preview (if omitted, the default local track will be rendered).
59
      */
59
      */
60
-    videoTrack?: Object
60
+    videoTrack?: Object,
61
+
62
+    /**
63
+     * Array with the buttons which this Toolbox should display.
64
+     */
65
+    visibleButtons?: Array<string>
61
 }
66
 }
62
 
67
 
63
 /**
68
 /**
81
      * @inheritdoc
86
      * @inheritdoc
82
      */
87
      */
83
     render() {
88
     render() {
84
-        const { name, showAvatar, showConferenceInfo, title, videoMuted, videoTrack } = this.props;
89
+        const { name, showAvatar, showConferenceInfo, title, videoMuted, videoTrack, visibleButtons } = this.props;
85
         const showSharingButton = allowUrlSharing();
90
         const showSharingButton = allowUrlSharing();
86
 
91
 
87
         return (
92
         return (
116
                             <div className = 'toolbox-content-items'>
121
                             <div className = 'toolbox-content-items'>
117
                                 <AudioSettingsButton visible = { true } />
122
                                 <AudioSettingsButton visible = { true } />
118
                                 <VideoSettingsButton visible = { true } />
123
                                 <VideoSettingsButton visible = { true } />
119
-                                <VideoBackgroundButton visible = { checkBlurSupport() } />
124
+                                { ((visibleButtons && visibleButtons.includes('select-background'))
125
+                                   || (visibleButtons && visibleButtons.includes('videobackgroundblur')))
126
+                                   && <VideoBackgroundButton visible = { checkBlurSupport() } /> }
120
                             </div>
127
                             </div>
121
                         </div>
128
                         </div>
122
                     </div>
129
                     </div>

+ 12
- 3
react/features/prejoin/components/Prejoin.js View File

4
 import React, { Component } from 'react';
4
 import React, { Component } from 'react';
5
 
5
 
6
 import { getRoomName } from '../../base/conference';
6
 import { getRoomName } from '../../base/conference';
7
+import { getToolbarButtons } from '../../base/config';
7
 import { translate } from '../../base/i18n';
8
 import { translate } from '../../base/i18n';
8
 import { Icon, IconArrowDown, IconArrowUp, IconPhone, IconVolumeOff } from '../../base/icons';
9
 import { Icon, IconArrowDown, IconArrowUp, IconPhone, IconVolumeOff } from '../../base/icons';
9
 import { isVideoMutedByUser } from '../../base/media';
10
 import { isVideoMutedByUser } from '../../base/media';
127
      * The JitsiLocalTrack to display.
128
      * The JitsiLocalTrack to display.
128
      */
129
      */
129
     videoTrack: ?Object,
130
     videoTrack: ?Object,
131
+
132
+    /**
133
+     * Array with the buttons which this Toolbox should display.
134
+     */
135
+    visibleButtons: Array<string>
130
 };
136
 };
131
 
137
 
132
 type State = {
138
 type State = {
295
             showConferenceInfo,
301
             showConferenceInfo,
296
             showJoinActions,
302
             showJoinActions,
297
             t,
303
             t,
298
-            videoTrack
304
+            videoTrack,
305
+            visibleButtons
299
         } = this.props;
306
         } = this.props;
300
 
307
 
301
         const { _closeDialog, _onDropdownClose, _onJoinButtonClick, _onOptionsClick, _setName, _showDialog } = this;
308
         const { _closeDialog, _onDropdownClose, _onJoinButtonClick, _onOptionsClick, _setName, _showDialog } = this;
310
                 skipPrejoinButton = { this._renderSkipPrejoinButton() }
317
                 skipPrejoinButton = { this._renderSkipPrejoinButton() }
311
                 title = { t('prejoin.joinMeeting') }
318
                 title = { t('prejoin.joinMeeting') }
312
                 videoMuted = { !showCameraPreview }
319
                 videoMuted = { !showCameraPreview }
313
-                videoTrack = { videoTrack }>
320
+                videoTrack = { videoTrack }
321
+                visibleButtons = { visibleButtons }>
314
                 {showJoinActions && (
322
                 {showJoinActions && (
315
                     <div className = 'prejoin-input-area-container'>
323
                     <div className = 'prejoin-input-area-container'>
316
                         <div className = 'prejoin-input-area'>
324
                         <div className = 'prejoin-input-area'>
440
         hasJoinByPhoneButton: isJoinByPhoneButtonVisible(state),
448
         hasJoinByPhoneButton: isJoinByPhoneButtonVisible(state),
441
         showCameraPreview: !isVideoMutedByUser(state),
449
         showCameraPreview: !isVideoMutedByUser(state),
442
         showConferenceInfo,
450
         showConferenceInfo,
443
-        videoTrack: getLocalJitsiVideoTrack(state)
451
+        videoTrack: getLocalJitsiVideoTrack(state),
452
+        visibleButtons: getToolbarButtons(state)
444
     };
453
     };
445
 }
454
 }
446
 
455
 

Loading…
Cancel
Save