From 473ba28171eb042a98fb6231eac7f93219fc32d2 Mon Sep 17 00:00:00 2001 From: Radium Zheng Date: Fri, 20 Jul 2018 08:11:47 +1000 Subject: [PATCH] feature flag --- config.js | 7 ++++++- react/features/local-recording/middleware.js | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 3c94dbccb..8120a607c 100644 --- a/config.js +++ b/config.js @@ -345,7 +345,7 @@ var config = { // shard: "shard1", // region: "europe", // userRegion: "asia" - } + }, // Options related to end-to-end (participant to participant) ping. // e2eping: { @@ -408,6 +408,11 @@ var config = { nick startBitrate */ + + localRecording: { + enabled: true, + format: 'flac' + } }; /* eslint-enable no-unused-vars, no-var */ diff --git a/react/features/local-recording/middleware.js b/react/features/local-recording/middleware.js index 3795a707c..7d16cd64d 100644 --- a/react/features/local-recording/middleware.js +++ b/react/features/local-recording/middleware.js @@ -13,8 +13,13 @@ import { LocalRecordingInfoDialog } from './components'; import { recordingController } from './controller'; declare var APP: Object; +declare var config: Object; -MiddlewareRegistry.register(({ getState, dispatch }) => next => action => { +const isFeatureEnabled = config.localRecording + && config.localRecording.enabled === true; + +isFeatureEnabled +&& MiddlewareRegistry.register(({ getState, dispatch }) => next => action => { const result = next(action); switch (action.type) {