mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat: Use recording dialog on asyncTranscription.
This commit is contained in:
@@ -63,11 +63,6 @@ export interface IProps extends WithTranslation {
|
|||||||
*/
|
*/
|
||||||
_rToken: string;
|
_rToken: string;
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether the record audio / video option is enabled by default.
|
|
||||||
*/
|
|
||||||
_recordAudioAndVideo: boolean;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not the local participant is screensharing.
|
* Whether or not the local participant is screensharing.
|
||||||
*/
|
*/
|
||||||
@@ -99,6 +94,11 @@ export interface IProps extends WithTranslation {
|
|||||||
dispatch: IStore['dispatch'];
|
dispatch: IStore['dispatch'];
|
||||||
|
|
||||||
navigation: any;
|
navigation: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the record audio / video option is enabled by default.
|
||||||
|
*/
|
||||||
|
recordAudioAndVideo: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IState {
|
interface IState {
|
||||||
@@ -191,7 +191,7 @@ class AbstractStartRecordingDialog extends Component<IProps, IState> {
|
|||||||
isValidating: false,
|
isValidating: false,
|
||||||
userName: undefined,
|
userName: undefined,
|
||||||
sharingEnabled: true,
|
sharingEnabled: true,
|
||||||
shouldRecordAudioAndVideo: this.props._recordAudioAndVideo,
|
shouldRecordAudioAndVideo: this.props.recordAudioAndVideo,
|
||||||
shouldRecordTranscription: this.props._autoTranscribeOnRecord,
|
shouldRecordTranscription: this.props._autoTranscribeOnRecord,
|
||||||
spaceLeft: undefined,
|
spaceLeft: undefined,
|
||||||
selectedRecordingService,
|
selectedRecordingService,
|
||||||
@@ -474,7 +474,7 @@ export function mapStateToProps(state: IReduxState, _ownProps: any) {
|
|||||||
_isDropboxEnabled: isDropboxEnabled(state),
|
_isDropboxEnabled: isDropboxEnabled(state),
|
||||||
_localRecordingEnabled: !localRecording?.disable,
|
_localRecordingEnabled: !localRecording?.disable,
|
||||||
_rToken: state['features/dropbox'].rToken ?? '',
|
_rToken: state['features/dropbox'].rToken ?? '',
|
||||||
_recordAudioAndVideo: recordings?.recordAudioAndVideo ?? true,
|
recordAudioAndVideo: _ownProps.recordAudioAndVideo ?? recordings?.recordAudioAndVideo ?? true,
|
||||||
_subtitlesLanguage,
|
_subtitlesLanguage,
|
||||||
_tokenExpireDate: state['features/dropbox'].expireDate,
|
_tokenExpireDate: state['features/dropbox'].expireDate,
|
||||||
_token: state['features/dropbox'].token ?? ''
|
_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 { DEFAULT_LANGUAGE } from '../base/i18n/i18next';
|
||||||
|
import { StartRecordingDialog } from '../recording/components/Recording';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
REMOVE_CACHED_TRANSCRIPT_MESSAGE,
|
REMOVE_CACHED_TRANSCRIPT_MESSAGE,
|
||||||
@@ -97,12 +100,24 @@ export function setRequestingSubtitles(
|
|||||||
displaySubtitles = true,
|
displaySubtitles = true,
|
||||||
language: string | null = `translation-languages:${DEFAULT_LANGUAGE}`,
|
language: string | null = `translation-languages:${DEFAULT_LANGUAGE}`,
|
||||||
backendRecordingOn = false) {
|
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,
|
type: SET_REQUESTING_SUBTITLES,
|
||||||
backendRecordingOn,
|
backendRecordingOn,
|
||||||
displaySubtitles,
|
displaySubtitles,
|
||||||
enabled,
|
enabled,
|
||||||
language
|
language
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user