Files
jitsi-meet/react/features/mobile/audio-mode/components/AudioDeviceToggleButton.js
Saúl Ibarra Corretgé 6ad279f029 fix(rn, bottomsheet) fix not rendering above presentation sheets
Move all sheets to render in a new container which uses FullWindowOverlay, which allows rendering above presentation controllers on iOS.
2022-06-20 16:53:19 +02:00

40 lines
1.1 KiB
JavaScript

import type { Dispatch } from 'redux';
import { openSheet } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
import { IconVolumeEmpty } from '../../../base/icons';
import { connect } from '../../../base/redux';
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
import AudioRoutePickerDialog from './AudioRoutePickerDialog';
type Props = AbstractButtonProps & {
/**
* The Redux dispatch function.
*/
dispatch: Dispatch<any>
};
/**
* Implements an {@link AbstractButton} to open the audio device list.
*/
class AudioDeviceToggleButton extends AbstractButton<Props, *> {
accessibilityLabel = 'toolbar.accessibilityLabel.audioRoute';
icon = IconVolumeEmpty;
label = 'toolbar.accessibilityLabel.audioRoute';
/**
* Handles clicking / pressing the button, and opens the appropriate dialog.
*
* @private
* @returns {void}
*/
_handleClick() {
this.props.dispatch(openSheet(AudioRoutePickerDialog));
}
}
export default translate(connect()(AudioDeviceToggleButton));