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.

AbstractBlockAudioVideoDialog.js 1000B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // @flow
  2. import { Component } from 'react';
  3. import { blockParticipantsAudioVideo } from '../actions.any';
  4. type Props = {
  5. /**
  6. * The Redux dispatch function.
  7. */
  8. dispatch: Function,
  9. /**
  10. * Function to translate i18n labels.
  11. */
  12. t: Function
  13. };
  14. /**
  15. * Abstract dialog to confirm blocking mic and camera for all participants.
  16. */
  17. export default class AbstractBlockAudioVideoDialog
  18. extends Component<Props> {
  19. /**
  20. * Initializes a new {@code AbstractBlockAudioVideoDialog} instance.
  21. *
  22. * @inheritdoc
  23. */
  24. constructor(props: Props) {
  25. super(props);
  26. this._onSubmit = this._onSubmit.bind(this);
  27. }
  28. _onSubmit: () => boolean;
  29. /**
  30. * Callback for the confirm button.
  31. *
  32. * @private
  33. * @returns {boolean} - True (to note that the modal should be closed).
  34. */
  35. _onSubmit() {
  36. const { dispatch } = this.props;
  37. dispatch(blockParticipantsAudioVideo());
  38. return true;
  39. }
  40. }