浏览代码

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

j8
tudordan7 4 年前
父节点
当前提交
c765e08aa1

+ 10
- 3
react/features/base/premeeting/components/web/PreMeetingScreen.js 查看文件

@@ -57,7 +57,12 @@ type Props = {
57 57
     /**
58 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,7 +86,7 @@ export default class PreMeetingScreen extends PureComponent<Props> {
81 86
      * @inheritdoc
82 87
      */
83 88
     render() {
84
-        const { name, showAvatar, showConferenceInfo, title, videoMuted, videoTrack } = this.props;
89
+        const { name, showAvatar, showConferenceInfo, title, videoMuted, videoTrack, visibleButtons } = this.props;
85 90
         const showSharingButton = allowUrlSharing();
86 91
 
87 92
         return (
@@ -116,7 +121,9 @@ export default class PreMeetingScreen extends PureComponent<Props> {
116 121
                             <div className = 'toolbox-content-items'>
117 122
                                 <AudioSettingsButton visible = { true } />
118 123
                                 <VideoSettingsButton visible = { true } />
119
-                                <VideoBackgroundButton visible = { checkBlurSupport() } />
124
+                                { ((visibleButtons && visibleButtons.includes('select-background'))
125
+                                   || (visibleButtons && visibleButtons.includes('videobackgroundblur')))
126
+                                   && <VideoBackgroundButton visible = { checkBlurSupport() } /> }
120 127
                             </div>
121 128
                         </div>
122 129
                     </div>

+ 12
- 3
react/features/prejoin/components/Prejoin.js 查看文件

@@ -4,6 +4,7 @@ import InlineDialog from '@atlaskit/inline-dialog';
4 4
 import React, { Component } from 'react';
5 5
 
6 6
 import { getRoomName } from '../../base/conference';
7
+import { getToolbarButtons } from '../../base/config';
7 8
 import { translate } from '../../base/i18n';
8 9
 import { Icon, IconArrowDown, IconArrowUp, IconPhone, IconVolumeOff } from '../../base/icons';
9 10
 import { isVideoMutedByUser } from '../../base/media';
@@ -127,6 +128,11 @@ type Props = {
127 128
      * The JitsiLocalTrack to display.
128 129
      */
129 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 138
 type State = {
@@ -295,7 +301,8 @@ class Prejoin extends Component<Props, State> {
295 301
             showConferenceInfo,
296 302
             showJoinActions,
297 303
             t,
298
-            videoTrack
304
+            videoTrack,
305
+            visibleButtons
299 306
         } = this.props;
300 307
 
301 308
         const { _closeDialog, _onDropdownClose, _onJoinButtonClick, _onOptionsClick, _setName, _showDialog } = this;
@@ -310,7 +317,8 @@ class Prejoin extends Component<Props, State> {
310 317
                 skipPrejoinButton = { this._renderSkipPrejoinButton() }
311 318
                 title = { t('prejoin.joinMeeting') }
312 319
                 videoMuted = { !showCameraPreview }
313
-                videoTrack = { videoTrack }>
320
+                videoTrack = { videoTrack }
321
+                visibleButtons = { visibleButtons }>
314 322
                 {showJoinActions && (
315 323
                     <div className = 'prejoin-input-area-container'>
316 324
                         <div className = 'prejoin-input-area'>
@@ -440,7 +448,8 @@ function mapStateToProps(state, ownProps): Object {
440 448
         hasJoinByPhoneButton: isJoinByPhoneButtonVisible(state),
441 449
         showCameraPreview: !isVideoMutedByUser(state),
442 450
         showConferenceInfo,
443
-        videoTrack: getLocalJitsiVideoTrack(state)
451
+        videoTrack: getLocalJitsiVideoTrack(state),
452
+        visibleButtons: getToolbarButtons(state)
444 453
     };
445 454
 }
446 455
 

正在加载...
取消
保存