@webex/plugin-meetings 2.37.0 → 2.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/common/browser-detection.js +1 -20
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +5 -20
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +0 -7
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +5 -26
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +5 -26
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +6 -27
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +5 -26
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +5 -26
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +4 -25
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +5 -26
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +5 -26
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +7 -46
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +1 -24
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +35 -61
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +4 -14
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +1 -5
- package/dist/config.js.map +1 -1
- package/dist/constants.js +46 -42
- package/dist/constants.js.map +1 -1
- package/dist/index.js +1 -17
- package/dist/index.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +10 -28
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -26
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +0 -15
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +4 -12
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +101 -193
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +0 -37
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +12 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +87 -123
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +16 -81
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +74 -137
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +64 -110
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +3 -17
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +10 -12
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/effectsState.js +120 -192
- package/dist/meeting/effectsState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +0 -13
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +812 -1487
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +31 -78
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +157 -227
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +25 -169
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +3 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +10 -33
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +179 -268
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -16
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +98 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +137 -228
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +3 -21
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +451 -570
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +7 -30
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +94 -148
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +49 -89
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +17 -68
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +2 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +68 -184
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +21 -56
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +9 -38
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +0 -2
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js +1 -2
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +48 -136
- package/dist/metrics/index.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +28 -57
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/peer-connection-manager/index.js +60 -190
- package/dist/peer-connection-manager/index.js.map +1 -1
- package/dist/peer-connection-manager/util.js +10 -24
- package/dist/peer-connection-manager/util.js.map +1 -1
- package/dist/personal-meeting-room/index.js +10 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -33
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +100 -166
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +2 -18
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/reactions.js +0 -2
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js +0 -5
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +294 -468
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/collection.js +1 -12
- package/dist/roap/collection.js.map +1 -1
- package/dist/roap/handler.js +15 -85
- package/dist/roap/handler.js.map +1 -1
- package/dist/roap/index.js +42 -94
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +81 -148
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/state.js +2 -39
- package/dist/roap/state.js.map +1 -1
- package/dist/roap/turnDiscovery.js +8 -52
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/util.js +0 -26
- package/dist/roap/util.js.map +1 -1
- package/dist/statsAnalyzer/global.js +0 -2
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +68 -168
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +54 -53
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +13 -45
- package/dist/transcription/index.js.map +1 -1
- package/internal-README.md +7 -6
- package/package.json +17 -17
- package/src/common/browser-detection.ts +9 -6
- package/src/common/collection.ts +3 -1
- package/src/common/errors/captcha-error.ts +6 -6
- package/src/common/errors/intent-to-join.ts +6 -6
- package/src/common/errors/join-meeting.ts +12 -8
- package/src/common/errors/media.ts +6 -6
- package/src/common/errors/parameter.ts +9 -6
- package/src/common/errors/password-error.ts +6 -6
- package/src/common/errors/permission.ts +5 -5
- package/src/common/errors/reconnection.ts +6 -6
- package/src/common/errors/stats.ts +6 -6
- package/src/common/errors/webex-errors.ts +7 -5
- package/src/common/errors/webex-meetings-error.ts +1 -1
- package/src/common/events/events-scope.ts +5 -1
- package/src/common/events/events.ts +5 -1
- package/src/common/events/trigger-proxy.ts +8 -3
- package/src/common/events/util.ts +1 -2
- package/src/common/logs/logger-proxy.ts +21 -10
- package/src/common/logs/request.ts +11 -8
- package/src/config.ts +11 -11
- package/src/constants.ts +138 -119
- package/src/index.js +1 -1
- package/src/locus-info/controlsUtils.ts +34 -24
- package/src/locus-info/fullState.ts +15 -11
- package/src/locus-info/hostUtils.ts +4 -3
- package/src/locus-info/index.ts +25 -34
- package/src/locus-info/infoUtils.ts +12 -4
- package/src/locus-info/mediaSharesUtils.ts +4 -4
- package/src/locus-info/parser.ts +45 -68
- package/src/locus-info/selfUtils.ts +106 -57
- package/src/media/index.ts +118 -109
- package/src/media/properties.ts +26 -20
- package/src/media/util.ts +2 -2
- package/src/mediaQualityMetrics/config.ts +46 -46
- package/src/meeting/effectsState.ts +35 -35
- package/src/meeting/in-meeting-actions.ts +7 -3
- package/src/meeting/index.ts +1435 -1210
- package/src/meeting/muteState.ts +62 -31
- package/src/meeting/request.ts +160 -113
- package/src/meeting/state.ts +45 -30
- package/src/meeting/util.ts +131 -90
- package/src/meeting-info/collection.ts +2 -1
- package/src/meeting-info/index.ts +32 -30
- package/src/meeting-info/meeting-info-v2.ts +106 -108
- package/src/meeting-info/request.ts +9 -3
- package/src/meeting-info/util.ts +54 -46
- package/src/meeting-info/utilv2.ts +59 -53
- package/src/meetings/collection.ts +1 -1
- package/src/meetings/index.ts +513 -441
- package/src/meetings/request.ts +26 -24
- package/src/meetings/util.ts +26 -23
- package/src/member/index.ts +55 -49
- package/src/member/util.ts +26 -13
- package/src/members/collection.ts +0 -1
- package/src/members/index.ts +172 -121
- package/src/members/request.ts +46 -14
- package/src/members/util.ts +44 -42
- package/src/metrics/config.ts +254 -81
- package/src/metrics/constants.ts +0 -2
- package/src/metrics/index.ts +84 -71
- package/src/networkQualityMonitor/index.ts +20 -23
- package/src/peer-connection-manager/index.ts +321 -241
- package/src/peer-connection-manager/util.ts +4 -2
- package/src/personal-meeting-room/index.ts +12 -16
- package/src/personal-meeting-room/request.ts +10 -3
- package/src/personal-meeting-room/util.ts +3 -3
- package/src/reachability/index.ts +61 -59
- package/src/reachability/request.ts +36 -32
- package/src/reactions/reactions.ts +4 -4
- package/src/reactions/reactions.type.ts +2 -3
- package/src/reconnection-manager/index.ts +159 -98
- package/src/roap/collection.ts +2 -4
- package/src/roap/handler.ts +63 -32
- package/src/roap/index.ts +78 -58
- package/src/roap/request.ts +69 -54
- package/src/roap/state.ts +17 -11
- package/src/roap/turnDiscovery.ts +60 -31
- package/src/roap/util.ts +39 -31
- package/src/statsAnalyzer/global.ts +30 -33
- package/src/statsAnalyzer/index.ts +397 -169
- package/src/statsAnalyzer/mqaUtil.ts +178 -72
- package/src/transcription/index.ts +34 -32
- package/test/integration/spec/journey.js +666 -462
- package/test/integration/spec/space-meeting.js +318 -203
- package/test/integration/spec/transcription.js +6 -7
- package/test/unit/spec/common/browser-detection.js +9 -28
- package/test/unit/spec/fixture/locus.js +92 -90
- package/test/unit/spec/locus-info/controlsUtils.js +5 -5
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +1 -2
- package/test/unit/spec/locus-info/infoUtils.js +24 -31
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
- package/test/unit/spec/locus-info/parser.js +3 -9
- package/test/unit/spec/locus-info/selfConstant.js +72 -103
- package/test/unit/spec/locus-info/selfUtils.js +21 -12
- package/test/unit/spec/meeting/effectsState.js +33 -45
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -3
- package/test/unit/spec/meeting/index.js +1141 -649
- package/test/unit/spec/meeting/muteState.js +42 -33
- package/test/unit/spec/meeting/request.js +56 -45
- package/test/unit/spec/meeting/utils.js +66 -49
- package/test/unit/spec/meeting-info/meetinginfov2.js +100 -73
- package/test/unit/spec/meeting-info/request.js +7 -9
- package/test/unit/spec/meeting-info/util.js +11 -12
- package/test/unit/spec/meeting-info/utilv2.js +110 -74
- package/test/unit/spec/meetings/collection.js +1 -1
- package/test/unit/spec/meetings/index.js +438 -257
- package/test/unit/spec/meetings/utils.js +14 -12
- package/test/unit/spec/member/index.js +0 -1
- package/test/unit/spec/member/util.js +5 -6
- package/test/unit/spec/members/index.js +84 -35
- package/test/unit/spec/members/request.js +29 -20
- package/test/unit/spec/members/utils.js +8 -5
- package/test/unit/spec/metrics/index.js +16 -21
- package/test/unit/spec/networkQualityMonitor/index.js +21 -15
- package/test/unit/spec/peerconnection-manager/index.js +88 -58
- package/test/unit/spec/peerconnection-manager/utils.js +5 -4
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +7 -8
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/index.ts +9 -11
- package/test/unit/spec/reconnection-manager/index.js +14 -17
- package/test/unit/spec/roap/index.ts +18 -8
- package/test/unit/spec/roap/turnDiscovery.ts +22 -19
- package/test/unit/spec/roap/util.js +3 -3
- package/test/unit/spec/stats-analyzer/index.js +29 -24
- package/test/utils/cmr.js +44 -42
- package/test/utils/testUtils.js +83 -74
- package/test/utils/webex-config.js +18 -18
- package/test/utils/webex-test-users.js +53 -50
package/dist/metrics/index.js
CHANGED
|
@@ -1,44 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
|
|
11
8
|
exports.default = void 0;
|
|
12
|
-
|
|
13
9
|
var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
|
|
14
|
-
|
|
15
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
16
|
-
|
|
17
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
18
|
-
|
|
19
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
20
|
-
|
|
21
13
|
var _includes2 = _interopRequireDefault(require("lodash/includes"));
|
|
22
|
-
|
|
23
14
|
var _util = _interopRequireDefault(require("util"));
|
|
24
|
-
|
|
25
15
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
26
|
-
|
|
27
16
|
var _window = _interopRequireDefault(require("global/window"));
|
|
28
|
-
|
|
29
17
|
var _ipAnonymize = _interopRequireDefault(require("ip-anonymize"));
|
|
30
|
-
|
|
31
18
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
32
|
-
|
|
33
19
|
var _constants = require("../constants");
|
|
34
|
-
|
|
35
20
|
var _browserDetection = _interopRequireDefault(require("../common/browser-detection"));
|
|
36
|
-
|
|
37
21
|
var _config = require("./config");
|
|
38
|
-
|
|
39
22
|
/*!
|
|
40
23
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
41
24
|
*/
|
|
25
|
+
|
|
42
26
|
var OSMap = {
|
|
43
27
|
// @ts-ignore
|
|
44
28
|
'Chrome OS': _config.OS_NAME.chrome,
|
|
@@ -48,34 +32,29 @@ var OSMap = {
|
|
|
48
32
|
Android: _config.OS_NAME.ANDROID,
|
|
49
33
|
Linux: _config.OS_NAME.LINUX
|
|
50
34
|
};
|
|
51
|
-
|
|
52
35
|
var _BrowserDetection = (0, _browserDetection.default)(),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// For reference : https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
|
|
58
|
-
|
|
36
|
+
getOSName = _BrowserDetection.getOSName,
|
|
37
|
+
getOSVersion = _BrowserDetection.getOSVersion,
|
|
38
|
+
getBrowserName = _BrowserDetection.getBrowserName,
|
|
39
|
+
getBrowserVersion = _BrowserDetection.getBrowserVersion;
|
|
59
40
|
|
|
41
|
+
// Apply a CIDR /28 format to the IPV4 and /96 to the IPV6 addresses
|
|
42
|
+
// For reference : https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
|
|
60
43
|
var anonymizeIPAddress = function anonymizeIPAddress(localIp) {
|
|
61
44
|
return (0, _ipAnonymize.default)(localIp, 28, 96);
|
|
62
45
|
};
|
|
63
|
-
|
|
64
46
|
var triggerTimers = function triggerTimers(_ref) {
|
|
65
47
|
var event = _ref.event,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
48
|
+
meeting = _ref.meeting,
|
|
49
|
+
data = _ref.data;
|
|
69
50
|
switch (event) {
|
|
70
51
|
case _config.eventType.CALL_INITIATED:
|
|
71
52
|
meeting.setStartCallInitiateJoinReq();
|
|
72
53
|
break;
|
|
73
|
-
|
|
74
54
|
case _config.eventType.LOCUS_JOIN_REQUEST:
|
|
75
55
|
meeting.setEndCallInitiateJoinReq();
|
|
76
56
|
meeting.setStartJoinReqResp();
|
|
77
57
|
break;
|
|
78
|
-
|
|
79
58
|
case _config.eventType.LOCUS_JOIN_RESPONSE:
|
|
80
59
|
meeting.setEndJoinReqResp();
|
|
81
60
|
meeting.setStartSetupDelay(_config.mediaType.AUDIO);
|
|
@@ -83,48 +62,41 @@ var triggerTimers = function triggerTimers(_ref) {
|
|
|
83
62
|
meeting.setStartSendingMediaDelay(_config.mediaType.AUDIO);
|
|
84
63
|
meeting.setStartSendingMediaDelay(_config.mediaType.VIDEO);
|
|
85
64
|
break;
|
|
86
|
-
|
|
87
65
|
case _config.eventType.RECEIVING_MEDIA_START:
|
|
88
66
|
meeting.setEndSetupDelay(data.mediaType);
|
|
89
67
|
break;
|
|
90
|
-
|
|
91
68
|
case _config.eventType.SENDING_MEDIA_START:
|
|
92
69
|
meeting.setEndSendingMediaDelay(data.mediaType);
|
|
93
70
|
break;
|
|
94
|
-
|
|
95
71
|
case _config.eventType.LOCAL_SDP_GENERATED:
|
|
96
72
|
meeting.setStartLocalSDPGenRemoteSDPRecvDelay();
|
|
97
73
|
break;
|
|
98
|
-
|
|
99
74
|
case _config.eventType.REMOTE_SDP_RECEIVED:
|
|
100
75
|
meeting.setEndLocalSDPGenRemoteSDPRecvDelay();
|
|
101
76
|
break;
|
|
102
|
-
|
|
103
77
|
default:
|
|
104
78
|
break;
|
|
105
79
|
}
|
|
106
80
|
};
|
|
81
|
+
|
|
107
82
|
/**
|
|
108
83
|
* @description Metrics handles all the call metrics events
|
|
109
84
|
* @export
|
|
110
85
|
* @class Metrics
|
|
111
86
|
*/
|
|
112
|
-
|
|
113
|
-
|
|
114
87
|
var Metrics = /*#__PURE__*/function () {
|
|
115
88
|
/**
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
89
|
+
* Create Metrics Object
|
|
90
|
+
* @constructor
|
|
91
|
+
* @public
|
|
92
|
+
* @memberof Meetings
|
|
93
|
+
*/
|
|
121
94
|
function Metrics() {
|
|
122
95
|
(0, _classCallCheck2.default)(this, Metrics);
|
|
123
96
|
(0, _defineProperty2.default)(this, "_events", void 0);
|
|
124
97
|
(0, _defineProperty2.default)(this, "keys", void 0);
|
|
125
98
|
(0, _defineProperty2.default)(this, "meetingCollection", void 0);
|
|
126
99
|
(0, _defineProperty2.default)(this, "webex", void 0);
|
|
127
|
-
|
|
128
100
|
if (!Metrics.instance) {
|
|
129
101
|
/**
|
|
130
102
|
* @instance
|
|
@@ -134,20 +106,18 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
134
106
|
*/
|
|
135
107
|
this._events = [];
|
|
136
108
|
/**
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
109
|
+
* @instance
|
|
110
|
+
* @type {MeetingCollection}
|
|
111
|
+
* @private
|
|
112
|
+
* @memberof Metrics
|
|
113
|
+
*/
|
|
143
114
|
this.meetingCollection = null;
|
|
144
115
|
/**
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
116
|
+
* @instance
|
|
117
|
+
* @type {MeetingCollection}
|
|
118
|
+
* @private
|
|
119
|
+
* @memberof Metrics
|
|
120
|
+
*/
|
|
151
121
|
this.keys = (0, _values.default)(_config.eventType);
|
|
152
122
|
/**
|
|
153
123
|
* @instance
|
|
@@ -155,12 +125,13 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
155
125
|
* @private
|
|
156
126
|
* @memberof Metrics
|
|
157
127
|
*/
|
|
158
|
-
|
|
159
128
|
Metrics.instance = this;
|
|
160
129
|
}
|
|
161
130
|
|
|
131
|
+
// eslint-disable-next-line no-constructor-return
|
|
162
132
|
return Metrics.instance;
|
|
163
133
|
}
|
|
134
|
+
|
|
164
135
|
/**
|
|
165
136
|
* Initializes the Metrics singleton with a meeting Collection.
|
|
166
137
|
*
|
|
@@ -169,14 +140,13 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
169
140
|
*
|
|
170
141
|
* @returns {void}
|
|
171
142
|
*/
|
|
172
|
-
|
|
173
|
-
|
|
174
143
|
(0, _createClass2.default)(Metrics, [{
|
|
175
144
|
key: "initialSetup",
|
|
176
145
|
value: function initialSetup(meetingCollection, webex) {
|
|
177
146
|
this.meetingCollection = meetingCollection;
|
|
178
147
|
this.webex = webex;
|
|
179
148
|
}
|
|
149
|
+
|
|
180
150
|
/**
|
|
181
151
|
* poste Meeting event metrics
|
|
182
152
|
* @param {object} options {meetingId/meeting} as a json object
|
|
@@ -186,32 +156,26 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
186
156
|
* @param {object} options.event
|
|
187
157
|
* @returns {object} null
|
|
188
158
|
*/
|
|
189
|
-
|
|
190
159
|
}, {
|
|
191
160
|
key: "postEvent",
|
|
192
161
|
value: function postEvent(options) {
|
|
193
162
|
var meetingId = options.meetingId,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
163
|
+
_options$data = options.data,
|
|
164
|
+
data = _options$data === void 0 ? {} : _options$data,
|
|
165
|
+
event = options.event;
|
|
197
166
|
var meeting = options.meeting;
|
|
198
|
-
|
|
199
167
|
if (this.keys.indexOf(event) === -1) {
|
|
200
168
|
_loggerProxy.default.logger.error("Metrics:index#postEvent --> Event ".concat(event, " doesn't exist in dictionary"));
|
|
201
169
|
}
|
|
202
|
-
|
|
203
170
|
if (!meeting && meetingId) {
|
|
204
171
|
meeting = this.meetingCollection.get(meetingId);
|
|
205
172
|
options.meeting = meeting;
|
|
206
173
|
}
|
|
207
|
-
|
|
208
174
|
if (meeting) {
|
|
209
175
|
triggerTimers(options);
|
|
210
|
-
|
|
211
176
|
if (!meeting.callEvents) {
|
|
212
177
|
meeting.callEvents = [];
|
|
213
178
|
}
|
|
214
|
-
|
|
215
179
|
if (event === _config.eventType.MEDIA_QUALITY) {
|
|
216
180
|
data.event = event;
|
|
217
181
|
meeting.sendMediaQualityAnalyzerMetrics(data);
|
|
@@ -224,17 +188,18 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
224
188
|
_loggerProxy.default.logger.info("Metrics:index#postEvent --> Event received for meetingId:".concat(meetingId, ", but meeting not found in collection."));
|
|
225
189
|
}
|
|
226
190
|
}
|
|
191
|
+
|
|
227
192
|
/**
|
|
228
193
|
* Docs for Call analyzer metrics
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
194
|
+
* https://sqbu-github.cisco.com/WebExSquared/call-analyzer/wiki
|
|
195
|
+
* https://sqbu-github.cisco.com/WebExSquared/event-dictionary/blob/master/diagnostic-events.raml
|
|
196
|
+
*/
|
|
232
197
|
|
|
198
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
233
199
|
}, {
|
|
234
200
|
key: "initPayload",
|
|
235
201
|
value: function initPayload(eventType, identifiers, options) {
|
|
236
202
|
var _this$webex$meetings$, _this$webex$meetings$2;
|
|
237
|
-
|
|
238
203
|
var payload = {
|
|
239
204
|
eventId: _uuid.default.v4(),
|
|
240
205
|
version: 1,
|
|
@@ -265,48 +230,41 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
265
230
|
webClientDomain: _window.default.location.hostname
|
|
266
231
|
}
|
|
267
232
|
}
|
|
268
|
-
};
|
|
233
|
+
};
|
|
269
234
|
|
|
235
|
+
// TODO: more options should be checked and some of them should be mandatory in certain conditions
|
|
270
236
|
if (options) {
|
|
271
237
|
if (Object.prototype.hasOwnProperty.call(options, 'canProceed')) {
|
|
272
238
|
payload.event.canProceed = options.canProceed;
|
|
273
239
|
}
|
|
274
|
-
|
|
275
240
|
if (options.errors) {
|
|
276
241
|
payload.event.errors = options.errors;
|
|
277
242
|
}
|
|
278
|
-
|
|
279
243
|
if (options.mediaType) {
|
|
280
244
|
payload.event.mediaType = options.mediaType;
|
|
281
245
|
}
|
|
282
|
-
|
|
283
246
|
if (options.trigger) {
|
|
284
247
|
payload.event.trigger = options.trigger;
|
|
285
248
|
}
|
|
286
|
-
|
|
287
249
|
if (options.pstnAudioType) {
|
|
288
250
|
payload.event.pstnAudioType = options.pstnAudioType;
|
|
289
251
|
}
|
|
290
|
-
|
|
291
252
|
if (options.mediaCapabilities) {
|
|
292
253
|
payload.event.mediaCapabilities = options.mediaCapabilities;
|
|
293
254
|
}
|
|
294
|
-
|
|
295
255
|
if (options.recoveredBy) {
|
|
296
256
|
payload.event.recoveredBy = options.recoveredBy;
|
|
297
257
|
}
|
|
298
|
-
|
|
299
258
|
if (options.joinTimes) {
|
|
300
259
|
payload.event.joinTimes = options.joinTimes;
|
|
301
260
|
}
|
|
302
|
-
|
|
303
261
|
if (options.isRoapCallEnabled) {
|
|
304
262
|
payload.event.isRoapCallEnabled = options.isRoapCallEnabled;
|
|
305
263
|
}
|
|
306
264
|
}
|
|
307
|
-
|
|
308
265
|
return payload;
|
|
309
266
|
}
|
|
267
|
+
|
|
310
268
|
/**
|
|
311
269
|
* returns metrics friendly OS versions
|
|
312
270
|
* @param {String} osName Os name
|
|
@@ -314,14 +272,13 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
314
272
|
* @private
|
|
315
273
|
* @memberof Metrics
|
|
316
274
|
*/
|
|
317
|
-
|
|
318
275
|
}, {
|
|
319
276
|
key: "getOsName",
|
|
320
277
|
value: function getOsName() {
|
|
321
278
|
var _OSMap$getOSName;
|
|
322
|
-
|
|
323
279
|
return (_OSMap$getOSName = OSMap[getOSName()]) !== null && _OSMap$getOSName !== void 0 ? _OSMap$getOSName : _config.OS_NAME.OTHERS;
|
|
324
280
|
}
|
|
281
|
+
|
|
325
282
|
/**
|
|
326
283
|
* get the payload specific for a media quality event through call analyzer
|
|
327
284
|
* @param {String} eventType the event name
|
|
@@ -336,16 +293,16 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
336
293
|
* @public
|
|
337
294
|
* @memberof Metrics
|
|
338
295
|
*/
|
|
339
|
-
|
|
340
296
|
}, {
|
|
341
297
|
key: "initMediaPayload",
|
|
342
|
-
value: function initMediaPayload(
|
|
298
|
+
value: function initMediaPayload(
|
|
299
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
300
|
+
eventType, identifiers) {
|
|
343
301
|
var _this$webex$meetings$3, _this$webex$meetings$4;
|
|
344
|
-
|
|
345
302
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
346
303
|
var audioSetupDelay = options.audioSetupDelay,
|
|
347
|
-
|
|
348
|
-
|
|
304
|
+
videoSetupDelay = options.videoSetupDelay,
|
|
305
|
+
joinTimes = options.joinTimes;
|
|
349
306
|
var payload = {
|
|
350
307
|
eventId: _uuid.default.v4(),
|
|
351
308
|
version: 1,
|
|
@@ -391,6 +348,7 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
391
348
|
};
|
|
392
349
|
return payload;
|
|
393
350
|
}
|
|
351
|
+
|
|
394
352
|
/**
|
|
395
353
|
* This function Parses a Locus error and returns a diagnostic event payload.
|
|
396
354
|
* It should keep updating from:
|
|
@@ -401,12 +359,10 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
401
359
|
* @returns {{showToUser: boolean, category: string, errorDescription: string,
|
|
402
360
|
* errorCode: number, errorData: *, fatal: boolean, name: string}}
|
|
403
361
|
*/
|
|
404
|
-
|
|
405
362
|
}, {
|
|
406
363
|
key: "parseLocusError",
|
|
407
364
|
value: function parseLocusError(err, showToUser) {
|
|
408
365
|
var errorCode;
|
|
409
|
-
|
|
410
366
|
if (err && err.statusCode && err.statusCode >= 500) {
|
|
411
367
|
errorCode = 1003;
|
|
412
368
|
} else if (err && err.body && err.body.errorCode) {
|
|
@@ -415,132 +371,102 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
415
371
|
case _constants.MEETING_ERRORS.FREE_USER_MAX_PARTICIPANTS_EXCEEDED:
|
|
416
372
|
errorCode = 3007;
|
|
417
373
|
break;
|
|
418
|
-
|
|
419
374
|
case _constants.MEETING_ERRORS.PAID_USER_MAX_PARTICIPANTS_EXCEEDED:
|
|
420
375
|
case _constants.MEETING_ERRORS.SERVICE_MAX_PARTICIPANTS_EXCEEDED:
|
|
421
376
|
errorCode = 3002;
|
|
422
377
|
break;
|
|
423
|
-
|
|
424
378
|
case _constants.MEETING_ERRORS.INACTIVE:
|
|
425
379
|
errorCode = 4001;
|
|
426
380
|
break;
|
|
427
|
-
|
|
428
381
|
case _constants.MEETING_ERRORS.EXCEEDED_MAX_JOINED_PARTICIPANTS:
|
|
429
382
|
case _constants.MEETING_ERRORS.EXCEEDED_SERVICE_MAX_PARTICIPANTS:
|
|
430
383
|
errorCode = 3001;
|
|
431
384
|
break;
|
|
432
|
-
|
|
433
385
|
case _constants.MEETING_ERRORS.MEETING_IS_LOCKED:
|
|
434
386
|
errorCode = 4002;
|
|
435
387
|
break;
|
|
436
|
-
|
|
437
388
|
case _constants.MEETING_ERRORS.MEETING_IS_TERMINATING:
|
|
438
389
|
errorCode = 4003;
|
|
439
390
|
break;
|
|
440
|
-
|
|
441
391
|
case _constants.MEETING_ERRORS.MEETING_REQUIRE_MODERATOR_PIN_INTENT:
|
|
442
392
|
errorCode = 4004;
|
|
443
393
|
break;
|
|
444
|
-
|
|
445
394
|
case _constants.MEETING_ERRORS.MEETING_REQUIRE_MODERATOR_PIN:
|
|
446
395
|
errorCode = 4005;
|
|
447
396
|
break;
|
|
448
|
-
|
|
449
397
|
case _constants.MEETING_ERRORS.MEETING_REQUIRE_MODERATOR_ROLE:
|
|
450
398
|
errorCode = 4006;
|
|
451
399
|
break;
|
|
452
|
-
|
|
453
400
|
case _constants.MEETING_ERRORS.JOIN_RESTRICTED_USER:
|
|
454
401
|
case _constants.MEETING_ERRORS.GET_RESTRICTED_USER:
|
|
455
402
|
case _constants.MEETING_ERRORS.CREATE_MEDIA_RESTRICTED_USER:
|
|
456
403
|
errorCode = 3005;
|
|
457
404
|
break;
|
|
458
|
-
|
|
459
405
|
case _constants.MEETING_ERRORS.JOIN_RESTRICTED_USER_NOT_IN_ROOM:
|
|
460
406
|
errorCode = 4007;
|
|
461
407
|
break;
|
|
462
|
-
|
|
463
408
|
case _constants.MEETING_ERRORS.MEETING_NOT_FOUND:
|
|
464
409
|
errorCode = 4011;
|
|
465
410
|
break;
|
|
466
|
-
|
|
467
411
|
case _constants.MEETING_ERRORS.NOT_WEBEX_SITE:
|
|
468
412
|
errorCode = 4012;
|
|
469
413
|
break;
|
|
470
|
-
|
|
471
414
|
case _constants.MEETING_ERRORS.INVALID_JOIN_TIME:
|
|
472
415
|
errorCode = 4013;
|
|
473
416
|
break;
|
|
474
|
-
|
|
475
417
|
case _constants.MEETING_ERRORS.PHONE_NUMBER_NOT_A_NUMBER:
|
|
476
418
|
errorCode = 4016;
|
|
477
419
|
break;
|
|
478
|
-
|
|
479
420
|
case _constants.MEETING_ERRORS.PHONE_NUMBER_TOO_LONG:
|
|
480
421
|
errorCode = 4017;
|
|
481
422
|
break;
|
|
482
|
-
|
|
483
423
|
case _constants.MEETING_ERRORS.INVALID_DIALABLE_KEY:
|
|
484
424
|
errorCode = 4018;
|
|
485
425
|
break;
|
|
486
|
-
|
|
487
426
|
case _constants.MEETING_ERRORS.ONE_ON_ONE_TO_SELF_NOT_ALLOWED:
|
|
488
427
|
errorCode = 4019;
|
|
489
428
|
break;
|
|
490
|
-
|
|
491
429
|
case _constants.MEETING_ERRORS.REMOVED_PARTICIPANT:
|
|
492
430
|
errorCode = 4020;
|
|
493
431
|
break;
|
|
494
|
-
|
|
495
432
|
case _constants.MEETING_ERRORS.MEETING_LINK_NOT_FOUND:
|
|
496
433
|
errorCode = 4021;
|
|
497
434
|
break;
|
|
498
|
-
|
|
499
435
|
case _constants.MEETING_ERRORS.PHONE_NUMBER_TOO_SHORT_AFTER_IDD:
|
|
500
436
|
errorCode = 4022;
|
|
501
437
|
break;
|
|
502
|
-
|
|
503
438
|
case _constants.MEETING_ERRORS.INVALID_INVITEE_ADDRESS:
|
|
504
439
|
errorCode = 4023;
|
|
505
440
|
break;
|
|
506
|
-
|
|
507
441
|
case _constants.MEETING_ERRORS.PMR_ACCOUNT_LOCKED:
|
|
508
442
|
errorCode = 4024;
|
|
509
443
|
break;
|
|
510
|
-
|
|
511
444
|
case _constants.MEETING_ERRORS.RESOURCE_GUEST_FORBIDDEN:
|
|
512
445
|
errorCode = 4025;
|
|
513
446
|
break;
|
|
514
|
-
|
|
515
447
|
case _constants.MEETING_ERRORS.PMR_ACCOUNT_SUSPENDED:
|
|
516
448
|
errorCode = 4026;
|
|
517
449
|
break;
|
|
518
|
-
|
|
519
450
|
case _constants.MEETING_ERRORS.EMPTY_PHONE_NUMBER_OR_COUNTRY_CODE:
|
|
520
451
|
errorCode = 4027;
|
|
521
452
|
break;
|
|
522
|
-
|
|
523
453
|
case _constants.MEETING_ERRORS.INVALID_SINCE_OR_SEQUENCE_HASH_IN_REQUEST:
|
|
524
454
|
errorCode = 1006;
|
|
525
455
|
break;
|
|
526
|
-
|
|
527
456
|
case _constants.MEETING_ERRORS.CONVERSATION_NOT_FOUND:
|
|
528
457
|
errorCode = 4028;
|
|
529
458
|
break;
|
|
530
|
-
|
|
531
459
|
case _constants.MEETING_ERRORS.RECORDING_CONTROL_NOT_SUPPORTED:
|
|
532
460
|
case _constants.MEETING_ERRORS.RECORDING_NOT_STARTED:
|
|
533
461
|
case _constants.MEETING_ERRORS.RECORDING_NOT_ENABLED:
|
|
534
462
|
errorCode = 4029;
|
|
535
463
|
break;
|
|
536
|
-
|
|
537
464
|
default:
|
|
538
465
|
errorCode = 4008;
|
|
539
466
|
}
|
|
540
467
|
} else {
|
|
541
468
|
errorCode = 4008;
|
|
542
469
|
}
|
|
543
|
-
|
|
544
470
|
return this.generateErrorPayload(errorCode, showToUser, _config.error.name.LOCUS_RESPONSE, err);
|
|
545
471
|
}
|
|
546
472
|
}, {
|
|
@@ -555,57 +481,46 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
555
481
|
fatal: !(0, _includes2.default)(_config.error.notFatalErrorList, errorCode),
|
|
556
482
|
name: name || _config.error.name.OTHER
|
|
557
483
|
};
|
|
558
|
-
|
|
559
484
|
if (err && err.body) {
|
|
560
485
|
errorPayload.errorData = err.body;
|
|
561
486
|
}
|
|
562
|
-
|
|
563
487
|
if (err && err.statusCode) {
|
|
564
488
|
errorPayload.httpCode = err.statusCode;
|
|
565
489
|
}
|
|
566
|
-
|
|
567
490
|
return errorPayload;
|
|
568
491
|
}
|
|
569
|
-
|
|
570
492
|
return null;
|
|
571
493
|
}
|
|
494
|
+
|
|
572
495
|
/**
|
|
573
496
|
* Returns a formated string of the user agent.
|
|
574
497
|
*
|
|
575
498
|
* @returns {string} formatted user agent information
|
|
576
499
|
*/
|
|
577
|
-
|
|
578
500
|
}, {
|
|
579
501
|
key: "userAgentToString",
|
|
580
502
|
value: function userAgentToString() {
|
|
581
503
|
var _this$webex$meetings, _this$webex$meetings$5;
|
|
582
|
-
|
|
583
504
|
var userAgentOption;
|
|
584
505
|
var browserInfo;
|
|
585
|
-
|
|
586
506
|
var clientInfo = _util.default.format('client=%s', "".concat((_this$webex$meetings = this.webex.meetings) === null || _this$webex$meetings === void 0 ? void 0 : (_this$webex$meetings$5 = _this$webex$meetings.metrics) === null || _this$webex$meetings$5 === void 0 ? void 0 : _this$webex$meetings$5.clientName));
|
|
587
|
-
|
|
588
507
|
if (['chrome', 'firefox', 'msie', 'msedge', 'safari'].indexOf(getBrowserName().toLowerCase()) !== -1) {
|
|
589
508
|
browserInfo = _util.default.format('browser=%s', "".concat(getBrowserName().toLowerCase(), "/").concat(getBrowserVersion().split('.')[0]));
|
|
590
509
|
}
|
|
591
|
-
|
|
592
510
|
var osInfo = _util.default.format('os=%s', "".concat(getOSName(), "/").concat(getOSVersion().split('.')[0]));
|
|
593
|
-
|
|
594
511
|
if (browserInfo) {
|
|
595
512
|
userAgentOption = "(".concat(browserInfo);
|
|
596
513
|
}
|
|
597
|
-
|
|
598
514
|
if (osInfo) {
|
|
599
515
|
userAgentOption = userAgentOption ? "".concat(userAgentOption, "; ").concat(clientInfo, "; ").concat(osInfo) : "".concat(clientInfo, "; (").concat(osInfo);
|
|
600
516
|
}
|
|
601
|
-
|
|
602
517
|
if (userAgentOption) {
|
|
603
518
|
userAgentOption += ')';
|
|
604
519
|
return _util.default.format('webex-js-sdk/%s %s', "".concat(process.env.NODE_ENV, "-").concat(this.webex.version), userAgentOption);
|
|
605
520
|
}
|
|
606
|
-
|
|
607
521
|
return _util.default.format('webex-js-sdk/%s', "".concat(process.env.NODE_ENV, "-").concat(this.webex.version));
|
|
608
522
|
}
|
|
523
|
+
|
|
609
524
|
/**
|
|
610
525
|
* Uploads given metric to the Metrics service as an Behavioral metric.
|
|
611
526
|
* Metadata about the environment such as browser, OS, SDK and their versions
|
|
@@ -621,7 +536,6 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
621
536
|
*
|
|
622
537
|
* @returns {void}
|
|
623
538
|
*/
|
|
624
|
-
|
|
625
539
|
}, {
|
|
626
540
|
key: "sendBehavioralMetric",
|
|
627
541
|
value: function sendBehavioralMetric(metricName) {
|
|
@@ -636,8 +550,6 @@ var Metrics = /*#__PURE__*/function () {
|
|
|
636
550
|
}]);
|
|
637
551
|
return Metrics;
|
|
638
552
|
}(); // Export Metrics singleton ---------------------------------------------------
|
|
639
|
-
|
|
640
|
-
|
|
641
553
|
(0, _defineProperty2.default)(Metrics, "instance", void 0);
|
|
642
554
|
var instance = new Metrics();
|
|
643
555
|
var _default = instance;
|