2023-03-23 13:24:57 +02:00
|
|
|
import { IconHangup } from '../../icons/svg';
|
2018-03-06 16:28:19 -08:00
|
|
|
|
2023-03-23 13:24:57 +02:00
|
|
|
import AbstractButton, { IProps } from './AbstractButton';
|
2018-03-06 16:28:19 -08:00
|
|
|
|
|
|
|
|
/**
|
2018-04-13 15:03:12 +02:00
|
|
|
* An abstract implementation of a button for disconnecting a conference.
|
2018-03-06 16:28:19 -08:00
|
|
|
*/
|
2023-03-30 11:27:53 +03:00
|
|
|
export default class AbstractHangupButton<P extends IProps, S=any>
|
2018-05-10 18:01:55 -05:00
|
|
|
extends AbstractButton<P, S> {
|
|
|
|
|
|
2025-03-12 10:19:11 -05:00
|
|
|
override icon = IconHangup;
|
2018-03-06 16:28:19 -08:00
|
|
|
|
|
|
|
|
/**
|
2018-04-13 15:03:12 +02:00
|
|
|
* Handles clicking / pressing the button, and disconnects the conference.
|
2018-03-06 16:28:19 -08:00
|
|
|
*
|
2018-05-10 21:10:26 -05:00
|
|
|
* @protected
|
2018-03-06 16:28:19 -08:00
|
|
|
* @returns {void}
|
|
|
|
|
*/
|
2025-03-12 10:19:11 -05:00
|
|
|
override _handleClick() {
|
2018-04-13 15:03:12 +02:00
|
|
|
this._doHangup();
|
2018-03-06 16:28:19 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2018-04-13 15:03:12 +02:00
|
|
|
* Helper function to perform the actual hangup action.
|
2018-03-06 16:28:19 -08:00
|
|
|
*
|
2018-05-10 21:10:26 -05:00
|
|
|
* @protected
|
2018-03-06 16:28:19 -08:00
|
|
|
* @returns {void}
|
|
|
|
|
*/
|
2018-04-13 15:03:12 +02:00
|
|
|
_doHangup() {
|
|
|
|
|
// To be implemented by subclass.
|
2018-03-06 16:28:19 -08:00
|
|
|
}
|
|
|
|
|
}
|