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.

VideoMuteButton.tsx 955B

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