您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

AbstractMuteEveryoneElseButton.js 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // @flow
  2. import { createToolbarEvent, sendAnalytics } from '../../analytics';
  3. import { openDialog } from '../../base/dialog';
  4. import { IconMuteEveryone } from '../../base/icons';
  5. import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
  6. import { MuteEveryoneDialog } from '.';
  7. export type Props = AbstractButtonProps & {
  8. /**
  9. * The redux {@code dispatch} function.
  10. */
  11. dispatch: Function,
  12. /**
  13. * The ID of the participant object that this button is supposed to keep unmuted.
  14. */
  15. participantID: string,
  16. /**
  17. * The function to be used to translate i18n labels.
  18. */
  19. t: Function
  20. };
  21. /**
  22. * An abstract remote video menu button which mutes all the other participants.
  23. */
  24. export default class AbstractMuteEveryoneElseButton extends AbstractButton<Props, *> {
  25. accessibilityLabel = 'toolbar.accessibilityLabel.muteEveryoneElse';
  26. icon = IconMuteEveryone;
  27. label = 'videothumbnail.domuteOthers';
  28. /**
  29. * Handles clicking / pressing the button, and opens a confirmation dialog.
  30. *
  31. * @private
  32. * @returns {void}
  33. */
  34. _handleClick() {
  35. const { dispatch, participantID } = this.props;
  36. sendAnalytics(createToolbarEvent('mute.everyoneelse.pressed'));
  37. dispatch(openDialog(MuteEveryoneDialog, { exclude: [ participantID ] }));
  38. }
  39. }