File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed
Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change 1+ import { IStore } from '../app/types' ;
2+ import { openDialog } from '../base/dialog/actions' ;
13import { DEFAULT_LANGUAGE } from '../base/i18n/i18next' ;
4+ import { StartRecordingDialog } from '../recording/components/Recording' ;
25
36import {
47 REMOVE_CACHED_TRANSCRIPT_MESSAGE ,
@@ -97,12 +100,22 @@ export function setRequestingSubtitles(
97100 displaySubtitles = true ,
98101 language : string | null = `translation-languages:${ DEFAULT_LANGUAGE } ` ,
99102 backendRecordingOn = false ) {
100- return {
101- type : SET_REQUESTING_SUBTITLES ,
102- backendRecordingOn,
103- displaySubtitles,
104- enabled,
105- language
103+ return function ( dispatch : IStore [ 'dispatch' ] , getState : IStore [ 'getState' ] ) {
104+ const { conference } = getState ( ) [ 'features/base/conference' ] ;
105+
106+ if ( conference ?. getMetadataHandler ( ) ?. getMetadata ( ) ?. asyncTranscription ) {
107+ dispatch ( openDialog ( 'StartRecordingDialog' , StartRecordingDialog ) ) ;
108+
109+ return ;
110+ }
111+
112+ dispatch ( {
113+ type : SET_REQUESTING_SUBTITLES ,
114+ backendRecordingOn,
115+ displaySubtitles,
116+ enabled,
117+ language
118+ } ) ;
106119 } ;
107120}
108121
You can’t perform that action at this time.
0 commit comments