mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
feat: Use recording dialog on asyncTranscription.
This commit is contained in:
@@ -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 ?? ''
|
||||
|
||||
@@ -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 {
|
||||
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
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user