[RN] Disable camera switch button when video is muted

This commit is contained in:
Saúl Ibarra Corretgé 2017-07-19 14:30:36 +02:00
parent 03da40b56a
commit ffc12ccc0e
1 changed files with 5 additions and 2 deletions

View File

@ -194,14 +194,17 @@ class Toolbox extends Component {
const iconStyle = styles.secondaryToolbarButtonIcon;
const style = styles.secondaryToolbarButton;
const underlayColor = 'transparent';
const { _audioOnly: audioOnly } = this.props;
const {
_audioOnly: audioOnly,
_videoMuted: videoMuted
} = this.props;
/* eslint-disable react/jsx-curly-spacing,react/jsx-handler-names */
return (
<View style = { styles.secondaryToolbar }>
<ToolbarButton
disabled = { audioOnly }
disabled = { audioOnly || videoMuted }
iconName = 'switch-camera'
iconStyle = { iconStyle }
onClick = { this.props._onToggleCameraFacingMode }