Преглед на файлове

Remove callstats (#14076)

* ref: Remove precall test.
* ref: Remove callstats.
* Remove the dependency on react-native-callstats.
factor2
bgrozev преди 1 година
родител
ревизия
6ab25f7bc0
No account linked to committer's email address

+ 1
- 14
conference.js Целия файл

@@ -154,7 +154,7 @@ import {
154 154
 import { isModerationNotificationDisplayed } from './react/features/notifications/functions';
155 155
 import { mediaPermissionPromptVisibilityChanged } from './react/features/overlay/actions';
156 156
 import { suspendDetected } from './react/features/power-monitor/actions';
157
-import { initPrejoin, makePrecallTest } from './react/features/prejoin/actions';
157
+import { initPrejoin } from './react/features/prejoin/actions';
158 158
 import { isPrejoinPageVisible } from './react/features/prejoin/functions';
159 159
 import { disableReceiver, stopReceiver } from './react/features/remote-control/actions';
160 160
 import { setScreenAudioShareState } from './react/features/screen-share/actions.web';
@@ -718,8 +718,6 @@ export default {
718 718
         };
719 719
 
720 720
         if (isPrejoinPageVisible(state)) {
721
-            APP.store.dispatch(makePrecallTest(this._getConferenceOptions()));
722
-
723 721
             const { tryCreateLocalTracks, errors } = this.createInitialLocalTracks(initialOptions);
724 722
             const localTracks = await tryCreateLocalTracks;
725 723
 
@@ -1039,17 +1037,6 @@ export default {
1039 1037
             .filter(p => !p.isHidden() || !(config.iAmRecorder && p.isHiddenFromRecorder())).length + 1;
1040 1038
     },
1041 1039
 
1042
-    /**
1043
-     * Returns true if the callstats integration is enabled, otherwise returns
1044
-     * false.
1045
-     *
1046
-     * @returns true if the callstats integration is enabled, otherwise returns
1047
-     * false.
1048
-     */
1049
-    isCallstatsEnabled() {
1050
-        return room && room.isCallstatsEnabled();
1051
-    },
1052
-
1053 1040
     /**
1054 1041
      * Get speaker stats that track total dominant speaker time.
1055 1042
      *

+ 5
- 41
config.js Целия файл

@@ -97,11 +97,6 @@ var config = {
97 97
         // Disables the auto-play behavior of *all* newly created video element.
98 98
         // This is useful when the client runs on a host with limited resources.
99 99
         // noAutoPlayVideo: false,
100
-
101
-        // Enable callstats only for a percentage of users.
102
-        // This takes a value between 0 and 100 which determines the probability for
103
-        // the callstats to be enabled.
104
-        // callStatsThreshold: 5, // enable callstats for 5% of the users.
105 100
     },
106 101
 
107 102
     // Disables moderator indicators.
@@ -943,38 +938,10 @@ var config = {
943 938
     // The interval at which PeerConnection.getStats() is called. Defaults to 10000
944 939
     // pcStatsInterval: 10000,
945 940
 
946
-    // To enable sending statistics to callstats.io you must provide the
947
-    // Application ID and Secret.
948
-    // callStatsID: '',
949
-    // callStatsSecret: '',
950
-    // callStatsApplicationLogsDisabled: false,
951
-
952
-    // The callstats initialize config params as described in the API:
953
-    // https://docs.callstats.io/docs/javascript#callstatsinitialize-with-app-secret
954
-    // callStatsConfigParams: {
955
-    //     disableBeforeUnloadHandler: true, // disables callstats.js's window.onbeforeunload parameter.
956
-    //     applicationVersion: "app_version", // Application version specified by the developer.
957
-    //     disablePrecalltest: true, // disables the pre-call test, it is enabled by default.
958
-    //     siteID: "siteID", // The name/ID of the site/campus from where the call/pre-call test is made.
959
-    //     additionalIDs: { // additionalIDs object, contains application related IDs.
960
-    //         customerID: "Customer Identifier. Example, walmart.",
961
-    //         tenantID: "Tenant Identifier. Example, monster.",
962
-    //         productName: "Product Name. Example, Jitsi.",
963
-    //         meetingsName: "Meeting Name. Example, Jitsi loves callstats.",
964
-    //         serverName: "Server/MiddleBox Name. Example, jvb-prod-us-east-mlkncws12.",
965
-    //         pbxID: "PBX Identifier. Example, walmart.",
966
-    //         pbxExtensionID: "PBX Extension Identifier. Example, 5625.",
967
-    //         fqExtensionID: "Fully qualified Extension Identifier. Example, +71 (US) +5625.",
968
-    //         sessionID: "Session Identifier. Example, session-12-34",
969
-    //     },
970
-    //     collectLegacyStats: true, //enables the collection of legacy stats in chrome browser
971
-    //     collectIP: true, //enables the collection localIP address
972
-    // },
973
-
974
-    // Enables sending participants' display names to callstats
941
+    // Enables sending participants' display names to stats
975 942
     // enableDisplayNameInStats: false,
976 943
 
977
-    // Enables sending participants' emails (if available) to callstats and other analytics
944
+    // Enables sending participants' emails (if available) to stats and other analytics
978 945
     // enableEmailInStats: false,
979 946
 
980 947
     // faceLandmarks: {
@@ -997,7 +964,7 @@ var config = {
997 964
     //     captureInterval: 1000,
998 965
     // },
999 966
 
1000
-    // Controls the percentage of automatic feedback shown to participants when callstats is enabled.
967
+    // Controls the percentage of automatic feedback shown to participants.
1001 968
     // The default value is 100%. If set to 0, no automatic feedback will be requested
1002 969
     // feedbackPercentage: 100,
1003 970
 
@@ -1005,7 +972,7 @@ var config = {
1005 972
     //
1006 973
 
1007 974
     // If third party requests are disabled, no other server will be contacted.
1008
-    // This means avatars will be locally generated and callstats integration
975
+    // This means avatars will be locally generated and external stats integration
1009 976
     // will not function.
1010 977
     // disableThirdPartyRequests: false,
1011 978
 
@@ -1556,8 +1523,6 @@ var config = {
1556 1523
      _peerConnStatusOutOfLastNTimeout
1557 1524
      _peerConnStatusRtcMuteTimeout
1558 1525
      avgRtpStatsN
1559
-     callStatsConfIDNamespace
1560
-     callStatsCustomScriptUrl
1561 1526
      desktopSharingSources
1562 1527
      disableAEC
1563 1528
      disableAGC
@@ -1731,13 +1696,12 @@ var config = {
1731 1696
     // logging: {
1732 1697
     //      // Default log level for the app and lib-jitsi-meet.
1733 1698
     //      defaultLogLevel: 'trace',
1734
-    //      // Option to disable LogCollector (which stores the logs on CallStats).
1699
+    //      // Option to disable LogCollector.
1735 1700
     //      //disableLogCollector: true,
1736 1701
     //      // Individual loggers are customizable.
1737 1702
     //      loggers: {
1738 1703
     //      // The following are too verbose in their logging with the default level.
1739 1704
     //      'modules/RTC/TraceablePeerConnection.js': 'info',
1740
-    //      'modules/statistics/CallStats.js': 'info',
1741 1705
     //      'modules/xmpp/strophe.util.js': 'log',
1742 1706
     // },
1743 1707
 

+ 0
- 42
package-lock.json Целия файл

@@ -77,7 +77,6 @@
77 77
         "react-native": "0.69.12",
78 78
         "react-native-background-timer": "2.4.1",
79 79
         "react-native-calendar-events": "2.2.0",
80
-        "react-native-callstats": "3.73.22",
81 80
         "react-native-default-preference": "1.4.4",
82 81
         "react-native-device-info": "10.9.0",
83 82
         "react-native-dialog": "https://github.com/jitsi/react-native-dialog/releases/download/v9.2.2-jitsi.1/react-native-dialog-9.2.2.tgz",
@@ -7285,11 +7284,6 @@
7285 7284
         "node": ">=0.10.0"
7286 7285
       }
7287 7286
     },
7288
-    "node_modules/base-64": {
7289
-      "version": "0.1.0",
7290
-      "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz",
7291
-      "integrity": "sha1-eAqZyE59YAJgNhURxId2E78k9rs="
7292
-    },
7293 7287
     "node_modules/base/node_modules/define-property": {
7294 7288
       "version": "1.0.0",
7295 7289
       "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
@@ -12488,14 +12482,6 @@
12488 12482
         "jss": "10.10.0"
12489 12483
       }
12490 12484
     },
12491
-    "node_modules/jssha": {
12492
-      "version": "3.2.0",
12493
-      "resolved": "https://registry.npmjs.org/jssha/-/jssha-3.2.0.tgz",
12494
-      "integrity": "sha512-QuruyBENDWdN4tZwJbQq7/eAK85FqrI4oDbXjy5IBhYD+2pTJyBUWZe8ctWaCkrV0gy6AaelgOZZBMeswEa/6Q==",
12495
-      "engines": {
12496
-        "node": "*"
12497
-      }
12498
-    },
12499 12485
     "node_modules/jsx-ast-utils": {
12500 12486
       "version": "3.2.1",
12501 12487
       "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz",
@@ -15610,15 +15596,6 @@
15610 15596
         "react-native": ">=0.60.0"
15611 15597
       }
15612 15598
     },
15613
-    "node_modules/react-native-callstats": {
15614
-      "version": "3.73.22",
15615
-      "resolved": "https://registry.npmjs.org/react-native-callstats/-/react-native-callstats-3.73.22.tgz",
15616
-      "integrity": "sha512-1l1n9XIca8VT7Vp/xaQY8grPDmgVp++nx0cYhelOWyn4TwBrWxIOPU1Ok4ODrNiYtnsh+/Dyqq+lSSwZksr7LA==",
15617
-      "dependencies": {
15618
-        "base-64": "0.1.0",
15619
-        "jssha": "^3.2.0"
15620
-      }
15621
-    },
15622 15599
     "node_modules/react-native-codegen": {
15623 15600
       "version": "0.69.2",
15624 15601
       "resolved": "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.69.2.tgz",
@@ -25381,11 +25358,6 @@
25381 25358
         }
25382 25359
       }
25383 25360
     },
25384
-    "base-64": {
25385
-      "version": "0.1.0",
25386
-      "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz",
25387
-      "integrity": "sha1-eAqZyE59YAJgNhURxId2E78k9rs="
25388
-    },
25389 25361
     "base64-js": {
25390 25362
       "version": "1.5.1",
25391 25363
       "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -29282,11 +29254,6 @@
29282 29254
         "jss": "10.10.0"
29283 29255
       }
29284 29256
     },
29285
-    "jssha": {
29286
-      "version": "3.2.0",
29287
-      "resolved": "https://registry.npmjs.org/jssha/-/jssha-3.2.0.tgz",
29288
-      "integrity": "sha512-QuruyBENDWdN4tZwJbQq7/eAK85FqrI4oDbXjy5IBhYD+2pTJyBUWZe8ctWaCkrV0gy6AaelgOZZBMeswEa/6Q=="
29289
-    },
29290 29257
     "jsx-ast-utils": {
29291 29258
       "version": "3.2.1",
29292 29259
       "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz",
@@ -31658,15 +31625,6 @@
31658 31625
       "resolved": "https://registry.npmjs.org/react-native-calendar-events/-/react-native-calendar-events-2.2.0.tgz",
31659 31626
       "integrity": "sha512-tNUbhT6Ief0JM4OQzQAaz1ri0+MCcAoHptBcEXCz2g7q3A05pg62PR2Dio4F9t2fCAD7Y2+QggdY1ycAsF3Tsg=="
31660 31627
     },
31661
-    "react-native-callstats": {
31662
-      "version": "3.73.22",
31663
-      "resolved": "https://registry.npmjs.org/react-native-callstats/-/react-native-callstats-3.73.22.tgz",
31664
-      "integrity": "sha512-1l1n9XIca8VT7Vp/xaQY8grPDmgVp++nx0cYhelOWyn4TwBrWxIOPU1Ok4ODrNiYtnsh+/Dyqq+lSSwZksr7LA==",
31665
-      "requires": {
31666
-        "base-64": "0.1.0",
31667
-        "jssha": "^3.2.0"
31668
-      }
31669
-    },
31670 31628
     "react-native-codegen": {
31671 31629
       "version": "0.69.2",
31672 31630
       "resolved": "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.69.2.tgz",

+ 0
- 1
package.json Целия файл

@@ -83,7 +83,6 @@
83 83
     "react-native": "0.69.12",
84 84
     "react-native-background-timer": "2.4.1",
85 85
     "react-native-calendar-events": "2.2.0",
86
-    "react-native-callstats": "3.73.22",
87 86
     "react-native-default-preference": "1.4.4",
88 87
     "react-native-device-info": "10.9.0",
89 88
     "react-native-dialog": "https://github.com/jitsi/react-native-dialog/releases/download/v9.2.2-jitsi.1/react-native-dialog-9.2.2.tgz",

+ 0
- 1
react-native-sdk/package.json Целия файл

@@ -38,7 +38,6 @@
38 38
         "react-emoji-render": "1.2.4",
39 39
         "react-i18next": "10.11.4",
40 40
         "react-linkify": "1.0.0-alpha",
41
-        "react-native-callstats": "3.73.22",
42 41
         "react-native-dialog": "https://github.com/jitsi/react-native-dialog/releases/download/v9.2.2-jitsi.1/react-native-dialog-9.2.2.tgz",
43 42
         "react-native-svg-transformer": "1.1.0",
44 43
         "react-native-tab-view": "3.5.2",

+ 0
- 2
react/features/base/conference/functions.ts Целия файл

@@ -246,8 +246,6 @@ export function getConferenceOptions(stateful: IStateful) {
246 246
         delete config.analytics?.scriptURLs;
247 247
         delete config.analytics?.amplitudeAPPKey;
248 248
         delete config.analytics?.googleAnalyticsTrackingId;
249
-        delete options.callStatsID;
250
-        delete options.callStatsSecret;
251 249
     }
252 250
 
253 251
     return options;

+ 0
- 1
react/features/base/conference/reducer.ts Целия файл

@@ -73,7 +73,6 @@ export interface IJitsiConference {
73 73
     getSsrcByTrack: Function;
74 74
     grantOwner: Function;
75 75
     isAVModerationSupported: Function;
76
-    isCallstatsEnabled: Function;
77 76
     isE2EEEnabled: Function;
78 77
     isE2EESupported: Function;
79 78
     isEndConferenceSupported: Function;

+ 0
- 22
react/features/base/config/configType.ts Целия файл

@@ -231,27 +231,6 @@ export interface IConfig {
231 231
     callDisplayName?: string;
232 232
     callFlowsEnabled?: boolean;
233 233
     callHandle?: string;
234
-    callStatsConfigParams?: {
235
-        additionalIDs?: {
236
-            customerID?: string;
237
-            fqExtensionID?: string;
238
-            meetingsName?: string;
239
-            pbxExtensionID?: string;
240
-            pbxID?: string;
241
-            productName?: string;
242
-            serverName?: string;
243
-            sessionID?: string;
244
-            tenantID?: string;
245
-        };
246
-        applicationVersion?: string;
247
-        collectIP?: boolean;
248
-        collectLegacyStats?: boolean;
249
-        disableBeforeUnloadHandler?: boolean;
250
-        disablePrecalltest?: boolean;
251
-        siteID?: string;
252
-    };
253
-    callStatsID?: string;
254
-    callStatsSecret?: string;
255 234
     callUUID?: string;
256 235
     cameraFacingMode?: string;
257 236
     channelLastN?: number;
@@ -581,7 +560,6 @@ export interface IConfig {
581 560
     subject?: string;
582 561
     testing?: {
583 562
         assumeBandwidth?: boolean;
584
-        callStatsThreshold?: number;
585 563
         disableE2EE?: boolean;
586 564
         mobileXmppWsThreshold?: number;
587 565
         noAutoPlayVideo?: boolean;

+ 0
- 4
react/features/base/config/configWhitelist.ts Целия файл

@@ -55,10 +55,6 @@ export default [
55 55
      * @type string
56 56
      */
57 57
     'callHandle',
58
-    'callStatsConfIDNamespace',
59
-    'callStatsConfigParams',
60
-    'callStatsID',
61
-    'callStatsSecret',
62 58
 
63 59
     /**
64 60
      * The UUID of the CallKit call representing the conference/meeting

+ 0
- 2
react/features/base/config/functions.native.ts Целия файл

@@ -28,8 +28,6 @@ export function _cleanupConfig(config: IConfig) {
28 28
         delete config.analytics?.rtcstatsUseLegacy;
29 29
         delete config.analytics?.obfuscateRoomName;
30 30
         delete config.analytics?.watchRTCEnabled;
31
-        delete config.callStatsID;
32
-        delete config.callStatsSecret;
33 31
         delete config.watchRTCConfigParams;
34 32
         config.giphy = { enabled: false };
35 33
     }

+ 0
- 1
react/features/base/jwt/constants.ts Целия файл

@@ -4,7 +4,6 @@
4 4
 export const MEET_FEATURES = {
5 5
     BRANDING: 'branding',
6 6
     CALENDAR: 'calendar',
7
-    CALLSTATS: 'callstats',
8 7
     FLIP: 'flip',
9 8
     INBOUND_CALL: 'inbound-call',
10 9
     LIVESTREAMING: 'livestreaming',

+ 2
- 51
react/features/base/logging/JitsiMeetLogStorage.ts Целия файл

@@ -1,11 +1,9 @@
1 1
 import { IStore } from '../../app/types';
2 2
 import RTCStats from '../../rtcstats/RTCStats';
3 3
 import { isRTCStatsEnabled } from '../../rtcstats/functions';
4
-import { getCurrentConference } from '../conference/functions';
5 4
 
6 5
 /**
7
- * Implements log storage interface from the @jitsi/logger lib. Captured
8
- * logs are sent to CallStats.
6
+ * Implements log storage interface from the @jitsi/logger lib.
9 7
  */
10 8
 export default class JitsiMeetLogStorage {
11 9
     counter: number;
@@ -33,8 +31,7 @@ export default class JitsiMeetLogStorage {
33 31
     }
34 32
 
35 33
     /**
36
-     * The JitsiMeetLogStorage is ready when the CallStats are started and
37
-     * before refactoring the code it was after the conference has been joined.
34
+     * The JitsiMeetLogStorage is ready when the conference has been joined.
38 35
      * A conference is considered joined when the 'conference' field is defined
39 36
      * in the base/conference state.
40 37
      *
@@ -73,54 +70,8 @@ export default class JitsiMeetLogStorage {
73 70
      */
74 71
     storeLogs(logEntries: Array<string | any>) {
75 72
 
76
-        // XXX the config.callStatsApplicationLogsDisabled controls whether or not the logs will be sent to callstats.
77
-        // this is done in LJM
78
-        this.storeLogsCallstats(logEntries);
79
-
80 73
         if (this.canStoreLogsRtcstats()) {
81 74
             RTCStats.sendLogs(logEntries);
82 75
         }
83 76
     }
84
-
85
-    /**
86
-     * Store the console logs in callstats (if callstats is enabled).
87
-     *
88
-     * @param {Array<string|any>} logEntries - The log entries to send to the rtcstats server.
89
-     * @returns {void}
90
-     */
91
-    storeLogsCallstats(logEntries: Array<string | any>) {
92
-        const conference = getCurrentConference(this.getState());
93
-
94
-        if (!conference?.isCallstatsEnabled()) {
95
-            // Discard the logs if CallStats is not enabled.
96
-            return;
97
-        }
98
-
99
-        let logMessage = `{"log${this.counter}":"\n`;
100
-
101
-        for (let i = 0, len = logEntries.length; i < len; i++) {
102
-            const logEntry = logEntries[i];
103
-
104
-            if (logEntry.timestamp) {
105
-                logMessage += `${logEntry.timestamp} `;
106
-            }
107
-            if (logEntry.count > 1) {
108
-                logMessage += `(${logEntry.count}) `;
109
-            }
110
-            logMessage += `${logEntry.text}\n`;
111
-        }
112
-        logMessage += '"}';
113
-
114
-        this.counter += 1;
115
-
116
-        // Try catch was used, because there are many variables
117
-        // on the way that could be uninitialized if the storeLogs
118
-        // attempt would be made very early (which is unlikely)
119
-        try {
120
-            conference.sendApplicationLog(logMessage);
121
-        } catch (error) {
122
-            // NOTE console is intentional here
123
-            console.error(`Failed to store the logs, msg length: ${logMessage.length} error:`, error);
124
-        }
125
-    }
126 77
 }

+ 1
- 1
react/features/base/logging/actionTypes.ts Целия файл

@@ -1,6 +1,6 @@
1 1
 /**
2 2
  * The type of redux action which stores the log collector that will be
3
- * submitting the logs to CallStats.
3
+ * submitting the logs to a service
4 4
  *
5 5
  * {
6 6
  *     type: SET_LOG_COLLECTOR,

+ 1
- 2
react/features/base/logging/actions.ts Целия файл

@@ -1,8 +1,7 @@
1 1
 import { SET_LOGGING_CONFIG, SET_LOG_COLLECTOR } from './actionTypes';
2 2
 
3 3
 /**
4
- * Stores a {@code Logger.LogCollector} instance which will be uploading logs
5
- * to CallStats.
4
+ * Stores a {@code Logger.LogCollector} instance which will be uploading logs.
6 5
  *
7 6
  * @param {Logger.LogCollector} logCollector - The log collector instance to be
8 7
  * stored in the Redux state of base/logging feature.

+ 1
- 1
react/features/base/logging/middleware.ts Целия файл

@@ -106,7 +106,7 @@ function _conferenceJoined({ getState }: IStore, next: Function, action: AnyActi
106 106
         logCollector.flush();
107 107
 
108 108
         // This event listener will flush the logs, before the statistics module
109
-        // (CallStats) is stopped.
109
+        // is stopped.
110 110
         //
111 111
         // NOTE The LogCollector is not stopped, because this event can be
112 112
         // triggered multiple times during single conference (whenever

+ 1
- 2
react/features/base/logging/reducer.ts Целия файл

@@ -10,14 +10,13 @@ const DEFAULT_LOGGING_CONFIG = {
10 10
     // default log level for the app and lib-jitsi-meet
11 11
     defaultLogLevel: 'trace' as LogLevel,
12 12
 
13
-    // Option to disable LogCollector (which stores the logs on CallStats)
13
+    // Option to disable LogCollector (which stores the logs)
14 14
     // disableLogCollector: true,
15 15
 
16 16
     loggers: {
17 17
         // The following are too verbose in their logging with the
18 18
         // {@link #defaultLogLevel}:
19 19
         'modules/RTC/TraceablePeerConnection.js': 'info' as LogLevel,
20
-        'modules/statistics/CallStats.js': 'info' as LogLevel,
21 20
         'modules/xmpp/strophe.util.js': 'log' as LogLevel
22 21
     }
23 22
 };

+ 2
- 3
react/features/base/premeeting/components/web/ConnectionStatus.tsx Целия файл

@@ -3,7 +3,6 @@ import { WithTranslation } from 'react-i18next';
3 3
 import { connect } from 'react-redux';
4 4
 import { makeStyles } from 'tss-react/mui';
5 5
 
6
-import { IReduxState } from '../../../../app/types';
7 6
 import { translate } from '../../../i18n/functions';
8 7
 import Icon from '../../../icons/components/Icon';
9 8
 import { IconArrowDown, IconWifi1Bar, IconWifi2Bars, IconWifi3Bars } from '../../../icons/svg';
@@ -217,8 +216,8 @@ function ConnectionStatus({ connectionDetails, t, connectionType }: IProps) {
217 216
  * @param {Object} state - The redux state.
218 217
  * @returns {Object}
219 218
  */
220
-function mapStateToProps(state: IReduxState) {
221
-    const { connectionDetails, connectionType } = getConnectionData(state);
219
+function mapStateToProps() {
220
+    const { connectionDetails, connectionType } = getConnectionData();
222 221
 
223 222
     return {
224 223
         connectionDetails,

+ 1
- 127
react/features/base/premeeting/functions.ts Целия файл

@@ -1,14 +1,5 @@
1
-import { findIndex } from 'lodash';
2
-
3
-import { IReduxState } from '../../app/types';
4
-
5 1
 import { CONNECTION_TYPE } from './constants';
6 2
 
7
-const LOSS_AUDIO_THRESHOLDS = [ 0.33, 0.05 ];
8
-const LOSS_VIDEO_THRESHOLDS = [ 0.33, 0.1, 0.05 ];
9
-
10
-const THROUGHPUT_AUDIO_THRESHOLDS = [ 8, 20 ];
11
-const THROUGHPUT_VIDEO_THRESHOLDS = [ 60, 750 ];
12 3
 
13 4
 /**
14 5
  * The avatar size to container size ration.
@@ -79,132 +70,15 @@ export function calculateAvatarDimensions(height: number) {
79 70
     };
80 71
 }
81 72
 
82
-/**
83
- * Returns the level based on a list of thresholds.
84
- *
85
- * @param {number[]} thresholds - The thresholds array.
86
- * @param {number} value - The value against which the level is calculated.
87
- * @param {boolean} descending - The order based on which the level is calculated.
88
- *
89
- * @returns {number}
90
- */
91
-function _getLevel(thresholds: number[], value: number, descending = true) {
92
-    let predicate;
93
-
94
-    if (descending) {
95
-        predicate = function(threshold: number) {
96
-            return value > threshold;
97
-        };
98
-    } else {
99
-        predicate = function(threshold: number) {
100
-            return value < threshold;
101
-        };
102
-    }
103
-
104
-    const i = findIndex(thresholds, predicate);
105
-
106
-    if (i === -1) {
107
-        return thresholds.length;
108
-    }
109
-
110
-    return i;
111
-}
112
-
113
-/**
114
- * Returns the connection details from the test results.
115
- *
116
- * @param {number} testResults.fractionalLoss - Factional loss.
117
- * @param {number} testResults.throughput - Throughput.
118
- *
119
- * @returns {{
120
- *   connectionType: string,
121
- *   connectionDetails: string[]
122
- * }}
123
- */
124
-function _getConnectionDataFromTestResults({ fractionalLoss: l, throughput: t }:
125
-    { fractionalLoss: number; throughput: number; }) {
126
-    const loss = {
127
-        audioQuality: _getLevel(LOSS_AUDIO_THRESHOLDS, l),
128
-        videoQuality: _getLevel(LOSS_VIDEO_THRESHOLDS, l)
129
-    };
130
-    const throughput = {
131
-        audioQuality: _getLevel(THROUGHPUT_AUDIO_THRESHOLDS, t, false),
132
-        videoQuality: _getLevel(THROUGHPUT_VIDEO_THRESHOLDS, t, false)
133
-    };
134
-    let connectionType = CONNECTION_TYPE.NONE;
135
-    const connectionDetails = [];
136
-
137
-    if (throughput.audioQuality === 0 || loss.audioQuality === 0) {
138
-        // Calls are impossible.
139
-        connectionType = CONNECTION_TYPE.POOR;
140
-        connectionDetails.push('prejoin.connectionDetails.veryPoorConnection');
141
-    } else if (
142
-        throughput.audioQuality === 2
143
-        && throughput.videoQuality === 2
144
-        && loss.audioQuality === 2
145
-        && loss.videoQuality === 3
146
-    ) {
147
-        // Ideal conditions for both audio and video. Show only one message.
148
-        connectionType = CONNECTION_TYPE.GOOD;
149
-        connectionDetails.push('prejoin.connectionDetails.goodQuality');
150
-    } else {
151
-        connectionType = CONNECTION_TYPE.NON_OPTIMAL;
152
-
153
-        if (throughput.audioQuality === 1) {
154
-            // Minimum requirements for a call are met.
155
-            connectionDetails.push('prejoin.connectionDetails.audioLowNoVideo');
156
-        } else {
157
-            // There are two paragraphs: one saying something about audio and the other about video.
158
-            if (loss.audioQuality === 1) {
159
-                connectionDetails.push('prejoin.connectionDetails.audioClipping');
160
-            } else {
161
-                connectionDetails.push('prejoin.connectionDetails.audioHighQuality');
162
-            }
163
-
164
-            if (throughput.videoQuality === 0 || loss.videoQuality === 0) {
165
-                connectionDetails.push('prejoin.connectionDetails.noVideo');
166
-            } else if (throughput.videoQuality === 1) {
167
-                connectionDetails.push('prejoin.connectionDetails.videoLowQuality');
168
-            } else if (loss.videoQuality === 1) {
169
-                connectionDetails.push('prejoin.connectionDetails.videoFreezing');
170
-            } else if (loss.videoQuality === 2) {
171
-                connectionDetails.push('prejoin.connectionDetails.videoTearing');
172
-            } else {
173
-                connectionDetails.push('prejoin.connectionDetails.videoHighQuality');
174
-            }
175
-        }
176
-        connectionDetails.push('prejoin.connectionDetails.undetectable');
177
-    }
178
-
179
-    return {
180
-        connectionType,
181
-        connectionDetails
182
-    };
183
-}
184
-
185 73
 /**
186 74
  * Selector for determining the connection type & details.
187 75
  *
188
- * @param {Object} state - The state of the app.
189 76
  * @returns {{
190 77
  *   connectionType: string,
191 78
  *   connectionDetails: string[]
192 79
  * }}
193 80
  */
194
-export function getConnectionData(state: IReduxState) {
195
-    const { precallTestResults } = state['features/prejoin'];
196
-
197
-    if (precallTestResults) {
198
-        if (precallTestResults.mediaConnectivity) {
199
-            return _getConnectionDataFromTestResults(precallTestResults);
200
-        }
201
-
202
-        return {
203
-            connectionType: CONNECTION_TYPE.POOR,
204
-            connectionDetails: [ 'prejoin.connectionDetails.noMediaConnectivity' ]
205
-        };
206
-    }
207
-
81
+export function getConnectionData() {
208 82
     return {
209 83
         connectionType: CONNECTION_TYPE.NONE,
210 84
         connectionDetails: []

+ 1
- 6
react/features/feedback/actions.web.ts Целия файл

@@ -71,8 +71,7 @@ export function maybeOpenFeedbackDialog(conference: IJitsiConference, title?: st
71 71
                 showThankYou: true,
72 72
                 wasDialogShown: false
73 73
             });
74
-        } else if (
75
-            (conference.isCallstatsEnabled() || shouldSendJaaSFeedbackMetadata(state))
74
+        } else if (shouldSendJaaSFeedbackMetadata(state)
76 75
                 && feedbackPercentage > Math.random() * 100) {
77 76
             return new Promise(resolve => {
78 77
                 dispatch(openFeedbackDialog(conference, title, () => {
@@ -168,10 +167,6 @@ export function submitFeedback(
168 167
         const state = getState();
169 168
         const promises = [];
170 169
 
171
-        if (conference.isCallstatsEnabled()) {
172
-            promises.push(conference.sendFeedback(score, message));
173
-        }
174
-
175 170
         if (shouldSendJaaSFeedbackMetadata(state)) {
176 171
             promises.push(dispatch(sendJaasFeedbackMetadata(conference, {
177 172
                 score,

+ 1
- 1
react/features/feedback/components/FeedbackButton.web.ts Целия файл

@@ -50,7 +50,7 @@ const mapStateToProps = (state: IReduxState) => {
50 50
 
51 51
     return {
52 52
         _conference: conference,
53
-        visible: conference?.isCallstatsEnabled() || shouldSendJaaSFeedbackMetadata(state)
53
+        visible: shouldSendJaaSFeedbackMetadata(state)
54 54
     };
55 55
 };
56 56
 

+ 0
- 7
react/features/mobile/polyfills/browser.js Целия файл

@@ -288,13 +288,6 @@ function _visitNode(node, callback) {
288 288
     global.performance.now = performanceNow;
289 289
     global.PerformanceObserver = perf.PerformanceObserver;
290 290
 
291
-    // CallStats
292
-    //
293
-    // Required by:
294
-    // - lib-jitsi-meet
295
-    require('react-native-callstats/csio-polyfill');
296
-    global.callstats = require('react-native-callstats/callstats');
297
-
298 291
     // Timers
299 292
     //
300 293
     // React Native's timers won't run while the app is in the background, this

+ 0
- 3
react/features/overlay/components/web/AbstractPageReloadOverlay.tsx Целия файл

@@ -152,9 +152,6 @@ export default class AbstractPageReloadOverlay<P extends IProps>
152 152
      * @returns {void}
153 153
      */
154 154
     componentDidMount() {
155
-        // FIXME (CallStats - issue) This event will not make it to CallStats
156
-        // because the log queue is not flushed before "fabric terminated" is
157
-        // sent to the backed.
158 155
         // FIXME: We should dispatch action for this.
159 156
         if (typeof APP !== 'undefined' && APP.conference?._room) {
160 157
             APP.conference._room.sendApplicationLog(JSON.stringify({

+ 0
- 5
react/features/prejoin/actionTypes.ts Целия файл

@@ -39,11 +39,6 @@ export const SET_DIALOUT_STATUS = 'SET_DIALOUT_STATUS';
39 39
  */
40 40
 export const SET_JOIN_BY_PHONE_DIALOG_VISIBLITY = 'SET_JOIN_BY_PHONE_DIALOG_VISIBLITY';
41 41
 
42
-/**
43
- * Action type to set the precall test data.
44
- */
45
-export const SET_PRECALL_TEST_RESULTS = 'SET_PRECALL_TEST_RESULTS';
46
-
47 42
 /**
48 43
  * Action type to disable the audio while on prejoin page.
49 44
  */

+ 0
- 33
react/features/prejoin/actions.web.ts Целия файл

@@ -30,7 +30,6 @@ import {
30 30
     SET_DIALOUT_NUMBER,
31 31
     SET_DIALOUT_STATUS,
32 32
     SET_JOIN_BY_PHONE_DIALOG_VISIBLITY,
33
-    SET_PRECALL_TEST_RESULTS,
34 33
     SET_PREJOIN_DEVICE_ERRORS,
35 34
     SET_PREJOIN_PAGE_VISIBILITY,
36 35
     SET_SKIP_PREJOIN_RELOAD
@@ -313,25 +312,6 @@ export function joinConferenceWithoutAudio() {
313 312
     };
314 313
 }
315 314
 
316
-/**
317
- * Initializes the 'precallTest' and executes one test, storing the results.
318
- *
319
- * @param {Object} conferenceOptions - The conference options.
320
- * @returns {Function}
321
- */
322
-export function makePrecallTest(conferenceOptions: Object) {
323
-    return async function(dispatch: IStore['dispatch']) {
324
-        try {
325
-            await JitsiMeetJS.precallTest.init(conferenceOptions);
326
-            const results = await JitsiMeetJS.precallTest.execute();
327
-
328
-            dispatch(setPrecallTestResults(results));
329
-        } catch (error) {
330
-            logger.debug('Failed to execute pre call test - ', error);
331
-        }
332
-    };
333
-}
334
-
335 315
 /**
336 316
  * Opens an external page with all the dial in numbers.
337 317
  *
@@ -515,19 +495,6 @@ export function setJoinByPhoneDialogVisiblity(value: boolean) {
515 495
     };
516 496
 }
517 497
 
518
-/**
519
- * Action used to set data from precall test.
520
- *
521
- * @param {Object} value - The precall test results.
522
- * @returns {Object}
523
- */
524
-export function setPrecallTestResults(value: Object) {
525
-    return {
526
-        type: SET_PRECALL_TEST_RESULTS,
527
-        value
528
-    };
529
-}
530
-
531 498
 /**
532 499
  * Action used to set the initial errors after creating the tracks.
533 500
  *

+ 1
- 3
react/features/prejoin/components/web/PrejoinApp.tsx Целия файл

@@ -2,14 +2,13 @@ import React, { ComponentType } from 'react';
2 2
 import { batch } from 'react-redux';
3 3
 
4 4
 import BaseApp from '../../../base/app/components/BaseApp';
5
-import { getConferenceOptions } from '../../../base/conference/functions';
6 5
 import { setConfig } from '../../../base/config/actions';
7 6
 import { createPrejoinTracks } from '../../../base/tracks/functions.web';
8 7
 import GlobalStyles from '../../../base/ui/components/GlobalStyles.web';
9 8
 import JitsiThemeProvider from '../../../base/ui/components/JitsiThemeProvider.web';
10 9
 import DialogContainer from '../../../base/ui/components/web/DialogContainer';
11 10
 import { setupInitialDevices } from '../../../conference/actions.web';
12
-import { initPrejoin, makePrecallTest } from '../../actions.web';
11
+import { initPrejoin } from '../../actions.web';
13 12
 
14 13
 import PrejoinThirdParty from './PrejoinThirdParty';
15 14
 
@@ -67,7 +66,6 @@ export default class PrejoinApp extends BaseApp<Props> {
67 66
 
68 67
         batch(() => {
69 68
             dispatch?.(initPrejoin(tracks, errors));
70
-            store && dispatch?.(makePrecallTest(getConferenceOptions(store.getState())));
71 69
         });
72 70
     }
73 71
 

+ 0
- 12
react/features/prejoin/reducer.ts Целия файл

@@ -8,7 +8,6 @@ import {
8 8
     SET_DIALOUT_NUMBER,
9 9
     SET_DIALOUT_STATUS,
10 10
     SET_JOIN_BY_PHONE_DIALOG_VISIBLITY,
11
-    SET_PRECALL_TEST_RESULTS,
12 11
     SET_PREJOIN_DEVICE_ERRORS,
13 12
     SET_PREJOIN_PAGE_VISIBILITY,
14 13
     SET_SKIP_PREJOIN_RELOAD
@@ -45,11 +44,6 @@ export interface IPrejoinState {
45 44
     dialOutStatus: string;
46 45
     joiningInProgress?: boolean;
47 46
     name: string;
48
-    precallTestResults?: {
49
-        fractionalLoss: number;
50
-        mediaConnectivity: boolean;
51
-        throughput: number;
52
-    };
53 47
     rawError: string;
54 48
     showJoinByPhoneDialog: boolean;
55 49
     showPrejoin: boolean;
@@ -81,12 +75,6 @@ ReducerRegistry.register<IPrejoinState>(
81 75
             };
82 76
         }
83 77
 
84
-        case SET_PRECALL_TEST_RESULTS:
85
-            return {
86
-                ...state,
87
-                precallTestResults: action.value
88
-            };
89
-
90 78
         case SET_PREJOIN_PAGE_VISIBILITY:
91 79
             return {
92 80
                 ...state,

Loading…
Отказ
Запис