Переглянути джерело

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

efficient_tiling
damencho 5 роки тому
джерело
коміт
0c042b4078

+ 3
- 0
config.js Переглянути файл

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

+ 2
- 2
package-lock.json Переглянути файл

@@ -10554,8 +10554,8 @@
10554 10554
       }
10555 10555
     },
10556 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 10559
       "requires": {
10560 10560
         "@jitsi/sdp-interop": "0.1.14",
10561 10561
         "@jitsi/sdp-simulcast": "0.2.1",

+ 1
- 1
package.json Переглянути файл

@@ -55,7 +55,7 @@
55 55
     "js-utils": "github:jitsi/js-utils#192b1c996e8c05530eb1f19e82a31069c3021e31",
56 56
     "jsrsasign": "8.0.12",
57 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 59
     "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
60 60
     "lodash": "4.17.13",
61 61
     "moment": "2.19.4",

+ 14
- 1
react/features/recording/components/Recording/AbstractStartRecordingDialog.js Переглянути файл

@@ -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,

Завантаження…
Відмінити
Зберегти