Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
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.
 
 
 
 
 
 
jitsi-meet/react/features/mobile/incoming-call/components/AnswerButton.js

39 lines
1.0 KiB

// @flow
import { translate } from '../../../base/i18n';
import { IconHangup } from '../../../base/icons';
import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import { incomingCallAnswered } from '../actions';
/**
* The type of the React {@code Component} props of {@link AnswerButton}.
*/
type Props = AbstractButtonProps & {
/**
* The redux {@code dispatch} function.
*/
dispatch: Function
};
/**
* An implementation of a button which accepts/answers an incoming call.
*/
class AnswerButton extends AbstractButton<Props, *> {
accessibilityLabel = 'incomingCall.answer';
icon = IconHangup;
label = 'incomingCall.answer';
/**
* Handles clicking / pressing the button, and answers the incoming call.
*
* @protected
* @returns {void}
*/
_handleClick() {
this.props.dispatch(incomingCallAnswered());
}
}
export default translate(connect()(AnswerButton));