[RN] Disable camera switch button when video is muted
This commit is contained in:
parent
03da40b56a
commit
ffc12ccc0e
|
@ -194,14 +194,17 @@ class Toolbox extends Component {
|
||||||
const iconStyle = styles.secondaryToolbarButtonIcon;
|
const iconStyle = styles.secondaryToolbarButtonIcon;
|
||||||
const style = styles.secondaryToolbarButton;
|
const style = styles.secondaryToolbarButton;
|
||||||
const underlayColor = 'transparent';
|
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 */
|
/* eslint-disable react/jsx-curly-spacing,react/jsx-handler-names */
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style = { styles.secondaryToolbar }>
|
<View style = { styles.secondaryToolbar }>
|
||||||
<ToolbarButton
|
<ToolbarButton
|
||||||
disabled = { audioOnly }
|
disabled = { audioOnly || videoMuted }
|
||||||
iconName = 'switch-camera'
|
iconName = 'switch-camera'
|
||||||
iconStyle = { iconStyle }
|
iconStyle = { iconStyle }
|
||||||
onClick = { this.props._onToggleCameraFacingMode }
|
onClick = { this.props._onToggleCameraFacingMode }
|
||||||
|
|
Loading…
Reference in New Issue