mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-11 07:52:29 +00:00
Currently the following are implemented: - AudioMuteButton - HangupButton - VideoMuteButton In order to implement these new buttons a new abstract class was introduced, which abstracts the ToolboxItem into a button with enough hooks so a stateful and a stateless version of it can be created. This patch only adds the stateful implementation of the aforementioned buttons.
36 lines
768 B
JavaScript
36 lines
768 B
JavaScript
// @flow
|
|
|
|
import AbstractButton from './AbstractButton';
|
|
import type { Props } from './AbstractButton';
|
|
|
|
/**
|
|
* An abstract implementation of a button for disconnecting a conference.
|
|
*/
|
|
class AbstractHangupButton<P : Props, S: *> extends AbstractButton<P, S> {
|
|
accessibilityLabel = 'Hangup';
|
|
iconName = 'icon-hangup';
|
|
|
|
/**
|
|
* Handles clicking / pressing the button, and disconnects the conference.
|
|
*
|
|
* @private
|
|
* @returns {void}
|
|
*/
|
|
_handleClick() {
|
|
this._doHangup();
|
|
}
|
|
|
|
/**
|
|
* Helper function to perform the actual hangup action.
|
|
*
|
|
* @abstract
|
|
* @private
|
|
* @returns {void}
|
|
*/
|
|
_doHangup() {
|
|
// To be implemented by subclass.
|
|
}
|
|
}
|
|
|
|
export default AbstractHangupButton;
|