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

MuteEveryoneElsesVideoButton.js 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // @flow
  2. import React from 'react';
  3. import { translate } from '../../../base/i18n';
  4. import { IconMuteVideoEveryoneElse } from '../../../base/icons';
  5. import { connect } from '../../../base/redux';
  6. import AbstractMuteEveryoneElsesVideoButton, {
  7. type Props
  8. } from '../AbstractMuteEveryoneElsesVideoButton';
  9. import VideoMenuButton from './VideoMenuButton';
  10. /**
  11. * Implements a React {@link Component} which displays a button for audio muting
  12. * every participant in the conference except the one with the given
  13. * participantID
  14. */
  15. class MuteEveryoneElsesVideoButton extends AbstractMuteEveryoneElsesVideoButton {
  16. /**
  17. * Instantiates a new {@code Component}.
  18. *
  19. * @inheritdoc
  20. */
  21. constructor(props: Props) {
  22. super(props);
  23. this._handleClick = this._handleClick.bind(this);
  24. }
  25. /**
  26. * Implements React's {@link Component#render()}.
  27. *
  28. * @inheritdoc
  29. * @returns {ReactElement}
  30. */
  31. render() {
  32. const { participantID, t } = this.props;
  33. return (
  34. <VideoMenuButton
  35. buttonText = { t('videothumbnail.domuteVideoOfOthers') }
  36. displayClass = { 'mutelink' }
  37. icon = { IconMuteVideoEveryoneElse }
  38. id = { `mutelink_${participantID}` }
  39. // eslint-disable-next-line react/jsx-handler-names
  40. onClick = { this._handleClick } />
  41. );
  42. }
  43. _handleClick: () => void;
  44. }
  45. export default translate(connect()(MuteEveryoneElsesVideoButton));