Browse Source

feature flag

master
Radium Zheng 7 years ago
parent
commit
473ba28171
2 changed files with 12 additions and 2 deletions
  1. 6
    1
      config.js
  2. 6
    1
      react/features/local-recording/middleware.js

+ 6
- 1
config.js View File

@@ -345,7 +345,7 @@ var config = {
345 345
         // shard: "shard1",
346 346
         // region: "europe",
347 347
         // userRegion: "asia"
348
-    }
348
+    },
349 349
 
350 350
     // Options related to end-to-end (participant to participant) ping.
351 351
     // e2eping: {
@@ -408,6 +408,11 @@ var config = {
408 408
      nick
409 409
      startBitrate
410 410
      */
411
+
412
+    localRecording: {
413
+        enabled: true,
414
+        format: 'flac'
415
+    }
411 416
 };
412 417
 
413 418
 /* eslint-enable no-unused-vars, no-var */

+ 6
- 1
react/features/local-recording/middleware.js View File

@@ -13,8 +13,13 @@ import { LocalRecordingInfoDialog } from './components';
13 13
 import { recordingController } from './controller';
14 14
 
15 15
 declare var APP: Object;
16
+declare var config: Object;
16 17
 
17
-MiddlewareRegistry.register(({ getState, dispatch }) => next => action => {
18
+const isFeatureEnabled = config.localRecording
19
+    && config.localRecording.enabled === true;
20
+
21
+isFeatureEnabled
22
+&& MiddlewareRegistry.register(({ getState, dispatch }) => next => action => {
18 23
     const result = next(action);
19 24
 
20 25
     switch (action.type) {

Loading…
Cancel
Save