Browse Source

Adds config to auto turn on captions when recording is started.

efficient_tiling
damencho 5 years ago
parent
commit
0c042b4078

+ 3
- 0
config.js View File

201
     // subtitles and buttons can be configured)
201
     // subtitles and buttons can be configured)
202
     // transcribingEnabled: false,
202
     // transcribingEnabled: false,
203
 
203
 
204
+    // Enables automatic turning on captions when recording is started
205
+    // autoCaptionOnRecord: false,
206
+
204
     // Misc
207
     // Misc
205
 
208
 
206
     // Default value for the channel "last N" attribute. -1 for unlimited.
209
     // Default value for the channel "last N" attribute. -1 for unlimited.

+ 2
- 2
package-lock.json View File

10554
       }
10554
       }
10555
     },
10555
     },
10556
     "lib-jitsi-meet": {
10556
     "lib-jitsi-meet": {
10557
-      "version": "github:jitsi/lib-jitsi-meet#4010d2a301fa847374f2744d6f826d3decebe76a",
10558
-      "from": "github:jitsi/lib-jitsi-meet#4010d2a301fa847374f2744d6f826d3decebe76a",
10557
+      "version": "github:jitsi/lib-jitsi-meet#1c3b3c18e1a3a8c5c9c11cc93e61a4b3c720cfd9",
10558
+      "from": "github:jitsi/lib-jitsi-meet#1c3b3c18e1a3a8c5c9c11cc93e61a4b3c720cfd9",
10559
       "requires": {
10559
       "requires": {
10560
         "@jitsi/sdp-interop": "0.1.14",
10560
         "@jitsi/sdp-interop": "0.1.14",
10561
         "@jitsi/sdp-simulcast": "0.2.1",
10561
         "@jitsi/sdp-simulcast": "0.2.1",

+ 1
- 1
package.json View File

55
     "js-utils": "github:jitsi/js-utils#192b1c996e8c05530eb1f19e82a31069c3021e31",
55
     "js-utils": "github:jitsi/js-utils#192b1c996e8c05530eb1f19e82a31069c3021e31",
56
     "jsrsasign": "8.0.12",
56
     "jsrsasign": "8.0.12",
57
     "jwt-decode": "2.2.0",
57
     "jwt-decode": "2.2.0",
58
-    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#4010d2a301fa847374f2744d6f826d3decebe76a",
58
+    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#1c3b3c18e1a3a8c5c9c11cc93e61a4b3c720cfd9",
59
     "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
59
     "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
60
     "lodash": "4.17.13",
60
     "lodash": "4.17.13",
61
     "moment": "2.19.4",
61
     "moment": "2.19.4",

+ 14
- 1
react/features/recording/components/Recording/AbstractStartRecordingDialog.js View File

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

Loading…
Cancel
Save