From 6eb767ba11e0affeb965e7cb3f79d5e6a99199c7 Mon Sep 17 00:00:00 2001 From: Lyubomir Marinov Date: Wed, 2 Nov 2016 14:42:52 -0500 Subject: [PATCH] [React Native] Disable audio levels The audio levels are gathered by lib-jitsi-meet via polling of RTCPeerConnection.getStats() which is very slow on Android. Since the mobile app makes no use of audio levels, it is easiest to disable them for now in order to not penalize the app. --- react/features/base/lib-jitsi-meet/reducer.js | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/react/features/base/lib-jitsi-meet/reducer.js b/react/features/base/lib-jitsi-meet/reducer.js index 0a7304561..cab547668 100644 --- a/react/features/base/lib-jitsi-meet/reducer.js +++ b/react/features/base/lib-jitsi-meet/reducer.js @@ -17,13 +17,20 @@ import { */ const INITIAL_STATE = { config: { - // FIXME Lib-jitsi-meet uses HTML script elements to asynchronously - // load certain pieces of JavaScript. Unfortunately, the technique - // doesn't work on React Native (because there are no HTML elements - // in the first place). Fortunately, these pieces of JavaScript - // currently involve third parties and we can temporarily disable - // them (until we implement an alternative to async script elements - // on React Native). + // FIXME The support for audio levels in lib-jitsi-meet polls the + // statistics of WebRTC at a short interval multiple times a second. + // Unfortunately, React Native is slow to fetch these statistics from + // the native WebRTC API, through the React Native bridge and eventually + // to JavaScript. Because the audio levels are of no interest to the + // mobile app, it is fastest to merely disable them. + disableAudioLevels: true, + + // FIXME Lib-jitsi-meet uses HTML script elements to asynchronously load + // certain pieces of JavaScript. Unfortunately, the technique doesn't + // work on React Native (because there are no HTML elements in the first + // place). Fortunately, these pieces of JavaScript currently involve + // third parties and we can temporarily disable them (until we implement + // an alternative to async script elements on React Native). disableThirdPartyRequests: true }, initializationError: null,