|
@@ -12,9 +12,15 @@ import {
|
12
|
12
|
isEnabled as isDropboxEnabled
|
13
|
13
|
} from '../../../dropbox';
|
14
|
14
|
import { RECORDING_TYPES } from '../../constants';
|
|
15
|
+import { toggleRequestingSubtitles } from '../../../subtitles';
|
15
|
16
|
|
16
|
17
|
type Props = {
|
17
|
18
|
|
|
19
|
+ /**
|
|
20
|
+ * Requests subtitles when recording is turned on.
|
|
21
|
+ */
|
|
22
|
+ _autoCaptionOnRecord: boolean,
|
|
23
|
+
|
18
|
24
|
/**
|
19
|
25
|
* The {@code JitsiConference} for the current conference.
|
20
|
26
|
*/
|
|
@@ -241,7 +247,7 @@ class AbstractStartRecordingDialog extends Component<Props, State> {
|
241
|
247
|
* @returns {boolean} - True (to note that the modal should be closed).
|
242
|
248
|
*/
|
243
|
249
|
_onSubmit() {
|
244
|
|
- const { _conference, _isDropboxEnabled, _token } = this.props;
|
|
250
|
+ const { _autoCaptionOnRecord, _conference, _isDropboxEnabled, _token, dispatch } = this.props;
|
245
|
251
|
let appData;
|
246
|
252
|
const attributes = {};
|
247
|
253
|
|
|
@@ -276,6 +282,10 @@ class AbstractStartRecordingDialog extends Component<Props, State> {
|
276
|
282
|
appData
|
277
|
283
|
});
|
278
|
284
|
|
|
285
|
+ if (_autoCaptionOnRecord) {
|
|
286
|
+ dispatch(toggleRequestingSubtitles());
|
|
287
|
+ }
|
|
288
|
+
|
279
|
289
|
return true;
|
280
|
290
|
}
|
281
|
291
|
|
|
@@ -296,6 +306,7 @@ class AbstractStartRecordingDialog extends Component<Props, State> {
|
296
|
306
|
* @private
|
297
|
307
|
* @returns {{
|
298
|
308
|
* _appKey: string,
|
|
309
|
+ * _autoCaptionOnRecord: boolean,
|
299
|
310
|
* _conference: JitsiConference,
|
300
|
311
|
* _fileRecordingsServiceEnabled: boolean,
|
301
|
312
|
* _fileRecordingsServiceSharingEnabled: boolean,
|
|
@@ -305,6 +316,7 @@ class AbstractStartRecordingDialog extends Component<Props, State> {
|
305
|
316
|
*/
|
306
|
317
|
export function mapStateToProps(state: Object) {
|
307
|
318
|
const {
|
|
319
|
+ autoCaptionOnRecord = false,
|
308
|
320
|
fileRecordingsServiceEnabled = false,
|
309
|
321
|
fileRecordingsServiceSharingEnabled = false,
|
310
|
322
|
dropbox = {}
|
|
@@ -312,6 +324,7 @@ export function mapStateToProps(state: Object) {
|
312
|
324
|
|
313
|
325
|
return {
|
314
|
326
|
_appKey: dropbox.appKey,
|
|
327
|
+ _autoCaptionOnRecord: autoCaptionOnRecord,
|
315
|
328
|
_conference: state['features/base/conference'].conference,
|
316
|
329
|
_fileRecordingsServiceEnabled: fileRecordingsServiceEnabled,
|
317
|
330
|
_fileRecordingsServiceSharingEnabled: fileRecordingsServiceSharingEnabled,
|