瀏覽代碼

feature flag

master
Radium Zheng 7 年之前
父節點
當前提交
473ba28171
共有 2 個檔案被更改,包括 12 行新增2 行删除
  1. 6
    1
      config.js
  2. 6
    1
      react/features/local-recording/middleware.js

+ 6
- 1
config.js 查看文件

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

+ 6
- 1
react/features/local-recording/middleware.js 查看文件

13
 import { recordingController } from './controller';
13
 import { recordingController } from './controller';
14
 
14
 
15
 declare var APP: Object;
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
     const result = next(action);
23
     const result = next(action);
19
 
24
 
20
     switch (action.type) {
25
     switch (action.type) {

Loading…
取消
儲存