瀏覽代碼

[RN] Disable camera switch button when video is muted

j8
Saúl Ibarra Corretgé 8 年之前
父節點
當前提交
ffc12ccc0e
共有 1 個檔案被更改,包括 5 行新增2 行删除
  1. 5
    2
      react/features/toolbox/components/Toolbox.native.js

+ 5
- 2
react/features/toolbox/components/Toolbox.native.js 查看文件

194
         const iconStyle = styles.secondaryToolbarButtonIcon;
194
         const iconStyle = styles.secondaryToolbarButtonIcon;
195
         const style = styles.secondaryToolbarButton;
195
         const style = styles.secondaryToolbarButton;
196
         const underlayColor = 'transparent';
196
         const underlayColor = 'transparent';
197
-        const { _audioOnly: audioOnly } = this.props;
197
+        const {
198
+            _audioOnly: audioOnly,
199
+            _videoMuted: videoMuted
200
+        } = this.props;
198
 
201
 
199
         /* eslint-disable react/jsx-curly-spacing,react/jsx-handler-names */
202
         /* eslint-disable react/jsx-curly-spacing,react/jsx-handler-names */
200
 
203
 
201
         return (
204
         return (
202
             <View style = { styles.secondaryToolbar }>
205
             <View style = { styles.secondaryToolbar }>
203
                 <ToolbarButton
206
                 <ToolbarButton
204
-                    disabled = { audioOnly }
207
+                    disabled = { audioOnly || videoMuted }
205
                     iconName = 'switch-camera'
208
                     iconName = 'switch-camera'
206
                     iconStyle = { iconStyle }
209
                     iconStyle = { iconStyle }
207
                     onClick = { this.props._onToggleCameraFacingMode }
210
                     onClick = { this.props._onToggleCameraFacingMode }

Loading…
取消
儲存