Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

[RN] Disable camera switch button when video is muted

Saúl Ibarra Corretgéffc12ccc0ef4
diff --git a/react/features/toolbox/components/Toolbox.native.js b/react/features/toolbox/components/Toolbox.native.js
index aa3be19bc4..929cf0bfeb 100644
--- a/react/features/toolbox/components/Toolbox.native.js
+++ b/react/features/toolbox/components/Toolbox.native.js
@@ -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 }