Просмотр исходного кода

Remove callstats (#14076)

* ref: Remove precall test.
* ref: Remove callstats.
* Remove the dependency on react-native-callstats.
factor2
bgrozev 1 год назад
Родитель
Сommit
6ab25f7bc0
Аккаунт пользователя с таким Email не найден

+ 1
- 14
conference.js Просмотреть файл

154
 import { isModerationNotificationDisplayed } from './react/features/notifications/functions';
154
 import { isModerationNotificationDisplayed } from './react/features/notifications/functions';
155
 import { mediaPermissionPromptVisibilityChanged } from './react/features/overlay/actions';
155
 import { mediaPermissionPromptVisibilityChanged } from './react/features/overlay/actions';
156
 import { suspendDetected } from './react/features/power-monitor/actions';
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
 import { isPrejoinPageVisible } from './react/features/prejoin/functions';
158
 import { isPrejoinPageVisible } from './react/features/prejoin/functions';
159
 import { disableReceiver, stopReceiver } from './react/features/remote-control/actions';
159
 import { disableReceiver, stopReceiver } from './react/features/remote-control/actions';
160
 import { setScreenAudioShareState } from './react/features/screen-share/actions.web';
160
 import { setScreenAudioShareState } from './react/features/screen-share/actions.web';
718
         };
718
         };
719
 
719
 
