Fix audio modal buttons (MIC/LISTEN) not working after audio error

When user joins audio and for some reason an error (such as 1001, 1002,...), happens, the user is not able to click "Mic" and "Listen Only Buttons"; except if the audio window is closed and oppened again.
This commit is contained in:
Mario Jr 2020-11-16 15:57:25 -03:00
parent 38b71049f9
commit 1b1a055d37

View File

@ -183,6 +183,7 @@ class AudioModal extends Component {
componentDidUpdate(prevProps) {
const { autoplayBlocked, closeModal } = this.props;
if (autoplayBlocked !== prevProps.autoplayBlocked) {
autoplayBlocked ? this.setState({ content: 'autoplayBlocked' }) : closeModal();
}
@ -246,13 +247,14 @@ class AudioModal extends Component {
const {
joinEchoTest,
isConnecting,
} = this.props;
const {
disableActions,
} = this.state;
if (disableActions) return;
if (disableActions && isConnecting) return;
this.setState({
hasError: false,