@webex/plugin-meetings 1.151.5 → 1.152.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.
Files changed (44) hide show
  1. package/dist/common/errors/captcha-error.js +64 -0
  2. package/dist/common/errors/captcha-error.js.map +1 -0
  3. package/dist/common/errors/password-error.js +64 -0
  4. package/dist/common/errors/password-error.js.map +1 -0
  5. package/dist/config.js +2 -1
  6. package/dist/config.js.map +1 -1
  7. package/dist/constants.js +33 -1
  8. package/dist/constants.js.map +1 -1
  9. package/dist/meeting/index.js +674 -433
  10. package/dist/meeting/index.js.map +1 -1
  11. package/dist/meeting/request.js +59 -32
  12. package/dist/meeting/request.js.map +1 -1
  13. package/dist/meeting/util.js +12 -0
  14. package/dist/meeting/util.js.map +1 -1
  15. package/dist/meeting-info/index.js +5 -0
  16. package/dist/meeting-info/index.js.map +1 -1
  17. package/dist/meeting-info/meeting-info-v2.js +142 -8
  18. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  19. package/dist/meeting-info/utilv2.js +12 -1
  20. package/dist/meeting-info/utilv2.js.map +1 -1
  21. package/dist/meetings/index.js +31 -22
  22. package/dist/meetings/index.js.map +1 -1
  23. package/dist/peer-connection-manager/index.js +10 -1
  24. package/dist/peer-connection-manager/index.js.map +1 -1
  25. package/dist/personal-meeting-room/index.js +6 -9
  26. package/dist/personal-meeting-room/index.js.map +1 -1
  27. package/package.json +5 -5
  28. package/src/common/errors/captcha-error.js +21 -0
  29. package/src/common/errors/password-error.js +21 -0
  30. package/src/config.js +2 -1
  31. package/src/constants.js +24 -0
  32. package/src/meeting/index.js +180 -5
  33. package/src/meeting/request.js +27 -0
  34. package/src/meeting/util.js +15 -4
  35. package/src/meeting-info/index.js +6 -1
  36. package/src/meeting-info/meeting-info-v2.js +67 -3
  37. package/src/meeting-info/utilv2.js +12 -1
  38. package/src/meetings/index.js +12 -9
  39. package/src/peer-connection-manager/index.js +13 -2
  40. package/src/personal-meeting-room/index.js +5 -6
  41. package/test/unit/spec/meeting/index.js +304 -2
  42. package/test/unit/spec/meeting-info/meetinginfov2.js +93 -3
  43. package/test/unit/spec/peerconnection-manager/index.js +66 -0
  44. package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +33 -0
@@ -36,10 +36,10 @@ var _assign = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/obj
36
36
 
37
37
  var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/typeof"));
38
38
 
39
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
40
-
41
39
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
42
40
 
41
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
42
+
43
43
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
44
44
 
45
45
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
@@ -110,6 +110,10 @@ var _util3 = _interopRequireDefault(require("../stats/util"));
110
110
 
111
111
  var _transcription = _interopRequireDefault(require("../transcription"));
112
112
 
113
+ var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
114
+
115
+ var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
116
+
113
117
  var _reconnection = _interopRequireDefault(require("../common/errors/reconnection"));
114
118
 
115
119
  var _reconnectionInProgress = _interopRequireDefault(require("../common/errors/reconnection-in-progress"));
@@ -120,6 +124,8 @@ var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
120
124
 
121
125
  var _media2 = _interopRequireDefault(require("../common/errors/media"));
122
126
 
127
+ var _meetingInfoV = require("../meeting-info/meeting-info-v2");
128
+
123
129
  var _mqaProcessor = _interopRequireDefault(require("../metrics/mqa-processor"));
124
130
 
125
131
  var _browserDetection = _interopRequireDefault(require("../common/browser-detection"));
@@ -1111,22 +1117,253 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1111
1117
  */
1112
1118
 
1113
1119
  _this.transcription = undefined;
1120
+ /**
1121
+ * Password status. If it's PASSWORD_STATUS.REQUIRED then verifyPassword() needs to be called
1122
+ * with the correct password before calling join()
1123
+ * @instance
1124
+ * @type {PASSWORD_STATUS}
1125
+ * @public
1126
+ * @memberof Meeting
1127
+ */
1128
+
1129
+ _this.passwordStatus = _constants.PASSWORD_STATUS.UNKNOWN;
1130
+ /**
1131
+ * Information about required captcha. If null, then no captcha is required. status. If it's PASSWORD_STATUS.REQUIRED then verifyPassword() needs to be called
1132
+ * with the correct password before calling join()
1133
+ * @instance
1134
+ * @type {Object}
1135
+ * @property {string} captchaId captcha id
1136
+ * @property {string} verificationImageURL Url of the captcha image
1137
+ * @property {string} verificationAudioURL Url of the captcha audio file
1138
+ * @property {string} refreshURL Url used for refreshing the captcha (don't use it directly, call refreshCaptcha() instead)
1139
+ * @public
1140
+ * @memberof Meeting
1141
+ */
1142
+
1143
+ _this.requiredCaptcha = null;
1144
+ /**
1145
+ * Indicates the reason for last failure to obtain meeting.meetingInfo. MEETING_INFO_FAILURE_REASON.NONE if meeting info was
1146
+ * retrieved successfully
1147
+ * @instance
1148
+ * @type {MEETING_INFO_FAILURE_REASON}
1149
+ * @private
1150
+ * @memberof Meeting
1151
+ */
1152
+
1153
+ _this.meetingInfoFailureReason = undefined;
1114
1154
 
1115
1155
  _this.setUpLocusInfoListeners();
1116
1156
 
1117
1157
  _this.locusInfo.init(attrs.locus ? attrs.locus : {});
1118
1158
 
1159
+ _this.isCreated = true;
1119
1160
  return _this;
1120
1161
  }
1121
1162
  /**
1122
- * Proxy function for all the listener set ups
1123
- * @returns {undefined}
1163
+ * Fetches meeting information.
1164
+ * @param {Object} options
1165
+ * @param {String} options.destination
1166
+ * @param {String} options.type
1124
1167
  * @private
1125
1168
  * @memberof Meeting
1169
+ * @returns {Promise}
1126
1170
  */
1127
1171
 
1128
1172
 