720
         if (isPrejoinPageVisible(state)) {
720
         if (isPrejoinPageVisible(state)) {
721
-            APP.store.dispatch(makePrecallTest(this._getConferenceOptions()));
722
-
723
             const { tryCreateLocalTracks, errors } = this.createInitialLocalTracks(initialOptions);
721
             const { tryCreateLocalTracks, errors } = this.createInitialLocalTracks(initialOptions);
724
             const localTracks = await tryCreateLocalTracks;
722
             const localTracks = await tryCreateLocalTracks;
725
 
723
 
1039
             .filter(p => !p.isHidden() || !(config.iAmRecorder && p.isHiddenFromRecorder())).length + 1;
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
      * Get speaker stats that track total dominant speaker time.
1041
      * Get speaker stats that track total dominant speaker time.
1055
      *
1042
      *

+ 5
- 41
config.js Просмотреть файл

97
         // Disables the auto-play behavior of *all* newly created video element.
97
         // Disables the auto-play behavior of *all* newly created video element.
98
         // This is useful when the client runs on a host with limited resources.
98
         // This is useful when the client runs on a host with limited resources.
99
         // noAutoPlayVideo: false,
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
     // Disables moderator indicators.
102
     // Disables moderator indicators.
943
     // The interval at which PeerConnection.getStats() is called. Defaults to 10000
938
     // The interval at which PeerConnection.getStats() is called. Defaults to 10000
944
     // pcStatsInterval: 10000,
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
     // enableDisplayNameInStats: false,
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
     // enableEmailInStats: false,
945
     // enableEmailInStats: false,
979
 
946
 
980
     // faceLandmarks: {
947
     // faceLandmarks: {
997
     //     captureInterval: 1000,
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
     // The default value is 100%. If set to 0, no automatic feedback will be requested
968
     // The default value is 100%. If set to 0, no automatic feedback will be requested
1002
     // feedbackPercentage: 100,
969
     // feedbackPercentage: 100,
1003
 
970
 
1005
     //
972
     //
1006
 
973
 
1007
     // If third party requests are disabled, no other server will be contacted.
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
     // will not function.
976
     // will not function.
1010
     // disableThirdPartyRequests: false,
977
     // disableThirdPartyRequests: false,
1011
 
978
 
1556
      _peerConnStatusOutOfLastNTimeout
1523
      _peerConnStatusOutOfLastNTimeout
1557
      _peerConnStatusRtcMuteTimeout
1524
      _peerConnStatusRtcMuteTimeout
1558
      avgRtpStatsN
1525
      avgRtpStatsN
1559
-     callStatsConfIDNamespace
1560
-     callStatsCustomScriptUrl
1561
      desktopSharingSources
1526
      desktopSharingSources
1562
      disableAEC
1527
      disableAEC
1563
      disableAGC
1528
      disableAGC
1731
     // logging: {
1696
     // logging: {
1732
     //      // Default log level for the app and lib-jitsi-meet.
1697
     //      // Default log level for the app and lib-jitsi-meet.
1733
     //      defaultLogLevel: 'trace',
1698
     //      defaultLogLevel: 'trace',
1734
-    //      // Option to disable LogCollector (which stores the logs on CallStats).
1699
+    //      // Option to disable LogCollector.
1735
     //      //disableLogCollector: true,
1700
     //      //disableLogCollector: true,
1736
     //      // Individual loggers are customizable.
1701
     //      // Individual loggers are customizable.
1737
     //      loggers: {
1702
     //      loggers: {
1738
     //      // The following are too verbose in their logging with the default level.
1703
     //      // The following are too verbose in their logging with the default level.
1739
     //      'modules/RTC/TraceablePeerConnection.js': 'info',
1704
     //      'modules/RTC/TraceablePeerConnection.js': 'info',
1740
-    //      'modules/statistics/CallStats.js': 'info',
1741
     //      'modules/xmpp/strophe.util.js': 'log',
1705
     //      'modules/xmpp/strophe.util.js': 'log',
1742
     // },
1706
     // },
1743
 
1707
 

+ 0
- 42
package-lock.json Просмотреть файл

77
         "react-native": "0.69.12",
77
         "react-native": "0.69.12",
78
         "react-native-background-timer": "2.4.1",
78
         "react-native-background-timer": "2.4.1",
79
         "react-native-calendar-events": "2.2.0",
79
         "react-native-calendar-events": "2.2.0",
80
-        "react-native-callstats": "3.73.22",
81
         "react-native-default-preference": "1.4.4",
80
         "react-native-default-preference": "1.4.4",
82
         "react-native-device-info": "10.9.0",
81
         "react-native-device-info": "10.9.0",
83
         "react-native-dialog": "https://github.com/jitsi/react-native-dialog/releases/download/v9.2.2-jitsi.1/react-native-dialog-9.2.2.tgz",
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
         "node": ">=0.10.0"
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
     "node_modules/base/node_modules/define-property": {
7287
     "node_modules/base/node_modules/define-property": {
7294
       "version": "1.0.0",
7288
       "version": "1.0.0",
7295
       "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
7289
       "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
12488
         "jss": "10.10.0"
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
     "node_modules/jsx-ast-utils": {
12485
     "node_modules/jsx-ast-utils": {
12500
       "version": "3.2.1",
12486
       "version": "3.2.1",
12501
       "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz",
12487
       "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz",
15610
         "react-native": ">=0.60.0"
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
     "node_modules/react-native-codegen": {
15599
     "node_modules/react-native-codegen": {
15623
       "version": "0.69.2",
15600
       "version": "0.69.2",
15624
       "resolved": "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.69.2.tgz",
15601
       "resolved": "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.69.2.tgz",
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
     "base64-js": {
25361
     "base64-js": {
25390
       "version": "1.5.1",
25362
       "version": "1.5.1",
25391
       "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
25363
       "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
29282
         "jss": "10.10.0"
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
     "jsx-ast-utils": {
29257
     "jsx-ast-utils": {
29291
       "version": "3.2.1",
29258
       "version": "3.2.1",
29292
       "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz",
29259
       "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz",
31658
       "resolved": "https://registry.npmjs.org/react-native-calendar-events/-/react-native-calendar-events-2.2.0.tgz",
31625
       "resolved": "https://registry.npmjs.org/react-native-calendar-events/-/react-native-calendar-events-2.2.0.tgz",
31659
       "integrity": "sha512-tNUbhT6Ief0JM4OQzQAaz1ri0+MCcAoHptBcEXCz2g7q3A05pg62PR2Dio4F9t2fCAD7Y2+QggdY1ycAsF3Tsg=="
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
     "react-native-codegen": {
31628
     "react-native-codegen": {
31671
       "version": "0.69.2",
31629
       "version": "0.69.2",
31672
       "resolved": "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.69.2.tgz",
31630
       "resolved": "https://registry.npmjs.org/react-native-codegen/-/react-native-codegen-0.69.2.tgz",

+ 0
- 1
package.json Просмотреть файл

83
     "react-native": "0.69.12",
83
     "react-native": "0.69.12",
84
     "react-native-background-timer": "2.4.1",
84
     "react-native-background-timer": "2.4.1",
85
     "react-native-calendar-events": "2.2.0",
85
     "react-native-calendar-events": "2.2.0",
86
-    "react-native-callstats": "3.73.22",
87
     "react-native-default-preference": "1.4.4",
86
     "react-native-default-preference": "1.4.4",
88
     "react-native-device-info": "10.9.0",
87
     "react-native-device-info": "10.9.0",
89
     "react-native-dialog": "https://github.com/jitsi/react-native-dialog/releases/download/v9.2.2-jitsi.1/react-native-dialog-9.2.2.tgz",
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
         "react-emoji-render": "1.2.4",
38
         "react-emoji-render": "1.2.4",
39
         "react-i18next": "10.11.4",
39
         "react-i18next": "10.11.4",
40
         "react-linkify": "1.0.0-alpha",
40
         "react-linkify": "1.0.0-alpha",
41
-        "react-native-callstats": "3.73.22",
42
         "react-native-dialog": "https://github.com/jitsi/react-native-dialog/releases/download/v9.2.2-jitsi.1/react-native-dialog-9.2.2.tgz",
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
         "react-native-svg-transformer": "1.1.0",
42
         "react-native-svg-transformer": "1.1.0",
44
         "react-native-tab-view": "3.5.2",
43
         "react-native-tab-view": "3.5.2",

+ 0
- 2
react/features/base/conference/functions.ts Просмотреть файл

246
         delete config.analytics?.scriptURLs;
246
         delete config.analytics?.scriptURLs;
247
         delete config.analytics?.amplitudeAPPKey;
247
         delete config.analytics?.amplitudeAPPKey;
248
         delete config.analytics?.googleAnalyticsTrackingId;
248
         delete config.analytics?.googleAnalyticsTrackingId;
249
-        delete options.callStatsID;
250
-        delete options.callStatsSecret;
251
     }
249
     }
252
 
250
 
253
     return options;
251
     return options;

+ 0
- 1
react/features/base/conference/reducer.ts Просмотреть файл

73
     getSsrcByTrack: Function;
73
     getSsrcByTrack: Function;
74
     grantOwner: Function;
74
     grantOwner: Function;
75
     isAVModerationSupported: Function;
75
     isAVModerationSupported: Function;
76
-    isCallstatsEnabled: Function;
77
     isE2EEEnabled: Function;
76
     isE2EEEnabled: Function;
78
     isE2EESupported: Function;
77
     isE2EESupported: Function;
79
     isEndConferenceSupported: Function;
78
     isEndConferenceSupported: Function;

+ 0
- 22
react/features/base/config/configType.ts Просмотреть файл

231
     callDisplayName?: string;
231
     callDisplayName?: string;
232
     callFlowsEnabled?: boolean;
232
     callFlowsEnabled?: boolean;
233
     callHandle?: string;
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
     callUUID?: string;
234
     callUUID?: string;
256
     cameraFacingMode?: string;
235
     cameraFacingMode?: string;
257
     channelLastN?: number;
236
     channelLastN?: number;
581
     subject?: string;
560
     subject?: string;
582
     testing?: {
561
     testing?: {
583
         assumeBandwidth?: boolean;
562
         assumeBandwidth?: boolean;
584
-        callStatsThreshold?: number;
585
         disableE2EE?: boolean;
563
         disableE2EE?: boolean;
586
         mobileXmppWsThreshold?: number;
564
         mobileXmppWsThreshold?: number;
587
         noAutoPlayVideo?: boolean;
565
         noAutoPlayVideo?: boolean;

+ 0
- 4
react/features/base/config/configWhitelist.ts Просмотреть файл

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

+ 0
- 2
react/features/base/config/functions.native.ts Просмотреть файл

28
         delete config.analytics?.rtcstatsUseLegacy;
28
         delete config.analytics?.rtcstatsUseLegacy;
29
         delete config.analytics?.obfuscateRoomName;
29
         delete config.analytics?.obfuscateRoomName;
30
         delete config.analytics?.watchRTCEnabled;
30
         delete config.analytics?.watchRTCEnabled;
31
-        delete config.callStatsID;
32
-        delete config.callStatsSecret;
33
         delete config.watchRTCConfigParams;
31
         delete config.watchRTCConfigParams;
34
         config.giphy = { enabled: false };
32
         config.giphy = { enabled: false };
35
     }
33
     }

+ 0
- 1
react/features/base/jwt/constants.ts Просмотреть файл

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

+ 2
- 51
react/features/base/logging/JitsiMeetLogStorage.ts Просмотреть файл

1
 import { IStore } from '../../app/types';
1
 import { IStore } from '../../app/types';
2
 import RTCStats from '../../rtcstats/RTCStats';
2
 import RTCStats from '../../rtcstats/RTCStats';
3
 import { isRTCStatsEnabled } from '../../rtcstats/functions';
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
 export default class JitsiMeetLogStorage {
8
 export default class JitsiMeetLogStorage {
11
     counter: number;
9
     counter: number;
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
      * A conference is considered joined when the 'conference' field is defined
35
      * A conference is considered joined when the 'conference' field is defined
39
      * in the base/conference state.
36
      * in the base/conference state.
40
      *
37
      *
73
      */
70
      */
74
     storeLogs(logEntries: Array<string | any>) {
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
         if (this.canStoreLogsRtcstats()) {
73
         if (this.canStoreLogsRtcstats()) {
81
             RTCStats.sendLogs(logEntries);
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
 /**
1
 /**
2
  * The type of redux action which stores the log collector that will be
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
  *     type: SET_LOG_COLLECTOR,
6
  *     type: SET_LOG_COLLECTOR,

+ 1
- 2
react/features/base/logging/actions.ts Просмотреть файл

1
 import { SET_LOGGING_CONFIG, SET_LOG_COLLECTOR } from './actionTypes';
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
  * @param {Logger.LogCollector} logCollector - The log collector instance to be
6
  * @param {Logger.LogCollector} logCollector - The log collector instance to be
8
  * stored in the Redux state of base/logging feature.
7
  * stored in the Redux state of base/logging feature.

+ 1
- 1
react/features/base/logging/middleware.ts Просмотреть файл

106
         logCollector.flush();
106
         logCollector.flush();
107
 
107
 
108
         // This event listener will flush the logs, before the statistics module
108
         // This event listener will flush the logs, before the statistics module
109
-        // (CallStats) is stopped.
109
+        // is stopped.
110
         //
110
         //
111
         // NOTE The LogCollector is not stopped, because this event can be
111
         // NOTE The LogCollector is not stopped, because this event can be
112
         // triggered multiple times during single conference (whenever
112
         // triggered multiple times during single conference (whenever

+ 1
- 2
react/features/base/logging/reducer.ts Просмотреть файл

10
     // default log level for the app and lib-jitsi-meet
10
     // default log level for the app and lib-jitsi-meet
11
     defaultLogLevel: 'trace' as LogLevel,
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
     // disableLogCollector: true,
14
     // disableLogCollector: true,
15
 
15
 
16
     loggers: {
16
     loggers: {
17
         // The following are too verbose in their logging with the
17
         // The following are too verbose in their logging with the
18
         // {@link #defaultLogLevel}:
18
         // {@link #defaultLogLevel}:
19
         'modules/RTC/TraceablePeerConnection.js': 'info' as LogLevel,
19
         'modules/RTC/TraceablePeerConnection.js': 'info' as LogLevel,
20
-        'modules/statistics/CallStats.js': 'info' as LogLevel,
21
         'modules/xmpp/strophe.util.js': 'log' as LogLevel
20
         'modules/xmpp/strophe.util.js': 'log' as LogLevel
22
     }
21
     }
23
 };
22
 };

+ 2
- 3
react/features/base/premeeting/components/web/ConnectionStatus.tsx Просмотреть файл

3
 import { connect } from 'react-redux';
3
 import { connect } from 'react-redux';
4
 import { makeStyles } from 'tss-react/mui';
4
 import { makeStyles } from 'tss-react/mui';
5
 
5
 
6
-import { IReduxState } from '../../../../app/types';
7
 import { translate } from '../../../i18n/functions';
6
 import { translate } from '../../../i18n/functions';
8
 import Icon from '../../../icons/components/Icon';
7
 import Icon from '../../../icons/components/Icon';
9
 import { IconArrowDown, IconWifi1Bar, IconWifi2Bars, IconWifi3Bars } from '../../../icons/svg';
8
 import { IconArrowDown, IconWifi1Bar, IconWifi2Bars, IconWifi3Bars } from '../../../icons/svg';
217
  * @param {Object} state - The redux state.
216
  * @param {Object} state - The redux state.
218
  * @returns {Object}
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
     return {
222
     return {
224
         connectionDetails,
223
         connectionDetails,

+ 1
- 127
react/features/base/premeeting/functions.ts Просмотреть файл

1
-import { findIndex } from 'lodash';
2
-
3
-import { IReduxState } from '../../app/types';
4
-
5
 import { CONNECTION_TYPE } from './constants';
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
  * The avatar size to container size ration.
5
  * The avatar size to container size ration.
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
  * Selector for determining the connection type & details.
74
  * Selector for determining the connection type & details.
187
  *
75
  *
188
- * @param {Object} state - The state of the app.
189
  * @returns {{
76
  * @returns {{
190
  *   connectionType: string,
77
  *   connectionType: string,
191
  *   connectionDetails: string[]
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
     return {
82
     return {
209
         connectionType: CONNECTION_TYPE.NONE,
83
         connectionType: CONNECTION_TYPE.NONE,
210
         connectionDetails: []
84
         connectionDetails: []

+ 1
- 6
react/features/feedback/actions.web.ts Просмотреть файл

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

+ 1
- 1
react/features/feedback/components/FeedbackButton.web.ts Просмотреть файл

50
 
50
 
51
     return {
51
     return {
52
         _conference: conference,
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
     global.performance.now = performanceNow;
288
     global.performance.now = performanceNow;
289
     global.PerformanceObserver = perf.PerformanceObserver;
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
     // Timers
291
     // Timers
299
     //
292
     //
300
     // React Native's timers won't run while the app is in the background, this
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
      * @returns {void}
152
      * @returns {void}
153
      */
153
      */
154
     componentDidMount() {
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
         // FIXME: We should dispatch action for this.
155
         // FIXME: We should dispatch action for this.
159
         if (typeof APP !== 'undefined' && APP.conference?._room) {
156
         if (typeof APP !== 'undefined' && APP.conference?._room) {
160
             APP.conference._room.sendApplicationLog(JSON.stringify({
157
             APP.conference._room.sendApplicationLog(JSON.stringify({

+ 0
- 5
react/features/prejoin/actionTypes.ts Просмотреть файл

39
  */
39
  */
40
 export const SET_JOIN_BY_PHONE_DIALOG_VISIBLITY = 'SET_JOIN_BY_PHONE_DIALOG_VISIBLITY';
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
  * Action type to disable the audio while on prejoin page.
43
  * Action type to disable the audio while on prejoin page.
49
  */
44
  */

+ 0
- 33
react/features/prejoin/actions.web.ts Просмотреть файл

30
     SET_DIALOUT_NUMBER,
30
     SET_DIALOUT_NUMBER,
31
     SET_DIALOUT_STATUS,
31
     SET_DIALOUT_STATUS,
32
     SET_JOIN_BY_PHONE_DIALOG_VISIBLITY,
32
     SET_JOIN_BY_PHONE_DIALOG_VISIBLITY,
33
-    SET_PRECALL_TEST_RESULTS,
34
     SET_PREJOIN_DEVICE_ERRORS,
33
     SET_PREJOIN_DEVICE_ERRORS,
35
     SET_PREJOIN_PAGE_VISIBILITY,
34
     SET_PREJOIN_PAGE_VISIBILITY,
36
     SET_SKIP_PREJOIN_RELOAD
35
     SET_SKIP_PREJOIN_RELOAD
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
  * Opens an external page with all the dial in numbers.
316
  * Opens an external page with all the dial in numbers.
337
  *
317
  *
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
  * Action used to set the initial errors after creating the tracks.
499
  * Action used to set the initial errors after creating the tracks.
533
  *
500
  *

+ 1
- 3
react/features/prejoin/components/web/PrejoinApp.tsx Просмотреть файл

2
 import { batch } from 'react-redux';
2
 import { batch } from 'react-redux';
3
 
3
 
4
 import BaseApp from '../../../base/app/components/BaseApp';
4
 import BaseApp from '../../../base/app/components/BaseApp';
5
-import { getConferenceOptions } from '../../../base/conference/functions';
6
 import { setConfig } from '../../../base/config/actions';
5
 import { setConfig } from '../../../base/config/actions';
7
 import { createPrejoinTracks } from '../../../base/tracks/functions.web';
6
 import { createPrejoinTracks } from '../../../base/tracks/functions.web';
8
 import GlobalStyles from '../../../base/ui/components/GlobalStyles.web';
7
 import GlobalStyles from '../../../base/ui/components/GlobalStyles.web';
9
 import JitsiThemeProvider from '../../../base/ui/components/JitsiThemeProvider.web';
8
 import JitsiThemeProvider from '../../../base/ui/components/JitsiThemeProvider.web';
10
 import DialogContainer from '../../../base/ui/components/web/DialogContainer';
9
 import DialogContainer from '../../../base/ui/components/web/DialogContainer';
11
 import { setupInitialDevices } from '../../../conference/actions.web';
10
 import { setupInitialDevices } from '../../../conference/actions.web';
12
-import { initPrejoin, makePrecallTest } from '../../actions.web';
11
+import { initPrejoin } from '../../actions.web';
13
 
12
 
14
 import PrejoinThirdParty from './PrejoinThirdParty';
13
 import PrejoinThirdParty from './PrejoinThirdParty';
15
 
14
 
67
 
66
 
68
         batch(() => {
67
         batch(() => {
69
             dispatch?.(initPrejoin(tracks, errors));
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
     SET_DIALOUT_NUMBER,
8
     SET_DIALOUT_NUMBER,
9
     SET_DIALOUT_STATUS,
9
     SET_DIALOUT_STATUS,
10
     SET_JOIN_BY_PHONE_DIALOG_VISIBLITY,
10
     SET_JOIN_BY_PHONE_DIALOG_VISIBLITY,
11
-    SET_PRECALL_TEST_RESULTS,
12
     SET_PREJOIN_DEVICE_ERRORS,
11
     SET_PREJOIN_DEVICE_ERRORS,
13
     SET_PREJOIN_PAGE_VISIBILITY,
12
     SET_PREJOIN_PAGE_VISIBILITY,
14
     SET_SKIP_PREJOIN_RELOAD
13
     SET_SKIP_PREJOIN_RELOAD
45
     dialOutStatus: string;
44
     dialOutStatus: string;
46
     joiningInProgress?: boolean;
45
     joiningInProgress?: boolean;
47
     name: string;
46
     name: string;
48
-    precallTestResults?: {
49
-        fractionalLoss: number;
50
-        mediaConnectivity: boolean;
51
-        throughput: number;
52
-    };
53
     rawError: string;
47
     rawError: string;
54
     showJoinByPhoneDialog: boolean;
48
     showJoinByPhoneDialog: boolean;
55
     showPrejoin: boolean;
49
     showPrejoin: boolean;
81
             };
75
             };
82
         }
76
         }
83
 
77
 
84
-        case SET_PRECALL_TEST_RESULTS:
85
-            return {
86
-                ...state,
87
-                precallTestResults: action.value
88
-            };
89
-
90
         case SET_PREJOIN_PAGE_VISIBILITY:
78
         case SET_PREJOIN_PAGE_VISIBILITY:
91
             return {
79
             return {
92
                 ...state,
80
                 ...state,

Загрузка…
Отмена
Сохранить