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.

AbstractMuteEveryoneElsesVideoButton.js 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // @flow
  2. import { createToolbarEvent, sendAnalytics } from '../../analytics';
  3. import { openDialog } from '../../base/dialog';
  4. import { IconMuteVideoEveryone } from '../../base/icons';
  5. import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
  6. import { MuteEveryonesVideoDialog } 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 disables the camera of all the other participants.
  23. */
  24. export default class AbstractMuteEveryoneElsesVideoButton extends AbstractButton<Props, *> {
  25. accessibilityLabel = 'toolbar.accessibilityLabel.muteEveryoneElsesVideo';
  26. icon = IconMuteVideoEveryone;
  27. label = 'videothumbnail.domuteVideoOfOthers';
  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.everyoneelsesvideo.pressed'));
  37. dispatch(openDialog(MuteEveryonesVideoDialog, { exclude: [ participantID ] }));
  38. }
  39. }