1129
1173
  (0, _createClass2.default)(Meeting, [{
1174
+ key: "fetchMeetingInfo",
1175
+ value: function () {
1176
+ var _fetchMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref4) {
1177
+ var destination, type, _ref4$password, password, _ref4$captchaCode, captchaCode, captchaInfo, info, _err$body, _err$body2;
1178
+
1179
+ return _regenerator.default.wrap(function _callee$(_context) {
1180
+ while (1) {
1181
+ switch (_context.prev = _context.next) {
1182
+ case 0:
1183
+ destination = _ref4.destination, type = _ref4.type, _ref4$password = _ref4.password, password = _ref4$password === void 0 ? null : _ref4$password, _ref4$captchaCode = _ref4.captchaCode, captchaCode = _ref4$captchaCode === void 0 ? null : _ref4$captchaCode;
1184
+
1185
+ if (!(captchaCode && !this.requiredCaptcha)) {
1186
+ _context.next = 3;
1187
+ break;
1188
+ }
1189
+
1190
+ return _context.abrupt("return", _promise.default.reject(new Error('fetchMeetingInfo() called with captchaCode when captcha was not required')));
1191
+
1192
+ case 3:
1193
+ if (!(password && this.passwordStatus !== _constants.PASSWORD_STATUS.REQUIRED && this.passwordStatus !== _constants.PASSWORD_STATUS.UNKNOWN)) {
1194
+ _context.next = 5;
1195
+ break;
1196
+ }
1197
+
1198
+ return _context.abrupt("return", _promise.default.reject(new Error('fetchMeetingInfo() called with password when password was not required')));
1199
+
1200
+ case 5:
1201
+ _context.prev = 5;
1202
+ captchaInfo = captchaCode ? {
1203
+ code: captchaCode,
1204
+ id: this.requiredCaptcha.captchaId
1205
+ } : null;
1206
+ _context.next = 9;
1207
+ return this.attrs.meetingInfoProvider.fetchMeetingInfo(destination, type, password, captchaInfo);
1208
+
1209
+ case 9:
1210
+ info = _context.sent;
1211
+ this.parseMeetingInfo(info);
1212
+ this.meetingInfo = info ? info.body : null;
1213
+ this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.NONE;
1214
+ this.requiredCaptcha = null;
1215
+
1216
+ if (this.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED || this.passwordStatus === _constants.PASSWORD_STATUS.VERIFIED) {
1217
+ this.passwordStatus = _constants.PASSWORD_STATUS.VERIFIED;
1218
+ } else {
1219
+ this.passwordStatus = _constants.PASSWORD_STATUS.NOT_REQUIRED;
1220
+ }
1221
+
1222
+ return _context.abrupt("return", _promise.default.resolve());
1223
+
1224
+ case 18:
1225
+ _context.prev = 18;
1226
+ _context.t0 = _context["catch"](5);
1227
+
1228
+ if (!(_context.t0 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
1229
+ _context.next = 31;
1230
+ break;
1231
+ }
1232
+
1233
+ _loggerProxy.default.logger.info("Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(destination, " - password required (code=").concat(_context.t0 === null || _context.t0 === void 0 ? void 0 : (_err$body = _context.t0.body) === null || _err$body === void 0 ? void 0 : _err$body.code, ").")); // when wbxappapi requires password it still populates partial meeting info in the response
1234
+
1235
+
1236
+ if (_context.t0.meetingInfo) {
1237
+ this.meetingInfo = _context.t0.meetingInfo;
1238
+ this.meetingNumber = _context.t0.meetingInfo.meetingNumber;
1239
+ }
1240
+
1241
+ this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
1242
+ this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
1243
+
1244
+ if (!this.requiredCaptcha) {
1245
+ _context.next = 28;
1246
+ break;
1247
+ }
1248
+
1249
+ _context.next = 28;
1250
+ return this.refreshCaptcha();
1251
+
1252
+ case 28:
1253
+ throw new _passwordError.default();
1254
+
1255
+ case 31:
1256
+ if (!(_context.t0 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
1257
+ _context.next = 39;
1258
+ break;
1259
+ }
1260
+
1261
+ _loggerProxy.default.logger.info("Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(destination, " - captcha required (code=").concat(_context.t0 === null || _context.t0 === void 0 ? void 0 : (_err$body2 = _context.t0.body) === null || _err$body2 === void 0 ? void 0 : _err$body2.code, ")."));
1262
+
1263
+ this.meetingInfoFailureReason = this.requiredCaptcha ? _constants.MEETING_INFO_FAILURE_REASON.WRONG_CAPTCHA : _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
1264
+
1265
+ if (_context.t0.isPasswordRequired) {
1266
+ this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
1267
+ }
1268
+
1269
+ this.requiredCaptcha = _context.t0.captchaInfo;
1270
+ throw new _captchaError.default();
1271
+
1272
+ case 39:
1273
+ this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.OTHER;
1274
+ throw _context.t0;
1275
+
1276
+ case 41:
1277
+ case "end":
1278
+ return _context.stop();
1279
+ }
1280
+ }
1281
+ }, _callee, this, [[5, 18]]);
1282
+ }));
1283
+
1284
+ function fetchMeetingInfo(_x) {
1285
+ return _fetchMeetingInfo.apply(this, arguments);
1286
+ }
1287
+
1288
+ return fetchMeetingInfo;
1289
+ }()
1290
+ /**
1291
+ * Checks if the supplied password/host key is correct. It returns a promise with information whether the
1292
+ * password and captcha code were correct or not.
1293
+ * @param {String} password - this can be either a password or a host key, can be undefined if only captcha was required
1294
+ * @param {String} captchaCode - can be undefined if captcha was not required by the server
1295
+ * @public
1296
+ * @memberof Meeting
1297
+ * @returns {Promise<{isPasswordValid: boolean, requiredCaptcha: boolean, failureReason: MEETING_INFO_FAILURE_REASON}>}
1298
+ */
1299
+
1300
+ }, {
1301
+ key: "verifyPassword",
1302
+ value: function verifyPassword(password, captchaCode) {
1303
+ var _this2 = this;
1304
+
1305
+ return this.fetchMeetingInfo({
1306
+ destination: this.sipUri,
1307
+ type: _constants._SIP_URI_,
1308
+ password: password,
1309
+ captchaCode: captchaCode
1310
+ }).then(function () {
1311
+ return {
1312
+ isPasswordValid: true,
1313
+ requiredCaptcha: null,
1314
+ failureReason: _constants.MEETING_INFO_FAILURE_REASON.NONE
1315
+ };
1316
+ }).catch(function (error) {
1317
+ if (error instanceof _passwordError.default || error instanceof _captchaError.default) {
1318
+ return {
1319
+ isPasswordValid: _this2.passwordStatus === _constants.PASSWORD_STATUS.VERIFIED,
1320
+ requiredCaptcha: _this2.requiredCaptcha,
1321
+ failureReason: _this2.meetingInfoFailureReason
1322
+ };
1323
+ }
1324
+
1325
+ throw error;
1326
+ });
1327
+ }
1328
+ /**
1329
+ * Refreshes the captcha. As a result the meeting will have new captcha id, image and audio.
1330
+ * If the refresh operation fails, meeting remains with the old captcha properties.
1331
+ * @public
1332
+ * @memberof Meeting
1333
+ * @returns {Promise}
1334
+ */
1335
+
1336
+ }, {
1337
+ key: "refreshCaptcha",
1338
+ value: function refreshCaptcha() {
1339
+ var _this3 = this;
1340
+
1341
+ if (!this.requiredCaptcha) {
1342
+ return _promise.default.reject(new Error('There is no captcha to refresh'));
1343
+ } // in order to get fully populated uris for captcha audio and image in response to refresh captcha request
1344
+ // we have to pass the wbxappapi hostname as the siteFullName parameter
1345
+
1346
+
1347
+ var _URL = new URL(this.requiredCaptcha.refreshURL),
1348
+ hostname = _URL.hostname;
1349
+
1350
+ return this.meetingRequest.refreshCaptcha({
1351
+ captchaRefreshUrl: "".concat(this.requiredCaptcha.refreshURL, "&siteFullName=").concat(hostname),
1352
+ captchaId: this.requiredCaptcha.captchaId
1353
+ }).then(function (response) {
1354
+ _this3.requiredCaptcha.captchaId = response.body.captchaID;
1355
+ _this3.requiredCaptcha.verificationImageURL = response.body.verificationImageURL;
1356
+ _this3.requiredCaptcha.verificationAudioURL = response.body.verificationAudioURL;
1357
+ });
1358
+ }
1359
+ /**
1360
+ * Proxy function for all the listener set ups
1361
+ * @returns {undefined}
1362
+ * @private
1363
+ * @memberof Meeting
1364
+ */
1365
+
1366
+ }, {
1130
1367
  key: "setUpLocusInfoListeners",
1131
1368
  value: function setUpLocusInfoListeners() {
1132
1369
  // meeting update listeners
@@ -1154,7 +1391,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1154
1391
  }, {
1155
1392
  key: "setUpLocusInfoMediaInactiveListener",
1156
1393
  value: function setUpLocusInfoMediaInactiveListener() {
1157
- var _this2 = this;
1394
+ var _this4 = this;
1158
1395
 
1159
1396
  // User gets kicked off the meeting due to inactivity or user did a refresh
1160
1397
  this.locusInfo.on(_constants.EVENTS.DISCONNECT_DUE_TO_INACTIVITY, function (res) {
@@ -1162,23 +1399,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1162
1399
  // TODO: send custom parameter explaining why the inactivity happened
1163
1400
  // refresh , no media or network got dsconnected or something else
1164
1401
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.DISCONNECT_DUE_TO_INACTIVITY, {
1165
- correlation_id: _this2.correlationId,
1166
- locus_id: _this2.locusId
1402
+ correlation_id: _this4.correlationId,
1403
+ locus_id: _this4.locusId
1167
1404
  }); // Upload logs on media inactivity
1168
1405
  // Normally media should not be inactive
1169
1406
 
1170
1407
 
1171
- _triggerProxy.default.trigger(_this2, {
1408
+ _triggerProxy.default.trigger(_this4, {
1172
1409
  file: 'meeting/index',
1173
1410
  function: 'setUpLocusInfoMediaInactiveListener'
1174
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this2);
1411
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this4);
1175
1412
 
1176
1413
  _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMediaInactiveListener --> Meeting disconnected due to inactivity: ".concat(res.reason));
1177
1414
 
1178
- if (_this2.config.reconnection.autoRejoin) {
1179
- _this2.reconnect();
1415
+ if (_this4.config.reconnection.autoRejoin) {
1416
+ _this4.reconnect();
1180
1417
  } else {
1181
- _triggerProxy.default.trigger(_this2, {
1418
+ _triggerProxy.default.trigger(_this4, {
1182
1419
  file: 'meeting/index',
1183
1420
  function: 'setUpLocusInfoMediaInactiveListener'
1184
1421
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_LEFT, res.reason);
@@ -1195,19 +1432,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1195
1432
  }, {
1196
1433
  key: "setUpLocusInfoAssignHostListener",
1197
1434
  value: function setUpLocusInfoAssignHostListener() {
1198
- var _this3 = this;
1435
+ var _this5 = this;
1199
1436
 
1200
1437
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_CAN_ASSIGN_HOST, function (payload) {
1201
- _triggerProxy.default.trigger(_this3, {
1438
+ _triggerProxy.default.trigger(_this5, {
1202
1439
  file: 'meeting/index',
1203
1440
  function: 'setUpLocusInfoAssignHostListener'
1204
1441
  }, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, {
1205
1442
  canAssignHost: payload.canAssignHost,
1206
- canLock: _this3.inMeetingActions.getCanLock(),
1207
- canUnlock: _this3.inMeetingActions.getCanUnlock()
1443
+ canLock: _this5.inMeetingActions.getCanLock(),
1444
+ canUnlock: _this5.inMeetingActions.getCanUnlock()
1208
1445
  });
1209
1446
 
1210
- _this3.inMeetingActions.setCanAssignHost(payload.canAssignHost);
1447
+ _this5.inMeetingActions.setCanAssignHost(payload.canAssignHost);
1211
1448
  });
1212
1449
  }
1213
1450
  /**
@@ -1220,10 +1457,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1220
1457
  }, {
1221
1458
  key: "setUpLocusFullStateListener",
1222
1459
  value: function setUpLocusFullStateListener() {
1223
- var _this4 = this;
1460
+ var _this6 = this;
1224
1461
 
1225
1462
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.FULL_STATE_MEETING_STATE_CHANGE, function (payload) {
1226
- _triggerProxy.default.trigger(_this4, {
1463
+ _triggerProxy.default.trigger(_this6, {
1227
1464
  file: 'meeting/index',
1228
1465
  function: 'setUpLocusFullStateListener'
1229
1466
  }, _constants.EVENT_TRIGGERS.MEETING_STATE_CHANGE, {
@@ -1231,7 +1468,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1231
1468
  });
1232
1469
  });
1233
1470
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.FULL_STATE_TYPE_UPDATE, function (payload) {
1234
- _this4.members.locusFullStateTypeUpdate(payload);
1471
+ _this6.members.locusFullStateTypeUpdate(payload);
1235
1472
  });
1236
1473
  }
1237
1474
  /**
@@ -1439,17 +1676,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1439
1676
  }, {
1440
1677
  key: "setUpLocusSelfListener",
1441
1678
  value: function setUpLocusSelfListener() {
1442
- var _this5 = this;
1679
+ var _this7 = this;
1443
1680
 
1444
1681
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_SELF, function (payload) {
1445
- _this5.members.locusSelfUpdate(payload);
1682
+ _this7.members.locusSelfUpdate(payload);
1446
1683
 
1447
- _this5.pstnUpdate(payload); // If user moved to a JOINED state and there is a pending floor grant trigger it
1684
+ _this7.pstnUpdate(payload); // If user moved to a JOINED state and there is a pending floor grant trigger it
1448
1685
 
1449
1686
 
1450
- if (_this5.floorGrantPending && payload.newSelf.state === _constants.MEETING_STATE.STATES.JOINED) {
1451
- _this5.share().then(function () {
1452
- _this5.floorGrantPending = false;
1687
+ if (_this7.floorGrantPending && payload.newSelf.state === _constants.MEETING_STATE.STATES.JOINED) {
1688
+ _this7.share().then(function () {
1689
+ _this7.floorGrantPending = false;
1453
1690
  });
1454
1691
  }
1455
1692
  });
@@ -1465,16 +1702,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1465
1702
  }, {
1466
1703
  key: "pstnUpdate",
1467
1704
  value: function pstnUpdate(payload) {
1468
- var _this6 = this;
1705
+ var _this8 = this;
1469
1706
 
1470
1707
  if (this.locusInfo.self) {
1471
1708
  var _payload$newSelf, _payload$newSelf2;
1472
1709
 
1473
1710
  var dialInPstnDevice = (_payload$newSelf = payload.newSelf) === null || _payload$newSelf === void 0 ? void 0 : _payload$newSelf.pstnDevices.find(function (device) {
1474
- return device.url === _this6.dialInUrl;
1711
+ return device.url === _this8.dialInUrl;
1475
1712
  });
1476
1713
  var dialOutPstnDevice = (_payload$newSelf2 = payload.newSelf) === null || _payload$newSelf2 === void 0 ? void 0 : _payload$newSelf2.pstnDevices.find(function (device) {
1477
- return device.url === _this6.dialOutUrl;
1714
+ return device.url === _this8.dialOutUrl;
1478
1715
  });
1479
1716
  var changed = false;
1480
1717
 
@@ -1529,10 +1766,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1529
1766
  }, {
1530
1767
  key: "setUpLocusHostListener",
1531
1768
  value: function setUpLocusHostListener() {
1532
- var _this7 = this;
1769
+ var _this9 = this;
1533
1770
 
1534
1771
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_HOST, function (payload) {
1535
- _this7.members.locusHostUpdate(payload);
1772
+ _this9.members.locusHostUpdate(payload);
1536
1773
  });
1537
1774
  }
1538
1775
  /**
@@ -1547,10 +1784,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1547
1784
  }, {
1548
1785
  key: "setUpLocusParticipantsListener",
1549
1786
  value: function setUpLocusParticipantsListener() {
1550
- var _this8 = this;
1787
+ var _this10 = this;
1551
1788
 
1552
1789
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_PARTICIPANTS, function (payload) {
1553
- _this8.members.locusParticipantsUpdate(payload);
1790
+ _this10.members.locusParticipantsUpdate(payload);
1554
1791
  });
1555
1792
  }
1556
1793
  /**
@@ -1569,12 +1806,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1569
1806
  }, {
1570
1807
  key: "setupLocusControlsListener",
1571
1808
  value: function setupLocusControlsListener() {
1572
- var _this9 = this;
1809
+ var _this11 = this;
1573
1810
 
1574
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED, function (_ref4) {
1575
- var state = _ref4.state,
1576
- modifiedBy = _ref4.modifiedBy,
1577
- lastModified = _ref4.lastModified;
1811
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED, function (_ref5) {
1812
+ var state = _ref5.state,
1813
+ modifiedBy = _ref5.modifiedBy,
1814
+ lastModified = _ref5.lastModified;
1578
1815
  var event;
1579
1816
 
1580
1817
  switch (state) {
@@ -1600,16 +1837,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1600
1837
  } // `RESUMED` state should be converted to `RECORDING` after triggering the event
1601
1838
 
1602
1839
 
1603
- _this9.recording = {
1840
+ _this11.recording = {
1604
1841
  state: state === _constants.RECORDING_STATE.RESUMED ? _constants.RECORDING_STATE.RECORDING : state,
1605
1842
  modifiedBy: modifiedBy,
1606
1843
  lastModified: lastModified
1607
1844
  };
1608
1845
 
1609
- _triggerProxy.default.trigger(_this9, {
1846
+ _triggerProxy.default.trigger(_this11, {
1610
1847
  file: 'meeting/index',
1611
1848
  function: 'setupLocusControlsListener'
1612
- }, event, _this9.recording);
1849
+ }, event, _this11.recording);
1613
1850
  });
1614
1851
  }
1615
1852
  /**
@@ -1624,7 +1861,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1624
1861
  }, {
1625
1862
  key: "setUpLocusMediaSharesListener",
1626
1863
  value: function setUpLocusMediaSharesListener() {
1627
- var _this10 = this;
1864
+ var _this12 = this;
1628
1865
 
1629
1866
  // Will get triggered on local and remote share
1630
1867
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, function (payload) {
@@ -1642,17 +1879,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1642
1879
  return;
1643
1880
  }
1644
1881
 
1645
- var newShareStatus = _this10.shareStatus; // REMOTE - check if remote started sharing
1882
+ var newShareStatus = _this12.shareStatus; // REMOTE - check if remote started sharing
1646
1883
 
1647
- if (_this10.selfId !== contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
1884
+ if (_this12.selfId !== contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
1648
1885
  // CONTENT - sharing content remote
1649
1886
  newShareStatus = _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE;
1650
1887
  } // LOCAL - check if we started sharing content
1651
- else if (_this10.selfId === contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
1652
- var _this10$mediaProperti;
1888
+ else if (_this12.selfId === contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
1889
+ var _this12$mediaProperti;
1653
1890
 
1654
- if (((_this10$mediaProperti = _this10.mediaProperties.shareTrack) === null || _this10$mediaProperti === void 0 ? void 0 : _this10$mediaProperti.readyState) === 'ended') {
1655
- _this10.stopShare({
1891
+ if (((_this12$mediaProperti = _this12.mediaProperties.shareTrack) === null || _this12$mediaProperti === void 0 ? void 0 : _this12$mediaProperti.readyState) === 'ended') {
1892
+ _this12.stopShare({
1656
1893
  skipSignalingCheck: true
1657
1894
  }).catch(function (error) {
1658
1895
  _loggerProxy.default.logger.log('Meeting:index#setUpLocusMediaSharesListener --> Error stopping share: ', error);
@@ -1672,14 +1909,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1672
1909
  newShareStatus = _constants.SHARE_STATUS.NO_SHARE;
1673
1910
  }
1674
1911
 
1675
- if (newShareStatus !== _this10.shareStatus) {
1676
- var oldShareStatus = _this10.shareStatus; // update our state before we send out any notifications
1912
+ if (newShareStatus !== _this12.shareStatus) {
1913
+ var oldShareStatus = _this12.shareStatus; // update our state before we send out any notifications
1677
1914
 
1678
- _this10.shareStatus = newShareStatus; // send out "stop" notifications for the old state
1915
+ _this12.shareStatus = newShareStatus; // send out "stop" notifications for the old state
1679
1916
 
1680
1917
  switch (oldShareStatus) {
1681
1918
  case _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE:
1682
- _triggerProxy.default.trigger(_this10, {
1919
+ _triggerProxy.default.trigger(_this12, {
1683
1920
  file: 'meetings/index',
1684
1921
  function: 'remoteShare'
1685
1922
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_REMOTE);
@@ -1687,7 +1924,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1687
1924
  break;
1688
1925
 
1689
1926
  case _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE:
1690
- _triggerProxy.default.trigger(_this10, {
1927
+ _triggerProxy.default.trigger(_this12, {
1691
1928
  file: 'meeting/index',
1692
1929
  function: 'stopFloorRequest'
1693
1930
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL, {
@@ -1697,7 +1934,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1697
1934
  break;
1698
1935
 
1699
1936
  case _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE:
1700
- _triggerProxy.default.trigger(_this10, {
1937
+ _triggerProxy.default.trigger(_this12, {
1701
1938
  file: 'meeting/index',
1702
1939
  function: 'stopWhiteboardShare'
1703
1940
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_WHITEBOARD);
@@ -1716,10 +1953,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1716
1953
  switch (newShareStatus) {
1717
1954
  case _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE:
1718
1955
  {
1719
- var _this10$mediaProperti2;
1956
+ var _this12$mediaProperti2;
1720
1957
 
1721
1958
  var sendStartedSharingRemote = function sendStartedSharingRemote() {
1722
- _triggerProxy.default.trigger(_this10, {
1959
+ _triggerProxy.default.trigger(_this12, {
1723
1960
  file: 'meetings/index',
1724
1961
  function: 'remoteShare'
1725
1962
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE, {
@@ -1728,12 +1965,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1728
1965
  }; // if a remote participant is stealing the presentation from us
1729
1966
 
1730
1967
 
1731
- if (!((_this10$mediaProperti2 = _this10.mediaProperties.mediaDirection) !== null && _this10$mediaProperti2 !== void 0 && _this10$mediaProperti2.sendShare) || oldShareStatus === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE) {
1968
+ if (!((_this12$mediaProperti2 = _this12.mediaProperties.mediaDirection) !== null && _this12$mediaProperti2 !== void 0 && _this12$mediaProperti2.sendShare) || oldShareStatus === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE) {
1732
1969
  sendStartedSharingRemote();
1733
1970
  } else {
1734
- _this10.updateShare({
1971
+ _this12.updateShare({
1735
1972
  sendShare: false,
1736
- receiveShare: _this10.mediaProperties.mediaDirection.receiveShare
1973
+ receiveShare: _this12.mediaProperties.mediaDirection.receiveShare
1737
1974
  }).finally(function () {
1738
1975
  sendStartedSharingRemote();
1739
1976
  });
@@ -1743,20 +1980,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1743
1980
  }
1744
1981
 
1745
1982
  case _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE:
1746
- _triggerProxy.default.trigger(_this10, {
1983
+ _triggerProxy.default.trigger(_this12, {
1747
1984
  file: 'meeting/index',
1748
1985
  function: 'share'
1749
1986
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_LOCAL);
1750
1987
 
1751
1988
  _metrics.default.postEvent({
1752
1989
  event: _config.eventType.LOCAL_SHARE_FLOOR_GRANTED,
1753
- meeting: _this10
1990
+ meeting: _this12
1754
1991
  });
1755
1992
 
1756
1993
  break;
1757
1994
 
1758
1995
  case _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE:
1759
- _triggerProxy.default.trigger(_this10, {
1996
+ _triggerProxy.default.trigger(_this12, {
1760
1997
  file: 'meeting/index',
1761
1998
  function: 'startWhiteboardShare'
1762
1999
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_WHITEBOARD, {
@@ -1766,7 +2003,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1766
2003
 
1767
2004
  _metrics.default.postEvent({
1768
2005
  event: _config.eventType.WHITEBOARD_SHARE_FLOOR_GRANTED,
1769
- meeting: _this10
2006
+ meeting: _this12
1770
2007
  });
1771
2008
 
1772
2009
  break;
@@ -1779,22 +2016,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1779
2016
  break;
1780
2017
  }
1781
2018
 
1782
- _this10.members.locusMediaSharesUpdate(payload);
2019
+ _this12.members.locusMediaSharesUpdate(payload);
1783
2020
  } else if (newShareStatus === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE) {
1784
2021
  // if we got here, then some remote participant has stolen
1785
2022
  // the presentation from another remote participant
1786
- _triggerProxy.default.trigger(_this10, {
2023
+ _triggerProxy.default.trigger(_this12, {
1787
2024
  file: 'meetings/index',
1788
2025
  function: 'remoteShare'
1789
2026
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE, {
1790
2027
  memberId: contentShare.beneficiaryId
1791
2028
  });
1792
2029
 
1793
- _this10.members.locusMediaSharesUpdate(payload);
2030
+ _this12.members.locusMediaSharesUpdate(payload);
1794
2031
  } else if (newShareStatus === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE) {
1795
2032
  // if we got here, then some remote participant has stolen
1796
2033
  // the presentation from another remote participant
1797
- _triggerProxy.default.trigger(_this10, {
2034
+ _triggerProxy.default.trigger(_this12, {
1798
2035
  file: 'meeting/index',
1799
2036
  function: 'startWhiteboardShare'
1800
2037
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_WHITEBOARD, {
@@ -1804,10 +2041,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1804
2041
 
1805
2042
  _metrics.default.postEvent({
1806
2043
  event: _config.eventType.WHITEBOARD_SHARE_FLOOR_GRANTED,
1807
- meeting: _this10
2044
+ meeting: _this12
1808
2045
  });
1809
2046
 
1810
- _this10.members.locusMediaSharesUpdate(payload);
2047
+ _this12.members.locusMediaSharesUpdate(payload);
1811
2048
  }
1812
2049
  });
1813
2050
  }
@@ -1822,15 +2059,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1822
2059
  }, {
1823
2060
  key: "setUpLocusUrlListener",
1824
2061
  value: function setUpLocusUrlListener() {
1825
- var _this11 = this;
2062
+ var _this13 = this;
1826
2063
 
1827
2064
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_URL, function (payload) {
1828
- var _this11$locusUrl;
2065
+ var _this13$locusUrl;
1829
2066
 
1830
- _this11.members.locusUrlUpdate(payload);
2067
+ _this13.members.locusUrlUpdate(payload);
1831
2068
 
1832
- _this11.locusUrl = payload;
1833
- _this11.locusId = (_this11$locusUrl = _this11.locusUrl) === null || _this11$locusUrl === void 0 ? void 0 : _this11$locusUrl.split('/').pop();
2069
+ _this13.locusUrl = payload;
2070
+ _this13.locusId = (_this13$locusUrl = _this13.locusUrl) === null || _this13$locusUrl === void 0 ? void 0 : _this13$locusUrl.split('/').pop();
1834
2071
  });
1835
2072
  }
1836
2073
  /**
@@ -1843,11 +2080,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1843
2080
  }, {
1844
2081
  key: "setUpLocusInfoMeetingInfoListener",
1845
2082
  value: function setUpLocusInfoMeetingInfoListener() {
1846
- var _this12 = this;
2083
+ var _this14 = this;
1847
2084
 
1848
2085
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_LOCKED, function (payload) {
1849
2086
  if (payload) {
1850
- _triggerProxy.default.trigger(_this12, {
2087
+ _triggerProxy.default.trigger(_this14, {
1851
2088
  file: 'meeting/index',
1852
2089
  function: 'setUpLocusInfoMeetingInfoListener'
1853
2090
  }, _constants.EVENT_TRIGGERS.MEETING_LOCKED, {
@@ -1857,7 +2094,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1857
2094
  });
1858
2095
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_UNLOCKED, function (payload) {
1859
2096
  if (payload) {
1860
- _triggerProxy.default.trigger(_this12, {
2097
+ _triggerProxy.default.trigger(_this14, {
1861
2098
  file: 'meeting/index',
1862
2099
  function: 'setUpLocusInfoMeetingInfoListener'
1863
2100
  }, _constants.EVENT_TRIGGERS.MEETING_UNLOCKED, {
@@ -1878,31 +2115,31 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1878
2115
  newCanUnlock = _util.default.canUserUnlock(payload.info.moderator, payload.info.policy);
1879
2116
  }
1880
2117
 
1881
- if (newCanLock && !_this12.inMeetingActions.canLock) {
1882
- _triggerProxy.default.trigger(_this12, {
2118
+ if (newCanLock && !_this14.inMeetingActions.canLock) {
2119
+ _triggerProxy.default.trigger(_this14, {
1883
2120
  file: 'meeting/index',
1884
2121
  function: 'setUpLocusInfoMeetingInfoListener'
1885
2122
  }, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, {
1886
2123
  canLock: true,
1887
2124
  canUnlock: false,
1888
- canAssignHost: _this12.inMeetingActions.getCanAssignHost()
2125
+ canAssignHost: _this14.inMeetingActions.getCanAssignHost()
1889
2126
  });
1890
2127
  }
1891
2128
 
1892
- if (newCanUnlock && !_this12.inMeetingActions.canUnlock || !newCanLock) {
1893
- _triggerProxy.default.trigger(_this12, {
2129
+ if (newCanUnlock && !_this14.inMeetingActions.canUnlock || !newCanLock) {
2130
+ _triggerProxy.default.trigger(_this14, {
1894
2131
  file: 'meeting/index',
1895
2132
  function: 'setUpLocusInfoMeetingInfoListener'
1896
2133
  }, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, {
1897
2134
  canLock: false,
1898
2135
  canUnlock: true,
1899
- canAssignHost: _this12.inMeetingActions.getCanAssignHost()
2136
+ canAssignHost: _this14.inMeetingActions.getCanAssignHost()
1900
2137
  });
1901
2138
  }
1902
2139
 
1903
- _this12.inMeetingActions.setCanLock(newCanLock || false);
2140
+ _this14.inMeetingActions.setCanLock(newCanLock || false);
1904
2141
 
1905
- _this12.inMeetingActions.setCanUnlock(newCanUnlock || false);
2142
+ _this14.inMeetingActions.setCanUnlock(newCanUnlock || false);
1906
2143
  }
1907
2144
  });
1908
2145
  }
@@ -1916,13 +2153,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1916
2153
  }, {
1917
2154
  key: "setUpLocusInfoSelfListener",
1918
2155
  value: function setUpLocusInfoSelfListener() {
1919
- var _this13 = this;
2156
+ var _this15 = this;
1920
2157
 
1921
2158
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED, function (payload) {
1922
- if (_this13.audio) {
1923
- _this13.audio.handleServerLocalUnmuteRequired(_this13);
2159
+ if (_this15.audio) {
2160
+ _this15.audio.handleServerLocalUnmuteRequired(_this15);
1924
2161
 
1925
- _triggerProxy.default.trigger(_this13, {
2162
+ _triggerProxy.default.trigger(_this15, {
1926
2163
  file: 'meeting/index',
1927
2164
  function: 'setUpLocusInfoSelfListener'
1928
2165
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS, {
@@ -1932,17 +2169,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1932
2169
  });
1933
2170
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED, function (payload) {
1934
2171
  if (payload) {
1935
- var _this13$audio;
2172
+ var _this15$audio;
1936
2173
 
1937
- if (_this13.audio) {
1938
- _this13.audio.handleServerRemoteMuteUpdate(payload.muted, payload.unmuteAllowed);
2174
+ if (_this15.audio) {
2175
+ _this15.audio.handleServerRemoteMuteUpdate(payload.muted, payload.unmuteAllowed);
1939
2176
  } // with "mute on entry" server will send us remote mute even if we don't have media configured,
1940
2177
  // so if being muted by others, always send the notification,
1941
2178
  // but if being unmuted, only send it if we are also locally unmuted
1942
2179
 
1943
2180
 
1944
- if (payload.muted || !((_this13$audio = _this13.audio) !== null && _this13$audio !== void 0 && _this13$audio.isMuted())) {
1945
- _triggerProxy.default.trigger(_this13, {
2181
+ if (payload.muted || !((_this15$audio = _this15.audio) !== null && _this15$audio !== void 0 && _this15$audio.isMuted())) {
2182
+ _triggerProxy.default.trigger(_this15, {
1946
2183
  file: 'meeting/index',
1947
2184
  function: 'setUpLocusInfoSelfListener'
1948
2185
  }, payload.muted ? _constants.EVENT_TRIGGERS.MEETING_SELF_MUTED_BY_OTHERS : _constants.EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS, {
@@ -1952,7 +2189,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1952
2189
  }
1953
2190
  });
1954
2191
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED, function (payload) {
1955
- _triggerProxy.default.trigger(_this13, {
2192
+ _triggerProxy.default.trigger(_this15, {
1956
2193
  file: 'meeting/index',
1957
2194
  function: 'setUpLocusInfoSelfListener'
1958
2195
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_REQUESTED_TO_UNMUTE, {
@@ -1961,7 +2198,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1961
2198
  });
1962
2199
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_UNADMITTED_GUEST, function (payload) {
1963
2200
  if (payload) {
1964
- _triggerProxy.default.trigger(_this13, {
2201
+ _triggerProxy.default.trigger(_this15, {
1965
2202
  file: 'meeting/index',
1966
2203
  function: 'setUpLocusInfoSelfListener'
1967
2204
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_LOBBY_WAITING, {
@@ -1970,13 +2207,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1970
2207
 
1971
2208
  _metrics.default.postEvent({
1972
2209
  event: _config.eventType.LOBBY_ENTERED,
1973
- meeting: _this13
2210
+ meeting: _this15
1974
2211
  });
1975
2212
  }
1976
2213
  });
1977
2214
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, function (payload) {
1978
2215
  if (payload) {
1979
- _triggerProxy.default.trigger(_this13, {
2216
+ _triggerProxy.default.trigger(_this15, {
1980
2217
  file: 'meeting/index',
1981
2218
  function: 'setUpLocusInfoSelfListener'
1982
2219
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_GUEST_ADMITTED, {
@@ -1985,35 +2222,35 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1985
2222
 
1986
2223
  _metrics.default.postEvent({
1987
2224
  event: _config.eventType.LOBBY_EXITED,
1988
- meeting: _this13
2225
+ meeting: _this15
1989
2226
  });
1990
2227
  }
1991
2228
  });
1992
2229
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, function () {
1993
2230
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_MEDIA_INACTIVE, {
1994
- correlation_id: _this13.correlationId,
1995
- locus_id: _this13.locusId
2231
+ correlation_id: _this15.correlationId,
2232
+ locus_id: _this15.locusId
1996
2233
  });
1997
2234
 
1998
- _this13.reconnect();
2235
+ _this15.reconnect();
1999
2236
  }); // There is two stats for mute one is the actual media being sent or received
2000
2237
  // The second on is if the audio is muted, we need to tell the statsAnalyzer when
2001
2238
  // the audio is muted or the user is not willing to send media
2002
2239
 
2003
2240
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_STATUS_CHANGE, function (status) {
2004
- if (_this13.statsAnalyzer) {
2005
- var _this13$mediaProperti, _this13$audio2, _this13$mediaProperti2, _this13$video, _this13$mediaProperti3, _this13$mediaProperti4, _this13$mediaProperti5, _this13$mediaProperti6;
2241
+ if (_this15.statsAnalyzer) {
2242
+ var _this15$mediaProperti, _this15$audio2, _this15$mediaProperti2, _this15$video, _this15$mediaProperti3, _this15$mediaProperti4, _this15$mediaProperti5, _this15$mediaProperti6;
2006
2243
 
2007
- _this13.statsAnalyzer.updateMediaStatus({
2244
+ _this15.statsAnalyzer.updateMediaStatus({
2008
2245
  actual: status,
2009
2246
  expected: {
2010
2247
  // We need to check what should be the actual direction of media
2011
- sendAudio: ((_this13$mediaProperti = _this13.mediaProperties.mediaDirection) === null || _this13$mediaProperti === void 0 ? void 0 : _this13$mediaProperti.sendAudio) && !((_this13$audio2 = _this13.audio) !== null && _this13$audio2 !== void 0 && _this13$audio2.isMuted()),
2012
- sendVideo: ((_this13$mediaProperti2 = _this13.mediaProperties.mediaDirection) === null || _this13$mediaProperti2 === void 0 ? void 0 : _this13$mediaProperti2.sendVideo) && !((_this13$video = _this13.video) !== null && _this13$video !== void 0 && _this13$video.isMuted()),
2013
- sendShare: (_this13$mediaProperti3 = _this13.mediaProperties.mediaDirection) === null || _this13$mediaProperti3 === void 0 ? void 0 : _this13$mediaProperti3.sendShare,
2014
- receiveAudio: (_this13$mediaProperti4 = _this13.mediaProperties.mediaDirection) === null || _this13$mediaProperti4 === void 0 ? void 0 : _this13$mediaProperti4.receiveAudio,
2015
- receiveVideo: (_this13$mediaProperti5 = _this13.mediaProperties.mediaDirection) === null || _this13$mediaProperti5 === void 0 ? void 0 : _this13$mediaProperti5.receiveVideo,
2016
- receiveShare: (_this13$mediaProperti6 = _this13.mediaProperties.mediaDirection) === null || _this13$mediaProperti6 === void 0 ? void 0 : _this13$mediaProperti6.receiveShare
2248
+ sendAudio: ((_this15$mediaProperti = _this15.mediaProperties.mediaDirection) === null || _this15$mediaProperti === void 0 ? void 0 : _this15$mediaProperti.sendAudio) && !((_this15$audio2 = _this15.audio) !== null && _this15$audio2 !== void 0 && _this15$audio2.isMuted()),
2249
+ sendVideo: ((_this15$mediaProperti2 = _this15.mediaProperties.mediaDirection) === null || _this15$mediaProperti2 === void 0 ? void 0 : _this15$mediaProperti2.sendVideo) && !((_this15$video = _this15.video) !== null && _this15$video !== void 0 && _this15$video.isMuted()),
2250
+ sendShare: (_this15$mediaProperti3 = _this15.mediaProperties.mediaDirection) === null || _this15$mediaProperti3 === void 0 ? void 0 : _this15$mediaProperti3.sendShare,
2251
+ receiveAudio: (_this15$mediaProperti4 = _this15.mediaProperties.mediaDirection) === null || _this15$mediaProperti4 === void 0 ? void 0 : _this15$mediaProperti4.receiveAudio,
2252
+ receiveVideo: (_this15$mediaProperti5 = _this15.mediaProperties.mediaDirection) === null || _this15$mediaProperti5 === void 0 ? void 0 : _this15$mediaProperti5.receiveVideo,
2253
+ receiveShare: (_this15$mediaProperti6 = _this15.mediaProperties.mediaDirection) === null || _this15$mediaProperti6 === void 0 ? void 0 : _this15$mediaProperti6.receiveShare
2017
2254
  }
2018
2255
  });
2019
2256
  }
@@ -2029,29 +2266,29 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2029
2266
  }, {
2030
2267
  key: "setUpLocusInfoMeetingListener",
2031
2268
  value: function setUpLocusInfoMeetingListener() {
2032
- var _this14 = this;
2269
+ var _this16 = this;
2033
2270
 
2034
2271
  this.locusInfo.on(_constants.EVENTS.REMOTE_RESPONSE, function (payload) {
2035
- _this14.meetingFiniteStateMachine.remote(payload);
2272
+ _this16.meetingFiniteStateMachine.remote(payload);
2036
2273
 
2037
2274
  if (payload.remoteDeclined) {
2038
- _this14.leave({
2275
+ _this16.leave({
2039
2276
  reason: payload.reason
2040
2277
  }).then(function () {
2041
2278
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Attempting to leave meeting.');
2042
2279
  }).catch(function (error) {
2043
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Issue with leave for meeting, meeting still in collection: ".concat(_this14.meeting, ", error: ").concat(error));
2280
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Issue with leave for meeting, meeting still in collection: ".concat(_this16.meeting, ", error: ").concat(error));
2044
2281
  });
2045
2282
  }
2046
2283
  });
2047
2284
  this.locusInfo.on(_constants.EVENTS.DESTROY_MEETING, function (payload) {
2048
2285
  // if self state is NOT left
2049
2286
  // TODO: Handle sharing and wireless sharing when meeting end
2050
- if (_this14.wirelessShare) {
2051
- if (_this14.mediaProperties.shareTrack) {
2052
- _this14.mediaProperties.shareTrack.onended = null;
2287
+ if (_this16.wirelessShare) {
2288
+ if (_this16.mediaProperties.shareTrack) {
2289
+ _this16.mediaProperties.shareTrack.onended = null;
2053
2290
 
2054
- _this14.mediaProperties.shareTrack.stop();
2291
+ _this16.mediaProperties.shareTrack.stop();
2055
2292
  }
2056
2293
  } // when multiple WEB deviceType join with same user
2057
2294
  // and some of the devices are joined and some are left
@@ -2065,24 +2302,24 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2065
2302
 
2066
2303
  if (payload.shouldLeave) {
2067
2304
  // TODO: We should do cleaning of meeting object if the shouldLeave: false because there might be meeting object which we are not cleaning
2068
- _this14.leave({
2305
+ _this16.leave({
2069
2306
  reason: payload.reason
2070
2307
  }).then(function () {
2071
2308
  _loggerProxy.default.logger.warn('Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. The meeting has been left, but has not been destroyed, you should see a later event for leave.');
2072
2309
  }).catch(function (error) {
2073
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this14.meeting, ", error: ").concat(error));
2310
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this16.meeting, ", error: ").concat(error));
2074
2311
  });
2075
2312
  } else {
2076
2313
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> MEETING_REMOVED_REASON', payload.reason);
2077
2314
 
2078
- _util.default.cleanUp(_this14);
2315
+ _util.default.cleanUp(_this16);
2079
2316
 
2080
- _triggerProxy.default.trigger(_this14, {
2317
+ _triggerProxy.default.trigger(_this16, {
2081
2318
  file: 'meeting/index',
2082
2319
  function: 'setUpLocusInfoMeetingListener'
2083
2320
  }, _constants.EVENTS.DESTROY_MEETING, {
2084
2321
  reason: payload.reason,
2085
- meetingId: _this14.id
2322
+ meetingId: _this16.id
2086
2323
  });
2087
2324
  }
2088
2325
  });
@@ -2099,14 +2336,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2099
2336
  }, {
2100
2337
  key: "updateMeetingObject",
2101
2338
  value: function updateMeetingObject(object) {
2102
- var _this15 = this;
2339
+ var _this17 = this;
2103
2340
 
2104
2341
  // Validate if these are valid meeting object property
2105
2342
  // TODO: add a check to make sure the value passed in the constructor
2106
2343
  // is not changed by any delta event
2107
2344
  if (object && (0, _keys.default)(object).length) {
2108
2345
  (0, _keys.default)(object).forEach(function (key) {
2109
- _this15[key] = object[key];
2346
+ _this17[key] = object[key];
2110
2347
  });
2111
2348
  }
2112
2349
  }
@@ -2238,7 +2475,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2238
2475
  }, {
2239
2476
  key: "startMediaQualityMetrics",
2240
2477
  value: function startMediaQualityMetrics() {
2241
- var _this16 = this;
2478
+ var _this18 = this;
2242
2479
 
2243
2480
  var automaticMetrics = new _metrics2.default({
2244
2481
  config: this.config
@@ -2247,7 +2484,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2247
2484
  this.mediaQualityMetrics = automaticMetrics;
2248
2485
  this.mediaQualityMetrics.setStats(stats);
2249
2486
  this.mqaInterval = setInterval(function () {
2250
- return _this16.processMQAData();
2487
+ return _this18.processMQAData();
2251
2488
  }, this.config.metrics.mqaMetricsInterval);
2252
2489
  return automaticMetrics;
2253
2490
  }
@@ -2260,20 +2497,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2260
2497
  }, {
2261
2498
  key: "processMQAData",
2262
2499
  value: function processMQAData() {
2263
- var _this17 = this;
2500
+ var _this19 = this;
2264
2501
 
2265
2502
  if (!this.mqaProcessor) {
2266
2503
  this.mqaProcessor = new _mqaProcessor.default();
2267
2504
  }
2268
2505
 
2269
2506
  _constants.MQA_STATS.DATA_PLACEMENTS.forEach(function (key) {
2270
- if (_this17.mediaQualityMetrics && _this17.mediaQualityMetrics.stats) {
2507
+ if (_this19.mediaQualityMetrics && _this19.mediaQualityMetrics.stats) {
2271
2508
  var sendRecvData;
2272
2509
 
2273
2510
  if (key.toLowerCase().endsWith(_constants.STATS.SENDER)) {
2274
- sendRecvData = _this17.mediaQualityMetrics.stats.getSender(key);
2511
+ sendRecvData = _this19.mediaQualityMetrics.stats.getSender(key);
2275
2512
  } else if (key.toLowerCase().endsWith(_constants.STATS.RECEIVER)) {
2276
- sendRecvData = _this17.mediaQualityMetrics.stats.getReceiver(key);
2513
+ sendRecvData = _this19.mediaQualityMetrics.stats.getReceiver(key);
2277
2514
  }
2278
2515
 
2279
2516
  var mqa;
@@ -2283,9 +2520,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2283
2520
  }
2284
2521
 
2285
2522
  if (mqa) {
2286
- var interval = mqa.getSlice(_this17.config.metrics.mqaMetricsInterval / 1000); // milliseconds -> second based intervals
2523
+ var interval = mqa.getSlice(_this19.config.metrics.mqaMetricsInterval / 1000); // milliseconds -> second based intervals
2287
2524
 
2288
- _this17.mqaProcessor.process(key, interval);
2525
+ _this19.mqaProcessor.process(key, interval);
2289
2526
  }
2290
2527
  }
2291
2528
  });
@@ -2552,7 +2789,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2552
2789
  }, {
2553
2790
  key: "setRemoteStream",
2554
2791
  value: function setRemoteStream(pc) {
2555
- var _this18 = this;
2792
+ var _this20 = this;
2556
2793
 
2557
2794
  if (!pc) {
2558
2795
  return;
@@ -2595,8 +2832,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2595
2832
  trackMediaID = null;
2596
2833
 
2597
2834
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MUTE_AUDIO_FAILURE, {
2598
- correlation_id: _this18.correlationId,
2599
- locus_id: _this18.locusUrl.split('/').pop()
2835
+ correlation_id: _this20.correlationId,
2836
+ locus_id: _this20.locusUrl.split('/').pop()
2600
2837
  });
2601
2838
  }
2602
2839
  }
@@ -2605,14 +2842,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2605
2842
  case MEDIA_ID.AUDIO_TRACK:
2606
2843
  eventType = _constants.EVENT_TYPES.REMOTE_AUDIO;
2607
2844
 
2608
- _this18.mediaProperties.setRemoteAudioTrack(mediaTrack);
2845
+ _this20.mediaProperties.setRemoteAudioTrack(mediaTrack);
2609
2846
 
2610
2847
  break;
2611
2848
 
2612
2849
  case MEDIA_ID.VIDEO_TRACK:
2613
2850
  eventType = _constants.EVENT_TYPES.REMOTE_VIDEO;
2614
2851
 
2615
- _this18.mediaProperties.setRemoteVideoTrack(mediaTrack);
2852
+ _this20.mediaProperties.setRemoteVideoTrack(mediaTrack);
2616
2853
 
2617
2854
  break;
2618
2855
 
@@ -2620,7 +2857,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2620
2857
  if (event.track) {
2621
2858
  eventType = _constants.EVENT_TYPES.REMOTE_SHARE;
2622
2859
 
2623
- _this18.mediaProperties.setRemoteShare(mediaTrack);
2860
+ _this20.mediaProperties.setRemoteShare(mediaTrack);
2624
2861
  }
2625
2862
 
2626
2863
  break;
@@ -2632,10 +2869,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2632
2869
  } // start stats here the stats are coming null if you dont receive streams
2633
2870
 
2634
2871
 
2635
- _this18.statsAnalyzer.startAnalyzer(_this18.mediaProperties.peerConnection);
2872
+ _this20.statsAnalyzer.startAnalyzer(_this20.mediaProperties.peerConnection);
2636
2873
 
2637
2874
  if (eventType && mediaTrack) {
2638
- _triggerProxy.default.trigger(_this18, {
2875
+ _triggerProxy.default.trigger(_this20, {
2639
2876
  file: 'meeting/index',
2640
2877
  function: 'setRemoteStream:pc.ontrack'
2641
2878
  }, _constants.EVENT_TRIGGERS.MEDIA_READY, {
@@ -2715,7 +2952,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2715
2952
  }, {
2716
2953
  key: "closeRemoteTracks",
2717
2954
  value: function closeRemoteTracks() {
2718
- var _this19 = this;
2955
+ var _this21 = this;
2719
2956
 
2720
2957
  var _this$mediaProperties = this.mediaProperties,
2721
2958
  remoteAudioTrack = _this$mediaProperties.remoteAudioTrack,
@@ -2729,7 +2966,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2729
2966
  */
2730
2967
 
2731
2968
  var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
2732
- _triggerProxy.default.trigger(_this19, {
2969
+ _triggerProxy.default.trigger(_this21, {
2733
2970
  file: 'meeting/index',
2734
2971
  function: 'closeRemoteTracks'
2735
2972
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -2884,7 +3121,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2884
3121
  }, {
2885
3122
  key: "setLocalShareTrack",
2886
3123
  value: function setLocalShareTrack(localShare) {
2887
- var _this20 = this;
3124
+ var _this22 = this;
2888
3125
 
2889
3126
  var settings = null;
2890
3127
 
@@ -2907,7 +3144,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2907
3144
  }
2908
3145
 
2909
3146
  contentTracks.onended = function () {
2910
- return _this20.handleShareTrackEnded(localShare);
3147
+ return _this22.handleShareTrackEnded(localShare);
2911
3148
  };
2912
3149
 
2913
3150
  _triggerProxy.default.trigger(this, {
@@ -2930,7 +3167,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2930
3167
  }, {
2931
3168
  key: "closeLocalStream",
2932
3169
  value: function closeLocalStream() {
2933
- var _this21 = this;
3170
+ var _this23 = this;
2934
3171
 
2935
3172
  var _this$mediaProperties2 = this.mediaProperties,
2936
3173
  audioTrack = _this$mediaProperties2.audioTrack,
@@ -2942,7 +3179,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2942
3179
  var videoStopped = videoTrack && videoTrack.readyState === _constants.ENDED;
2943
3180
 
2944
3181
  if (audioStopped && videoStopped) {
2945
- _triggerProxy.default.trigger(_this21, {
3182
+ _triggerProxy.default.trigger(_this23, {
2946
3183
  file: 'meeting/index',
2947
3184
  function: 'closeLocalStream'
2948
3185
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -2964,12 +3201,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2964
3201
  }, {
2965
3202
  key: "closeLocalShare",
2966
3203
  value: function closeLocalShare() {
2967
- var _this22 = this;
3204
+ var _this24 = this;
2968
3205
 
2969
3206
  var track = this.mediaProperties.shareTrack;
2970
3207
  return _media.default.stopTracks(track).then(function () {
2971
3208
  if (track && track.readyState === _constants.ENDED) {
2972
- _triggerProxy.default.trigger(_this22, {
3209
+ _triggerProxy.default.trigger(_this24, {
2973
3210
  file: 'meeting/index',
2974
3211
  function: 'closeLocalShare'
2975
3212
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -3015,7 +3252,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3015
3252
  }, {
3016
3253
  key: "setMercuryListener",
3017
3254
  value: function setMercuryListener() {
3018
- var _this23 = this;
3255
+ var _this25 = this;
3019
3256
 
3020
3257
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
3021
3258
  // if the meeting has active peer connections, it should try to reconnect.
@@ -3023,25 +3260,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3023
3260
  _loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online'); // Only send restore event when it was disconnected before and for connected later
3024
3261
 
3025
3262
 
3026
- if (!_this23.hasWebsocketConnected) {
3263
+ if (!_this25.hasWebsocketConnected) {
3027
3264
  _metrics.default.postEvent({
3028
3265
  event: _config.eventType.MERCURY_CONNECTION_RESTORED,
3029
- meeting: _this23
3266
+ meeting: _this25
3030
3267
  });
3031
3268
  }
3032
3269
 
3033
- _this23.hasWebsocketConnected = true;
3270
+ _this25.hasWebsocketConnected = true;
3034
3271
  });
3035
3272
  this.webex.internal.mercury.on(_constants.OFFLINE, function () {
3036
3273
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
3037
3274
 
3038
3275
  _metrics.default.postEvent({
3039
3276
  event: _config.eventType.MERCURY_CONNECTION_LOST,
3040
- meeting: _this23
3277
+ meeting: _this25
3041
3278
  });
3042
3279
 
3043
3280
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MERCURY_CONNECTION_FAILURE, {
3044
- correlation_id: _this23.correlationId
3281
+ correlation_id: _this25.correlationId
3045
3282
  });
3046
3283
  });
3047
3284
  }
@@ -3099,7 +3336,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3099
3336
  }, {
3100
3337
  key: "muteAudio",
3101
3338
  value: function muteAudio() {
3102
- var _this24 = this;
3339
+ var _this26 = this;
3103
3340
 
3104
3341
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3105
3342
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
@@ -3117,11 +3354,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3117
3354
  var LOG_HEADER = 'Meeting:index#muteAudio -->'; // First, stop sending the local audio media
3118
3355
 
3119
3356
  return logRequest(this.audio.handleClientRequest(this, true).then(function () {
3120
- _util.default.handleAudioLogging(_this24.mediaProperties.audioTrack);
3357
+ _util.default.handleAudioLogging(_this26.mediaProperties.audioTrack);
3121
3358
 
3122
3359
  _metrics.default.postEvent({
3123
3360
  event: _config.eventType.MUTED,
3124
- meeting: _this24,
3361
+ meeting: _this26,
3125
3362
  data: {
3126
3363
  trigger: _config.trigger.USER_INTERACTION,
3127
3364
  mediaType: _config.mediaType.AUDIO
@@ -3129,8 +3366,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3129
3366
  });
3130
3367
  }).catch(function (error) {
3131
3368
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MUTE_AUDIO_FAILURE, {
3132
- correlation_id: _this24.correlationId,
3133
- locus_id: _this24.locusUrl.split('/').pop(),
3369
+ correlation_id: _this26.correlationId,
3370
+ locus_id: _this26.locusUrl.split('/').pop(),
3134
3371
  reason: error.message,
3135
3372
  stack: error.stack
3136
3373
  });
@@ -3152,7 +3389,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3152
3389
  }, {
3153
3390
  key: "unmuteAudio",
3154
3391
  value: function unmuteAudio() {
3155
- var _this25 = this;
3392
+ var _this27 = this;
3156
3393
 
3157
3394
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3158
3395
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
@@ -3170,11 +3407,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3170
3407
  var LOG_HEADER = 'Meeting:index#unmuteAudio -->'; // First, send the control to unmute the participant on the server
3171
3408
 
3172
3409
  return logRequest(this.audio.handleClientRequest(this, false).then(function () {
3173
- _util.default.handleAudioLogging(_this25.mediaProperties.audioTrack);
3410
+ _util.default.handleAudioLogging(_this27.mediaProperties.audioTrack);
3174
3411
 
3175
3412
  _metrics.default.postEvent({
3176
3413
  event: _config.eventType.UNMUTED,
3177
- meeting: _this25,
3414
+ meeting: _this27,
3178
3415
  data: {
3179
3416
  trigger: _config.trigger.USER_INTERACTION,
3180
3417
  mediaType: _config.mediaType.AUDIO
@@ -3182,8 +3419,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3182
3419
  });
3183
3420
  }).catch(function (error) {
3184
3421
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.UNMUTE_AUDIO_FAILURE, {
3185
- correlation_id: _this25.correlationId,
3186
- locus_id: _this25.locusUrl.split('/').pop(),
3422
+ correlation_id: _this27.correlationId,
3423
+ locus_id: _this27.locusUrl.split('/').pop(),
3187
3424
  reason: error.message,
3188
3425
  stack: error.stack
3189
3426
  });
@@ -3205,7 +3442,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3205
3442
  }, {
3206
3443
  key: "muteVideo",
3207
3444
  value: function muteVideo() {
3208
- var _this26 = this;
3445
+ var _this28 = this;
3209
3446
 
3210
3447
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3211
3448
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
@@ -3222,11 +3459,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3222
3459
 
3223
3460
  var LOG_HEADER = 'Meeting:index#muteVideo -->';
3224
3461
  return logRequest(this.video.handleClientRequest(this, true).then(function () {
3225
- _util.default.handleVideoLogging(_this26.mediaProperties.videoTrack);
3462
+ _util.default.handleVideoLogging(_this28.mediaProperties.videoTrack);
3226
3463
 
3227
3464
  _metrics.default.postEvent({
3228
3465
  event: _config.eventType.MUTED,
3229
- meeting: _this26,
3466
+ meeting: _this28,
3230
3467
  data: {
3231
3468
  trigger: _config.trigger.USER_INTERACTION,
3232
3469
  mediaType: _config.mediaType.VIDEO
@@ -3234,8 +3471,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3234
3471
  });
3235
3472
  }).catch(function (error) {
3236
3473
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MUTE_VIDEO_FAILURE, {
3237
- correlation_id: _this26.correlationId,
3238
- locus_id: _this26.locusUrl.split('/').pop(),
3474
+ correlation_id: _this28.correlationId,
3475
+ locus_id: _this28.locusUrl.split('/').pop(),
3239
3476
  reason: error.message,
3240
3477
  stack: error.stack
3241
3478
  });
@@ -3257,7 +3494,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3257
3494
  }, {
3258
3495
  key: "unmuteVideo",
3259
3496
  value: function unmuteVideo() {
3260
- var _this27 = this;
3497
+ var _this29 = this;
3261
3498
 
3262
3499
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3263
3500
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
@@ -3274,11 +3511,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3274
3511
 
3275
3512
  var LOG_HEADER = 'Meeting:index#unmuteVideo -->';
3276
3513
  return logRequest(this.video.handleClientRequest(this, false).then(function () {
3277
- _util.default.handleVideoLogging(_this27.mediaProperties.videoTrack);
3514
+ _util.default.handleVideoLogging(_this29.mediaProperties.videoTrack);
3278
3515
 
3279
3516
  _metrics.default.postEvent({
3280
3517
  event: _config.eventType.UNMUTED,
3281
- meeting: _this27,
3518
+ meeting: _this29,
3282
3519
  data: {
3283
3520
  trigger: _config.trigger.USER_INTERACTION,
3284
3521
  mediaType: _config.mediaType.VIDEO
@@ -3286,8 +3523,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3286
3523
  });
3287
3524
  }).catch(function (error) {
3288
3525
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.UNMUTE_VIDEO_FAILURE, {
3289
- correlation_id: _this27.correlationId,
3290
- locus_id: _this27.locusUrl.split('/').pop(),
3526
+ correlation_id: _this29.correlationId,
3527
+ locus_id: _this29.locusUrl.split('/').pop(),
3291
3528
  reason: error.message,
3292
3529
  stack: error.stack
3293
3530
  });
@@ -3328,7 +3565,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3328
3565
  }, {
3329
3566
  key: "joinWithMedia",
3330
3567
  value: function joinWithMedia() {
3331
- var _this28 = this;
3568
+ var _this30 = this;
3332
3569
 
3333
3570
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3334
3571
  // TODO: add validations for parameters
@@ -3336,12 +3573,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3336
3573
  joinOptions = options.joinOptions,
3337
3574
  audioVideoOptions = options.audioVideoOptions;
3338
3575
  return this.join(joinOptions).then(function (joinResponse) {
3339
- return _this28.getMediaStreams(mediaSettings, audioVideoOptions).then(function (_ref5) {
3340
- var _ref6 = (0, _slicedToArray2.default)(_ref5, 2),
3341
- localStream = _ref6[0],
3342
- localShare = _ref6[1];
3576
+ return _this30.getMediaStreams(mediaSettings, audioVideoOptions).then(function (_ref6) {
3577
+ var _ref7 = (0, _slicedToArray2.default)(_ref6, 2),
3578
+ localStream = _ref7[0],
3579
+ localShare = _ref7[1];
3343
3580
 
3344
- return _this28.addMedia({
3581
+ return _this30.addMedia({
3345
3582
  mediaSettings: mediaSettings,
3346
3583
  localShare: localShare,
3347
3584
  localStream: localStream
@@ -3357,8 +3594,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3357
3594
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', error);
3358
3595
 
3359
3596
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.JOIN_WITH_MEDIA_FAILURE, {
3360
- correlation_id: _this28.correlationId,
3361
- locus_id: _this28.locusUrl.split('/').pop(),
3597
+ correlation_id: _this30.correlationId,
3598
+ locus_id: _this30.locusUrl.split('/').pop(),
3362
3599
  reason: error.message,
3363
3600
  stack: error.stack
3364
3601
  }, {
@@ -3380,7 +3617,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3380
3617
  }, {
3381
3618
  key: "reconnect",
3382
3619
  value: function reconnect(options) {
3383
- var _this29 = this;
3620
+ var _this31 = this;
3384
3621
 
3385
3622
  _loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
3386
3623
 
@@ -3413,14 +3650,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3413
3650
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING);
3414
3651
 
3415
3652
  return this.reconnectionManager.reconnect(options).then(function () {
3416
- _triggerProxy.default.trigger(_this29, {
3653
+ _triggerProxy.default.trigger(_this31, {
3417
3654
  file: 'meeting/index',
3418
3655
  function: 'reconnect'
3419
3656
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_SUCCESS);
3420
3657
 
3421
3658
  _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
3422
3659
  }).catch(function (error) {
3423
- _triggerProxy.default.trigger(_this29, {
3660
+ _triggerProxy.default.trigger(_this31, {
3424
3661
  file: 'meeting/index',
3425
3662
  function: 'reconnect'
3426
3663
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_FAILURE, {
@@ -3430,20 +3667,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3430
3667
  _loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
3431
3668
 
3432
3669
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_RECONNECT_FAILURE, {
3433
- correlation_id: _this29.correlationId,
3434
- locus_id: _this29.locusUrl.split('/').pop(),
3670
+ correlation_id: _this31.correlationId,
3671
+ locus_id: _this31.locusUrl.split('/').pop(),
3435
3672
  reason: error.message,
3436
3673
  stack: error.stack
3437
3674
  });
3438
3675
 
3439
- _this29.uploadLogs({
3676
+ _this31.uploadLogs({
3440
3677
  file: 'meeting/index',
3441
3678
  function: 'reconnect'
3442
3679
  });
3443
3680
 
3444
3681
  return _promise.default.reject(new _reconnection.default('Reconnection failure event', error));
3445
3682
  }).finally(function () {
3446
- _this29.reconnectionManager.reset();
3683
+ _this31.reconnectionManager.reset();
3447
3684
  });
3448
3685
  }
3449
3686
  /**
@@ -3474,20 +3711,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3474
3711
  }, {
3475
3712
  key: "monitorTranscriptionSocketConnection",
3476
3713
  value: function monitorTranscriptionSocketConnection() {
3477
- var _this30 = this;
3714
+ var _this32 = this;
3478
3715
 
3479
3716
  this.transcription.onCloseSocket(function (event) {
3480
3717
  _loggerProxy.default.logger.info("Meeting:index#onCloseSocket -->\n unable to continue receiving transcription;\n low-latency mercury web socket connection is closed now.\n ".concat(event));
3481
3718
 
3482
- _this30.triggerStopReceivingTranscriptionEvent();
3719
+ _this32.triggerStopReceivingTranscriptionEvent();
3483
3720
  });
3484
3721
  this.transcription.onErrorSocket(function (event) {
3485
3722
  _loggerProxy.default.logger.error("Meeting:index#onErrorSocket -->\n unable to continue receiving transcription;\n low-latency mercury web socket connection error had occured.\n ".concat(event));
3486
3723
 
3487
- _this30.triggerStopReceivingTranscriptionEvent();
3724
+ _this32.triggerStopReceivingTranscriptionEvent();
3488
3725
 
3489
3726
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.RECEIVE_TRANSCRIPTION_FAILURE, {
3490
- correlation_id: _this30.correlationId,
3727
+ correlation_id: _this32.correlationId,
3491
3728
  reason: 'unexpected error: transcription LLM web socket connection error had occured.',
3492
3729
  event: event
3493
3730
  });
@@ -3502,20 +3739,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3502
3739
  }, {
3503
3740
  key: "receiveTranscription",
3504
3741
  value: function () {
3505
- var _receiveTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
3506
- var _this31 = this;
3742
+ var _receiveTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
3743
+ var _this33 = this;
3507
3744
 
3508
3745
  var datachannelUrl, _yield$this$request, webSocketUrl;
3509
3746
 
3510
- return _regenerator.default.wrap(function _callee$(_context) {
3747
+ return _regenerator.default.wrap(function _callee2$(_context2) {
3511
3748
  while (1) {
3512
- switch (_context.prev = _context.next) {
3749
+ switch (_context2.prev = _context2.next) {
3513
3750
  case 0:
3514
3751
  _loggerProxy.default.logger.info("Meeting:index#receiveTranscription -->\n Attempting to generate a web socket url.");
3515
3752
 
3516
- _context.prev = 1;
3753
+ _context2.prev = 1;
3517
3754
  datachannelUrl = this.locusInfo.info.datachannelUrl;
3518
- _context.next = 5;
3755
+ _context2.next = 5;
3519
3756
  return this.request({
3520
3757
  method: _constants.HTTP_VERBS.POST,
3521
3758
  uri: datachannelUrl,
@@ -3525,7 +3762,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3525
3762
  });
3526
3763
 
3527
3764
  case 5:
3528
- _yield$this$request = _context.sent;
3765
+ _yield$this$request = _context2.sent;
3529
3766
  webSocketUrl = _yield$this$request.body.webSocketUrl;
3530
3767
 
3531
3768
  _loggerProxy.default.logger.info("Meeting:index#receiveTranscription -->\n Generated web socket url succesfully.");
@@ -3536,34 +3773,34 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3536
3773
 
3537
3774
 
3538
3775
  this.transcription.subscribe(function (payload) {
3539
- _triggerProxy.default.trigger(_this31, {
3776
+ _triggerProxy.default.trigger(_this33, {
3540
3777
  file: 'meeting/index',
3541
3778
  function: 'join'
3542
3779
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION, payload);
3543
3780
  });
3544
3781
  this.monitorTranscriptionSocketConnection();
3545
3782
  this.transcription.connect(this.webex.credentials.supertoken.access_token);
3546
- _context.next = 19;
3783
+ _context2.next = 19;
3547
3784
  break;
3548
3785
 
3549
3786
  case 15:
3550
- _context.prev = 15;
3551
- _context.t0 = _context["catch"](1);
3787
+ _context2.prev = 15;
3788
+ _context2.t0 = _context2["catch"](1);
3552
3789
 
3553
- _loggerProxy.default.logger.error("Meeting:index#receiveTranscription --> ".concat(_context.t0));
3790
+ _loggerProxy.default.logger.error("Meeting:index#receiveTranscription --> ".concat(_context2.t0));
3554
3791
 
3555
3792
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.RECEIVE_TRANSCRIPTION_FAILURE, {
3556
3793
  correlation_id: this.correlationId,
3557
- reason: _context.t0.message,
3558
- stack: _context.t0.stack
3794
+ reason: _context2.t0.message,
3795
+ stack: _context2.t0.stack
3559
3796
  });
3560
3797
 
3561
3798
  case 19:
3562
3799
  case "end":
3563
- return _context.stop();
3800
+ return _context2.stop();
3564
3801
  }
3565
3802
  }
3566
- }, _callee, this, [[1, 15]]);
3803
+ }, _callee2, this, [[1, 15]]);
3567
3804
  }));
3568
3805
 
3569
3806
  function receiveTranscription() {
@@ -3618,7 +3855,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3618
3855
  }, {
3619
3856
  key: "join",
3620
3857
  value: function join() {
3621
- var _this32 = this;
3858
+ var _this34 = this;
3622
3859
 
3623
3860
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3624
3861
 
@@ -3637,13 +3874,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3637
3874
  joinSuccess = resolve;
3638
3875
  });
3639
3876
 
3640
- _loggerProxy.default.logger.log("Meeting:index#join --> Generating a new correlation id for meeting ".concat(this.id));
3877
+ if (this.isCreated) {
3878
+ this.isCreated = false;
3879
+ } else {
3880
+ _loggerProxy.default.logger.log("Meeting:index#join --> Generating a new correlation id for meeting ".concat(this.id));
3641
3881
 
3642
- _loggerProxy.default.logger.log("Meeting:index#join --> Previous correlation id ".concat(this.correlationId));
3882
+ _loggerProxy.default.logger.log("Meeting:index#join --> Previous correlation id ".concat(this.correlationId));
3643
3883
 
3644
- this.setCorrelationId(_uuid.default.v4());
3884
+ this.setCorrelationId(_uuid.default.v4());
3645
3885
 
3646
- _loggerProxy.default.logger.log("Meeting:index#join --> New correlation id ".concat(this.correlationId));
3886
+ _loggerProxy.default.logger.log("Meeting:index#join --> New correlation id ".concat(this.correlationId));
3887
+ }
3647
3888
 
3648
3889
  if (options.rejoin) {
3649
3890
  this.meetingFiniteStateMachine.reset();
@@ -3717,85 +3958,85 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3717
3958
  }
3718
3959
 
3719
3960
  return _util.default.joinMeetingOptions(this, options).then(function (join) {
3720
- _this32.meetingFiniteStateMachine.join();
3961
+ _this34.meetingFiniteStateMachine.join();
3721
3962
 
3722
3963
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
3723
3964
 
3724
3965
  return join;
3725
3966
  }).then(function (join) {
3726
3967
  joinSuccess(join);
3727
- _this32.deferJoin = undefined;
3968
+ _this34.deferJoin = undefined;
3728
3969
  return join;
3729
3970
  }).then( /*#__PURE__*/function () {
3730
- var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(join) {
3731
- return _regenerator.default.wrap(function _callee2$(_context2) {
3971
+ var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(join) {
3972
+ return _regenerator.default.wrap(function _callee3$(_context3) {
3732
3973
  while (1) {
3733
- switch (_context2.prev = _context2.next) {
3974
+ switch (_context3.prev = _context3.next) {
3734
3975
  case 0:
3735
3976
  if (!isBrowser) {
3736
- _context2.next = 8;
3977
+ _context3.next = 8;
3737
3978
  break;
3738
3979
  }
3739
3980
 
3740
- if (!(_this32.config.receiveTranscription || options.receiveTranscription)) {
3741
- _context2.next = 6;
3981
+ if (!(_this34.config.receiveTranscription || options.receiveTranscription)) {
3982
+ _context3.next = 6;
3742
3983
  break;
3743
3984
  }
3744
3985
 
3745
- if (!_this32.isTranscriptionSupported()) {
3746
- _context2.next = 6;
3986
+ if (!_this34.isTranscriptionSupported()) {
3987
+ _context3.next = 6;
3747
3988
  break;
3748
3989
  }
3749
3990
 
3750
- _context2.next = 5;
3751
- return _this32.receiveTranscription();
3991
+ _context3.next = 5;
3992
+ return _this34.receiveTranscription();
3752
3993
 
3753
3994
  case 5:
3754
3995
  _loggerProxy.default.logger.info('Meeting:index#join --> enabled to recieve transcription!');
3755
3996
 
3756
3997
  case 6:
3757
- _context2.next = 9;
3998
+ _context3.next = 9;
3758
3999
  break;
3759
4000
 
3760
4001
  case 8:
3761
4002
  _loggerProxy.default.logger.error('Meeting:index#join --> Receving transcription is not supported on this platform');
3762
4003
 
3763
4004
  case 9:
3764
- return _context2.abrupt("return", join);
4005
+ return _context3.abrupt("return", join);
3765
4006
 
3766
4007
  case 10:
3767
4008
  case "end":
3768
- return _context2.stop();
4009
+ return _context3.stop();
3769
4010
  }
3770
4011
  }
3771
- }, _callee2);
4012
+ }, _callee3);
3772
4013
  }));
3773
4014
 
3774
- return function (_x) {
3775
- return _ref7.apply(this, arguments);
4015
+ return function (_x2) {
4016
+ return _ref8.apply(this, arguments);
3776
4017
  };
3777
4018
  }()).catch(function (error) {
3778
4019
  var _error$error;
3779
4020
 
3780
- _this32.meetingFiniteStateMachine.fail(error);
4021
+ _this34.meetingFiniteStateMachine.fail(error);
3781
4022
 
3782
4023
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error); // TODO: change this to error codes and pre defined dictionary
3783
4024
 
3784
4025
 
3785
4026
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.JOIN_FAILURE, {
3786
- correlation_id: _this32.correlationId,
4027
+ correlation_id: _this34.correlationId,
3787
4028
  reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
3788
4029
  stack: error.stack
3789
4030
  }); // Upload logs on join Failure
3790
4031
 
3791
4032
 
3792
- _triggerProxy.default.trigger(_this32, {
4033
+ _triggerProxy.default.trigger(_this34, {
3793
4034
  file: 'meeting/index',
3794
4035
  function: 'join'
3795
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this32);
4036
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this34);
3796
4037
 
3797
4038
  joinFailed(error);
3798
- _this32.deferJoin = undefined;
4039
+ _this34.deferJoin = undefined;
3799
4040
  return _promise.default.reject(error);
3800
4041
  });
3801
4042
  }
@@ -3839,7 +4080,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3839
4080
  }, {
3840
4081
  key: "dialInPstn",
3841
4082
  value: function dialInPstn() {
3842
- var _this33 = this;
4083
+ var _this35 = this;
3843
4084
 
3844
4085
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
3845
4086
 
@@ -3852,15 +4093,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3852
4093
  locusUrl: locusUrl,
3853
4094
  clientUrl: this.deviceUrl
3854
4095
  }).then(function (res) {
3855
- _this33.locusInfo.onFullLocus(res.body.locus);
4096
+ _this35.locusInfo.onFullLocus(res.body.locus);
3856
4097
  }).catch(function (error) {
3857
4098
  var _error$error2;
3858
4099
 
3859
4100
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_DIAL_IN_FAILURE, {
3860
- correlation_id: _this33.correlationId,
3861
- dial_in_url: _this33.dialInUrl,
4101
+ correlation_id: _this35.correlationId,
4102
+ dial_in_url: _this35.dialInUrl,
3862
4103
  locus_id: locusUrl.split('/').pop(),
3863
- client_url: _this33.deviceUrl,
4104
+ client_url: _this35.deviceUrl,
3864
4105
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
3865
4106
  stack: error.stack
3866
4107
  });
@@ -3879,7 +4120,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3879
4120
  }, {
3880
4121
  key: "dialOutPstn",
3881
4122
  value: function dialOutPstn(phoneNumber) {
3882
- var _this34 = this;
4123
+ var _this36 = this;
3883
4124
 
3884
4125
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
3885
4126
 
@@ -3893,15 +4134,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3893
4134
  locusUrl: locusUrl,
3894
4135
  clientUrl: this.deviceUrl
3895
4136
  }).then(function (res) {
3896
- _this34.locusInfo.onFullLocus(res.body.locus);
4137
+ _this36.locusInfo.onFullLocus(res.body.locus);
3897
4138
  }).catch(function (error) {
3898
4139
  var _error$error3;
3899
4140
 
3900
4141
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_DIAL_OUT_FAILURE, {
3901
- correlation_id: _this34.correlationId,
3902
- dial_out_url: _this34.dialOutUrl,
4142
+ correlation_id: _this36.correlationId,
4143
+ dial_out_url: _this36.dialOutUrl,
3903
4144
  locus_id: locusUrl.split('/').pop(),
3904
- client_url: _this34.deviceUrl,
4145
+ client_url: _this36.deviceUrl,
3905
4146
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
3906
4147
  stack: error.stack
3907
4148
  });
@@ -3933,7 +4174,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3933
4174
  }, {
3934
4175
  key: "moveTo",
3935
4176
  value: function moveTo(resourceId) {
3936
- var _this35 = this;
4177
+ var _this37 = this;
3937
4178
 
3938
4179
  if (!resourceId) {
3939
4180
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -3971,9 +4212,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3971
4212
  resourceId: resourceId,
3972
4213
  moveToResource: true
3973
4214
  }).then(function () {
3974
- _this35.meetingFiniteStateMachine.join();
4215
+ _this37.meetingFiniteStateMachine.join();
3975
4216
 
3976
- return _this35.updateMedia({
4217
+ return _this37.updateMedia({
3977
4218
  mediaSettings: {
3978
4219
  sendVideo: false,
3979
4220
  receiveVideo: false,
@@ -3983,10 +4224,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3983
4224
  receiveShare: false
3984
4225
  }
3985
4226
  }).then(function () {
3986
- return _promise.default.resolve(_this35);
4227
+ return _promise.default.resolve(_this37);
3987
4228
  });
3988
4229
  }).catch(function (error) {
3989
- _this35.meetingFiniteStateMachine.fail(error);
4230
+ _this37.meetingFiniteStateMachine.fail(error);
3990
4231
 
3991
4232
  return _promise.default.reject(error);
3992
4233
  });
@@ -4002,7 +4243,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4002
4243
  }, {
4003
4244
  key: "moveFrom",
4004
4245
  value: function moveFrom(resourceId) {
4005
- var _this36 = this;
4246
+ var _this38 = this;
4006
4247
 
4007
4248
  if (!resourceId) {
4008
4249
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -4041,16 +4282,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4041
4282
  });
4042
4283
 
4043
4284
  return _util.default.joinMeetingOptions(this).then(function (join) {
4044
- return _this36.getMediaStreams({
4285
+ return _this38.getMediaStreams({
4045
4286
  sendAudio: true,
4046
4287
  sendVideo: true,
4047
4288
  sendShare: false
4048
- }).then(function (_ref8) {
4049
- var _ref9 = (0, _slicedToArray2.default)(_ref8, 2),
4050
- localStream = _ref9[0],
4051
- localShare = _ref9[1];
4289
+ }).then(function (_ref9) {
4290
+ var _ref10 = (0, _slicedToArray2.default)(_ref9, 2),
4291
+ localStream = _ref10[0],
4292
+ localShare = _ref10[1];
4052
4293
 
4053
- return _this36.updateMedia({
4294
+ return _this38.updateMedia({
4054
4295
  mediaSettings: {
4055
4296
  sendAudio: true,
4056
4297
  receiveAudio: true,
@@ -4065,14 +4306,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4065
4306
  return _promise.default.resolve(join);
4066
4307
  });
4067
4308
  }).then(function () {
4068
- return _util.default.leaveMeeting(_this36, {
4309
+ return _util.default.leaveMeeting(_this38, {
4069
4310
  resourceId: resourceId,
4070
4311
  correlationId: oldCorrelationId,
4071
4312
  moveMeeting: true
4072
4313
  });
4073
4314
  });
4074
4315
  }).then(function () {
4075
- _this36.webex.meetings.meetingCollection.delete(_this36.id);
4316
+ _this38.webex.meetings.meetingCollection.delete(_this38.id);
4076
4317
 
4077
4318
  return _promise.default.resolve();
4078
4319
  });
@@ -4103,7 +4344,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4103
4344
  * @memberof Meeting
4104
4345
  */
4105
4346
  function addMedia() {
4106
- var _this37 = this;
4347
+ var _this39 = this;
4107
4348
 
4108
4349
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4109
4350
  var LOG_HEADER = 'Meeting:index#addMedia -->';
@@ -4151,54 +4392,54 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4151
4392
  });
4152
4393
 
4153
4394
  return _util.default.validateOptions(options).then(function () {
4154
- _this37.mediaProperties.setMediaPeerConnection(_util2.default.createPeerConnection());
4395
+ _this39.mediaProperties.setMediaPeerConnection(_util2.default.createPeerConnection());
4155
4396
 
4156
- _this37.setMercuryListener();
4397
+ _this39.setMercuryListener();
4157
4398
 
4158
- _peerConnectionManager.default.setPeerConnectionEvents(_this37);
4399
+ _peerConnectionManager.default.setPeerConnectionEvents(_this39);
4159
4400
 
4160
- return _this37.preMedia(localStream, localShare, mediaSettings);
4401
+ return _this39.preMedia(localStream, localShare, mediaSettings);
4161
4402
  }).then(function () {
4162
- return _media.default.attachMedia(_this37.mediaProperties, {
4163
- meetingId: _this37.id,
4164
- remoteQualityLevel: _this37.mediaProperties.remoteQualityLevel,
4165
- enableRtx: _this37.config.enableRtx,
4166
- enableExtmap: _this37.config.enableExtmap,
4167
- setStartLocalSDPGenRemoteSDPRecvDelay: _this37.setStartLocalSDPGenRemoteSDPRecvDelay.bind(_this37)
4403
+ return _media.default.attachMedia(_this39.mediaProperties, {
4404
+ meetingId: _this39.id,
4405
+ remoteQualityLevel: _this39.mediaProperties.remoteQualityLevel,
4406
+ enableRtx: _this39.config.enableRtx,
4407
+ enableExtmap: _this39.config.enableExtmap,
4408
+ setStartLocalSDPGenRemoteSDPRecvDelay: _this39.setStartLocalSDPGenRemoteSDPRecvDelay.bind(_this39)
4168
4409
  }).then(function (peerConnection) {
4169
- return _this37.getDevices().then(function (devices) {
4410
+ return _this39.getDevices().then(function (devices) {
4170
4411
  _util.default.handleDeviceLogging(devices);
4171
4412
 
4172
4413
  return peerConnection;
4173
4414
  });
4174
4415
  }).then(function (peerConnection) {
4175
- _this37.handleMediaLogging(_this37.mediaProperties);
4416
+ _this39.handleMediaLogging(_this39.mediaProperties);
4176
4417
 
4177
4418
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection Received from attachMedia "));
4178
4419
 
4179
- _this37.setRemoteStream(peerConnection);
4420
+ _this39.setRemoteStream(peerConnection);
4180
4421
 
4181
- _util.default.startInternalStats(_this37);
4422
+ _util.default.startInternalStats(_this39);
4182
4423
 
4183
- if (_this37.config.metrics.autoSendMQA) {
4184
- _this37.startMediaQualityMetrics();
4424
+ if (_this39.config.metrics.autoSendMQA) {
4425
+ _this39.startMediaQualityMetrics();
4185
4426
  }
4186
4427
 
4187
- if (_this37.config.stats.enableStatsAnalyzer) {
4428
+ if (_this39.config.stats.enableStatsAnalyzer) {
4188
4429
  // TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
4189
- _this37.networkQualityMonitor = new _networkQualityMonitor.default(_this37.config.stats);
4190
- _this37.statsAnalyzer = new _statsAnalyzer.default(_this37.config.stats, _this37.networkQualityMonitor);
4430
+ _this39.networkQualityMonitor = new _networkQualityMonitor.default(_this39.config.stats);
4431
+ _this39.statsAnalyzer = new _statsAnalyzer.default(_this39.config.stats, _this39.networkQualityMonitor);
4191
4432
 
4192
- _this37.statsAnalyzer.on(_constants.EVENT_TRIGGERS.MEDIA_QUALITY, function (options) {
4193
- var _this37$webex$meeting;
4433
+ _this39.statsAnalyzer.on(_constants.EVENT_TRIGGERS.MEDIA_QUALITY, function (options) {
4434
+ var _this39$webex$meeting;
4194
4435
 
4195
4436
  // TODO: might have to send the same event to the developer
4196
4437
  // Add ip address info if geo hint is present
4197
- options.data.intervalMetadata.peerReflexiveIP = ((_this37$webex$meeting = _this37.webex.meetings.geoHintInfo) === null || _this37$webex$meeting === void 0 ? void 0 : _this37$webex$meeting.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
4438
+ options.data.intervalMetadata.peerReflexiveIP = ((_this39$webex$meeting = _this39.webex.meetings.geoHintInfo) === null || _this39$webex$meeting === void 0 ? void 0 : _this39$webex$meeting.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
4198
4439
 
4199
4440
  _metrics.default.postEvent({
4200
4441
  event: _config.eventType.MEDIA_QUALITY,
4201
- meeting: _this37,
4442
+ meeting: _this39,
4202
4443
  data: {
4203
4444
  intervalData: options.data,
4204
4445
  networkType: options.networkType
@@ -4206,14 +4447,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4206
4447
  });
4207
4448
  });
4208
4449
 
4209
- _this37.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this37.sendNetworkQualityEvent.bind(_this37));
4450
+ _this39.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this39.sendNetworkQualityEvent.bind(_this39));
4210
4451
  }
4211
4452
  }).catch(function (error) {
4212
4453
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
4213
4454
 
4214
4455
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_MEDIA_FAILURE, {
4215
- correlation_id: _this37.correlationId,
4216
- locus_id: _this37.locusUrl.split('/').pop(),
4456
+ correlation_id: _this39.correlationId,
4457
+ locus_id: _this39.locusUrl.split('/').pop(),
4217
4458
  reason: error.message,
4218
4459
  stack: error.stack
4219
4460
  });
@@ -4224,14 +4465,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4224
4465
  var timerCount = 0; // eslint-disable-next-line func-names
4225
4466
  // eslint-disable-next-line prefer-arrow-callback
4226
4467
 
4227
- if (_this37.type === _constants._CALL_) {
4468
+ if (_this39.type === _constants._CALL_) {
4228
4469
  resolve();
4229
4470
  }
4230
4471
 
4231
4472
  var joiningTimer = setInterval(function () {
4232
4473
  timerCount += 1;
4233
4474
 
4234
- if (_this37.meetingState === _constants.FULL_STATE.ACTIVE) {
4475
+ if (_this39.meetingState === _constants.FULL_STATE.ACTIVE) {
4235
4476
  clearInterval(joiningTimer);
4236
4477
  resolve();
4237
4478
  }
@@ -4243,10 +4484,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4243
4484
  }, 1000);
4244
4485
  });
4245
4486
  }).then(function () {
4246
- return logRequest(_this37.roap.sendRoapMediaRequest({
4247
- sdp: _this37.mediaProperties.peerConnection.sdp,
4248
- roapSeq: _this37.roapSeq,
4249
- meeting: _this37 // or can pass meeting ID
4487
+ return logRequest(_this39.roap.sendRoapMediaRequest({
4488
+ sdp: _this39.mediaProperties.peerConnection.sdp,
4489
+ roapSeq: _this39.roapSeq,
4490
+ meeting: _this39 // or can pass meeting ID
4250
4491
 
4251
4492
  }), {
4252
4493
  header: "".concat(LOG_HEADER, " Send Roap Media Request."),
@@ -4254,7 +4495,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4254
4495
  failure: "".concat(LOG_HEADER, " Error joining the call on send roap media request, ")
4255
4496
  });
4256
4497
  }).then(function () {
4257
- var peerConnection = _this37.mediaProperties.peerConnection;
4498
+ var peerConnection = _this39.mediaProperties.peerConnection;
4258
4499
  return new _promise.default(function (resolve, reject) {
4259
4500
  if (peerConnection.connectionState === _constants.CONNECTION_STATE.CONNECTED) {
4260
4501
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
@@ -4275,7 +4516,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4275
4516
  }
4276
4517
  }, _constants.PC_BAIL_TIMEOUT);
4277
4518
 
4278
- _this37.once(_constants.EVENT_TRIGGERS.MEDIA_READY, function () {
4519
+ _this39.once(_constants.EVENT_TRIGGERS.MEDIA_READY, function () {
4279
4520
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED, clearing stability timer."));
4280
4521
 
4281
4522
  clearTimeout(stabilityTimeout);
@@ -4284,51 +4525,51 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4284
4525
  });
4285
4526
  }).then(function () {
4286
4527
  if (mediaSettings && mediaSettings.sendShare && localShare) {
4287
- if (_this37.state === _constants.MEETING_STATE.STATES.JOINED) {
4288
- return _this37.share();
4528
+ if (_this39.state === _constants.MEETING_STATE.STATES.JOINED) {
4529
+ return _this39.share();
4289
4530
  } // When the self state changes to JOINED then request the floor
4290
4531
 
4291
4532
 
4292
- _this37.floorGrantPending = true;
4533
+ _this39.floorGrantPending = true;
4293
4534
  }
4294
4535
 
4295
4536
  return _promise.default.resolve();
4296
4537
  });
4297
4538
  }).catch(function (error) {
4298
4539
  // Clean up stats analyzer, peer connection, and turn off listeners
4299
- if (_this37.statsAnalyzer) {
4300
- _this37.statsAnalyzer.stopAnalyzer();
4540
+ if (_this39.statsAnalyzer) {
4541
+ _this39.statsAnalyzer.stopAnalyzer();
4301
4542
 
4302
- _this37.statsAnalyzer = null;
4543
+ _this39.statsAnalyzer = null;
4303
4544
  }
4304
4545
 
4305
- if (_this37.mediaProperties.peerConnection) {
4306
- _this37.closePeerConnections();
4546
+ if (_this39.mediaProperties.peerConnection) {
4547
+ _this39.closePeerConnections();
4307
4548
 
4308
- _this37.unsetPeerConnections();
4549
+ _this39.unsetPeerConnections();
4309
4550
  }
4310
4551
 
4311
4552
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
4312
4553
 
4313
4554
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_MEDIA_FAILURE, {
4314
- correlation_id: _this37.correlationId,
4315
- locus_id: _this37.locusUrl.split('/').pop(),
4555
+ correlation_id: _this39.correlationId,
4556
+ locus_id: _this39.locusUrl.split('/').pop(),
4316
4557
  reason: error.message,
4317
4558
  stack: error.stack,
4318
4559
  code: error.code
4319
4560
  }); // Upload logs on error while adding media
4320
4561
 
4321
4562
 
4322
- _triggerProxy.default.trigger(_this37, {
4563
+ _triggerProxy.default.trigger(_this39, {
4323
4564
  file: 'meeting/index',
4324
4565
  function: 'addMedia'
4325
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this37); // If addMedia failes for not establishing connection then
4566
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this39); // If addMedia failes for not establishing connection then
4326
4567
  // leave the meeting with reson connection failed as meeting anyways will end
4327
4568
  // and cannot be connected unless network condition is checked for firewall
4328
4569
 
4329
4570
 
4330
4571
  if (error.code === _webexErrors.InvalidSdpError.CODE) {
4331
- _this37.leave({
4572
+ _this39.leave({
4332
4573
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
4333
4574
  });
4334
4575
  }
@@ -4358,7 +4599,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4358
4599
  }, {
4359
4600
  key: "enqueueMediaUpdate",
4360
4601
  value: function enqueueMediaUpdate(mediaUpdateType, options) {
4361
- var _this38 = this;
4602
+ var _this40 = this;
4362
4603
 
4363
4604
  return new _promise.default(function (resolve, reject) {
4364
4605
  var queueItem = {
@@ -4370,7 +4611,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4370
4611
 
4371
4612
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
4372
4613
 
4373
- _this38.queuedMediaUpdates.push(queueItem);
4614
+ _this40.queuedMediaUpdates.push(queueItem);
4374
4615
  });
4375
4616
  }
4376
4617
  /**
@@ -4396,7 +4637,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4396
4637
  * @memberof Meeting
4397
4638
  */
4398
4639
  function updateMedia() {
4399
- var _this39 = this;
4640
+ var _this41 = this;
4400
4641
 
4401
4642
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4402
4643
  var LOG_HEADER = 'Meeting:index#updateMedia -->';
@@ -4410,17 +4651,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4410
4651
  mediaSettings = options.mediaSettings;
4411
4652
  var previousSendShareStatus = this.mediaProperties.mediaDirection.sendShare;
4412
4653
  return _util.default.validateOptions(options).then(function () {
4413
- return _this39.preMedia(localStream, localShare, mediaSettings);
4654
+ return _this41.preMedia(localStream, localShare, mediaSettings);
4414
4655
  }).then(function () {
4415
- return _media.default.updateMedia(_this39.mediaProperties, {
4416
- meetingId: _this39.id,
4417
- remoteQualityLevel: _this39.mediaProperties.remoteQualityLevel,
4418
- enableRtx: _this39.config.enableRtx,
4419
- enableExtmap: _this39.config.enableExtmap
4656
+ return _media.default.updateMedia(_this41.mediaProperties, {
4657
+ meetingId: _this41.id,
4658
+ remoteQualityLevel: _this41.mediaProperties.remoteQualityLevel,
4659
+ enableRtx: _this41.config.enableRtx,
4660
+ enableExtmap: _this41.config.enableExtmap
4420
4661
  }).then(function (peerConnection) {
4421
4662
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection received from updateMedia, ").concat(peerConnection));
4422
4663
 
4423
- _this39.setRemoteStream(peerConnection);
4664
+ _this41.setRemoteStream(peerConnection);
4424
4665
 
4425
4666
  if (mediaSettings.receiveShare || localShare) {
4426
4667
  _peerConnectionManager.default.setContentSlides(peerConnection);
@@ -4429,18 +4670,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4429
4670
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error updatedMedia, "), error);
4430
4671
 
4431
4672
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.UPDATE_MEDIA_FAILURE, {
4432
- correlation_id: _this39.correlationId,
4433
- locus_id: _this39.locusUrl.split('/').pop(),
4673
+ correlation_id: _this41.correlationId,
4674
+ locus_id: _this41.locusUrl.split('/').pop(),
4434
4675
  reason: error.message,
4435
4676
  stack: error.stack
4436
4677
  });
4437
4678
 
4438
4679
  throw error;
4439
4680
  }).then(function () {
4440
- return logRequest(_this39.roap.sendRoapMediaRequest({
4441
- sdp: _this39.mediaProperties.peerConnection.sdp,
4442
- roapSeq: _this39.roapSeq,
4443
- meeting: _this39 // or can pass meeting ID
4681
+ return logRequest(_this41.roap.sendRoapMediaRequest({
4682
+ sdp: _this41.mediaProperties.peerConnection.sdp,
4683
+ roapSeq: _this41.roapSeq,
4684
+ meeting: _this41 // or can pass meeting ID
4444
4685
 
4445
4686
  }), {
4446
4687
  header: "".concat(LOG_HEADER, " sendRoapMediaRequest being sent"),
@@ -4448,13 +4689,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4448
4689
  failure: "".concat(LOG_HEADER, " Error updateMedia on send roap media request, ")
4449
4690
  });
4450
4691
  }).then(function () {
4451
- return _this39.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4692
+ return _this41.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4452
4693
  }).then(function (startShare) {
4453
4694
  // This is a special case if we do an /floor grant followed by /media
4454
4695
  // we actually get a OFFER from the server and a GLAR condition happens
4455
4696
  if (startShare) {
4456
4697
  // We are assuming that the clients are connected when doing an update
4457
- return _this39.share();
4698
+ return _this41.share();
4458
4699
  }
4459
4700
 
4460
4701
  return _promise.default.resolve();
@@ -4475,7 +4716,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4475
4716
  }, {
4476
4717
  key: "updateAudio",
4477
4718
  value: function updateAudio(options) {
4478
- var _this40 = this;
4719
+ var _this42 = this;
4479
4720
 
4480
4721
  if (!this.canUpdateMedia()) {
4481
4722
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.AUDIO, options);
@@ -4498,13 +4739,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4498
4739
  }).then(function () {
4499
4740
  var previousMediaDirection = {};
4500
4741
 
4501
- if (_this40.mediaProperties.mediaDirection) {
4742
+ if (_this42.mediaProperties.mediaDirection) {
4502
4743
  previousMediaDirection = {
4503
- sendTrack: _this40.mediaProperties.mediaDirection.sendAudio,
4504
- receiveTrack: _this40.mediaProperties.mediaDirection.receiveAudio
4744
+ sendTrack: _this42.mediaProperties.mediaDirection.sendAudio,
4745
+ receiveTrack: _this42.mediaProperties.mediaDirection.receiveAudio
4505
4746
  };
4506
4747
  } else {
4507
- _this40.mediaProperties.mediaDirection = {};
4748
+ _this42.mediaProperties.mediaDirection = {};
4508
4749
  }
4509
4750
 
4510
4751
  return _util.default.updateTransceiver({
@@ -4513,20 +4754,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4513
4754
  receiveTrack: options.receiveAudio,
4514
4755
  track: track,
4515
4756
  transceiver: audioTransceiver,
4516
- peerConnection: _this40.mediaProperties.peerConnection,
4757
+ peerConnection: _this42.mediaProperties.peerConnection,
4517
4758
  previousMediaDirection: previousMediaDirection
4518
4759
  }, {
4519
- mediaProperties: _this40.mediaProperties,
4520
- meeting: _this40,
4521
- id: _this40.id
4760
+ mediaProperties: _this42.mediaProperties,
4761
+ meeting: _this42,
4762
+ id: _this42.id
4522
4763
  });
4523
4764
  }).then(function () {
4524
- _this40.setLocalAudioTrack(track);
4765
+ _this42.setLocalAudioTrack(track);
4525
4766
 
4526
- _this40.mediaProperties.mediaDirection.sendAudio = sendAudio;
4527
- _this40.mediaProperties.mediaDirection.receiveAudio = receiveAudio; // audio state could be undefined if you have not sent audio before
4767
+ _this42.mediaProperties.mediaDirection.sendAudio = sendAudio;
4768
+ _this42.mediaProperties.mediaDirection.receiveAudio = receiveAudio; // audio state could be undefined if you have not sent audio before
4528
4769
 
4529
- _this40.audio = _this40.audio || (0, _muteState.default)(_constants.AUDIO, _this40, _this40.mediaProperties.mediaDirection);
4770
+ _this42.audio = _this42.audio || (0, _muteState.default)(_constants.AUDIO, _this42, _this42.mediaProperties.mediaDirection);
4530
4771
  });
4531
4772
  }
4532
4773
  /**
@@ -4543,7 +4784,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4543
4784
  }, {
4544
4785
  key: "updateVideo",
4545
4786
  value: function updateVideo(options) {
4546
- var _this41 = this;
4787
+ var _this43 = this;
4547
4788
 
4548
4789
  if (!this.canUpdateMedia()) {
4549
4790
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.VIDEO, options);
@@ -4570,23 +4811,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4570
4811
  receiveTrack: options.receiveVideo,
4571
4812
  track: track,
4572
4813
  transceiver: videoTransceiver,
4573
- peerConnection: _this41.mediaProperties.peerConnection,
4814
+ peerConnection: _this43.mediaProperties.peerConnection,
4574
4815
  previousMediaDirection: {
4575
- sendTrack: _this41.mediaProperties.mediaDirection.sendVideo,
4576
- receiveTrack: _this41.mediaProperties.mediaDirection.receiveVideo
4816
+ sendTrack: _this43.mediaProperties.mediaDirection.sendVideo,
4817
+ receiveTrack: _this43.mediaProperties.mediaDirection.receiveVideo
4577
4818
  }
4578
4819
  }, {
4579
- mediaProperties: _this41.mediaProperties,
4580
- meeting: _this41,
4581
- id: _this41.id
4820
+ mediaProperties: _this43.mediaProperties,
4821
+ meeting: _this43,
4822
+ id: _this43.id
4582
4823
  });
4583
4824
  }).then(function () {
4584
- _this41.setLocalVideoTrack(track);
4825
+ _this43.setLocalVideoTrack(track);
4585
4826
 
4586
- _this41.mediaProperties.mediaDirection.sendVideo = sendVideo;
4587
- _this41.mediaProperties.mediaDirection.receiveVideo = receiveVideo; // video state could be undefined if you have not sent video before
4827
+ _this43.mediaProperties.mediaDirection.sendVideo = sendVideo;
4828
+ _this43.mediaProperties.mediaDirection.receiveVideo = receiveVideo; // video state could be undefined if you have not sent video before
4588
4829
 
4589
- _this41.video = _this41.video || (0, _muteState.default)(_constants.VIDEO, _this41, _this41.mediaProperties.mediaDirection);
4830
+ _this43.video = _this43.video || (0, _muteState.default)(_constants.VIDEO, _this43, _this43.mediaProperties.mediaDirection);
4590
4831
  });
4591
4832
  }
4592
4833
  /**
@@ -4628,7 +4869,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4628
4869
  }, {
4629
4870
  key: "updateShare",
4630
4871
  value: function updateShare(options) {
4631
- var _this42 = this;
4872
+ var _this44 = this;
4632
4873
 
4633
4874
  if (!options.skipSignalingCheck && !this.canUpdateMedia()) {
4634
4875
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE, options);
@@ -4651,7 +4892,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4651
4892
  sendShare: sendShare,
4652
4893
  localShare: stream
4653
4894
  }).then(function () {
4654
- return _this42.checkForStopShare(sendShare, previousSendShareStatus);
4895
+ return _this44.checkForStopShare(sendShare, previousSendShareStatus);
4655
4896
  }).then(function (startShare) {
4656
4897
  return _util.default.updateTransceiver({
4657
4898
  type: 'video',
@@ -4659,41 +4900,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4659
4900
  receiveTrack: receiveShare,
4660
4901
  track: track,
4661
4902
  transceiver: shareTransceiver,
4662
- peerConnection: _this42.mediaProperties.peerConnection,
4903
+ peerConnection: _this44.mediaProperties.peerConnection,
4663
4904
  previousMediaDirection: {
4664
- sendTrack: _this42.mediaProperties.mediaDirection.sendShare,
4665
- receiveTrack: _this42.mediaProperties.mediaDirection.receiveShare
4905
+ sendTrack: _this44.mediaProperties.mediaDirection.sendShare,
4906
+ receiveTrack: _this44.mediaProperties.mediaDirection.receiveShare
4666
4907
  }
4667
4908
  }, {
4668
- mediaProperties: _this42.mediaProperties,
4669
- meeting: _this42,
4670
- id: _this42.id
4909
+ mediaProperties: _this44.mediaProperties,
4910
+ meeting: _this44,
4911
+ id: _this44.id
4671
4912
  }).then(function () {
4672
4913
  if (startShare) {
4673
- return _this42.share();
4914
+ return _this44.share();
4674
4915
  }
4675
4916
 
4676
4917
  return _promise.default.resolve();
4677
4918
  });
4678
4919
  }).then(function () {
4679
- _this42.mediaProperties.mediaDirection.sendShare = sendShare;
4680
- _this42.mediaProperties.mediaDirection.receiveShare = receiveShare;
4920
+ _this44.mediaProperties.mediaDirection.sendShare = sendShare;
4921
+ _this44.mediaProperties.mediaDirection.receiveShare = receiveShare;
4681
4922
  }).catch(function (error) {
4682
- _this42.unsetLocalShareTrack(stream);
4923
+ _this44.unsetLocalShareTrack(stream);
4683
4924
 
4684
4925
  throw error;
4685
4926
  }).finally(function () {
4686
4927
  var delay = 1e3; // Check to see if share was stopped natively before onended was assigned.
4687
4928
 
4688
- var sharingModeIsActive = _this42.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
4689
- var isSharingOutOfSync = sharingModeIsActive && !_this42.isLocalShareLive;
4929
+ var sharingModeIsActive = _this44.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
4930
+ var isSharingOutOfSync = sharingModeIsActive && !_this44.isLocalShareLive;
4690
4931
 
4691
4932
  if (isSharingOutOfSync) {
4692
4933
  // Adding a delay to avoid a 409 from server
4693
4934
  // which results in user still appearing as if sharing.
4694
4935
  // Also delay give time for changes to peerConnection.
4695
4936
  setTimeout(function () {
4696
- return _this42.handleShareTrackEnded(stream);
4937
+ return _this44.handleShareTrackEnded(stream);
4697
4938
  }, delay);
4698
4939
  }
4699
4940
  });
@@ -4733,7 +4974,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4733
4974
  }, {
4734
4975
  key: "acknowledge",
4735
4976
  value: function acknowledge(type) {
4736
- var _this43 = this;
4977
+ var _this45 = this;
4737
4978
 
4738
4979
  if (!type) {
4739
4980
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
@@ -4747,11 +4988,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4747
4988
  }).then(function (response) {
4748
4989
  return _promise.default.resolve(response);
4749
4990
  }).then(function (response) {
4750
- _this43.meetingFiniteStateMachine.ring(type);
4991
+ _this45.meetingFiniteStateMachine.ring(type);
4751
4992
 
4752
4993
  _metrics.default.postEvent({
4753
4994
  event: _config.eventType.ALERT_DISPLAYED,
4754
- meeting: _this43
4995
+ meeting: _this45
4755
4996
  });
4756
4997
 
4757
4998
  return _promise.default.resolve({
@@ -4776,14 +5017,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4776
5017
  }, {
4777
5018
  key: "decline",
4778
5019
  value: function decline(reason) {
4779
- var _this44 = this;
5020
+ var _this46 = this;
4780
5021
 
4781
5022
  return _util.default.declineMeeting(this, reason).then(function (decline) {
4782
- _this44.meetingFiniteStateMachine.decline();
5023
+ _this46.meetingFiniteStateMachine.decline();
4783
5024
 
4784
5025
  return _promise.default.resolve(decline);
4785
5026
  }).catch(function (error) {
4786
- _this44.meetingFiniteStateMachine.fail(error);
5027
+ _this46.meetingFiniteStateMachine.fail(error);
4787
5028
 
4788
5029
  return _promise.default.reject(error);
4789
5030
  });
@@ -4800,7 +5041,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4800
5041
  }, {
4801
5042
  key: "leave",
4802
5043
  value: function leave() {
4803
- var _this45 = this;
5044
+ var _this47 = this;
4804
5045
 
4805
5046
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4806
5047
 
@@ -4818,41 +5059,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4818
5059
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
4819
5060
 
4820
5061
  return _util.default.leaveMeeting(this, options).then(function (leave) {
4821
- _this45.meetingFiniteStateMachine.leave();
5062
+ _this47.meetingFiniteStateMachine.leave();
4822
5063
 
4823
- _this45.audio = null;
4824
- _this45.video = null;
4825
- _this45.isSharing = false;
5064
+ _this47.audio = null;
5065
+ _this47.video = null;
5066
+ _this47.isSharing = false;
4826
5067
 
4827
- if (_this45.shareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
4828
- _this45.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
5068
+ if (_this47.shareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
5069
+ _this47.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
4829
5070
  }
4830
5071
 
4831
- _this45.queuedMediaUpdates = [];
5072
+ _this47.queuedMediaUpdates = [];
4832
5073
 
4833
- if (_this45.transcription) {
4834
- _this45.transcription.closeSocket();
5074
+ if (_this47.transcription) {
5075
+ _this47.transcription.closeSocket();
4835
5076
 
4836
- _this45.triggerStopReceivingTranscriptionEvent();
5077
+ _this47.triggerStopReceivingTranscriptionEvent();
4837
5078
 
4838
- _this45.transcription = undefined;
5079
+ _this47.transcription = undefined;
4839
5080
  } // upload logs on leave irrespective of meeting delete
4840
5081
 
4841
5082
 
4842
- _triggerProxy.default.trigger(_this45, {
5083
+ _triggerProxy.default.trigger(_this47, {
4843
5084
  file: 'meeting/index',
4844
5085
  function: 'leave'
4845
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this45); // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
5086
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47); // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
4846
5087
 
4847
5088
 
4848
- if (_this45.wirelessShare || _this45.guest) {
5089
+ if (_this47.wirelessShare || _this47.guest) {
4849
5090
  // If screen sharing clean the meeting object
4850
- _triggerProxy.default.trigger(_this45, {
5091
+ _triggerProxy.default.trigger(_this47, {
4851
5092
  file: 'meeting/index',
4852
5093
  function: 'leave'
4853
5094
  }, _constants.EVENTS.DESTROY_MEETING, {
4854
5095
  reason: options.reason,
4855
- meetingId: _this45.id
5096
+ meetingId: _this47.id
4856
5097
  });
4857
5098
  }
4858
5099
 
@@ -4860,19 +5101,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4860
5101
 
4861
5102
  return leave;
4862
5103
  }).catch(function (error) {
4863
- _this45.meetingFiniteStateMachine.fail(error);
5104
+ _this47.meetingFiniteStateMachine.fail(error);
4864
5105
 
4865
5106
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error); // upload logs on leave irrespective of meeting delete
4866
5107
 
4867
5108
 
4868
- _triggerProxy.default.trigger(_this45, {
5109
+ _triggerProxy.default.trigger(_this47, {
4869
5110
  file: 'meeting/index',
4870
5111
  function: 'leave'
4871
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this45);
5112
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
4872
5113
 
4873
5114
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_LEAVE_FAILURE, {
4874
- correlation_id: _this45.correlationId,
4875
- locus_id: _this45.locusUrl.split('/').pop(),
5115
+ correlation_id: _this47.correlationId,
5116
+ locus_id: _this47.locusUrl.split('/').pop(),
4876
5117
  reason: error.message,
4877
5118
  stack: error.stack,
4878
5119
  code: error.code
@@ -4893,7 +5134,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4893
5134
  }, {
4894
5135
  key: "startWhiteboardShare",
4895
5136
  value: function startWhiteboardShare(channelUrl, resourceToken) {
4896
- var _this46 = this;
5137
+ var _this48 = this;
4897
5138
 
4898
5139
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
4899
5140
  return element.name === 'whiteboard';
@@ -4922,14 +5163,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4922
5163
  }
4923
5164
 
4924
5165
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
4925
- _this46.isSharing = false;
5166
+ _this48.isSharing = false;
4926
5167
  return _promise.default.resolve();
4927
5168
  }).catch(function (error) {
4928
5169
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
4929
5170
 
4930
5171
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
4931
- correlation_id: _this46.correlationId,
4932
- locus_id: _this46.locusUrl.split('/').pop(),
5172
+ correlation_id: _this48.correlationId,
5173
+ locus_id: _this48.locusUrl.split('/').pop(),
4933
5174
  reason: error.message,
4934
5175
  stack: error.stack,
4935
5176
  board: {
@@ -4954,7 +5195,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4954
5195
  }, {
4955
5196
  key: "stopWhiteboardShare",
4956
5197
  value: function stopWhiteboardShare(channelUrl) {
4957
- var _this47 = this;
5198
+ var _this49 = this;
4958
5199
 
4959
5200
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
4960
5201
  return element.name === 'whiteboard';
@@ -4975,8 +5216,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4975
5216
  _loggerProxy.default.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
4976
5217
 
4977
5218
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.STOP_WHITEBOARD_SHARE_FAILURE, {
4978
- correlation_id: _this47.correlationId,
4979
- locus_id: _this47.locusUrl.split('/').pop(),
5219
+ correlation_id: _this49.correlationId,
5220
+ locus_id: _this49.locusUrl.split('/').pop(),
4980
5221
  reason: error.message,
4981
5222
  stack: error.stack,
4982
5223
  board: {
@@ -5000,7 +5241,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5000
5241
  }, {
5001
5242
  key: "share",
5002
5243
  value: function share() {
5003
- var _this48 = this;
5244
+ var _this50 = this;
5004
5245
 
5005
5246
  var content = this.locusInfo.mediaShares.find(function (element) {
5006
5247
  return element.name === _constants.CONTENT;
@@ -5019,14 +5260,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5019
5260
  uri: content.url,
5020
5261
  resourceUrl: this.resourceUrl
5021
5262
  }).then(function () {
5022
- _this48.isSharing = true;
5263
+ _this50.isSharing = true;
5023
5264
  return _promise.default.resolve();
5024
5265
  }).catch(function (error) {
5025
5266
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
5026
5267
 
5027
5268
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_SHARE_FAILURE, {
5028
- correlation_id: _this48.correlationId,
5029
- locus_id: _this48.locusUrl.split('/').pop(),
5269
+ correlation_id: _this50.correlationId,
5270
+ locus_id: _this50.locusUrl.split('/').pop(),
5030
5271
  reason: error.message,
5031
5272
  stack: error.stack
5032
5273
  });
@@ -5065,7 +5306,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5065
5306
  }, {
5066
5307
  key: "stopFloorRequest",
5067
5308
  value: function stopFloorRequest() {
5068
- var _this49 = this;
5309
+ var _this51 = this;
5069
5310
 
5070
5311
  var content = this.locusInfo.mediaShares.find(function (element) {
5071
5312
  return element.name === _constants.CONTENT;
@@ -5095,15 +5336,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5095
5336
  _loggerProxy.default.logger.error('Meeting:index#stopFloorRequest --> Error ', error);
5096
5337
 
5097
5338
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.STOP_FLOOR_REQUEST_FAILURE, {
5098
- correlation_id: _this49.correlationId,
5099
- locus_id: _this49.locusUrl.split('/').pop(),
5339
+ correlation_id: _this51.correlationId,
5340
+ locus_id: _this51.locusUrl.split('/').pop(),
5100
5341
  reason: error.message,
5101
5342
  stack: error.stack
5102
5343
  });
5103
5344
 
5104
5345
  return _promise.default.reject(error);
5105
5346
  }).finally(function () {
5106
- _this49.isSharing = false;
5347
+ _this51.isSharing = false;
5107
5348
  });
5108
5349
  }
5109
5350
 
@@ -5239,7 +5480,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5239
5480
  }, {
5240
5481
  key: "changeVideoLayout",
5241
5482
  value: function changeVideoLayout(layoutType) {
5242
- var _this50 = this;
5483
+ var _this52 = this;
5243
5484
 
5244
5485
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5245
5486
  var main = renderInfo.main,
@@ -5302,7 +5543,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5302
5543
  content: layoutInfo.content
5303
5544
  }).then(function (response) {
5304
5545
  if (response && response.body && response.body.locus) {
5305
- _this50.locusInfo.onFullLocus(response.body.locus);
5546
+ _this52.locusInfo.onFullLocus(response.body.locus);
5306
5547
  }
5307
5548
  }).catch(function (error) {
5308
5549
  _loggerProxy.default.logger.error('Meeting:index#changeVideoLayout --> Error ', error);
@@ -5319,7 +5560,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5319
5560
  }, {
5320
5561
  key: "setLocalVideoQuality",
5321
5562
  value: function setLocalVideoQuality(level) {
5322
- var _this51 = this;
5563
+ var _this53 = this;
5323
5564
 
5324
5565
  _loggerProxy.default.logger.log("Meeting:index#setLocalVideoQuality --> Setting quality to ".concat(level));
5325
5566
 
@@ -5345,11 +5586,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5345
5586
  sendVideo: this.mediaProperties.mediaDirection.sendVideo,
5346
5587
  sendShare: this.mediaProperties.mediaDirection.sendShare
5347
5588
  };
5348
- return this.getMediaStreams(mediaDirection, _constants.VIDEO_RESOLUTIONS[level]).then(function (_ref10) {
5349
- var _ref11 = (0, _slicedToArray2.default)(_ref10, 1),
5350
- localStream = _ref11[0];
5589
+ return this.getMediaStreams(mediaDirection, _constants.VIDEO_RESOLUTIONS[level]).then(function (_ref11) {
5590
+ var _ref12 = (0, _slicedToArray2.default)(_ref11, 1),
5591
+ localStream = _ref12[0];
5351
5592
 
5352
- return _this51.updateVideo({
5593
+ return _this53.updateVideo({
5353
5594
  sendVideo: true,
5354
5595
  receiveVideo: true,
5355
5596
  stream: localStream
@@ -5397,7 +5638,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5397
5638
  }, {
5398
5639
  key: "setMeetingQuality",
5399
5640
  value: function setMeetingQuality(level) {
5400
- var _this52 = this;
5641
+ var _this54 = this;
5401
5642
 
5402
5643
  _loggerProxy.default.logger.log("Meeting:index#setMeetingQuality --> Setting quality to ".concat(level));
5403
5644
 
@@ -5422,18 +5663,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5422
5663
  receiveVideo = _this$mediaProperties4.receiveVideo,
5423
5664
  sendVideo = _this$mediaProperties4.sendVideo;
5424
5665
  return (sendVideo ? this.setLocalVideoQuality(level) : _promise.default.resolve()).then(function () {
5425
- return receiveAudio || receiveVideo ? _this52.setRemoteQualityLevel(level) : _promise.default.resolve();
5666
+ return receiveAudio || receiveVideo ? _this54.setRemoteQualityLevel(level) : _promise.default.resolve();
5426
5667
  }).catch(function (error) {
5427
5668
  // From troubleshooting it seems that the stream itself doesn't change the max-fs if the peer connection isn't stable
5428
- _this52.mediaProperties.setLocalQualityLevel(previousLevel.local);
5669
+ _this54.mediaProperties.setLocalQualityLevel(previousLevel.local);
5429
5670
 
5430
- _this52.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5671
+ _this54.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5431
5672
 
5432
5673
  _loggerProxy.default.logger.error("Meeting:index#setMeetingQuality --> ".concat(error.message));
5433
5674
 
5434
5675
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.SET_MEETING_QUALITY_FAILURE, {
5435
- correlation_id: _this52.correlationId,
5436
- locus_id: _this52.locusUrl.split('/').pop(),
5676
+ correlation_id: _this54.correlationId,
5677
+ locus_id: _this54.locusUrl.split('/').pop(),
5437
5678
  reason: error.message,
5438
5679
  stack: error.stack
5439
5680
  }, {
@@ -5457,7 +5698,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5457
5698
  }, {
5458
5699
  key: "shareScreen",
5459
5700
  value: function shareScreen() {
5460
- var _this53 = this;
5701
+ var _this55 = this;
5461
5702
 
5462
5703
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5463
5704
 
@@ -5469,9 +5710,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5469
5710
  }, options);
5470
5711
 
5471
5712
  return _media.default.getDisplayMedia(shareConstraints, this.config).then(function (shareStream) {
5472
- return _this53.updateShare({
5713
+ return _this55.updateShare({
5473
5714
  sendShare: true,
5474
- receiveShare: _this53.mediaProperties.mediaDirection.receiveShare,
5715
+ receiveShare: _this55.mediaProperties.mediaDirection.receiveShare,
5475
5716
  stream: shareStream
5476
5717
  });
5477
5718
  }).catch(function (error) {
@@ -5483,8 +5724,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5483
5724
  // TODO: The getDisplayMedia errors need to be moved inside `media.getDisplayMedia`
5484
5725
  var metricName = _constants.METRICS_OPERATIONAL_MEASURES.GET_DISPLAY_MEDIA_FAILURE;
5485
5726
  var data = {
5486
- correlation_id: _this53.correlationId,
5487
- locus_id: _this53.locusUrl.split('/').pop(),
5727
+ correlation_id: _this55.correlationId,
5728
+ locus_id: _this55.locusUrl.split('/').pop(),
5488
5729
  reason: error.message,
5489
5730
  stack: error.stack
5490
5731
  };
@@ -5563,9 +5804,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5563
5804
 
5564
5805
  }, {
5565
5806
  key: "handleMediaLogging",
5566
- value: function handleMediaLogging(_ref12) {
5567
- var audioTrack = _ref12.audioTrack,
5568
- videoTrack = _ref12.videoTrack;
5807
+ value: function handleMediaLogging(_ref13) {
5808
+ var audioTrack = _ref13.audioTrack,
5809
+ videoTrack = _ref13.videoTrack;
5569
5810
 
5570
5811
  _util.default.handleVideoLogging(videoTrack);
5571
5812