feat: Use recording dialog on asyncTranscription.

This commit is contained in:
damencho
2025-12-05 11:22:13 -06:00
committed by Дамян Минков
parent 2476a06237
commit 02787b1394
2 changed files with 28 additions and 13 deletions

View File

@@ -63,11 +63,6 @@ export interface IProps extends WithTranslation {
*/
_rToken: string;
/**
* Whether the record audio / video option is enabled by default.
*/
_recordAudioAndVideo: boolean;
/**
* Whether or not the local participant is screensharing.
*/
@@ -99,6 +94,11 @@ export interface IProps extends WithTranslation {
dispatch: IStore['dispatch'];
navigation: any;
/**
* Whether the record audio / video option is enabled by default.
*/
recordAudioAndVideo: boolean;
}
interface IState {
@@ -191,7 +191,7 @@ class AbstractStartRecordingDialog extends Component<IProps, IState> {
isValidating: false,
userName: undefined,
sharingEnabled: true,
shouldRecordAudioAndVideo: this.props._recordAudioAndVideo,
shouldRecordAudioAndVideo: this.props.recordAudioAndVideo,
shouldRecordTranscription: this.props._autoTranscribeOnRecord,
spaceLeft: undefined,
selectedRecordingService,
@@ -474,7 +474,7 @@ export function mapStateToProps(state: IReduxState, _ownProps: any) {
_isDropboxEnabled: isDropboxEnabled(state),
_localRecordingEnabled: !localRecording?.disable,
_rToken: state['features/dropbox'].rToken ?? '',
_recordAudioAndVideo: recordings?.recordAudioAndVideo ?? true,
recordAudioAndVideo: _ownProps.recordAudioAndVideo ?? recordings?.recordAudioAndVideo ?? true,
_subtitlesLanguage,
_tokenExpireDate: state['features/dropbox'].expireDate,
_token: state['features/dropbox'].token ?? ''

View File

@@ -1,4 +1,7 @@
import { IStore } from '../app/types';
import { openDialog } from '../base/dialog/actions';
import { DEFAULT_LANGUAGE } from '../base/i18n/i18next';
import { StartRecordingDialog } from '../recording/components/Recording';
import {
REMOVE_CACHED_TRANSCRIPT_MESSAGE,
@@ -97,12 +100,24 @@ export function setRequestingSubtitles(
displaySubtitles = true,
language: string | null = `translation-languages:${DEFAULT_LANGUAGE}`,
backendRecordingOn = false) {
return {
type: SET_REQUESTING_SUBTITLES,
backendRecordingOn,
displaySubtitles,
enabled,
language
return function(dispatch: IStore['dispatch'], getState: IStore['getState']) {
const { conference } = getState()['features/base/conference'];
if (conference?.getMetadataHandler()?.getMetadata()?.asyncTranscription) {
dispatch(openDialog('StartRecordingDialog', StartRecordingDialog, {
recordAudioAndVideo: false
}));
return;
}
dispatch({
type: SET_REQUESTING_SUBTITLES,
backendRecordingOn,
displaySubtitles,
enabled,
language
});
};
}