2023-03-21 09:47:52 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
|
2023-03-31 14:04:33 +03:00
|
|
|
import { openSheet } from '../../../base/dialog/actions';
|
2023-04-03 13:49:19 +03:00
|
|
|
import { translate } from '../../../base/i18n/functions';
|
|
|
|
|
import { IconInfoCircle } from '../../../base/icons/svg';
|
|
|
|
|
import AbstractButton, { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';
|
2020-12-22 11:12:52 +02:00
|
|
|
|
|
|
|
|
import ConnectionStatusComponent from './ConnectionStatusComponent';
|
|
|
|
|
|
2023-05-02 11:09:38 +03:00
|
|
|
export interface IProps extends AbstractButtonProps {
|
2020-12-22 11:12:52 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The ID of the participant that this button is supposed to pin.
|
|
|
|
|
*/
|
2023-05-02 11:09:38 +03:00
|
|
|
participantID: string;
|
|
|
|
|
}
|
2020-12-22 11:12:52 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A remote video menu button which shows the connection statistics.
|
|
|
|
|
*/
|
2023-05-02 11:09:38 +03:00
|
|
|
class ConnectionStatusButton extends AbstractButton<IProps> {
|
2022-11-08 12:24:32 +02:00
|
|
|
icon = IconInfoCircle;
|
2020-12-22 11:12:52 +02:00
|
|
|
label = 'videothumbnail.connectionInfo';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Handles clicking / pressing the button, and kicks the participant.
|
|
|
|
|
*
|
|
|
|
|
* @private
|
|
|
|
|
* @returns {void}
|
|
|
|
|
*/
|
|
|
|
|
_handleClick() {
|
|
|
|
|
const { dispatch, participantID } = this.props;
|
|
|
|
|
|
2022-06-20 16:53:19 +02:00
|
|
|
dispatch(openSheet(ConnectionStatusComponent, {
|
2020-12-22 11:12:52 +02:00
|
|
|
participantID
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default translate(connect()(ConnectionStatusButton));
|