Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

AbstractMuteEveryoneElseButton.ts 1.2KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import { createToolbarEvent } from '../../analytics/AnalyticsEvents';
  2. import { sendAnalytics } from '../../analytics/functions';
  3. import { openDialog } from '../../base/dialog/actions';
  4. import { IconMicSlash } from '../../base/icons/svg';
  5. import AbstractButton, { IProps as AbstractButtonProps } from '../../base/toolbox/components/AbstractButton';
  6. import { MuteEveryoneDialog } from './';
  7. export interface IProps extends AbstractButtonProps {
  8. /**
  9. * The ID of the participant object that this button is supposed to keep unmuted.
  10. */
  11. participantID: string;
  12. }
  13. /**
  14. * An abstract remote video menu button which mutes all the other participants.
  15. */
  16. export default class AbstractMuteEveryoneElseButton extends AbstractButton<IProps> {
  17. accessibilityLabel = 'toolbar.accessibilityLabel.muteEveryoneElse';
  18. icon = IconMicSlash;
  19. label = 'videothumbnail.domuteOthers';
  20. /**
  21. * Handles clicking / pressing the button, and opens a confirmation dialog.
  22. *
  23. * @private
  24. * @returns {void}
  25. */
  26. _handleClick() {
  27. const { dispatch, participantID } = this.props;
  28. sendAnalytics(createToolbarEvent('mute.everyoneelse.pressed'));
  29. dispatch(openDialog(MuteEveryoneDialog, { exclude: [ participantID ] }));
  30. }
  31. }