mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
* ref(transcriptions): refactor transcriptions api * ref(transcriptions): refactor usage of translation label Extend IFrame API to allow adding a transcriber in the room without the subtitles needing to be visible. Allow transcription chunk messages to be passed through the IFrame API if a transcriber is present. Clean-up transcription messages sent through the IFrame API to not include timeout field and possible conflicting states (stable / unstable /final) * fix linting * code review: extend api message to match webhook format
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import { connect } from 'react-redux';
|
|
|
|
import { translate } from '../../../base/i18n/functions';
|
|
import { IconSubtitles } from '../../../base/icons/svg';
|
|
import { toggleLanguageSelectorDialog } from '../../actions.web';
|
|
import {
|
|
AbstractClosedCaptionButton,
|
|
_abstractMapStateToProps
|
|
} from '../AbstractClosedCaptionButton';
|
|
|
|
/**
|
|
* A button which starts/stops the transcriptions.
|
|
*/
|
|
class ClosedCaptionButton
|
|
extends AbstractClosedCaptionButton {
|
|
accessibilityLabel = 'toolbar.accessibilityLabel.cc';
|
|
icon = IconSubtitles;
|
|
tooltip = 'transcribing.ccButtonTooltip';
|
|
label = 'toolbar.startSubtitles';
|
|
labelProps = {
|
|
language: this.props.t(this.props._language ?? 'transcribing.subtitlesOff'),
|
|
languages: this.props.t(this.props.languages ?? ''),
|
|
languagesHead: this.props.t(this.props.languagesHead ?? '')
|
|
};
|
|
|
|
/**
|
|
* Toggle language selection dialog.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
_handleClickOpenLanguageSelector() {
|
|
const { dispatch } = this.props;
|
|
|
|
dispatch(toggleLanguageSelectorDialog());
|
|
}
|
|
}
|
|
|
|
export default translate(connect(_abstractMapStateToProps)(ClosedCaptionButton));
|