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.

AudioMuteButton.tsx 938B

123456789101112131415161718192021222324252627282930
  1. import { connect } from 'react-redux';
  2. import { AUDIO_MUTED_CHANGED } from '../../../base/conference/actionTypes';
  3. import { translate } from '../../../base/i18n/functions';
  4. import AbstractAudioMuteButton, { IProps, mapStateToProps } from '../AbstractAudioMuteButton';
  5. /**
  6. * Component that renders native toolbar button for toggling audio mute.
  7. *
  8. * @augments AbstractAudioMuteButton
  9. */
  10. class AudioMuteButton extends AbstractAudioMuteButton<IProps> {
  11. /**
  12. * Changes audio muted state and dispatches the state to redux.
  13. *
  14. * @param {boolean} audioMuted - Whether audio should be muted or not.
  15. * @protected
  16. * @returns {void}
  17. */
  18. _setAudioMuted(audioMuted: boolean) {
  19. this.props.dispatch?.({
  20. type: AUDIO_MUTED_CHANGED,
  21. muted: audioMuted
  22. });
  23. super._setAudioMuted(audioMuted);
  24. }
  25. }
  26. export default translate(connect(mapStateToProps)(AudioMuteButton));