mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 00:22:29 +00:00
[RN] Add remote video menu
This commit is contained in:
committed by
Zoltan Bettenbuk
parent
d4c0840659
commit
6b68fba220
@@ -0,0 +1,46 @@
|
||||
// @flow
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { openDialog } from '../../../base/dialog';
|
||||
import { translate } from '../../../base/i18n';
|
||||
import { AbstractButton } from '../../../base/toolbox';
|
||||
import type { AbstractButtonProps } from '../../../base/toolbox';
|
||||
|
||||
import KickRemoteParticipantDialog from './KickRemoteParticipantDialog';
|
||||
|
||||
type Props = AbstractButtonProps & {
|
||||
|
||||
/**
|
||||
* The redux {@code dispatch} function.
|
||||
*/
|
||||
dispatch: Function,
|
||||
|
||||
/**
|
||||
* The participant object that this button is supposed to kick.
|
||||
*/
|
||||
participant: Object
|
||||
};
|
||||
|
||||
/**
|
||||
* A remote video menu button which kicks the remote participant.
|
||||
*/
|
||||
class KickButton extends AbstractButton<Props, *> {
|
||||
accessibilityLabel = 'toolbar.accessibilityLabel.audioRoute';
|
||||
iconName = 'icon-kick';
|
||||
label = 'videothumbnail.kick';
|
||||
|
||||
/**
|
||||
* Handles clicking / pressing the button, and kicks the participant.
|
||||
*
|
||||
* @private
|
||||
* @returns {void}
|
||||
*/
|
||||
_handleClick() {
|
||||
const { dispatch, participant } = this.props;
|
||||
|
||||
dispatch(openDialog(KickRemoteParticipantDialog, { participant }));
|
||||
}
|
||||
}
|
||||
|
||||
export default translate(connect()(KickButton));
|
||||
Reference in New Issue
Block a user