2020-02-24 12:47:37 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import { translate } from '../../../base/i18n';
|
2020-03-13 12:14:18 +00:00
|
|
|
import { IconMuteEveryoneElse } from '../../../base/icons';
|
2020-02-24 12:47:37 +00:00
|
|
|
import { connect } from '../../../base/redux';
|
2022-10-06 10:09:40 +00:00
|
|
|
import ContextMenuItem from '../../../base/ui/components/web/ContextMenuItem';
|
2020-11-10 14:49:38 +00:00
|
|
|
import AbstractMuteEveryoneElseButton, {
|
2020-02-24 12:47:37 +00:00
|
|
|
type Props
|
2020-11-10 14:49:38 +00:00
|
|
|
} from '../AbstractMuteEveryoneElseButton';
|
2020-05-20 10:57:03 +00:00
|
|
|
|
2020-02-24 12:47:37 +00:00
|
|
|
/**
|
|
|
|
* Implements a React {@link Component} which displays a button for audio muting
|
|
|
|
* every participant in the conference except the one with the given
|
2021-11-04 21:10:43 +00:00
|
|
|
* participantID.
|
2020-02-24 12:47:37 +00:00
|
|
|
*/
|
2020-11-10 14:49:38 +00:00
|
|
|
class MuteEveryoneElseButton extends AbstractMuteEveryoneElseButton {
|
2020-02-24 12:47:37 +00:00
|
|
|
/**
|
2020-11-10 14:49:38 +00:00
|
|
|
* Instantiates a new {@code Component}.
|
2020-02-24 12:47:37 +00:00
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
*/
|
|
|
|
constructor(props: Props) {
|
|
|
|
super(props);
|
|
|
|
|
|
|
|
this._handleClick = this._handleClick.bind(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
2021-12-15 13:18:41 +00:00
|
|
|
const { t } = this.props;
|
2020-02-24 12:47:37 +00:00
|
|
|
|
|
|
|
return (
|
2021-12-15 13:18:41 +00:00
|
|
|
<ContextMenuItem
|
|
|
|
accessibilityLabel = { t('toolbar.accessibilityLabel.muteEveryoneElse') }
|
2020-03-13 12:14:18 +00:00
|
|
|
icon = { IconMuteEveryoneElse }
|
2020-02-24 12:47:37 +00:00
|
|
|
// eslint-disable-next-line react/jsx-handler-names
|
2021-12-15 13:18:41 +00:00
|
|
|
onClick = { this._handleClick }
|
|
|
|
text = { t('videothumbnail.domuteOthers') } />
|
2020-02-24 12:47:37 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
_handleClick: () => void;
|
|
|
|
}
|
|
|
|
|
2020-11-10 14:49:38 +00:00
|
|
|
export default translate(connect()(MuteEveryoneElseButton));
|