|
@@ -9,6 +9,7 @@ import { getLocalParticipant } from '../base/participants';
|
9
|
9
|
import { MiddlewareRegistry } from '../base/redux';
|
10
|
10
|
|
11
|
11
|
import RTCStats from './RTCStats';
|
|
12
|
+import { isRtcstatsEnabled } from './functions';
|
12
|
13
|
import logger from './logger';
|
13
|
14
|
|
14
|
15
|
/**
|
|
@@ -25,7 +26,7 @@ MiddlewareRegistry.register(store => next => action => {
|
25
|
26
|
|
26
|
27
|
switch (action.type) {
|
27
|
28
|
case LIB_WILL_INIT: {
|
28
|
|
- if (analytics.rtcstatsEnabled) {
|
|
29
|
+ if (isRtcstatsEnabled(state)) {
|
29
|
30
|
// RTCStats "proxies" WebRTC functions such as GUM and RTCPeerConnection by rewriting the global
|
30
|
31
|
// window functions. Because lib-jitsi-meet uses references to those functions that are taken on
|
31
|
32
|
// init, we need to add these proxies before it initializes, otherwise lib-jitsi-meet will use the
|
|
@@ -47,7 +48,7 @@ MiddlewareRegistry.register(store => next => action => {
|
47
|
48
|
break;
|
48
|
49
|
}
|
49
|
50
|
case CONFERENCE_JOINED: {
|
50
|
|
- if (analytics.rtcstatsEnabled && RTCStats.isInitialized()) {
|
|
51
|
+ if (isRtcstatsEnabled(state) && RTCStats.isInitialized()) {
|
51
|
52
|
// Once the conference started connect to the rtcstats server and send data.
|
52
|
53
|
try {
|
53
|
54
|
RTCStats.connect();
|