Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jitsi-meet/react/features/toolbox/components/native/AudioMuteButton.tsx

31 lines
938 B

import { connect } from 'react-redux';
import { AUDIO_MUTED_CHANGED } from '../../../base/conference/actionTypes';
import { translate } from '../../../base/i18n/functions';
import AbstractAudioMuteButton, { IProps, mapStateToProps } from '../AbstractAudioMuteButton';
/**
* Component that renders native toolbar button for toggling audio mute.
*
* @augments AbstractAudioMuteButton
*/
class AudioMuteButton extends AbstractAudioMuteButton<IProps> {
/**
* Changes audio muted state and dispatches the state to redux.
*
* @param {boolean} audioMuted - Whether audio should be muted or not.
* @protected
* @returns {void}
*/
_setAudioMuted(audioMuted: boolean) {
this.props.dispatch?.({
type: AUDIO_MUTED_CHANGED,
muted: audioMuted
});
super._setAudioMuted(audioMuted);
}
}
export default translate(connect(mapStateToProps)(AudioMuteButton));