@webex/plugin-meetings 3.0.0-beta.219 → 3.0.0-beta.220
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/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/media/index.js +3 -2
- package/dist/media/index.js.map +1 -1
- package/dist/meeting/index.js +1 -1
- package/dist/meeting/index.js.map +1 -1
- package/dist/rtcMetrics/index.js +3 -3
- package/dist/rtcMetrics/index.js.map +1 -1
- package/dist/types/rtcMetrics/index.d.ts +2 -1
- package/package.json +19 -19
- package/src/media/index.ts +3 -1
- package/src/meeting/index.ts +1 -0
- package/src/rtcMetrics/index.ts +3 -3
- package/test/unit/spec/media/index.ts +6 -6
- package/test/unit/spec/meeting/index.js +3 -0
- package/test/unit/spec/rtcMetrics/index.ts +9 -1
package/dist/rtcMetrics/index.js
CHANGED
|
@@ -9,7 +9,6 @@ exports.default = void 0;
|
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
12
|
-
var _uuid = _interopRequireDefault(require("uuid"));
|
|
13
12
|
var _constants = _interopRequireDefault(require("./constants"));
|
|
14
13
|
/**
|
|
15
14
|
* Rtc Metrics
|
|
@@ -24,8 +23,9 @@ var RtcMetrics = /*#__PURE__*/function () {
|
|
|
24
23
|
*
|
|
25
24
|
* @param {object} webex - The main `webex` object.
|
|
26
25
|
* @param {string} meetingId - The meeting id.
|
|
26
|
+
* @param {string} correlationId - The correlation id.
|
|
27
27
|
*/
|
|
28
|
-
function RtcMetrics(webex, meetingId) {
|
|
28
|
+
function RtcMetrics(webex, meetingId, correlationId) {
|
|
29
29
|
(0, _classCallCheck2.default)(this, RtcMetrics);
|
|
30
30
|
(0, _defineProperty2.default)(this, "metricsQueue", []);
|
|
31
31
|
(0, _defineProperty2.default)(this, "intervalId", void 0);
|
|
@@ -36,7 +36,7 @@ var RtcMetrics = /*#__PURE__*/function () {
|
|
|
36
36
|
this.intervalId = window.setInterval(this.checkMetrics.bind(this), 30 * 1000);
|
|
37
37
|
this.meetingId = meetingId;
|
|
38
38
|
this.webex = webex;
|
|
39
|
-
this.correlationId =
|
|
39
|
+
this.correlationId = correlationId;
|
|
40
40
|
// Send the first set of metrics at 5 seconds in the case of a user leaving the call shortly after joining.
|
|
41
41
|
setTimeout(this.checkMetrics.bind(this), 5 * 1000);
|
|
42
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RtcMetrics","webex","meetingId","intervalId","window","setInterval","checkMetrics","bind","
|
|
1
|
+
{"version":3,"names":["RtcMetrics","webex","meetingId","correlationId","intervalId","window","setInterval","checkMetrics","bind","setTimeout","metricsQueue","length","sendMetrics","data","payload","push","clearInterval","request","method","service","resource","headers","type","appId","RTC_METRICS","APP_ID","body","metrics","version","userId","internal","device"],"sources":["index.ts"],"sourcesContent":["import RTC_METRICS from './constants';\n\n/**\n * Rtc Metrics\n */\nexport default class RtcMetrics {\n /**\n * Array of MetricData items to be sent to the metrics service.\n */\n metricsQueue = [];\n\n intervalId: number;\n\n webex: any;\n\n meetingId: string;\n\n correlationId: string;\n\n /**\n * Initialize the interval.\n *\n * @param {object} webex - The main `webex` object.\n * @param {string} meetingId - The meeting id.\n * @param {string} correlationId - The correlation id.\n */\n constructor(webex, meetingId, correlationId) {\n // `window` is used to prevent typescript from returning a NodeJS.Timer.\n this.intervalId = window.setInterval(this.checkMetrics.bind(this), 30 * 1000);\n this.meetingId = meetingId;\n this.webex = webex;\n this.correlationId = correlationId;\n // Send the first set of metrics at 5 seconds in the case of a user leaving the call shortly after joining.\n setTimeout(this.checkMetrics.bind(this), 5 * 1000);\n }\n\n /**\n * Check to see if the metrics queue has any items.\n *\n * @returns {void}\n */\n private checkMetrics() {\n if (this.metricsQueue.length) {\n this.sendMetrics();\n this.metricsQueue = [];\n }\n }\n\n /**\n * Add metrics items to the metrics queue.\n *\n * @param {object} data - An object with a payload array of metrics items.\n *\n * @returns {void}\n */\n addMetrics(data) {\n if (data.payload.length) {\n this.metricsQueue.push(data);\n }\n }\n\n /**\n * Clear the metrics interval.\n *\n * @returns {void}\n */\n closeMetrics() {\n this.checkMetrics();\n clearInterval(this.intervalId);\n }\n\n /**\n * Send metrics to the metrics service.\n *\n * @returns {void}\n */\n private sendMetrics() {\n this.webex.request({\n method: 'POST',\n service: 'unifiedTelemetry',\n resource: 'metric/v2',\n headers: {\n type: 'webrtcMedia',\n appId: RTC_METRICS.APP_ID,\n },\n body: {\n metrics: [\n {\n type: 'webrtc',\n version: '1.0.1',\n userId: this.webex.internal.device.userId,\n meetingId: this.meetingId,\n correlationId: this.correlationId,\n data: this.metricsQueue,\n },\n ],\n },\n });\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA;AAEA;AACA;AACA;AAFA,IAGqBA,UAAU;EAC7B;AACF;AACA;;EAWE;AACF;AACA;AACA;AACA;AACA;AACA;EACE,oBAAYC,KAAK,EAAEC,SAAS,EAAEC,aAAa,EAAE;IAAA;IAAA,oDAjB9B,EAAE;IAAA;IAAA;IAAA;IAAA;IAkBf;IACA,IAAI,CAACC,UAAU,GAAGC,MAAM,CAACC,WAAW,CAAC,IAAI,CAACC,YAAY,CAACC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC;IAC7E,IAAI,CAACN,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACD,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACE,aAAa,GAAGA,aAAa;IAClC;IACAM,UAAU,CAAC,IAAI,CAACF,YAAY,CAACC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;EACpD;;EAEA;AACF;AACA;AACA;AACA;EAJE;IAAA;IAAA,OAKA,wBAAuB;MACrB,IAAI,IAAI,CAACE,YAAY,CAACC,MAAM,EAAE;QAC5B,IAAI,CAACC,WAAW,EAAE;QAClB,IAAI,CAACF,YAAY,GAAG,EAAE;MACxB;IACF;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,oBAAWG,IAAI,EAAE;MACf,IAAIA,IAAI,CAACC,OAAO,CAACH,MAAM,EAAE;QACvB,IAAI,CAACD,YAAY,CAACK,IAAI,CAACF,IAAI,CAAC;MAC9B;IACF;;IAEA;AACF;AACA;AACA;AACA;EAJE;IAAA;IAAA,OAKA,wBAAe;MACb,IAAI,CAACN,YAAY,EAAE;MACnBS,aAAa,CAAC,IAAI,CAACZ,UAAU,CAAC;IAChC;;IAEA;AACF;AACA;AACA;AACA;EAJE;IAAA;IAAA,OAKA,uBAAsB;MACpB,IAAI,CAACH,KAAK,CAACgB,OAAO,CAAC;QACjBC,MAAM,EAAE,MAAM;QACdC,OAAO,EAAE,kBAAkB;QAC3BC,QAAQ,EAAE,WAAW;QACrBC,OAAO,EAAE;UACPC,IAAI,EAAE,aAAa;UACnBC,KAAK,EAAEC,kBAAW,CAACC;QACrB,CAAC;QACDC,IAAI,EAAE;UACJC,OAAO,EAAE,CACP;YACEL,IAAI,EAAE,QAAQ;YACdM,OAAO,EAAE,OAAO;YAChBC,MAAM,EAAE,IAAI,CAAC5B,KAAK,CAAC6B,QAAQ,CAACC,MAAM,CAACF,MAAM;YACzC3B,SAAS,EAAE,IAAI,CAACA,SAAS;YACzBC,aAAa,EAAE,IAAI,CAACA,aAAa;YACjCU,IAAI,EAAE,IAAI,CAACH;UACb,CAAC;QAEL;MACF,CAAC,CAAC;IACJ;EAAC;EAAA;AAAA;AAAA"}
|
|
@@ -15,8 +15,9 @@ export default class RtcMetrics {
|
|
|
15
15
|
*
|
|
16
16
|
* @param {object} webex - The main `webex` object.
|
|
17
17
|
* @param {string} meetingId - The meeting id.
|
|
18
|
+
* @param {string} correlationId - The correlation id.
|
|
18
19
|
*/
|
|
19
|
-
constructor(webex: any, meetingId: any);
|
|
20
|
+
constructor(webex: any, meetingId: any, correlationId: any);
|
|
20
21
|
/**
|
|
21
22
|
* Check to see if the metrics queue has any items.
|
|
22
23
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/plugin-meetings",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.220",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
|
|
6
6
|
"contributors": [
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"build": "yarn run -T tsc --declaration true --declarationDir ./dist/types"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@webex/plugin-meetings": "3.0.0-beta.
|
|
36
|
-
"@webex/test-helper-chai": "3.0.0-beta.
|
|
37
|
-
"@webex/test-helper-mocha": "3.0.0-beta.
|
|
38
|
-
"@webex/test-helper-mock-webex": "3.0.0-beta.
|
|
39
|
-
"@webex/test-helper-retry": "3.0.0-beta.
|
|
40
|
-
"@webex/test-helper-test-users": "3.0.0-beta.
|
|
35
|
+
"@webex/plugin-meetings": "3.0.0-beta.220",
|
|
36
|
+
"@webex/test-helper-chai": "3.0.0-beta.220",
|
|
37
|
+
"@webex/test-helper-mocha": "3.0.0-beta.220",
|
|
38
|
+
"@webex/test-helper-mock-webex": "3.0.0-beta.220",
|
|
39
|
+
"@webex/test-helper-retry": "3.0.0-beta.220",
|
|
40
|
+
"@webex/test-helper-test-users": "3.0.0-beta.220",
|
|
41
41
|
"chai": "^4.3.4",
|
|
42
42
|
"chai-as-promised": "^7.1.1",
|
|
43
43
|
"jsdom-global": "3.0.2",
|
|
@@ -46,19 +46,19 @@
|
|
|
46
46
|
"typescript": "^4.7.4"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@webex/common": "3.0.0-beta.
|
|
49
|
+
"@webex/common": "3.0.0-beta.220",
|
|
50
50
|
"@webex/internal-media-core": "1.39.1",
|
|
51
|
-
"@webex/internal-plugin-conversation": "3.0.0-beta.
|
|
52
|
-
"@webex/internal-plugin-device": "3.0.0-beta.
|
|
53
|
-
"@webex/internal-plugin-llm": "3.0.0-beta.
|
|
54
|
-
"@webex/internal-plugin-mercury": "3.0.0-beta.
|
|
55
|
-
"@webex/internal-plugin-metrics": "3.0.0-beta.
|
|
56
|
-
"@webex/internal-plugin-support": "3.0.0-beta.
|
|
57
|
-
"@webex/internal-plugin-user": "3.0.0-beta.
|
|
58
|
-
"@webex/media-helpers": "3.0.0-beta.
|
|
59
|
-
"@webex/plugin-people": "3.0.0-beta.
|
|
60
|
-
"@webex/plugin-rooms": "3.0.0-beta.
|
|
61
|
-
"@webex/webex-core": "3.0.0-beta.
|
|
51
|
+
"@webex/internal-plugin-conversation": "3.0.0-beta.220",
|
|
52
|
+
"@webex/internal-plugin-device": "3.0.0-beta.220",
|
|
53
|
+
"@webex/internal-plugin-llm": "3.0.0-beta.220",
|
|
54
|
+
"@webex/internal-plugin-mercury": "3.0.0-beta.220",
|
|
55
|
+
"@webex/internal-plugin-metrics": "3.0.0-beta.220",
|
|
56
|
+
"@webex/internal-plugin-support": "3.0.0-beta.220",
|
|
57
|
+
"@webex/internal-plugin-user": "3.0.0-beta.220",
|
|
58
|
+
"@webex/media-helpers": "3.0.0-beta.220",
|
|
59
|
+
"@webex/plugin-people": "3.0.0-beta.220",
|
|
60
|
+
"@webex/plugin-rooms": "3.0.0-beta.220",
|
|
61
|
+
"@webex/webex-core": "3.0.0-beta.220",
|
|
62
62
|
"ampersand-collection": "^2.0.2",
|
|
63
63
|
"bowser": "^2.11.0",
|
|
64
64
|
"btoa": "^1.2.1",
|
package/src/media/index.ts
CHANGED
|
@@ -105,6 +105,7 @@ Media.getDirection = (forceSendRecv: boolean, receive: boolean, send: boolean) =
|
|
|
105
105
|
* @param {string} debugId string useful for debugging (will appear in media connection logs)
|
|
106
106
|
* @param {object} webex main `webex` object.
|
|
107
107
|
* @param {string} meetingId id for the meeting using this connection
|
|
108
|
+
* @param {string} correlationId id used in requests to correlate to this session
|
|
108
109
|
* @param {Object} options
|
|
109
110
|
* @param {Object} [options.mediaProperties] contains mediaDirection and local tracks:
|
|
110
111
|
* audioTrack, videoTrack, shareVideoTrack, and shareAudioTrack
|
|
@@ -120,6 +121,7 @@ Media.createMediaConnection = (
|
|
|
120
121
|
debugId: string,
|
|
121
122
|
webex: object,
|
|
122
123
|
meetingId: string,
|
|
124
|
+
correlationId: string,
|
|
123
125
|
options: {
|
|
124
126
|
mediaProperties: {
|
|
125
127
|
mediaDirection?: {
|
|
@@ -178,7 +180,7 @@ Media.createMediaConnection = (
|
|
|
178
180
|
config.bundlePolicy = bundlePolicy;
|
|
179
181
|
}
|
|
180
182
|
|
|
181
|
-
const rtcMetrics = new RtcMetrics(webex, meetingId);
|
|
183
|
+
const rtcMetrics = new RtcMetrics(webex, meetingId, correlationId);
|
|
182
184
|
|
|
183
185
|
return new MultistreamRoapMediaConnection(
|
|
184
186
|
config,
|
package/src/meeting/index.ts
CHANGED
|
@@ -5286,6 +5286,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
5286
5286
|
// @ts-ignore
|
|
5287
5287
|
this.webex,
|
|
5288
5288
|
this.id,
|
|
5289
|
+
this.correlationId,
|
|
5289
5290
|
{
|
|
5290
5291
|
mediaProperties: this.mediaProperties,
|
|
5291
5292
|
remoteQualityLevel: this.mediaProperties.remoteQualityLevel,
|
package/src/rtcMetrics/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import uuid from 'uuid';
|
|
2
1
|
import RTC_METRICS from './constants';
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -23,13 +22,14 @@ export default class RtcMetrics {
|
|
|
23
22
|
*
|
|
24
23
|
* @param {object} webex - The main `webex` object.
|
|
25
24
|
* @param {string} meetingId - The meeting id.
|
|
25
|
+
* @param {string} correlationId - The correlation id.
|
|
26
26
|
*/
|
|
27
|
-
constructor(webex, meetingId) {
|
|
27
|
+
constructor(webex, meetingId, correlationId) {
|
|
28
28
|
// `window` is used to prevent typescript from returning a NodeJS.Timer.
|
|
29
29
|
this.intervalId = window.setInterval(this.checkMetrics.bind(this), 30 * 1000);
|
|
30
30
|
this.meetingId = meetingId;
|
|
31
31
|
this.webex = webex;
|
|
32
|
-
this.correlationId =
|
|
32
|
+
this.correlationId = correlationId;
|
|
33
33
|
// Send the first set of metrics at 5 seconds in the case of a user leaving the call shortly after joining.
|
|
34
34
|
setTimeout(this.checkMetrics.bind(this), 5 * 1000);
|
|
35
35
|
}
|
|
@@ -43,7 +43,7 @@ describe('createMediaConnection', () => {
|
|
|
43
43
|
const ENABLE_EXTMAP = false;
|
|
44
44
|
const ENABLE_RTX = true;
|
|
45
45
|
|
|
46
|
-
Media.createMediaConnection(false, 'some debug id', webex, 'meetingId', {
|
|
46
|
+
Media.createMediaConnection(false, 'some debug id', webex, 'meetingId', 'correlationId', {
|
|
47
47
|
mediaProperties: {
|
|
48
48
|
mediaDirection: {
|
|
49
49
|
sendAudio: false,
|
|
@@ -115,7 +115,7 @@ describe('createMediaConnection', () => {
|
|
|
115
115
|
.stub(internalMediaModule, 'MultistreamRoapMediaConnection')
|
|
116
116
|
.returns(fakeRoapMediaConnection);
|
|
117
117
|
|
|
118
|
-
Media.createMediaConnection(true, 'some debug id', webex, 'meeting id', {
|
|
118
|
+
Media.createMediaConnection(true, 'some debug id', webex, 'meeting id', 'correlationId', {
|
|
119
119
|
mediaProperties: {
|
|
120
120
|
mediaDirection: {
|
|
121
121
|
sendAudio: true,
|
|
@@ -163,7 +163,7 @@ describe('createMediaConnection', () => {
|
|
|
163
163
|
.stub(internalMediaModule, 'MultistreamRoapMediaConnection')
|
|
164
164
|
.returns(fakeRoapMediaConnection);
|
|
165
165
|
|
|
166
|
-
Media.createMediaConnection(true, 'some debug id', webex, 'meeting id', {
|
|
166
|
+
Media.createMediaConnection(true, 'some debug id', webex, 'meeting id', 'correlationId', {
|
|
167
167
|
mediaProperties: {
|
|
168
168
|
mediaDirection: {
|
|
169
169
|
sendAudio,
|
|
@@ -194,7 +194,7 @@ describe('createMediaConnection', () => {
|
|
|
194
194
|
.stub(internalMediaModule, 'MultistreamRoapMediaConnection')
|
|
195
195
|
.returns(fakeRoapMediaConnection);
|
|
196
196
|
|
|
197
|
-
Media.createMediaConnection(true, 'debug string', webex, 'meeting id', {
|
|
197
|
+
Media.createMediaConnection(true, 'debug string', webex, 'meeting id', 'correlationId', {
|
|
198
198
|
mediaProperties: {
|
|
199
199
|
mediaDirection: {
|
|
200
200
|
sendAudio: true,
|
|
@@ -222,7 +222,7 @@ describe('createMediaConnection', () => {
|
|
|
222
222
|
.stub(internalMediaModule, 'MultistreamRoapMediaConnection')
|
|
223
223
|
.returns(fakeRoapMediaConnection);
|
|
224
224
|
|
|
225
|
-
Media.createMediaConnection(true, 'debug string', webex, 'meeting id', {
|
|
225
|
+
Media.createMediaConnection(true, 'debug string', webex, 'meeting id', 'correlationId', {
|
|
226
226
|
mediaProperties: {
|
|
227
227
|
mediaDirection: {
|
|
228
228
|
sendAudio: true,
|
|
@@ -258,7 +258,7 @@ describe('createMediaConnection', () => {
|
|
|
258
258
|
const ENABLE_EXTMAP = false;
|
|
259
259
|
const ENABLE_RTX = true;
|
|
260
260
|
|
|
261
|
-
Media.createMediaConnection(false, 'some debug id', webex, 'meeting id', {
|
|
261
|
+
Media.createMediaConnection(false, 'some debug id', webex, 'meeting id', 'correlationId', {
|
|
262
262
|
mediaProperties: {
|
|
263
263
|
mediaDirection: {
|
|
264
264
|
sendAudio: true,
|
|
@@ -1266,6 +1266,7 @@ describe('plugin-meetings', () => {
|
|
|
1266
1266
|
meeting.getMediaConnectionDebugId(),
|
|
1267
1267
|
webex,
|
|
1268
1268
|
meeting.id,
|
|
1269
|
+
meeting.correlationId,
|
|
1269
1270
|
sinon.match({turnServerInfo: undefined})
|
|
1270
1271
|
);
|
|
1271
1272
|
assert.calledOnce(meeting.setMercuryListener);
|
|
@@ -1338,6 +1339,7 @@ describe('plugin-meetings', () => {
|
|
|
1338
1339
|
meeting.getMediaConnectionDebugId(),
|
|
1339
1340
|
webex,
|
|
1340
1341
|
meeting.id,
|
|
1342
|
+
meeting.correlationId,
|
|
1341
1343
|
sinon.match({
|
|
1342
1344
|
turnServerInfo: {
|
|
1343
1345
|
url: FAKE_TURN_URL,
|
|
@@ -1593,6 +1595,7 @@ describe('plugin-meetings', () => {
|
|
|
1593
1595
|
meeting.getMediaConnectionDebugId(),
|
|
1594
1596
|
webex,
|
|
1595
1597
|
meeting.id,
|
|
1598
|
+
meeting.correlationId,
|
|
1596
1599
|
sinon.match({
|
|
1597
1600
|
turnServerInfo: {
|
|
1598
1601
|
url: FAKE_TURN_URL,
|
|
@@ -2,6 +2,7 @@ import RtcMetrics from '@webex/plugin-meetings/src/rtcMetrics';
|
|
|
2
2
|
import MockWebex from '@webex/test-helper-mock-webex';
|
|
3
3
|
import {assert} from '@webex/test-helper-chai';
|
|
4
4
|
import sinon from 'sinon';
|
|
5
|
+
import RTC_METRICS from '../../../../src/rtcMetrics/constants';
|
|
5
6
|
|
|
6
7
|
const FAKE_METRICS_ITEM = {payload: ['fake-metrics']};
|
|
7
8
|
|
|
@@ -13,7 +14,7 @@ describe('RtcMetrics', () => {
|
|
|
13
14
|
beforeEach(() => {
|
|
14
15
|
clock = sinon.useFakeTimers();
|
|
15
16
|
webex = new MockWebex();
|
|
16
|
-
metrics = new RtcMetrics(webex, 'mock-meeting-id');
|
|
17
|
+
metrics = new RtcMetrics(webex, 'mock-meeting-id', 'mock-correlation-id');
|
|
17
18
|
});
|
|
18
19
|
|
|
19
20
|
it('sendMetrics should send a webex request', () => {
|
|
@@ -23,6 +24,13 @@ describe('RtcMetrics', () => {
|
|
|
23
24
|
(metrics as any).sendMetrics();
|
|
24
25
|
|
|
25
26
|
assert.callCount(webex.request, 1);
|
|
27
|
+
assert.calledWithMatch(webex.request, sinon.match.has('headers', {
|
|
28
|
+
type: 'webrtcMedia',
|
|
29
|
+
appId: RTC_METRICS.APP_ID,
|
|
30
|
+
}));
|
|
31
|
+
assert.calledWithMatch(webex.request, sinon.match.hasNested('body.metrics[0].data[0].payload', FAKE_METRICS_ITEM.payload));
|
|
32
|
+
assert.calledWithMatch(webex.request, sinon.match.hasNested('body.metrics[0].meetingId', 'mock-meeting-id'));
|
|
33
|
+
assert.calledWithMatch(webex.request, sinon.match.hasNested('body.metrics[0].correlationId', 'mock-correlation-id'));
|
|
26
34
|
});
|
|
27
35
|
|
|
28
36
|
it('should send metrics requests over time', () => {
|