Skip to content

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

fix(toolbar): exercise conference audio toggling

Leonard Kim6916252ce111
diff --git a/react/features/toolbox/components/buttons/AudioMuteButton.web.js b/react/features/toolbox/components/buttons/AudioMuteButton.web.js
index 27f8b66342..072352c762 100644
--- a/react/features/toolbox/components/buttons/AudioMuteButton.web.js
+++ b/react/features/toolbox/components/buttons/AudioMuteButton.web.js
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
+import UIEvents from '../../../../../service/UI/UIEvents';
import {
ACTION_SHORTCUT_TRIGGERED,
AUDIO_MUTE,
@@ -122,6 +123,19 @@ export class AudioMuteButton extends AbstractAudioMuteButton {
_doToggleAudio: () => void;
+ /**
+ * Emits an event to signal audio mute should be toggled.
+ *
+ * @private
+ * @returns {void}
+ */
+ _doToggleAudio() {
+ // The old conference logic must be used for now as the redux flows do
+ // not handle all cases, such as unmuting when the config
+ // startWithAudioMuted is true.
+ APP.UI.emitEvent(UIEvents.AUDIO_MUTED, !this.props._audioMuted, true);
+ }
+
_onShortcutToggleAudio: () => void;
/**