@webex/plugin-meetings 2.37.2 → 2.38.0

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 (69) hide show
  1. package/dist/config.js +1 -1
  2. package/dist/config.js.map +1 -1
  3. package/dist/constants.js +2 -1
  4. package/dist/constants.js.map +1 -1
  5. package/dist/locus-info/index.js +24 -0
  6. package/dist/locus-info/index.js.map +1 -1
  7. package/dist/locus-info/parser.js +1 -0
  8. package/dist/locus-info/parser.js.map +1 -1
  9. package/dist/media/properties.js.map +1 -1
  10. package/dist/meeting/index.js +405 -352
  11. package/dist/meeting/index.js.map +1 -1
  12. package/dist/meeting/request.js +0 -27
  13. package/dist/meeting/request.js.map +1 -1
  14. package/dist/meeting/util.js +0 -56
  15. package/dist/meeting/util.js.map +1 -1
  16. package/dist/meeting-info/meeting-info-v2.js +2 -0
  17. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  18. package/dist/meetings/index.js +27 -17
  19. package/dist/meetings/index.js.map +1 -1
  20. package/dist/meetings/request.js +14 -12
  21. package/dist/meetings/request.js.map +1 -1
  22. package/dist/member/util.js +3 -1
  23. package/dist/member/util.js.map +1 -1
  24. package/dist/members/request.js +3 -1
  25. package/dist/members/request.js.map +1 -1
  26. package/dist/reachability/index.js +4 -4
  27. package/dist/reachability/index.js.map +1 -1
  28. package/dist/reactions/reactions.type.js +1 -0
  29. package/dist/reactions/reactions.type.js.map +1 -1
  30. package/dist/recording-controller/enums.js +17 -0
  31. package/dist/recording-controller/enums.js.map +1 -0
  32. package/dist/recording-controller/index.js +343 -0
  33. package/dist/recording-controller/index.js.map +1 -0
  34. package/dist/recording-controller/util.js +63 -0
  35. package/dist/recording-controller/util.js.map +1 -0
  36. package/dist/roap/turnDiscovery.js.map +1 -1
  37. package/dist/statsAnalyzer/mqaUtil.js +18 -6
  38. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  39. package/package.json +23 -18
  40. package/src/config.ts +1 -1
  41. package/src/constants.ts +1 -0
  42. package/src/locus-info/index.ts +24 -0
  43. package/src/locus-info/parser.ts +1 -0
  44. package/src/media/properties.ts +1 -1
  45. package/src/meeting/index.ts +121 -70
  46. package/src/meeting/request.ts +0 -31
  47. package/src/meeting/util.ts +0 -60
  48. package/src/meeting-info/meeting-info-v2.ts +2 -0
  49. package/src/meetings/index.ts +8 -3
  50. package/src/meetings/request.ts +1 -1
  51. package/src/member/util.ts +2 -1
  52. package/src/members/request.ts +1 -0
  53. package/src/reachability/index.ts +2 -1
  54. package/src/reactions/reactions.type.ts +2 -1
  55. package/src/recording-controller/enums.ts +8 -0
  56. package/src/recording-controller/index.ts +315 -0
  57. package/src/recording-controller/util.ts +58 -0
  58. package/src/roap/turnDiscovery.ts +1 -1
  59. package/src/statsAnalyzer/mqaUtil.ts +6 -0
  60. package/test/integration/spec/journey.js +1 -1
  61. package/test/integration/spec/space-meeting.js +1 -1
  62. package/test/integration/spec/transcription.js +1 -1
  63. package/test/unit/spec/meeting/index.js +33 -6
  64. package/test/unit/spec/meeting/utils.js +0 -127
  65. package/test/unit/spec/recording-controller/index.js +231 -0
  66. package/test/unit/spec/recording-controller/util.js +102 -0
  67. package/test/unit/spec/roap/index.ts +2 -1
  68. package/test/unit/spec/roap/turnDiscovery.ts +5 -4
  69. package/tsconfig.json +6 -0
@@ -54,7 +54,8 @@ var _reconnectionManager = _interopRequireDefault(require("../reconnection-manag
54
54
  var _request = _interopRequireDefault(require("./request"));
55
55
  var _index2 = _interopRequireDefault(require("../members/index"));
56
56
  var _util = _interopRequireDefault(require("./util"));
57
- var _util2 = _interopRequireDefault(require("../media/util"));
57
+ var _util2 = _interopRequireDefault(require("../recording-controller/util"));
58
+ var _util3 = _interopRequireDefault(require("../media/util"));
58
59
  var _transcription = _interopRequireDefault(require("../transcription"));
59
60
  var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
60
61
  var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
@@ -69,6 +70,7 @@ var _browserDetection = _interopRequireDefault(require("../common/browser-detect
69
70
  var _collection = _interopRequireDefault(require("../roap/collection"));
70
71
  var _reactions = require("../reactions/reactions");
71
72
  var _inMeetingActions = _interopRequireDefault(require("./in-meeting-actions"));
73
+ var _recordingController = _interopRequireDefault(require("../recording-controller"));
72
74
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
73
75
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty3.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty2(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
74
76
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -395,6 +397,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
395
397
  * @memberof Meeting
396
398
  */
397
399
  function Meeting(attrs, _options) {
400
+ var _this$locusInfo, _this$locusInfo$links, _this$locusInfo$links2, _this$locusInfo$links3, _this$locusInfo2, _this$locusInfo2$full, _this$locusInfo3;
398
401
  var _this;
399
402
  (0, _classCallCheck2.default)(this, Meeting);
400
403
  _this = _super.call(this, {}, _options);
@@ -457,6 +460,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
457
460
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "passwordStatus", void 0);
458
461
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "queuedMediaUpdates", void 0);
459
462
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "recording", void 0);
463
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "recordingController", void 0);
460
464
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "requiredCaptcha", void 0);
461
465
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "shareStatus", void 0);
462
466
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "statsAnalyzer", void 0);
@@ -579,7 +583,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
579
583
  // TODO: might have to send the same event to the developer
580
584
  // Add ip address info if geo hint is present
581
585
  // @ts-ignore fix type
582
- options.data.intervalMetadata.peerReflexiveIP = ((_this$webex$meetings$ = _this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$ === void 0 ? void 0 : _this$webex$meetings$.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
586
+ options.data.intervalMetadata.peerReflexiveIP =
587
+ // @ts-ignore
588
+ ((_this$webex$meetings$ = _this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$ === void 0 ? void 0 : _this$webex$meetings$.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
583
589
  _metrics.default.postEvent({
584
590
  event: _config.eventType.MEDIA_QUALITY,
585
591
  meeting: (0, _assertThisInitialized2.default)(_this),
@@ -1119,6 +1125,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1119
1125
  */
1120
1126
  // @ts-ignore - Fix type
1121
1127
  _this.locusInfo = new _locusInfo.default(_this.updateMeetingObject.bind((0, _assertThisInitialized2.default)(_this)), _this.webex, _this.id);
1128
+
1122
1129
  // We had to add listeners first before setting up the locus instance
1123
1130
  /**
1124
1131
  * @instance
@@ -1221,6 +1228,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1221
1228
  * @memberof Meeting
1222
1229
  */
1223
1230
  _this.keepAliveTimerId = null;
1231
+
1232
+ /**
1233
+ * The class that helps to control recording functions: start, stop, pause, resume, etc
1234
+ * @instance
1235
+ * @type {RecordingController}
1236
+ * @public
1237
+ * @memberof Meeting
1238
+ */
1239
+ _this.recordingController = new _recordingController.default(_this.meetingRequest, {
1240
+ serviceUrl: (_this$locusInfo = _this.locusInfo) === null || _this$locusInfo === void 0 ? void 0 : (_this$locusInfo$links = _this$locusInfo.links) === null || _this$locusInfo$links === void 0 ? void 0 : (_this$locusInfo$links2 = _this$locusInfo$links.services) === null || _this$locusInfo$links2 === void 0 ? void 0 : (_this$locusInfo$links3 = _this$locusInfo$links2.record) === null || _this$locusInfo$links3 === void 0 ? void 0 : _this$locusInfo$links3.url,
1241
+ sessionId: (_this$locusInfo2 = _this.locusInfo) === null || _this$locusInfo2 === void 0 ? void 0 : (_this$locusInfo2$full = _this$locusInfo2.fullState) === null || _this$locusInfo2$full === void 0 ? void 0 : _this$locusInfo2$full.sessionId,
1242
+ locusUrl: (_this$locusInfo3 = _this.locusInfo) === null || _this$locusInfo3 === void 0 ? void 0 : _this$locusInfo3.url,
1243
+ displayHints: []
1244
+ });
1224
1245
  _this.setUpLocusInfoListeners();
1225
1246
  _this.locusInfo.init(attrs.locus ? attrs.locus : {});
1226
1247
  _this.hasJoinedOnce = false;
@@ -1391,7 +1412,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1391
1412
  // we have to pass the wbxappapi hostname as the siteFullName parameter
1392
1413
  var _URL = new URL(this.requiredCaptcha.refreshURL),
1393
1414
  hostname = _URL.hostname;
1394
- return this.meetingRequest.refreshCaptcha({
1415
+ return this.meetingRequest
1416
+ // @ts-ignore
1417
+ .refreshCaptcha({
1395
1418
  captchaRefreshUrl: "".concat(this.requiredCaptcha.refreshURL, "&siteFullName=").concat(hostname),
1396
1419
  captchaId: this.requiredCaptcha.captchaId
1397
1420
  }).then(function (response) {
@@ -1416,6 +1439,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1416
1439
  // meeting update listeners
1417
1440
  this.setUpLocusInfoSelfListener();
1418
1441
  this.setUpLocusInfoMeetingListener();
1442
+ this.setUpLocusServicesListener();
1419
1443
  // members update listeners
1420
1444
  this.setUpLocusFullStateListener();
1421
1445
  this.setUpLocusUrlListener();
@@ -2089,6 +2113,27 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2089
2113
  _this13.members.locusUrlUpdate(payload);
2090
2114
  _this13.locusUrl = payload;
2091
2115
  _this13.locusId = (_this13$locusUrl = _this13.locusUrl) === null || _this13$locusUrl === void 0 ? void 0 : _this13$locusUrl.split('/').pop();
2116
+ _this13.recordingController.setLocusUrl(_this13.locusUrl);
2117
+ });
2118
+ }
2119
+
2120
+ /**
2121
+ * Set up the locus info service link listener
2122
+ * update the locusInfo for recording controller
2123
+ * does not currently re-emit the event as it's internal only
2124
+ * payload is unused
2125
+ * @returns {undefined}
2126
+ * @private
2127
+ * @memberof Meeting
2128
+ */
2129
+ }, {
2130
+ key: "setUpLocusServicesListener",
2131
+ value: function setUpLocusServicesListener() {
2132
+ var _this14 = this;
2133
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LINKS_SERVICES, function (payload) {
2134
+ var _payload$services, _payload$services$rec, _this14$locusInfo, _this14$locusInfo$ful;
2135
+ _this14.recordingController.setServiceUrl(payload === null || payload === void 0 ? void 0 : (_payload$services = payload.services) === null || _payload$services === void 0 ? void 0 : (_payload$services$rec = _payload$services.record) === null || _payload$services$rec === void 0 ? void 0 : _payload$services$rec.url);
2136
+ _this14.recordingController.setSessionId((_this14$locusInfo = _this14.locusInfo) === null || _this14$locusInfo === void 0 ? void 0 : (_this14$locusInfo$ful = _this14$locusInfo.fullState) === null || _this14$locusInfo$ful === void 0 ? void 0 : _this14$locusInfo$ful.sessionId);
2092
2137
  });
2093
2138
  }
2094
2139
 
@@ -2101,10 +2146,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2101
2146
  }, {
2102
2147
  key: "setUpLocusInfoMeetingInfoListener",
2103
2148
  value: function setUpLocusInfoMeetingInfoListener() {
2104
- var _this14 = this;
2149
+ var _this15 = this;
2105
2150
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_LOCKED, function (payload) {
2106
2151
  if (payload) {
2107
- _triggerProxy.default.trigger(_this14, {
2152
+ _triggerProxy.default.trigger(_this15, {
2108
2153
  file: 'meeting/index',
2109
2154
  function: 'setUpLocusInfoMeetingInfoListener'
2110
2155
  }, _constants.EVENT_TRIGGERS.MEETING_LOCKED, {
@@ -2114,7 +2159,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2114
2159
  });
2115
2160
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_UNLOCKED, function (payload) {
2116
2161
  if (payload) {
2117
- _triggerProxy.default.trigger(_this14, {
2162
+ _triggerProxy.default.trigger(_this15, {
2118
2163
  file: 'meeting/index',
2119
2164
  function: 'setUpLocusInfoMeetingInfoListener'
2120
2165
  }, _constants.EVENT_TRIGGERS.MEETING_UNLOCKED, {
@@ -2124,15 +2169,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2124
2169
  });
2125
2170
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (payload) {
2126
2171
  if (payload && payload.info) {
2127
- var changed = _this14.inMeetingActions.set({
2172
+ var changed = _this15.inMeetingActions.set({
2128
2173
  canInviteNewParticipants: _util.default.canInviteNewParticipants(payload.info.userDisplayHints),
2129
2174
  canAdmitParticipant: _util.default.canAdmitParticipant(payload.info.userDisplayHints),
2130
2175
  canLock: _util.default.canUserLock(payload.info.userDisplayHints),
2131
2176
  canUnlock: _util.default.canUserUnlock(payload.info.userDisplayHints),
2132
- canStartRecording: _util.default.canUserRecord(payload.info.userDisplayHints),
2133
- canStopRecording: _util.default.canUserStop(payload.info.userDisplayHints),
2134
- canPauseRecording: _util.default.canUserPause(payload.info.userDisplayHints),
2135
- canResumeRecording: _util.default.canUserResume(payload.info.userDisplayHints),
2177
+ canStartRecording: _util2.default.canUserStart(payload.info.userDisplayHints),
2178
+ canStopRecording: _util2.default.canUserStop(payload.info.userDisplayHints),
2179
+ canPauseRecording: _util2.default.canUserPause(payload.info.userDisplayHints),
2180
+ canResumeRecording: _util2.default.canUserResume(payload.info.userDisplayHints),
2136
2181
  canRaiseHand: _util.default.canUserRaiseHand(payload.info.userDisplayHints),
2137
2182
  canLowerAllHands: _util.default.canUserLowerAllHands(payload.info.userDisplayHints),
2138
2183
  canLowerSomeoneElsesHand: _util.default.canUserLowerSomeoneElsesHand(payload.info.userDisplayHints),
@@ -2147,11 +2192,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2147
2192
  canSelectSpokenLanguages: _util.default.canSelectSpokenLanguages(payload.info.userDisplayHints),
2148
2193
  waitingForOthersToJoin: _util.default.waitingForOthersToJoin(payload.info.userDisplayHints)
2149
2194
  });
2195
+ _this15.recordingController.setDisplayHints(payload.info.userDisplayHints);
2150
2196
  if (changed) {
2151
- _triggerProxy.default.trigger(_this14, {
2197
+ _triggerProxy.default.trigger(_this15, {
2152
2198
  file: 'meeting/index',
2153
2199
  function: 'setUpLocusInfoMeetingInfoListener'
2154
- }, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, _this14.inMeetingActions.get());
2200
+ }, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, _this15.inMeetingActions.get());
2155
2201
  }
2156
2202
  }
2157
2203
  });
@@ -2166,10 +2212,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2166
2212
  }, {
2167
2213
  key: "setUpLocusEmbeddedAppsListener",
2168
2214
  value: function setUpLocusEmbeddedAppsListener() {
2169
- var _this15 = this;
2215
+ var _this16 = this;
2170
2216
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.EMBEDDED_APPS_UPDATED, function (embeddedApps) {
2171
2217
  if (embeddedApps) {
2172
- _triggerProxy.default.trigger(_this15, {
2218
+ _triggerProxy.default.trigger(_this16, {
2173
2219
  file: 'meeting/index',
2174
2220
  function: 'setUpLocusEmbeddedAppsListener'
2175
2221
  }, _constants.EVENT_TRIGGERS.MEETING_EMBEDDED_APPS_UPDATE, embeddedApps);
@@ -2186,11 +2232,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2186
2232
  }, {
2187
2233
  key: "setUpLocusInfoSelfListener",
2188
2234
  value: function setUpLocusInfoSelfListener() {
2189
- var _this16 = this;
2235
+ var _this17 = this;
2190
2236
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED, function (payload) {
2191
- if (_this16.audio) {
2192
- _this16.audio.handleServerLocalUnmuteRequired(_this16);
2193
- _triggerProxy.default.trigger(_this16, {
2237
+ if (_this17.audio) {
2238
+ _this17.audio.handleServerLocalUnmuteRequired(_this17);
2239
+ _triggerProxy.default.trigger(_this17, {
2194
2240
  file: 'meeting/index',
2195
2241
  function: 'setUpLocusInfoSelfListener'
2196
2242
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS, {
@@ -2200,15 +2246,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2200
2246
  });
2201
2247
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED, function (payload) {
2202
2248
  if (payload) {
2203
- var _this16$audio;
2204
- if (_this16.audio) {
2205
- _this16.audio.handleServerRemoteMuteUpdate(payload.muted, payload.unmuteAllowed);
2249
+ var _this17$audio;
2250
+ if (_this17.audio) {
2251
+ _this17.audio.handleServerRemoteMuteUpdate(payload.muted, payload.unmuteAllowed);
2206
2252
  }
2207
2253
  // with "mute on entry" server will send us remote mute even if we don't have media configured,
2208
2254
  // so if being muted by others, always send the notification,
2209
2255
  // but if being unmuted, only send it if we are also locally unmuted
2210
- if (payload.muted || !((_this16$audio = _this16.audio) !== null && _this16$audio !== void 0 && _this16$audio.isMuted())) {
2211
- _triggerProxy.default.trigger(_this16, {
2256
+ if (payload.muted || !((_this17$audio = _this17.audio) !== null && _this17$audio !== void 0 && _this17$audio.isMuted())) {
2257
+ _triggerProxy.default.trigger(_this17, {
2212
2258
  file: 'meeting/index',
2213
2259
  function: 'setUpLocusInfoSelfListener'
2214
2260
  }, payload.muted ? _constants.EVENT_TRIGGERS.MEETING_SELF_MUTED_BY_OTHERS : _constants.EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS, {
@@ -2218,7 +2264,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2218
2264
  }
2219
2265
  });
2220
2266
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED, function (payload) {
2221
- _triggerProxy.default.trigger(_this16, {
2267
+ _triggerProxy.default.trigger(_this17, {
2222
2268
  file: 'meeting/index',
2223
2269
  function: 'setUpLocusInfoSelfListener'
2224
2270
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_REQUESTED_TO_UNMUTE, {
@@ -2227,8 +2273,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2227
2273
  });
2228
2274
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_UNADMITTED_GUEST, function (payload) {
2229
2275
  if (payload) {
2230
- _this16.startKeepAlive();
2231
- _triggerProxy.default.trigger(_this16, {
2276
+ _this17.startKeepAlive();
2277
+ _triggerProxy.default.trigger(_this17, {
2232
2278
  file: 'meeting/index',
2233
2279
  function: 'setUpLocusInfoSelfListener'
2234
2280
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_LOBBY_WAITING, {
@@ -2236,14 +2282,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2236
2282
  });
2237
2283
  _metrics.default.postEvent({
2238
2284
  event: _config.eventType.LOBBY_ENTERED,
2239
- meeting: _this16
2285
+ meeting: _this17
2240
2286
  });
2241
2287
  }
2242
2288
  });
2243
2289
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, function (payload) {
2244
- _this16.stopKeepAlive();
2290
+ _this17.stopKeepAlive();
2245
2291
  if (payload) {
2246
- _triggerProxy.default.trigger(_this16, {
2292
+ _triggerProxy.default.trigger(_this17, {
2247
2293
  file: 'meeting/index',
2248
2294
  function: 'setUpLocusInfoSelfListener'
2249
2295
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_GUEST_ADMITTED, {
@@ -2251,7 +2297,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2251
2297
  });
2252
2298
  _metrics.default.postEvent({
2253
2299
  event: _config.eventType.LOBBY_EXITED,
2254
- meeting: _this16
2300
+ meeting: _this17
2255
2301
  });
2256
2302
  }
2257
2303
  });
@@ -2259,34 +2305,34 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2259
2305
  // @ts-ignore - check if MEDIA_INACTIVITY exists
2260
2306
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, function () {
2261
2307
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_MEDIA_INACTIVE, {
2262
- correlation_id: _this16.correlationId,
2263
- locus_id: _this16.locusId
2308
+ correlation_id: _this17.correlationId,
2309
+ locus_id: _this17.locusId
2264
2310
  });
2265
- _this16.reconnect();
2311
+ _this17.reconnect();
2266
2312
  });
2267
2313
 
2268
2314
  // There is two stats for mute one is the actual media being sent or received
2269
2315
  // The second on is if the audio is muted, we need to tell the statsAnalyzer when
2270
2316
  // the audio is muted or the user is not willing to send media
2271
2317
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_STATUS_CHANGE, function (status) {
2272
- if (_this16.statsAnalyzer) {
2273
- var _this16$mediaProperti, _this16$audio2, _this16$mediaProperti2, _this16$video, _this16$mediaProperti3, _this16$mediaProperti4, _this16$mediaProperti5, _this16$mediaProperti6;
2274
- _this16.statsAnalyzer.updateMediaStatus({
2318
+ if (_this17.statsAnalyzer) {
2319
+ var _this17$mediaProperti, _this17$audio2, _this17$mediaProperti2, _this17$video, _this17$mediaProperti3, _this17$mediaProperti4, _this17$mediaProperti5, _this17$mediaProperti6;
2320
+ _this17.statsAnalyzer.updateMediaStatus({
2275
2321
  actual: status,
2276
2322
  expected: {
2277
2323
  // We need to check what should be the actual direction of media
2278
- sendAudio: ((_this16$mediaProperti = _this16.mediaProperties.mediaDirection) === null || _this16$mediaProperti === void 0 ? void 0 : _this16$mediaProperti.sendAudio) && !((_this16$audio2 = _this16.audio) !== null && _this16$audio2 !== void 0 && _this16$audio2.isMuted()),
2279
- sendVideo: ((_this16$mediaProperti2 = _this16.mediaProperties.mediaDirection) === null || _this16$mediaProperti2 === void 0 ? void 0 : _this16$mediaProperti2.sendVideo) && !((_this16$video = _this16.video) !== null && _this16$video !== void 0 && _this16$video.isMuted()),
2280
- sendShare: (_this16$mediaProperti3 = _this16.mediaProperties.mediaDirection) === null || _this16$mediaProperti3 === void 0 ? void 0 : _this16$mediaProperti3.sendShare,
2281
- receiveAudio: (_this16$mediaProperti4 = _this16.mediaProperties.mediaDirection) === null || _this16$mediaProperti4 === void 0 ? void 0 : _this16$mediaProperti4.receiveAudio,
2282
- receiveVideo: (_this16$mediaProperti5 = _this16.mediaProperties.mediaDirection) === null || _this16$mediaProperti5 === void 0 ? void 0 : _this16$mediaProperti5.receiveVideo,
2283
- receiveShare: (_this16$mediaProperti6 = _this16.mediaProperties.mediaDirection) === null || _this16$mediaProperti6 === void 0 ? void 0 : _this16$mediaProperti6.receiveShare
2324
+ sendAudio: ((_this17$mediaProperti = _this17.mediaProperties.mediaDirection) === null || _this17$mediaProperti === void 0 ? void 0 : _this17$mediaProperti.sendAudio) && !((_this17$audio2 = _this17.audio) !== null && _this17$audio2 !== void 0 && _this17$audio2.isMuted()),
2325
+ sendVideo: ((_this17$mediaProperti2 = _this17.mediaProperties.mediaDirection) === null || _this17$mediaProperti2 === void 0 ? void 0 : _this17$mediaProperti2.sendVideo) && !((_this17$video = _this17.video) !== null && _this17$video !== void 0 && _this17$video.isMuted()),
2326
+ sendShare: (_this17$mediaProperti3 = _this17.mediaProperties.mediaDirection) === null || _this17$mediaProperti3 === void 0 ? void 0 : _this17$mediaProperti3.sendShare,
2327
+ receiveAudio: (_this17$mediaProperti4 = _this17.mediaProperties.mediaDirection) === null || _this17$mediaProperti4 === void 0 ? void 0 : _this17$mediaProperti4.receiveAudio,
2328
+ receiveVideo: (_this17$mediaProperti5 = _this17.mediaProperties.mediaDirection) === null || _this17$mediaProperti5 === void 0 ? void 0 : _this17$mediaProperti5.receiveVideo,
2329
+ receiveShare: (_this17$mediaProperti6 = _this17.mediaProperties.mediaDirection) === null || _this17$mediaProperti6 === void 0 ? void 0 : _this17$mediaProperti6.receiveShare
2284
2330
  }
2285
2331
  });
2286
2332
  }
2287
2333
  });
2288
2334
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_CANNOT_VIEW_PARTICIPANT_LIST_CHANGE, function (payload) {
2289
- _triggerProxy.default.trigger(_this16, {
2335
+ _triggerProxy.default.trigger(_this17, {
2290
2336
  file: 'meeting/index',
2291
2337
  function: 'setUpLocusInfoSelfListener'
2292
2338
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_CANNOT_VIEW_PARTICIPANT_LIST, {
@@ -2294,7 +2340,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2294
2340
  });
2295
2341
  });
2296
2342
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_IS_SHARING_BLOCKED_CHANGE, function (payload) {
2297
- _triggerProxy.default.trigger(_this16, {
2343
+ _triggerProxy.default.trigger(_this17, {
2298
2344
  file: 'meeting/index',
2299
2345
  function: 'setUpLocusInfoSelfListener'
2300
2346
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_IS_SHARING_BLOCKED, {
@@ -2312,17 +2358,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2312
2358
  }, {
2313
2359
  key: "setUpLocusInfoMeetingListener",
2314
2360
  value: function setUpLocusInfoMeetingListener() {
2315
- var _this17 = this;
2361
+ var _this18 = this;
2316
2362
  this.locusInfo.on(_constants.EVENTS.REMOTE_RESPONSE, function (payload) {
2317
- _this17.meetingFiniteStateMachine.remote(payload);
2363
+ _this18.meetingFiniteStateMachine.remote(payload);
2318
2364
  if (payload.remoteDeclined) {
2319
- _this17.leave({
2365
+ _this18.leave({
2320
2366
  reason: payload.reason
2321
2367
  }).then(function () {
2322
2368
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Attempting to leave meeting.');
2323
2369
  }).catch(function (error) {
2324
2370
  // @ts-ignore
2325
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Issue with leave for meeting, meeting still in collection: ".concat(_this17.meeting, ", error: ").concat(error));
2371
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Issue with leave for meeting, meeting still in collection: ".concat(_this18, ", error: ").concat(error));
2326
2372
  });
2327
2373
  }
2328
2374
  });
@@ -2330,10 +2376,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2330
2376
  // if self state is NOT left
2331
2377
 
2332
2378
  // TODO: Handle sharing and wireless sharing when meeting end
2333
- if (_this17.wirelessShare) {
2334
- if (_this17.mediaProperties.shareTrack) {
2335
- _this17.mediaProperties.shareTrack.onended = null;
2336
- _this17.mediaProperties.shareTrack.stop();
2379
+ if (_this18.wirelessShare) {
2380
+ if (_this18.mediaProperties.shareTrack) {
2381
+ _this18.mediaProperties.shareTrack.onended = null;
2382
+ _this18.mediaProperties.shareTrack.stop();
2337
2383
  }
2338
2384
  }
2339
2385
  // when multiple WEB deviceType join with same user
@@ -2347,23 +2393,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2347
2393
  if (payload.shouldLeave) {
2348
2394
  // TODO: We should do cleaning of meeting object if the shouldLeave: false because there might be meeting object which we are not cleaning
2349
2395
 
2350
- _this17.leave({
2396
+ _this18.leave({
2351
2397
  reason: payload.reason
2352
2398
  }).then(function () {
2353
2399
  _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.');
2354
2400
  }).catch(function (error) {
2355
2401
  // @ts-ignore
2356
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this17.meeting, ", error: ").concat(error));
2402
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this18, ", error: ").concat(error));
2357
2403
  });
2358
2404
  } else {
2359
2405
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> MEETING_REMOVED_REASON', payload.reason);
2360
- _util.default.cleanUp(_this17);
2361
- _triggerProxy.default.trigger(_this17, {
2406
+ _util.default.cleanUp(_this18);
2407
+ _triggerProxy.default.trigger(_this18, {
2362
2408
  file: 'meeting/index',
2363
2409
  function: 'setUpLocusInfoMeetingListener'
2364
2410
  }, _constants.EVENTS.DESTROY_MEETING, {
2365
2411
  reason: payload.reason,
2366
- meetingId: _this17.id
2412
+ meetingId: _this18.id
2367
2413
  });
2368
2414
  }
2369
2415
  });
@@ -2380,13 +2426,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2380
2426
  }, {
2381
2427
  key: "updateMeetingObject",
2382
2428
  value: function updateMeetingObject(object) {
2383
- var _this18 = this;
2429
+ var _this19 = this;
2384
2430
  // Validate if these are valid meeting object property
2385
2431
  // TODO: add a check to make sure the value passed in the constructor
2386
2432
  // is not changed by any delta event
2387
2433
  if (object && (0, _keys.default)(object).length) {
2388
2434
  (0, _keys.default)(object).forEach(function (key) {
2389
- _this18[key] = object[key];
2435
+ _this19[key] = object[key];
2390
2436
  });
2391
2437
  }
2392
2438
  }
@@ -2594,7 +2640,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2594
2640
  this.conversationUrl = ((_locusMeetingObject = locusMeetingObject) === null || _locusMeetingObject === void 0 ? void 0 : _locusMeetingObject.conversationUrl) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.conversationUrl) || this.conversationUrl;
2595
2641
  this.locusUrl = ((_locusMeetingObject2 = locusMeetingObject) === null || _locusMeetingObject2 === void 0 ? void 0 : _locusMeetingObject2.url) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.locusUrl) || this.locusUrl;
2596
2642
  // @ts-ignore - config coming from registerPlugin
2597
- this.setSipUri(this.config.experimental.enableUnifiedMeetings ? ((_locusMeetingObject3 = locusMeetingObject) === null || _locusMeetingObject3 === void 0 ? void 0 : _locusMeetingObject3.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipUrl) : ((_locusMeetingObject4 = locusMeetingObject) === null || _locusMeetingObject4 === void 0 ? void 0 : _locusMeetingObject4.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipMeetingUri) || this.sipUri);
2643
+ this.setSipUri(
2644
+ // @ts-ignore
2645
+ this.config.experimental.enableUnifiedMeetings ? ((_locusMeetingObject3 = locusMeetingObject) === null || _locusMeetingObject3 === void 0 ? void 0 : _locusMeetingObject3.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipUrl) : ((_locusMeetingObject4 = locusMeetingObject) === null || _locusMeetingObject4 === void 0 ? void 0 : _locusMeetingObject4.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipMeetingUri) || this.sipUri);
2598
2646
  // @ts-ignore - config coming from registerPlugin
2599
2647
  if (this.config.experimental.enableUnifiedMeetings) {
2600
2648
  var _locusMeetingObject5;
@@ -2708,7 +2756,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2708
2756
  }, {
2709
2757
  key: "setRemoteStream",
2710
2758
  value: function setRemoteStream(pc) {
2711
- var _this19 = this;
2759
+ var _this20 = this;
2712
2760
  if (!pc) {
2713
2761
  return;
2714
2762
  }
@@ -2750,24 +2798,24 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2750
2798
  } else {
2751
2799
  trackMediaID = null;
2752
2800
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
2753
- correlation_id: _this19.correlationId,
2754
- locus_id: _this19.locusUrl.split('/').pop()
2801
+ correlation_id: _this20.correlationId,
2802
+ locus_id: _this20.locusUrl.split('/').pop()
2755
2803
  });
2756
2804
  }
2757
2805
  }
2758
2806
  switch (trackMediaID) {
2759
2807
  case MEDIA_ID.AUDIO_TRACK:
2760
2808
  eventType = _constants.EVENT_TYPES.REMOTE_AUDIO;
2761
- _this19.mediaProperties.setRemoteAudioTrack(mediaTrack);
2809
+ _this20.mediaProperties.setRemoteAudioTrack(mediaTrack);
2762
2810
  break;
2763
2811
  case MEDIA_ID.VIDEO_TRACK:
2764
2812
  eventType = _constants.EVENT_TYPES.REMOTE_VIDEO;
2765
- _this19.mediaProperties.setRemoteVideoTrack(mediaTrack);
2813
+ _this20.mediaProperties.setRemoteVideoTrack(mediaTrack);
2766
2814
  break;
2767
2815
  case MEDIA_ID.SHARE_TRACK:
2768
2816
  if (event.track) {
2769
2817
  eventType = _constants.EVENT_TYPES.REMOTE_SHARE;
2770
- _this19.mediaProperties.setRemoteShare(mediaTrack);
2818
+ _this20.mediaProperties.setRemoteShare(mediaTrack);
2771
2819
  }
2772
2820
  break;
2773
2821
  default:
@@ -2778,14 +2826,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2778
2826
 
2779
2827
  // start stats here the stats are coming null if you dont receive streams
2780
2828
 
2781
- _this19.statsAnalyzer.startAnalyzer(_this19.mediaProperties.peerConnection);
2829
+ _this20.statsAnalyzer.startAnalyzer(_this20.mediaProperties.peerConnection);
2782
2830
  if (eventType && mediaTrack) {
2783
- _triggerProxy.default.trigger(_this19, {
2831
+ _triggerProxy.default.trigger(_this20, {
2784
2832
  file: 'meeting/index',
2785
2833
  function: 'setRemoteStream:pc.ontrack'
2786
2834
  }, _constants.EVENT_TRIGGERS.MEDIA_READY, {
2787
2835
  type: eventType,
2788
- stream: _util2.default.createMediaStream([mediaTrack])
2836
+ stream: _util3.default.createMediaStream([mediaTrack])
2789
2837
  });
2790
2838
  }
2791
2839
  };
@@ -2857,7 +2905,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2857
2905
  }, {
2858
2906
  key: "closeRemoteTracks",
2859
2907
  value: function closeRemoteTracks() {
2860
- var _this20 = this;
2908
+ var _this21 = this;
2861
2909
  var _this$mediaProperties = this.mediaProperties,
2862
2910
  remoteAudioTrack = _this$mediaProperties.remoteAudioTrack,
2863
2911
  remoteVideoTrack = _this$mediaProperties.remoteVideoTrack,
@@ -2871,7 +2919,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2871
2919
  */
2872
2920
  // eslint-disable-next-line @typescript-eslint/no-shadow
2873
2921
  var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
2874
- _triggerProxy.default.trigger(_this20, {
2922
+ _triggerProxy.default.trigger(_this21, {
2875
2923
  file: 'meeting/index',
2876
2924
  function: 'closeRemoteTracks'
2877
2925
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -2915,7 +2963,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2915
2963
  function: 'setLocalTracks'
2916
2964
  }, _constants.EVENT_TRIGGERS.MEDIA_READY, {
2917
2965
  type: _constants.EVENT_TYPES.LOCAL,
2918
- stream: _util2.default.createMediaStream([this.mediaProperties.audioTrack, this.mediaProperties.videoTrack])
2966
+ stream: _util3.default.createMediaStream([this.mediaProperties.audioTrack, this.mediaProperties.videoTrack])
2919
2967
  });
2920
2968
  }
2921
2969
 
@@ -3019,7 +3067,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3019
3067
  }, {
3020
3068
  key: "setLocalShareTrack",
3021
3069
  value: function setLocalShareTrack(localShare) {
3022
- var _this21 = this;
3070
+ var _this22 = this;
3023
3071
  var settings = null;
3024
3072
  if (localShare) {
3025
3073
  this.mediaProperties.setLocalShareTrack(_util.default.getTrack(localShare).videoTrack);
@@ -3037,7 +3085,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3037
3085
  _loggerProxy.default.logger.log('Meeting:index#setLocalShareTrack --> Screen settings.', (0, _stringify.default)(this.mediaProperties.mediaSettings.screen));
3038
3086
  }
3039
3087
  contentTracks.onended = function () {
3040
- return _this21.handleShareTrackEnded(localShare);
3088
+ return _this22.handleShareTrackEnded(localShare);
3041
3089
  };
3042
3090
  _triggerProxy.default.trigger(this, {
3043
3091
  file: 'meeting/index',
@@ -3059,7 +3107,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3059
3107
  }, {
3060
3108
  key: "closeLocalStream",
3061
3109
  value: function closeLocalStream() {
3062
- var _this22 = this;
3110
+ var _this23 = this;
3063
3111
  var _this$mediaProperties2 = this.mediaProperties,
3064
3112
  audioTrack = _this$mediaProperties2.audioTrack,
3065
3113
  videoTrack = _this$mediaProperties2.videoTrack;
@@ -3071,7 +3119,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3071
3119
 
3072
3120
  // triggers event for audio and video stop , sometime either audio or video one of them exists
3073
3121
  if (audioStopped || videoStopped) {
3074
- _triggerProxy.default.trigger(_this22, {
3122
+ _triggerProxy.default.trigger(_this23, {
3075
3123
  file: 'meeting/index',
3076
3124
  function: 'closeLocalStream'
3077
3125
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -3093,11 +3141,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3093
3141
  }, {
3094
3142
  key: "closeLocalShare",
3095
3143
  value: function closeLocalShare() {
3096
- var _this23 = this;
3144
+ var _this24 = this;
3097
3145
  var track = this.mediaProperties.shareTrack;
3098
3146
  return _media.default.stopTracks(track).then(function () {
3099
3147
  if (track && track.readyState === _constants.ENDED) {
3100
- _triggerProxy.default.trigger(_this23, {
3148
+ _triggerProxy.default.trigger(_this24, {
3101
3149
  file: 'meeting/index',
3102
3150
  function: 'closeLocalShare'
3103
3151
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -3143,7 +3191,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3143
3191
  }, {
3144
3192
  key: "setMercuryListener",
3145
3193
  value: function setMercuryListener() {
3146
- var _this24 = this;
3194
+ var _this25 = this;
3147
3195
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
3148
3196
  // if the meeting has active peer connections, it should try to reconnect.
3149
3197
  // @ts-ignore
@@ -3151,16 +3199,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3151
3199
  _loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online');
3152
3200
 
3153
3201
  // Only send restore event when it was disconnected before and for connected later
3154
- if (!_this24.hasWebsocketConnected) {
3202
+ if (!_this25.hasWebsocketConnected) {
3155
3203
  _metrics.default.postEvent({
3156
3204
  event: _config.eventType.MERCURY_CONNECTION_RESTORED,
3157
- meeting: _this24
3205
+ meeting: _this25
3158
3206
  });
3159
3207
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
3160
- correlation_id: _this24.correlationId
3208
+ correlation_id: _this25.correlationId
3161
3209
  });
3162
3210
  }
3163
- _this24.hasWebsocketConnected = true;
3211
+ _this25.hasWebsocketConnected = true;
3164
3212
  });
3165
3213
 
3166
3214
  // @ts-ignore
@@ -3168,10 +3216,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3168
3216
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
3169
3217
  _metrics.default.postEvent({
3170
3218
  event: _config.eventType.MERCURY_CONNECTION_LOST,
3171
- meeting: _this24
3219
+ meeting: _this25
3172
3220
  });
3173
3221
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
3174
- correlation_id: _this24.correlationId
3222
+ correlation_id: _this25.correlationId
3175
3223
  });
3176
3224
  });
3177
3225
  }
@@ -3230,7 +3278,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3230
3278
  }, {
3231
3279
  key: "muteAudio",
3232
3280
  value: function muteAudio() {
3233
- var _this25 = this;
3281
+ var _this26 = this;
3234
3282
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3235
3283
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3236
3284
  }
@@ -3247,10 +3295,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3247
3295
 
3248
3296
  // First, stop sending the local audio media
3249
3297
  return logRequest(this.audio.handleClientRequest(this, true).then(function () {
3250
- _util.default.handleAudioLogging(_this25.mediaProperties.audioTrack);
3298
+ _util.default.handleAudioLogging(_this26.mediaProperties.audioTrack);
3251
3299
  _metrics.default.postEvent({
3252
3300
  event: _config.eventType.MUTED,
3253
- meeting: _this25,
3301
+ meeting: _this26,
3254
3302
  data: {
3255
3303
  trigger: _config.trigger.USER_INTERACTION,
3256
3304
  mediaType: _config.mediaType.AUDIO
@@ -3258,8 +3306,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3258
3306
  });
3259
3307
  }).catch(function (error) {
3260
3308
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
3261
- correlation_id: _this25.correlationId,
3262
- locus_id: _this25.locusUrl.split('/').pop(),
3309
+ correlation_id: _this26.correlationId,
3310
+ locus_id: _this26.locusUrl.split('/').pop(),
3263
3311
  reason: error.message,
3264
3312
  stack: error.stack
3265
3313
  });
@@ -3280,7 +3328,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3280
3328
  }, {
3281
3329
  key: "unmuteAudio",
3282
3330
  value: function unmuteAudio() {
3283
- var _this26 = this;
3331
+ var _this27 = this;
3284
3332
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3285
3333
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3286
3334
  }
@@ -3297,10 +3345,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3297
3345
 
3298
3346
  // First, send the control to unmute the participant on the server
3299
3347
  return logRequest(this.audio.handleClientRequest(this, false).then(function () {
3300
- _util.default.handleAudioLogging(_this26.mediaProperties.audioTrack);
3348
+ _util.default.handleAudioLogging(_this27.mediaProperties.audioTrack);
3301
3349
  _metrics.default.postEvent({
3302
3350
  event: _config.eventType.UNMUTED,
3303
- meeting: _this26,
3351
+ meeting: _this27,
3304
3352
  data: {
3305
3353
  trigger: _config.trigger.USER_INTERACTION,
3306
3354
  mediaType: _config.mediaType.AUDIO
@@ -3308,8 +3356,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3308
3356
  });
3309
3357
  }).catch(function (error) {
3310
3358
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_AUDIO_FAILURE, {
3311
- correlation_id: _this26.correlationId,
3312
- locus_id: _this26.locusUrl.split('/').pop(),
3359
+ correlation_id: _this27.correlationId,
3360
+ locus_id: _this27.locusUrl.split('/').pop(),
3313
3361
  reason: error.message,
3314
3362
  stack: error.stack
3315
3363
  });
@@ -3330,7 +3378,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3330
3378
  }, {
3331
3379
  key: "muteVideo",
3332
3380
  value: function muteVideo() {
3333
- var _this27 = this;
3381
+ var _this28 = this;
3334
3382
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3335
3383
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3336
3384
  }
@@ -3345,10 +3393,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3345
3393
  }
3346
3394
  var LOG_HEADER = 'Meeting:index#muteVideo -->';
3347
3395
  return logRequest(this.video.handleClientRequest(this, true).then(function () {
3348
- _util.default.handleVideoLogging(_this27.mediaProperties.videoTrack);
3396
+ _util.default.handleVideoLogging(_this28.mediaProperties.videoTrack);
3349
3397
  _metrics.default.postEvent({
3350
3398
  event: _config.eventType.MUTED,
3351
- meeting: _this27,
3399
+ meeting: _this28,
3352
3400
  data: {
3353
3401
  trigger: _config.trigger.USER_INTERACTION,
3354
3402
  mediaType: _config.mediaType.VIDEO
@@ -3356,8 +3404,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3356
3404
  });
3357
3405
  }).catch(function (error) {
3358
3406
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_VIDEO_FAILURE, {
3359
- correlation_id: _this27.correlationId,
3360
- locus_id: _this27.locusUrl.split('/').pop(),
3407
+ correlation_id: _this28.correlationId,
3408
+ locus_id: _this28.locusUrl.split('/').pop(),
3361
3409
  reason: error.message,
3362
3410
  stack: error.stack
3363
3411
  });
@@ -3378,7 +3426,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3378
3426
  }, {
3379
3427
  key: "unmuteVideo",
3380
3428
  value: function unmuteVideo() {
3381
- var _this28 = this;
3429
+ var _this29 = this;
3382
3430
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3383
3431
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3384
3432
  }
@@ -3393,10 +3441,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3393
3441
  }
3394
3442
  var LOG_HEADER = 'Meeting:index#unmuteVideo -->';
3395
3443
  return logRequest(this.video.handleClientRequest(this, false).then(function () {
3396
- _util.default.handleVideoLogging(_this28.mediaProperties.videoTrack);
3444
+ _util.default.handleVideoLogging(_this29.mediaProperties.videoTrack);
3397
3445
  _metrics.default.postEvent({
3398
3446
  event: _config.eventType.UNMUTED,
3399
- meeting: _this28,
3447
+ meeting: _this29,
3400
3448
  data: {
3401
3449
  trigger: _config.trigger.USER_INTERACTION,
3402
3450
  mediaType: _config.mediaType.VIDEO
@@ -3404,8 +3452,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3404
3452
  });
3405
3453
  }).catch(function (error) {
3406
3454
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_VIDEO_FAILURE, {
3407
- correlation_id: _this28.correlationId,
3408
- locus_id: _this28.locusUrl.split('/').pop(),
3455
+ correlation_id: _this29.correlationId,
3456
+ locus_id: _this29.locusUrl.split('/').pop(),
3409
3457
  reason: error.message,
3410
3458
  stack: error.stack
3411
3459
  });
@@ -3445,18 +3493,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3445
3493
  }, {
3446
3494
  key: "joinWithMedia",
3447
3495
  value: function joinWithMedia() {
3448
- var _this29 = this;
3496
+ var _this30 = this;
3449
3497
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3450
3498
  // TODO: add validations for parameters
3451
3499
  var mediaSettings = options.mediaSettings,
3452
3500
  joinOptions = options.joinOptions,
3453
3501
  audioVideoOptions = options.audioVideoOptions;
3454
3502
  return this.join(joinOptions).then(function (joinResponse) {
3455
- return _this29.getMediaStreams(mediaSettings, audioVideoOptions).then(function (_ref9) {
3503
+ return _this30.getMediaStreams(mediaSettings, audioVideoOptions).then(function (_ref9) {
3456
3504
  var _ref10 = (0, _slicedToArray2.default)(_ref9, 2),
3457
3505
  localStream = _ref10[0],
3458
3506
  localShare = _ref10[1];
3459
- return _this29.addMedia({
3507
+ return _this30.addMedia({
3460
3508
  mediaSettings: mediaSettings,
3461
3509
  localShare: localShare,
3462
3510
  localStream: localStream
@@ -3471,8 +3519,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3471
3519
  }).catch(function (error) {
3472
3520
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', error);
3473
3521
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
3474
- correlation_id: _this29.correlationId,
3475
- locus_id: _this29.locusUrl.split('/').pop(),
3522
+ correlation_id: _this30.correlationId,
3523
+ locus_id: _this30.locusUrl.split('/').pop(),
3476
3524
  reason: error.message,
3477
3525
  stack: error.stack
3478
3526
  }, {
@@ -3493,7 +3541,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3493
3541
  }, {
3494
3542
  key: "reconnect",
3495
3543
  value: function reconnect(options) {
3496
- var _this30 = this;
3544
+ var _this31 = this;
3497
3545
  _loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
3498
3546
  if (!this.reconnectionManager || !this.reconnectionManager.reconnect) {
3499
3547
  return _promise.default.reject(new _parameter.default('Cannot reconnect, ReconnectionManager must first be defined.'));
@@ -3521,13 +3569,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3521
3569
  function: 'reconnect'
3522
3570
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING);
3523
3571
  return this.reconnectionManager.reconnect(options).then(function () {
3524
- _triggerProxy.default.trigger(_this30, {
3572
+ _triggerProxy.default.trigger(_this31, {
3525
3573
  file: 'meeting/index',
3526
3574
  function: 'reconnect'
3527
3575
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_SUCCESS);
3528
3576
  _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
3529
3577
  }).catch(function (error) {
3530
- _triggerProxy.default.trigger(_this30, {
3578
+ _triggerProxy.default.trigger(_this31, {
3531
3579
  file: 'meeting/index',
3532
3580
  function: 'reconnect'
3533
3581
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_FAILURE, {
@@ -3535,18 +3583,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3535
3583
  });
3536
3584
  _loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
3537
3585
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_RECONNECT_FAILURE, {
3538
- correlation_id: _this30.correlationId,
3539
- locus_id: _this30.locusUrl.split('/').pop(),
3586
+ correlation_id: _this31.correlationId,
3587
+ locus_id: _this31.locusUrl.split('/').pop(),
3540
3588
  reason: error.message,
3541
3589
  stack: error.stack
3542
3590
  });
3543
- _this30.uploadLogs({
3591
+ _this31.uploadLogs({
3544
3592
  file: 'meeting/index',
3545
3593
  function: 'reconnect'
3546
3594
  });
3547
3595
  return _promise.default.reject(new _reconnection.default('Reconnection failure event', error));
3548
3596
  }).finally(function () {
3549
- _this30.reconnectionManager.reset();
3597
+ _this31.reconnectionManager.reset();
3550
3598
  });
3551
3599
  }
3552
3600
 
@@ -3574,16 +3622,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3574
3622
  }, {
3575
3623
  key: "monitorTranscriptionSocketConnection",
3576
3624
  value: function monitorTranscriptionSocketConnection() {
3577
- var _this31 = this;
3625
+ var _this32 = this;
3578
3626
  this.transcription.onCloseSocket(function (event) {
3579
3627
  _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));
3580
- _this31.triggerStopReceivingTranscriptionEvent();
3628
+ _this32.triggerStopReceivingTranscriptionEvent();
3581
3629
  });
3582
3630
  this.transcription.onErrorSocket(function (event) {
3583
3631
  _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));
3584
- _this31.triggerStopReceivingTranscriptionEvent();
3632
+ _this32.triggerStopReceivingTranscriptionEvent();
3585
3633
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
3586
- correlation_id: _this31.correlationId,
3634
+ correlation_id: _this32.correlationId,
3587
3635
  reason: 'unexpected error: transcription LLM web socket connection error had occured.',
3588
3636
  event: event
3589
3637
  });
@@ -3599,7 +3647,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3599
3647
  key: "receiveTranscription",
3600
3648
  value: function () {
3601
3649
  var _receiveTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
3602
- var _this32 = this;
3650
+ var _this33 = this;
3603
3651
  var datachannelUrl, _yield$this$request, webSocketUrl;
3604
3652
  return _regenerator.default.wrap(function _callee2$(_context2) {
3605
3653
  while (1) switch (_context2.prev = _context2.next) {
@@ -3626,7 +3674,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3626
3674
 
3627
3675
  // retrieve and pass the payload
3628
3676
  this.transcription.subscribe(function (payload) {
3629
- _triggerProxy.default.trigger(_this32, {
3677
+ _triggerProxy.default.trigger(_this33, {
3630
3678
  file: 'meeting/index',
3631
3679
  function: 'join'
3632
3680
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION, payload);
@@ -3700,14 +3748,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3700
3748
  }, {
3701
3749
  key: "join",
3702
3750
  value: function join() {
3703
- var _this33 = this;
3751
+ var _this34 = this;
3704
3752
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3705
3753
  // @ts-ignore - fix type
3706
3754
  if (!this.webex.meetings.registered) {
3707
3755
  var errorMessage = 'Meeting:index#join --> Device not registered';
3708
- var _error = new Error(errorMessage);
3756
+ var error = new Error(errorMessage);
3709
3757
  _loggerProxy.default.logger.error(errorMessage);
3710
- return _promise.default.reject(_error);
3758
+ return _promise.default.reject(error);
3711
3759
  }
3712
3760
 
3713
3761
  // If a join request is being processed, refer to the deferred promise.
@@ -3760,11 +3808,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3760
3808
  if (typeof options.meetingQuality === 'string') {
3761
3809
  if (!_constants.QUALITY_LEVELS[options.meetingQuality]) {
3762
3810
  var _errorMessage = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
3763
- var _error2 = new Error(_errorMessage);
3811
+ var _error = new Error(_errorMessage);
3764
3812
  _loggerProxy.default.logger.error(_errorMessage);
3765
- joinFailed(_error2);
3813
+ joinFailed(_error);
3766
3814
  this.deferJoin = undefined;
3767
- return _promise.default.reject(_error2);
3815
+ return _promise.default.reject(_error);
3768
3816
  }
3769
3817
  this.mediaProperties.setLocalQualityLevel(options.meetingQuality);
3770
3818
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
@@ -3773,8 +3821,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3773
3821
  if (!_constants.QUALITY_LEVELS[options.meetingQuality.local] && !_constants.QUALITY_LEVELS[options.meetingQuality.remote]) {
3774
3822
  var _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality.local || options.meetingQuality.remote, " not defined");
3775
3823
  _loggerProxy.default.logger.error(_errorMessage2);
3776
- var _error3 = new Error(_errorMessage2);
3777
- joinFailed(_error3);
3824
+ var _error2 = new Error(_errorMessage2);
3825
+ joinFailed(_error2);
3778
3826
  this.deferJoin = undefined;
3779
3827
  return _promise.default.reject(new Error(_errorMessage2));
3780
3828
  }
@@ -3787,14 +3835,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3787
3835
  }
3788
3836
  }
3789
3837
  return _util.default.joinMeetingOptions(this, options).then(function (join) {
3790
- _this33.meetingFiniteStateMachine.join();
3838
+ _this34.meetingFiniteStateMachine.join();
3791
3839
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
3792
3840
  return join;
3793
3841
  }).then(function (join) {
3794
3842
  joinSuccess(join);
3795
- _this33.deferJoin = undefined;
3843
+ _this34.deferJoin = undefined;
3796
3844
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
3797
- correlation_id: _this33.correlationId
3845
+ correlation_id: _this34.correlationId
3798
3846
  });
3799
3847
  return join;
3800
3848
  }).then( /*#__PURE__*/function () {
@@ -3806,16 +3854,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3806
3854
  _context3.next = 8;
3807
3855
  break;
3808
3856
  }
3809
- if (!(_this33.config.receiveTranscription || options.receiveTranscription)) {
3857
+ if (!(_this34.config.receiveTranscription || options.receiveTranscription)) {
3810
3858
  _context3.next = 6;
3811
3859
  break;
3812
3860
  }
3813
- if (!_this33.isTranscriptionSupported()) {
3861
+ if (!_this34.isTranscriptionSupported()) {
3814
3862
  _context3.next = 6;
3815
3863
  break;
3816
3864
  }
3817
3865
  _context3.next = 5;
3818
- return _this33.receiveTranscription();
3866
+ return _this34.receiveTranscription();
3819
3867
  case 5:
3820
3868
  _loggerProxy.default.logger.info('Meeting:index#join --> enabled to recieve transcription!');
3821
3869
  case 6:
@@ -3836,12 +3884,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3836
3884
  };
3837
3885
  }()).catch(function (error) {
3838
3886
  var _error$error;
3839
- _this33.meetingFiniteStateMachine.fail(error);
3887
+ _this34.meetingFiniteStateMachine.fail(error);
3840
3888
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
3841
3889
  _metrics.default.postEvent({
3842
3890
  event: _config.eventType.LOCUS_JOIN_RESPONSE,
3843
- meeting: _this33,
3844
- meetingId: _this33.id,
3891
+ meeting: _this34,
3892
+ meetingId: _this34.id,
3845
3893
  data: {
3846
3894
  errors: [_metrics.default.parseLocusError(error.error, true)]
3847
3895
  }
@@ -3849,18 +3897,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3849
3897
 
3850
3898
  // TODO: change this to error codes and pre defined dictionary
3851
3899
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
3852
- correlation_id: _this33.correlationId,
3900
+ correlation_id: _this34.correlationId,
3853
3901
  reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
3854
3902
  stack: error.stack
3855
3903
  });
3856
3904
 
3857
3905
  // Upload logs on join Failure
3858
- _triggerProxy.default.trigger(_this33, {
3906
+ _triggerProxy.default.trigger(_this34, {
3859
3907
  file: 'meeting/index',
3860
3908
  function: 'join'
3861
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this33);
3909
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this34);
3862
3910
  joinFailed(error);
3863
- _this33.deferJoin = undefined;
3911
+ _this34.deferJoin = undefined;
3864
3912
  return _promise.default.reject(error);
3865
3913
  });
3866
3914
  }
@@ -3903,26 +3951,28 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3903
3951
  }, {
3904
3952
  key: "dialInPstn",
3905
3953
  value: function dialInPstn() {
3906
- var _this34 = this;
3954
+ var _this35 = this;
3907
3955
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
3908
3956
 
3909
3957
  var correlationId = this.correlationId,
3910
3958
  locusUrl = this.locusUrl;
3911
3959
  if (!this.dialInUrl) this.dialInUrl = "dialin:///".concat(_uuid.default.v4());
3912
- return this.meetingRequest.dialIn({
3960
+ return this.meetingRequest
3961
+ // @ts-ignore
3962
+ .dialIn({
3913
3963
  correlationId: correlationId,
3914
3964
  dialInUrl: this.dialInUrl,
3915
3965
  locusUrl: locusUrl,
3916
3966
  clientUrl: this.deviceUrl
3917
3967
  }).then(function (res) {
3918
- _this34.locusInfo.onFullLocus(res.body.locus);
3968
+ _this35.locusInfo.onFullLocus(res.body.locus);
3919
3969
  }).catch(function (error) {
3920
3970
  var _error$error2;
3921
3971
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
3922
- correlation_id: _this34.correlationId,
3923
- dial_in_url: _this34.dialInUrl,
3972
+ correlation_id: _this35.correlationId,
3973
+ dial_in_url: _this35.dialInUrl,
3924
3974
  locus_id: locusUrl.split('/').pop(),
3925
- client_url: _this34.deviceUrl,
3975
+ client_url: _this35.deviceUrl,
3926
3976
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
3927
3977
  stack: error.stack
3928
3978
  });
@@ -3940,27 +3990,29 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3940
3990
  }, {
3941
3991
  key: "dialOutPstn",
3942
3992
  value: function dialOutPstn(phoneNumber) {
3943
- var _this35 = this;
3993
+ var _this36 = this;
3944
3994
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
3945
3995
 
3946
3996
  var correlationId = this.correlationId,
3947
3997
  locusUrl = this.locusUrl;
3948
3998
  if (!this.dialOutUrl) this.dialOutUrl = "dialout:///".concat(_uuid.default.v4());
3949
- return this.meetingRequest.dialOut({
3999
+ return this.meetingRequest
4000
+ // @ts-ignore
4001
+ .dialOut({
3950
4002
  correlationId: correlationId,
3951
4003
  dialOutUrl: this.dialOutUrl,
3952
4004
  phoneNumber: phoneNumber,
3953
4005
  locusUrl: locusUrl,
3954
4006
  clientUrl: this.deviceUrl
3955
4007
  }).then(function (res) {
3956
- _this35.locusInfo.onFullLocus(res.body.locus);
4008
+ _this36.locusInfo.onFullLocus(res.body.locus);
3957
4009
  }).catch(function (error) {
3958
4010
  var _error$error3;
3959
4011
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
3960
- correlation_id: _this35.correlationId,
3961
- dial_out_url: _this35.dialOutUrl,
4012
+ correlation_id: _this36.correlationId,
4013
+ dial_out_url: _this36.dialOutUrl,
3962
4014
  locus_id: locusUrl.split('/').pop(),
3963
- client_url: _this35.deviceUrl,
4015
+ client_url: _this36.deviceUrl,
3964
4016
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
3965
4017
  stack: error.stack
3966
4018
  });
@@ -3991,7 +4043,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3991
4043
  }, {
3992
4044
  key: "moveTo",
3993
4045
  value: function moveTo(resourceId) {
3994
- var _this36 = this;
4046
+ var _this37 = this;
3995
4047
  if (!resourceId) {
3996
4048
  throw new _parameter.default('Cannot move call without a resourceId.');
3997
4049
  }
@@ -4027,12 +4079,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4027
4079
  while (1) switch (_context4.prev = _context4.next) {
4028
4080
  case 0:
4029
4081
  _context4.prev = 0;
4030
- if (!_this36.isSharing) {
4082
+ if (!_this37.isSharing) {
4031
4083
  _context4.next = 4;
4032
4084
  break;
4033
4085
  }
4034
4086
  _context4.next = 4;
4035
- return _this36.releaseScreenShareFloor();
4087
+ return _this37.releaseScreenShareFloor();
4036
4088
  case 4:
4037
4089
  mediaSettings = {
4038
4090
  mediaDirection: {
@@ -4044,22 +4096,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4044
4096
  receiveShare: true
4045
4097
  }
4046
4098
  }; // clean up the local tracks
4047
- _this36.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
4099
+ _this37.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
4048
4100
 
4049
4101
  // close the existing local tracks
4050
4102
  _context4.next = 8;
4051
- return _this36.closeLocalStream();
4103
+ return _this37.closeLocalStream();
4052
4104
  case 8:
4053
4105
  _context4.next = 10;
4054
- return _this36.closeLocalShare();
4106
+ return _this37.closeLocalShare();
4055
4107
  case 10:
4056
- _this36.mediaProperties.unsetMediaTracks();
4108
+ _this37.mediaProperties.unsetMediaTracks();
4057
4109
 
4058
4110
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the DX answers the meeting
4059
4111
  // once the DX answers we establish connection back the media server with only receiveShare enabled
4060
4112
  // @ts-ignore - reconnectMedia does not accept any argument
4061
4113
  _context4.next = 13;
4062
- return _this36.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
4114
+ return _this37.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
4063
4115
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
4064
4116
  });
4065
4117
  case 13:
@@ -4070,8 +4122,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4070
4122
  _context4.t0 = _context4["catch"](0);
4071
4123
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context4.t0);
4072
4124
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
4073
- correlation_id: _this36.correlationId,
4074
- locus_id: _this36.locusUrl.split('/').pop(),
4125
+ correlation_id: _this37.correlationId,
4126
+ locus_id: _this37.locusUrl.split('/').pop(),
4075
4127
  reason: _context4.t0.message,
4076
4128
  stack: _context4.t0.stack
4077
4129
  });
@@ -4086,12 +4138,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4086
4138
  resourceId: resourceId,
4087
4139
  moveToResource: true
4088
4140
  }).then(function () {
4089
- _this36.meetingFiniteStateMachine.join();
4141
+ _this37.meetingFiniteStateMachine.join();
4090
4142
  }).catch(function (error) {
4091
- _this36.meetingFiniteStateMachine.fail(error);
4143
+ _this37.meetingFiniteStateMachine.fail(error);
4092
4144
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
4093
- correlation_id: _this36.correlationId,
4094
- locus_id: _this36.locusUrl.split('/').pop(),
4145
+ correlation_id: _this37.correlationId,
4146
+ locus_id: _this37.locusUrl.split('/').pop(),
4095
4147
  reason: error.message,
4096
4148
  stack: error.stack
4097
4149
  });
@@ -4110,7 +4162,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4110
4162
  }, {
4111
4163
  key: "moveFrom",
4112
4164
  value: function moveFrom(resourceId) {
4113
- var _this37 = this;
4165
+ var _this38 = this;
4114
4166
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
4115
4167
  if (!resourceId) {
4116
4168
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -4121,19 +4173,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4121
4173
  meeting: this
4122
4174
  });
4123
4175
  return _util.default.joinMeetingOptions(this).then(function () {
4124
- return _util.default.leaveMeeting(_this37, {
4176
+ return _util.default.leaveMeeting(_this38, {
4125
4177
  resourceId: resourceId,
4126
4178
  correlationId: oldCorrelationId,
4127
4179
  moveMeeting: true
4128
4180
  }).then(function () {
4129
- _this37.resourceId = '';
4181
+ _this38.resourceId = '';
4130
4182
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
4131
4183
  });
4132
4184
  }).catch(function (error) {
4133
- _this37.meetingFiniteStateMachine.fail(error);
4185
+ _this38.meetingFiniteStateMachine.fail(error);
4134
4186
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
4135
- correlation_id: _this37.correlationId,
4136
- locus_id: _this37.locusUrl.split('/').pop(),
4187
+ correlation_id: _this38.correlationId,
4188
+ locus_id: _this38.locusUrl.split('/').pop(),
4137
4189
  reason: error.message,
4138
4190
  stack: error.stack
4139
4191
  });
@@ -4167,7 +4219,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4167
4219
  * @memberof Meeting
4168
4220
  */
4169
4221
  function addMedia() {
4170
- var _this38 = this;
4222
+ var _this39 = this;
4171
4223
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4172
4224
  var LOG_HEADER = 'Meeting:index#addMedia -->';
4173
4225
  var turnDiscoverySkippedReason;
@@ -4210,49 +4262,49 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4210
4262
  }
4211
4263
  });
4212
4264
  return _util.default.validateOptions(options).then(function () {
4213
- return _this38.roap.doTurnDiscovery(_this38, false);
4265
+ return _this39.roap.doTurnDiscovery(_this39, false);
4214
4266
  }).then(function (turnDiscoveryObject) {
4215
4267
  turnDiscoverySkippedReason = turnDiscoveryObject.turnDiscoverySkippedReason;
4216
4268
  turnServerUsed = !turnDiscoverySkippedReason;
4217
4269
  var turnServerInfo = turnDiscoveryObject.turnServerInfo;
4218
- _this38.mediaProperties.setMediaPeerConnection(_util2.default.createPeerConnection(turnServerInfo));
4219
- _this38.setMercuryListener();
4220
- _peerConnectionManager.default.setPeerConnectionEvents(_this38);
4221
- return _this38.preMedia(localStream, localShare, mediaSettings);
4270
+ _this39.mediaProperties.setMediaPeerConnection(_util3.default.createPeerConnection(turnServerInfo));
4271
+ _this39.setMercuryListener();
4272
+ _peerConnectionManager.default.setPeerConnectionEvents(_this39);
4273
+ return _this39.preMedia(localStream, localShare, mediaSettings);
4222
4274
  }).then(function () {
4223
- return _media.default.attachMedia(_this38.mediaProperties, {
4224
- meetingId: _this38.id,
4225
- remoteQualityLevel: _this38.mediaProperties.remoteQualityLevel,
4275
+ return _media.default.attachMedia(_this39.mediaProperties, {
4276
+ meetingId: _this39.id,
4277
+ remoteQualityLevel: _this39.mediaProperties.remoteQualityLevel,
4226
4278
  // @ts-ignore - config coming from registerPlugin
4227
- enableRtx: _this38.config.enableRtx,
4279
+ enableRtx: _this39.config.enableRtx,
4228
4280
  // @ts-ignore - config coming from registerPlugin
4229
- enableExtmap: _this38.config.enableExtmap,
4230
- setStartLocalSDPGenRemoteSDPRecvDelay: _this38.setStartLocalSDPGenRemoteSDPRecvDelay.bind(_this38)
4281
+ enableExtmap: _this39.config.enableExtmap,
4282
+ setStartLocalSDPGenRemoteSDPRecvDelay: _this39.setStartLocalSDPGenRemoteSDPRecvDelay.bind(_this39)
4231
4283
  });
4232
4284
  }).then(function (peerConnection) {
4233
- return _this38.getDevices().then(function (devices) {
4285
+ return _this39.getDevices().then(function (devices) {
4234
4286
  _util.default.handleDeviceLogging(devices);
4235
4287
  return peerConnection;
4236
4288
  });
4237
4289
  }).then(function (peerConnection) {
4238
- _this38.handleMediaLogging(_this38.mediaProperties);
4290
+ _this39.handleMediaLogging(_this39.mediaProperties);
4239
4291
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection Received from attachMedia "));
4240
- _this38.setRemoteStream(peerConnection);
4292
+ _this39.setRemoteStream(peerConnection);
4241
4293
  // @ts-ignore - config coming from registerPlugin
4242
- if (_this38.config.stats.enableStatsAnalyzer) {
4294
+ if (_this39.config.stats.enableStatsAnalyzer) {
4243
4295
  // TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
4244
4296
  // @ts-ignore - config coming from registerPlugin
4245
- _this38.networkQualityMonitor = new _networkQualityMonitor.default(_this38.config.stats);
4297
+ _this39.networkQualityMonitor = new _networkQualityMonitor.default(_this39.config.stats);
4246
4298
  // @ts-ignore - config coming from registerPlugin
4247
- _this38.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(_this38.config.stats, _this38.networkQualityMonitor);
4248
- _this38.setupStatsAnalyzerEventHandlers();
4249
- _this38.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this38.sendNetworkQualityEvent.bind(_this38));
4299
+ _this39.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(_this39.config.stats, _this39.networkQualityMonitor);
4300
+ _this39.setupStatsAnalyzerEventHandlers();
4301
+ _this39.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this39.sendNetworkQualityEvent.bind(_this39));
4250
4302
  }
4251
4303
  }).catch(function (error) {
4252
4304
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
4253
4305
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
4254
- correlation_id: _this38.correlationId,
4255
- locus_id: _this38.locusUrl.split('/').pop(),
4306
+ correlation_id: _this39.correlationId,
4307
+ locus_id: _this39.locusUrl.split('/').pop(),
4256
4308
  reason: error.message,
4257
4309
  stack: error.stack,
4258
4310
  turnDiscoverySkippedReason: turnDiscoverySkippedReason,
@@ -4265,12 +4317,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4265
4317
 
4266
4318
  // eslint-disable-next-line func-names
4267
4319
  // eslint-disable-next-line prefer-arrow-callback
4268
- if (_this38.type === _constants._CALL_) {
4320
+ if (_this39.type === _constants._CALL_) {
4269
4321
  resolve();
4270
4322
  }
4271
4323
  var joiningTimer = setInterval(function () {
4272
4324
  timerCount += 1;
4273
- if (_this38.meetingState === _constants.FULL_STATE.ACTIVE) {
4325
+ if (_this39.meetingState === _constants.FULL_STATE.ACTIVE) {
4274
4326
  clearInterval(joiningTimer);
4275
4327
  resolve();
4276
4328
  }
@@ -4281,51 +4333,51 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4281
4333
  }, 1000);
4282
4334
  });
4283
4335
  }).then(function () {
4284
- return logRequest(_this38.roap.sendRoapMediaRequest({
4285
- sdp: _this38.mediaProperties.peerConnection.sdp,
4286
- roapSeq: _this38.roapSeq,
4287
- meeting: _this38 // or can pass meeting ID
4336
+ return logRequest(_this39.roap.sendRoapMediaRequest({
4337
+ sdp: _this39.mediaProperties.peerConnection.sdp,
4338
+ roapSeq: _this39.roapSeq,
4339
+ meeting: _this39 // or can pass meeting ID
4288
4340
  }), {
4289
4341
  header: "".concat(LOG_HEADER, " Send Roap Media Request."),
4290
4342
  success: "".concat(LOG_HEADER, " Successfully send roap media request"),
4291
4343
  failure: "".concat(LOG_HEADER, " Error joining the call on send roap media request, ")
4292
4344
  });
4293
4345
  }).then(function () {
4294
- return _this38.mediaProperties.waitForIceConnectedState().catch(function () {
4346
+ return _this39.mediaProperties.waitForIceConnectedState().catch(function () {
4295
4347
  throw (0, _webexErrors.createMeetingsError)(30202, 'Meeting connection failed');
4296
4348
  });
4297
4349
  }).then(function () {
4298
4350
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
4299
4351
  if (mediaSettings && mediaSettings.sendShare && localShare) {
4300
- if (_this38.state === _constants.MEETING_STATE.STATES.JOINED) {
4301
- return _this38.requestScreenShareFloor();
4352
+ if (_this39.state === _constants.MEETING_STATE.STATES.JOINED) {
4353
+ return _this39.requestScreenShareFloor();
4302
4354
  }
4303
4355
 
4304
4356
  // When the self state changes to JOINED then request the floor
4305
- _this38.floorGrantPending = true;
4357
+ _this39.floorGrantPending = true;
4306
4358
  }
4307
4359
  return {};
4308
4360
  }).then(function () {
4309
- return _this38.mediaProperties.getCurrentConnectionType();
4361
+ return _this39.mediaProperties.getCurrentConnectionType();
4310
4362
  }).then(function (connectionType) {
4311
4363
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, {
4312
- correlation_id: _this38.correlationId,
4313
- locus_id: _this38.locusUrl.split('/').pop(),
4364
+ correlation_id: _this39.correlationId,
4365
+ locus_id: _this39.locusUrl.split('/').pop(),
4314
4366
  connectionType: connectionType
4315
4367
  });
4316
4368
  }).catch(function (error) {
4317
4369
  // Clean up stats analyzer, peer connection, and turn off listeners
4318
- var stopStatsAnalyzer = _this38.statsAnalyzer ? _this38.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
4370
+ var stopStatsAnalyzer = _this39.statsAnalyzer ? _this39.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
4319
4371
  return stopStatsAnalyzer.then(function () {
4320
- _this38.statsAnalyzer = null;
4321
- if (_this38.mediaProperties.peerConnection) {
4322
- _this38.closePeerConnections();
4323
- _this38.unsetPeerConnections();
4372
+ _this39.statsAnalyzer = null;
4373
+ if (_this39.mediaProperties.peerConnection) {
4374
+ _this39.closePeerConnections();
4375
+ _this39.unsetPeerConnections();
4324
4376
  }
4325
4377
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
4326
4378
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
4327
- correlation_id: _this38.correlationId,
4328
- locus_id: _this38.locusUrl.split('/').pop(),
4379
+ correlation_id: _this39.correlationId,
4380
+ locus_id: _this39.locusUrl.split('/').pop(),
4329
4381
  reason: error.message,
4330
4382
  stack: error.stack,
4331
4383
  code: error.code,
@@ -4334,16 +4386,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4334
4386
  });
4335
4387
 
4336
4388
  // Upload logs on error while adding media
4337
- _triggerProxy.default.trigger(_this38, {
4389
+ _triggerProxy.default.trigger(_this39, {
4338
4390
  file: 'meeting/index',
4339
4391
  function: 'addMedia'
4340
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this38);
4392
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this39);
4341
4393
 
4342
4394
  // If addMedia failes for not establishing connection then
4343
4395
  // leave the meeting with reson connection failed as meeting anyways will end
4344
4396
  // and cannot be connected unless network condition is checked for firewall
4345
4397
  if (error.code === _webexErrors.InvalidSdpError.CODE) {
4346
- _this38.leave({
4398
+ _this39.leave({
4347
4399
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
4348
4400
  });
4349
4401
  }
@@ -4373,7 +4425,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4373
4425
  }, {
4374
4426
  key: "enqueueMediaUpdate",
4375
4427
  value: function enqueueMediaUpdate(mediaUpdateType, options) {
4376
- var _this39 = this;
4428
+ var _this40 = this;
4377
4429
  return new _promise.default(function (resolve, reject) {
4378
4430
  var queueItem = {
4379
4431
  pendingPromiseResolve: resolve,
@@ -4382,7 +4434,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4382
4434
  options: options
4383
4435
  };
4384
4436
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
4385
- _this39.queuedMediaUpdates.push(queueItem);
4437
+ _this40.queuedMediaUpdates.push(queueItem);
4386
4438
  });
4387
4439
  }
4388
4440
 
@@ -4408,7 +4460,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4408
4460
  * @memberof Meeting
4409
4461
  */
4410
4462
  function updateMedia() {
4411
- var _this40 = this;
4463
+ var _this41 = this;
4412
4464
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4413
4465
  var LOG_HEADER = 'Meeting:index#updateMedia -->';
4414
4466
  if (!this.canUpdateMedia()) {
@@ -4419,68 +4471,69 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4419
4471
  mediaSettings = options.mediaSettings;
4420
4472
  var previousSendShareStatus = this.mediaProperties.mediaDirection.sendShare;
4421
4473
  return _util.default.validateOptions(options).then(function () {
4422
- return _this40.preMedia(localStream, localShare, mediaSettings);
4474
+ return _this41.preMedia(localStream, localShare, mediaSettings);
4423
4475
  }).then(function () {
4424
- return _media.default.updateMedia(_this40.mediaProperties, {
4425
- meetingId: _this40.id,
4426
- remoteQualityLevel: _this40.mediaProperties.remoteQualityLevel,
4476
+ return _media.default.updateMedia(_this41.mediaProperties, {
4477
+ meetingId: _this41.id,
4478
+ remoteQualityLevel: _this41.mediaProperties.remoteQualityLevel,
4427
4479
  // @ts-ignore - config coming from registerPlugin
4428
- enableRtx: _this40.config.enableRtx,
4480
+ enableRtx: _this41.config.enableRtx,
4429
4481
  // @ts-ignore - config coming from registerPlugin
4430
- enableExtmap: _this40.config.enableExtmap
4482
+ enableExtmap: _this41.config.enableExtmap
4431
4483
  }).then(function (peerConnection) {
4432
4484
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection received from updateMedia, ").concat(peerConnection));
4433
- _this40.setRemoteStream(peerConnection);
4485
+ _this41.setRemoteStream(peerConnection);
4434
4486
  if (mediaSettings.receiveShare || localShare) {
4435
4487
  _peerConnectionManager.default.setContentSlides(peerConnection);
4436
4488
  }
4437
4489
  }).catch(function (error) {
4438
4490
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error updatedMedia, "), error);
4439
4491
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
4440
- correlation_id: _this40.correlationId,
4441
- locus_id: _this40.locusUrl.split('/').pop(),
4492
+ correlation_id: _this41.correlationId,
4493
+ locus_id: _this41.locusUrl.split('/').pop(),
4442
4494
  reason: error.message,
4443
4495
  stack: error.stack
4444
4496
  });
4445
4497
  throw error;
4446
4498
  }).then(function () {
4447
- return logRequest(_this40.roap.sendRoapMediaRequest({
4448
- sdp: _this40.mediaProperties.peerConnection.sdp,
4449
- roapSeq: _this40.roapSeq,
4450
- meeting: _this40 // or can pass meeting ID
4499
+ return logRequest(_this41.roap.sendRoapMediaRequest({
4500
+ sdp: _this41.mediaProperties.peerConnection.sdp,
4501
+ roapSeq: _this41.roapSeq,
4502
+ meeting: _this41 // or can pass meeting ID
4451
4503
  }), {
4452
4504
  header: "".concat(LOG_HEADER, " sendRoapMediaRequest being sent"),
4453
4505
  success: "".concat(LOG_HEADER, " sendRoadMediaRequest successful"),
4454
4506
  failure: "".concat(LOG_HEADER, " Error updateMedia on send roap media request, ")
4455
4507
  });
4456
4508
  }).then(function () {
4457
- return _this40.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4509
+ return _this41.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4458
4510
  }).then(function (startShare) {
4459
4511
  // This is a special case if we do an /floor grant followed by /media
4460
4512
  // we actually get a OFFER from the server and a GLAR condition happens
4461
4513
  if (startShare) {
4462
4514
  // We are assuming that the clients are connected when doing an update
4463
- return _this40.share();
4515
+ // @ts-ignore
4516
+ return _this41.share();
4464
4517
  }
4465
- throw error;
4518
+ return _promise.default.resolve();
4466
4519
  }).then(function () {
4467
- return logRequest(_this40.roap.sendRoapMediaRequest({
4468
- sdp: _this40.mediaProperties.peerConnection.sdp,
4469
- roapSeq: _this40.roapSeq,
4470
- meeting: _this40 // or can pass meeting ID
4520
+ return logRequest(_this41.roap.sendRoapMediaRequest({
4521
+ sdp: _this41.mediaProperties.peerConnection.sdp,
4522
+ roapSeq: _this41.roapSeq,
4523
+ meeting: _this41 // or can pass meeting ID
4471
4524
  }), {
4472
4525
  header: "".concat(LOG_HEADER, " sendRoapMediaRequest being sent"),
4473
4526
  success: "".concat(LOG_HEADER, " sendRoadMediaRequest successful"),
4474
4527
  failure: "".concat(LOG_HEADER, " Error updateMedia on send roap media request, ")
4475
4528
  });
4476
4529
  }).then(function () {
4477
- return _this40.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4530
+ return _this41.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4478
4531
  }).then(function (startShare) {
4479
4532
  // This is a special case if we do an /floor grant followed by /media
4480
4533
  // we actually get a OFFER from the server and a GLAR condition happens
4481
4534
  if (startShare) {
4482
4535
  // We are assuming that the clients are connected when doing an update
4483
- return _this40.requestScreenShareFloor();
4536
+ return _this41.requestScreenShareFloor();
4484
4537
  }
4485
4538
  return _promise.default.resolve();
4486
4539
  });
@@ -4501,7 +4554,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4501
4554
  key: "updateAudio",
4502
4555
  value: function () {
4503
4556
  var _updateAudio = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(options) {
4504
- var _this41 = this;
4557
+ var _this42 = this;
4505
4558
  var sendAudio, receiveAudio, stream, audioTransceiver, track, bnrEnabled;
4506
4559
  return _regenerator.default.wrap(function _callee5$(_context5) {
4507
4560
  while (1) switch (_context5.prev = _context5.next) {
@@ -4542,13 +4595,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4542
4595
  localStream: stream
4543
4596
  }).then(function () {
4544
4597
  var previousMediaDirection = {};
4545
- if (_this41.mediaProperties.mediaDirection) {
4598
+ if (_this42.mediaProperties.mediaDirection) {
4546
4599
  previousMediaDirection = {
4547
- sendTrack: _this41.mediaProperties.mediaDirection.sendAudio,
4548
- receiveTrack: _this41.mediaProperties.mediaDirection.receiveAudio
4600
+ sendTrack: _this42.mediaProperties.mediaDirection.sendAudio,
4601
+ receiveTrack: _this42.mediaProperties.mediaDirection.receiveAudio
4549
4602
  };
4550
4603
  } else {
4551
- _this41.mediaProperties.mediaDirection = {};
4604
+ _this42.mediaProperties.mediaDirection = {};
4552
4605
  }
4553
4606
  return _util.default.updateTransceiver({
4554
4607
  type: 'audio',
@@ -4556,20 +4609,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4556
4609
  receiveTrack: options.receiveAudio,
4557
4610
  track: track,
4558
4611
  transceiver: audioTransceiver,
4559
- peerConnection: _this41.mediaProperties.peerConnection,
4612
+ peerConnection: _this42.mediaProperties.peerConnection,
4560
4613
  previousMediaDirection: previousMediaDirection
4561
4614
  }, {
4562
- mediaProperties: _this41.mediaProperties,
4563
- meeting: _this41,
4564
- id: _this41.id
4615
+ mediaProperties: _this42.mediaProperties,
4616
+ meeting: _this42,
4617
+ id: _this42.id
4565
4618
  });
4566
4619
  }).then(function () {
4567
- _this41.setLocalAudioTrack(track);
4568
- _this41.mediaProperties.mediaDirection.sendAudio = sendAudio;
4569
- _this41.mediaProperties.mediaDirection.receiveAudio = receiveAudio;
4620
+ _this42.setLocalAudioTrack(track);
4621
+ _this42.mediaProperties.mediaDirection.sendAudio = sendAudio;
4622
+ _this42.mediaProperties.mediaDirection.receiveAudio = receiveAudio;
4570
4623
 
4571
4624
  // audio state could be undefined if you have not sent audio before
4572
- _this41.audio = _this41.audio || (0, _muteState.default)(_constants.AUDIO, _this41, _this41.mediaProperties.mediaDirection);
4625
+ _this42.audio = _this42.audio || (0, _muteState.default)(_constants.AUDIO, _this42, _this42.mediaProperties.mediaDirection);
4573
4626
  }));
4574
4627
  case 16:
4575
4628
  case "end":
@@ -4595,7 +4648,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4595
4648
  }, {
4596
4649
  key: "updateVideo",
4597
4650
  value: function updateVideo(options) {
4598
- var _this42 = this;
4651
+ var _this43 = this;
4599
4652
  if (!this.canUpdateMedia()) {
4600
4653
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.VIDEO, options);
4601
4654
  }
@@ -4617,23 +4670,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4617
4670
  receiveTrack: options.receiveVideo,
4618
4671
  track: track,
4619
4672
  transceiver: videoTransceiver,
4620
- peerConnection: _this42.mediaProperties.peerConnection,
4673
+ peerConnection: _this43.mediaProperties.peerConnection,
4621
4674
  previousMediaDirection: {
4622
- sendTrack: _this42.mediaProperties.mediaDirection.sendVideo,
4623
- receiveTrack: _this42.mediaProperties.mediaDirection.receiveVideo
4675
+ sendTrack: _this43.mediaProperties.mediaDirection.sendVideo,
4676
+ receiveTrack: _this43.mediaProperties.mediaDirection.receiveVideo
4624
4677
  }
4625
4678
  }, {
4626
- mediaProperties: _this42.mediaProperties,
4627
- meeting: _this42,
4628
- id: _this42.id
4679
+ mediaProperties: _this43.mediaProperties,
4680
+ meeting: _this43,
4681
+ id: _this43.id
4629
4682
  });
4630
4683
  }).then(function () {
4631
- _this42.setLocalVideoTrack(track);
4632
- _this42.mediaProperties.mediaDirection.sendVideo = sendVideo;
4633
- _this42.mediaProperties.mediaDirection.receiveVideo = receiveVideo;
4684
+ _this43.setLocalVideoTrack(track);
4685
+ _this43.mediaProperties.mediaDirection.sendVideo = sendVideo;
4686
+ _this43.mediaProperties.mediaDirection.receiveVideo = receiveVideo;
4634
4687
 
4635
4688
  // video state could be undefined if you have not sent video before
4636
- _this42.video = _this42.video || (0, _muteState.default)(_constants.VIDEO, _this42, _this42.mediaProperties.mediaDirection);
4689
+ _this43.video = _this43.video || (0, _muteState.default)(_constants.VIDEO, _this43, _this43.mediaProperties.mediaDirection);
4637
4690
  });
4638
4691
  }
4639
4692
 
@@ -4673,7 +4726,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4673
4726
  }, {
4674
4727
  key: "updateShare",
4675
4728
  value: function updateShare(options) {
4676
- var _this43 = this;
4729
+ var _this44 = this;
4677
4730
  if (!options.skipSignalingCheck && !this.canUpdateMedia()) {
4678
4731
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE, options);
4679
4732
  }
@@ -4691,7 +4744,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4691
4744
  sendShare: sendShare,
4692
4745
  localShare: stream
4693
4746
  }).then(function () {
4694
- return _this43.checkForStopShare(sendShare, previousSendShareStatus);
4747
+ return _this44.checkForStopShare(sendShare, previousSendShareStatus);
4695
4748
  }).then(function (startShare) {
4696
4749
  return _util.default.updateTransceiver({
4697
4750
  type: 'video',
@@ -4699,38 +4752,38 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4699
4752
  receiveTrack: receiveShare,
4700
4753
  track: track,
4701
4754
  transceiver: shareTransceiver,
4702
- peerConnection: _this43.mediaProperties.peerConnection,
4755
+ peerConnection: _this44.mediaProperties.peerConnection,
4703
4756
  previousMediaDirection: {
4704
- sendTrack: _this43.mediaProperties.mediaDirection.sendShare,
4705
- receiveTrack: _this43.mediaProperties.mediaDirection.receiveShare
4757
+ sendTrack: _this44.mediaProperties.mediaDirection.sendShare,
4758
+ receiveTrack: _this44.mediaProperties.mediaDirection.receiveShare
4706
4759
  }
4707
4760
  }, {
4708
- mediaProperties: _this43.mediaProperties,
4709
- meeting: _this43,
4710
- id: _this43.id
4761
+ mediaProperties: _this44.mediaProperties,
4762
+ meeting: _this44,
4763
+ id: _this44.id
4711
4764
  }).then(function () {
4712
4765
  if (startShare) {
4713
- return _this43.requestScreenShareFloor();
4766
+ return _this44.requestScreenShareFloor();
4714
4767
  }
4715
4768
  return _promise.default.resolve();
4716
4769
  });
4717
4770
  }).then(function () {
4718
- _this43.mediaProperties.mediaDirection.sendShare = sendShare;
4719
- _this43.mediaProperties.mediaDirection.receiveShare = receiveShare;
4771
+ _this44.mediaProperties.mediaDirection.sendShare = sendShare;
4772
+ _this44.mediaProperties.mediaDirection.receiveShare = receiveShare;
4720
4773
  }).catch(function (error) {
4721
- _this43.unsetLocalShareTrack();
4774
+ _this44.unsetLocalShareTrack();
4722
4775
  throw error;
4723
4776
  }).finally(function () {
4724
4777
  var delay = 1e3;
4725
4778
  // Check to see if share was stopped natively before onended was assigned.
4726
- var sharingModeIsActive = _this43.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
4727
- var isSharingOutOfSync = sharingModeIsActive && !_this43.isLocalShareLive;
4779
+ var sharingModeIsActive = _this44.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
4780
+ var isSharingOutOfSync = sharingModeIsActive && !_this44.isLocalShareLive;
4728
4781
  if (isSharingOutOfSync) {
4729
4782
  // Adding a delay to avoid a 409 from server
4730
4783
  // which results in user still appearing as if sharing.
4731
4784
  // Also delay give time for changes to peerConnection.
4732
4785
  setTimeout(function () {
4733
- return _this43.handleShareTrackEnded(stream);
4786
+ return _this44.handleShareTrackEnded(stream);
4734
4787
  }, delay);
4735
4788
  }
4736
4789
  });
@@ -4771,7 +4824,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4771
4824
  }, {
4772
4825
  key: "acknowledge",
4773
4826
  value: function acknowledge(type) {
4774
- var _this44 = this;
4827
+ var _this45 = this;
4775
4828
  if (!type) {
4776
4829
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
4777
4830
  }
@@ -4783,10 +4836,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4783
4836
  }).then(function (response) {
4784
4837
  return _promise.default.resolve(response);
4785
4838
  }).then(function (response) {
4786
- _this44.meetingFiniteStateMachine.ring(type);
4839
+ _this45.meetingFiniteStateMachine.ring(type);
4787
4840
  _metrics.default.postEvent({
4788
4841
  event: _config.eventType.ALERT_DISPLAYED,
4789
- meeting: _this44
4842
+ meeting: _this45
4790
4843
  });
4791
4844
  return _promise.default.resolve({
4792
4845
  response: response
@@ -4810,12 +4863,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4810
4863
  }, {
4811
4864
  key: "decline",
4812
4865
  value: function decline(reason) {
4813
- var _this45 = this;
4866
+ var _this46 = this;
4814
4867
  return _util.default.declineMeeting(this, reason).then(function (decline) {
4815
- _this45.meetingFiniteStateMachine.decline();
4868
+ _this46.meetingFiniteStateMachine.decline();
4816
4869
  return _promise.default.resolve(decline);
4817
4870
  }).catch(function (error) {
4818
- _this45.meetingFiniteStateMachine.fail(error);
4871
+ _this46.meetingFiniteStateMachine.fail(error);
4819
4872
  return _promise.default.reject(error);
4820
4873
  });
4821
4874
  }
@@ -4831,7 +4884,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4831
4884
  }, {
4832
4885
  key: "leave",
4833
4886
  value: function leave() {
4834
- var _this46 = this;
4887
+ var _this47 = this;
4835
4888
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4836
4889
  _metrics.default.postEvent({
4837
4890
  event: _config.eventType.LEAVE,
@@ -4844,39 +4897,39 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4844
4897
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
4845
4898
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
4846
4899
  return _util.default.leaveMeeting(this, options).then(function (leave) {
4847
- _this46.meetingFiniteStateMachine.leave();
4848
- _this46.clearMeetingData();
4900
+ _this47.meetingFiniteStateMachine.leave();
4901
+ _this47.clearMeetingData();
4849
4902
 
4850
4903
  // upload logs on leave irrespective of meeting delete
4851
- _triggerProxy.default.trigger(_this46, {
4904
+ _triggerProxy.default.trigger(_this47, {
4852
4905
  file: 'meeting/index',
4853
4906
  function: 'leave'
4854
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this46);
4907
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
4855
4908
 
4856
4909
  // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
4857
- if (_this46.wirelessShare || _this46.guest) {
4910
+ if (_this47.wirelessShare || _this47.guest) {
4858
4911
  // If screen sharing clean the meeting object
4859
- _triggerProxy.default.trigger(_this46, {
4912
+ _triggerProxy.default.trigger(_this47, {
4860
4913
  file: 'meeting/index',
4861
4914
  function: 'leave'
4862
4915
  }, _constants.EVENTS.DESTROY_MEETING, {
4863
4916
  reason: options.reason,
4864
- meetingId: _this46.id
4917
+ meetingId: _this47.id
4865
4918
  });
4866
4919
  }
4867
4920
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
4868
4921
  return leave;
4869
4922
  }).catch(function (error) {
4870
- _this46.meetingFiniteStateMachine.fail(error);
4923
+ _this47.meetingFiniteStateMachine.fail(error);
4871
4924
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
4872
4925
  // upload logs on leave irrespective of meeting delete
4873
- _triggerProxy.default.trigger(_this46, {
4926
+ _triggerProxy.default.trigger(_this47, {
4874
4927
  file: 'meeting/index',
4875
4928
  function: 'leave'
4876
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this46);
4929
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
4877
4930
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
4878
- correlation_id: _this46.correlationId,
4879
- locus_id: _this46.locusUrl.split('/').pop(),
4931
+ correlation_id: _this47.correlationId,
4932
+ locus_id: _this47.locusUrl.split('/').pop(),
4880
4933
  reason: error.message,
4881
4934
  stack: error.stack,
4882
4935
  code: error.code
@@ -4896,7 +4949,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4896
4949
  }, {
4897
4950
  key: "startWhiteboardShare",
4898
4951
  value: function startWhiteboardShare(channelUrl, resourceToken) {
4899
- var _this47 = this;
4952
+ var _this48 = this;
4900
4953
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
4901
4954
  return element.name === 'whiteboard';
4902
4955
  });
@@ -4919,13 +4972,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4919
4972
  body.resourceToken = resourceToken;
4920
4973
  }
4921
4974
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
4922
- _this47.isSharing = false;
4975
+ _this48.isSharing = false;
4923
4976
  return _promise.default.resolve();
4924
4977
  }).catch(function (error) {
4925
4978
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
4926
4979
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
4927
- correlation_id: _this47.correlationId,
4928
- locus_id: _this47.locusUrl.split('/').pop(),
4980
+ correlation_id: _this48.correlationId,
4981
+ locus_id: _this48.locusUrl.split('/').pop(),
4929
4982
  reason: error.message,
4930
4983
  stack: error.stack,
4931
4984
  board: {
@@ -4948,7 +5001,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4948
5001
  }, {
4949
5002
  key: "stopWhiteboardShare",
4950
5003
  value: function stopWhiteboardShare(channelUrl) {
4951
- var _this48 = this;
5004
+ var _this49 = this;
4952
5005
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
4953
5006
  return element.name === 'whiteboard';
4954
5007
  });
@@ -4967,8 +5020,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4967
5020
  _metrics.default.sendBehavioralMetric(
4968
5021
  // @ts-ignore - check if STOP_WHITEBOARD_SHARE_FAILURE exists
4969
5022
  _constants2.default.STOP_WHITEBOARD_SHARE_FAILURE, {
4970
- correlation_id: _this48.correlationId,
4971
- locus_id: _this48.locusUrl.split('/').pop(),
5023
+ correlation_id: _this49.correlationId,
5024
+ locus_id: _this49.locusUrl.split('/').pop(),
4972
5025
  reason: error.message,
4973
5026
  stack: error.stack,
4974
5027
  board: {
@@ -4990,7 +5043,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4990
5043
  }, {
4991
5044
  key: "requestScreenShareFloor",
4992
5045
  value: function requestScreenShareFloor() {
4993
- var _this49 = this;
5046
+ var _this50 = this;
4994
5047
  var content = this.locusInfo.mediaShares.find(function (element) {
4995
5048
  return element.name === _constants.CONTENT;
4996
5049
  });
@@ -5006,13 +5059,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5006
5059
  uri: content.url,
5007
5060
  resourceUrl: this.resourceUrl
5008
5061
  }).then(function () {
5009
- _this49.isSharing = true;
5062
+ _this50.isSharing = true;
5010
5063
  return _promise.default.resolve();
5011
5064
  }).catch(function (error) {
5012
5065
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
5013
5066
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
5014
- correlation_id: _this49.correlationId,
5015
- locus_id: _this49.locusUrl.split('/').pop(),
5067
+ correlation_id: _this50.correlationId,
5068
+ locus_id: _this50.locusUrl.split('/').pop(),
5016
5069
  reason: error.message,
5017
5070
  stack: error.stack
5018
5071
  });
@@ -5049,7 +5102,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5049
5102
  }, {
5050
5103
  key: "releaseScreenShareFloor",
5051
5104
  value: function releaseScreenShareFloor() {
5052
- var _this50 = this;
5105
+ var _this51 = this;
5053
5106
  var content = this.locusInfo.mediaShares.find(function (element) {
5054
5107
  return element.name === _constants.CONTENT;
5055
5108
  });
@@ -5073,14 +5126,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5073
5126
  }).catch(function (error) {
5074
5127
  _loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
5075
5128
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
5076
- correlation_id: _this50.correlationId,
5077
- locus_id: _this50.locusUrl.split('/').pop(),
5129
+ correlation_id: _this51.correlationId,
5130
+ locus_id: _this51.locusUrl.split('/').pop(),
5078
5131
  reason: error.message,
5079
5132
  stack: error.stack
5080
5133
  });
5081
5134
  return _promise.default.reject(error);
5082
5135
  }).finally(function () {
5083
- _this50.isSharing = false;
5136
+ _this51.isSharing = false;
5084
5137
  });
5085
5138
  }
5086
5139
  return _promise.default.reject(new _parameter.default('Cannot stop share without content'));
@@ -5095,7 +5148,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5095
5148
  }, {
5096
5149
  key: "startRecording",
5097
5150
  value: function startRecording() {
5098
- return _util.default.startRecording(this.meetingRequest, this.locusUrl, this.locusInfo);
5151
+ return this.recordingController.startRecording();
5099
5152
  }
5100
5153
 
5101
5154
  /**
@@ -5107,7 +5160,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5107
5160
  }, {
5108
5161
  key: "stopRecording",
5109
5162
  value: function stopRecording() {
5110
- return _util.default.stopRecording(this.meetingRequest, this.locusUrl, this.locusInfo);
5163
+ return this.recordingController.stopRecording();
5111
5164
  }
5112
5165
 
5113
5166
  /**
@@ -5119,7 +5172,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5119
5172
  }, {
5120
5173
  key: "pauseRecording",
5121
5174
  value: function pauseRecording() {
5122
- return _util.default.pauseRecording(this.meetingRequest, this.locusUrl, this.locusInfo);
5175
+ return this.recordingController.pauseRecording();
5123
5176
  }
5124
5177
 
5125
5178
  /**
@@ -5131,7 +5184,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5131
5184
  }, {
5132
5185
  key: "resumeRecording",
5133
5186
  value: function resumeRecording() {
5134
- return _util.default.resumeRecording(this.meetingRequest, this.locusUrl, this.locusInfo);
5187
+ return this.recordingController.resumeRecording();
5135
5188
  }
5136
5189
 
5137
5190
  /**
@@ -5212,7 +5265,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5212
5265
  }, {
5213
5266
  key: "changeVideoLayout",
5214
5267
  value: function changeVideoLayout(layoutType) {
5215
- var _this51 = this;
5268
+ var _this52 = this;
5216
5269
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5217
5270
  var main = renderInfo.main,
5218
5271
  content = renderInfo.content;
@@ -5266,7 +5319,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5266
5319
  }
5267
5320
  this.lastVideoLayoutInfo = (0, _cloneDeep2.default)(layoutInfo);
5268
5321
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
5269
- _triggerProxy.default.trigger(_this51, {
5322
+ _triggerProxy.default.trigger(_this52, {
5270
5323
  file: 'meeting/index',
5271
5324
  function: 'changeVideoLayout'
5272
5325
  }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
@@ -5281,7 +5334,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5281
5334
  content: layoutInfo.content
5282
5335
  }).then(function (response) {
5283
5336
  if (response && response.body && response.body.locus) {
5284
- _this51.locusInfo.onFullLocus(response.body.locus);
5337
+ _this52.locusInfo.onFullLocus(response.body.locus);
5285
5338
  }
5286
5339
  }).catch(function (error) {
5287
5340
  _loggerProxy.default.logger.error('Meeting:index#changeVideoLayout --> Error ', error);
@@ -5297,7 +5350,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5297
5350
  }, {
5298
5351
  key: "setLocalVideoQuality",
5299
5352
  value: function setLocalVideoQuality(level) {
5300
- var _this52 = this;
5353
+ var _this53 = this;
5301
5354
  _loggerProxy.default.logger.log("Meeting:index#setLocalVideoQuality --> Setting quality to ".concat(level));
5302
5355
  if (!_constants.VIDEO_RESOLUTIONS[level]) {
5303
5356
  return this.rejectWithErrorLog("Meeting:index#setLocalVideoQuality --> ".concat(level, " not defined"));
@@ -5333,7 +5386,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5333
5386
  case 0:
5334
5387
  _ref15 = (0, _slicedToArray2.default)(_ref13, 1), localStream = _ref15[0];
5335
5388
  _context6.next = 3;
5336
- return _this52.updateVideo({
5389
+ return _this53.updateVideo({
5337
5390
  sendVideo: true,
5338
5391
  receiveVideo: true,
5339
5392
  stream: localStream
@@ -5390,7 +5443,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5390
5443
  }, {
5391
5444
  key: "setMeetingQuality",
5392
5445
  value: function setMeetingQuality(level) {
5393
- var _this53 = this;
5446
+ var _this54 = this;
5394
5447
  _loggerProxy.default.logger.log("Meeting:index#setMeetingQuality --> Setting quality to ".concat(level));
5395
5448
  if (!_constants.QUALITY_LEVELS[level]) {
5396
5449
  return this.rejectWithErrorLog("Meeting:index#setMeetingQuality --> ".concat(level, " not defined"));
@@ -5412,15 +5465,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5412
5465
  receiveVideo = _this$mediaProperties4.receiveVideo,
5413
5466
  sendVideo = _this$mediaProperties4.sendVideo;
5414
5467
  return (sendVideo ? this.setLocalVideoQuality(level) : _promise.default.resolve()).then(function () {
5415
- return receiveAudio || receiveVideo ? _this53.setRemoteQualityLevel(level) : _promise.default.resolve();
5468
+ return receiveAudio || receiveVideo ? _this54.setRemoteQualityLevel(level) : _promise.default.resolve();
5416
5469
  }).catch(function (error) {
5417
5470
  // From troubleshooting it seems that the stream itself doesn't change the max-fs if the peer connection isn't stable
5418
- _this53.mediaProperties.setLocalQualityLevel(previousLevel.local);
5419
- _this53.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5471
+ _this54.mediaProperties.setLocalQualityLevel(previousLevel.local);
5472
+ _this54.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5420
5473
  _loggerProxy.default.logger.error("Meeting:index#setMeetingQuality --> ".concat(error.message));
5421
5474
  _metrics.default.sendBehavioralMetric(_constants2.default.SET_MEETING_QUALITY_FAILURE, {
5422
- correlation_id: _this53.correlationId,
5423
- locus_id: _this53.locusUrl.split('/').pop(),
5475
+ correlation_id: _this54.correlationId,
5476
+ locus_id: _this54.locusUrl.split('/').pop(),
5424
5477
  reason: error.message,
5425
5478
  stack: error.stack
5426
5479
  }, {
@@ -5443,7 +5496,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5443
5496
  }, {
5444
5497
  key: "shareScreen",
5445
5498
  value: function shareScreen() {
5446
- var _this54 = this;
5499
+ var _this55 = this;
5447
5500
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5448
5501
  _loggerProxy.default.logger.log('Meeting:index#shareScreen --> Getting local share');
5449
5502
  var shareConstraints = _objectSpread({
@@ -5453,9 +5506,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5453
5506
 
5454
5507
  // @ts-ignore - config coming from registerPlugin
5455
5508
  return _media.default.getDisplayMedia(shareConstraints, this.config).then(function (shareStream) {
5456
- return _this54.updateShare({
5509
+ return _this55.updateShare({
5457
5510
  sendShare: true,
5458
- receiveShare: _this54.mediaProperties.mediaDirection.receiveShare,
5511
+ receiveShare: _this55.mediaProperties.mediaDirection.receiveShare,
5459
5512
  stream: shareStream
5460
5513
  });
5461
5514
  }).catch(function (error) {
@@ -5468,8 +5521,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5468
5521
  // TODO: The getDisplayMedia errors need to be moved inside `media.getDisplayMedia`
5469
5522
  var metricName = _constants2.default.GET_DISPLAY_MEDIA_FAILURE;
5470
5523
  var data = {
5471
- correlation_id: _this54.correlationId,
5472
- locus_id: _this54.locusUrl.split('/').pop(),
5524
+ correlation_id: _this55.correlationId,
5525
+ locus_id: _this55.locusUrl.split('/').pop(),
5473
5526
  reason: error.message,
5474
5527
  stack: error.stack
5475
5528
  };
@@ -5754,7 +5807,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5754
5807
  }, {
5755
5808
  key: "endMeetingForAll",
5756
5809
  value: function endMeetingForAll() {
5757
- var _this55 = this;
5810
+ var _this56 = this;
5758
5811
  _metrics.default.postEvent({
5759
5812
  event: _config.eventType.LEAVE,
5760
5813
  meeting: this,
@@ -5769,25 +5822,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5769
5822
  locus_id: this.locusId
5770
5823
  });
5771
5824
  return _util.default.endMeetingForAll(this).then(function (end) {
5772
- _this55.meetingFiniteStateMachine.end();
5773
- _this55.clearMeetingData();
5825
+ _this56.meetingFiniteStateMachine.end();
5826
+ _this56.clearMeetingData();
5774
5827
  // upload logs on leave irrespective of meeting delete
5775
- _triggerProxy.default.trigger(_this55, {
5828
+ _triggerProxy.default.trigger(_this56, {
5776
5829
  file: 'meeting/index',
5777
5830
  function: 'endMeetingForAll'
5778
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this55);
5831
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
5779
5832
  return end;
5780
5833
  }).catch(function (error) {
5781
- _this55.meetingFiniteStateMachine.fail(error);
5834
+ _this56.meetingFiniteStateMachine.fail(error);
5782
5835
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
5783
5836
  // upload logs on leave irrespective of meeting delete
5784
- _triggerProxy.default.trigger(_this55, {
5837
+ _triggerProxy.default.trigger(_this56, {
5785
5838
  file: 'meeting/index',
5786
5839
  function: 'endMeetingForAll'
5787
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this55);
5840
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
5788
5841
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
5789
- correlation_id: _this55.correlationId,
5790
- locus_id: _this55.locusUrl.split('/').pop(),
5842
+ correlation_id: _this56.correlationId,
5843
+ locus_id: _this56.locusUrl.split('/').pop(),
5791
5844
  reason: error.message,
5792
5845
  stack: error.stack,
5793
5846
  code: error.code
@@ -5931,8 +5984,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5931
5984
  * @memberof Meeting
5932
5985
  */
5933
5986
  function sendReaction(reactionType, skinToneType) {
5934
- var _this$locusInfo, _this$locusInfo$contr2, _this$locusInfo$contr3;
5935
- var reactionChannelUrl = (_this$locusInfo = this.locusInfo) === null || _this$locusInfo === void 0 ? void 0 : (_this$locusInfo$contr2 = _this$locusInfo.controls) === null || _this$locusInfo$contr2 === void 0 ? void 0 : (_this$locusInfo$contr3 = _this$locusInfo$contr2.reactions) === null || _this$locusInfo$contr3 === void 0 ? void 0 : _this$locusInfo$contr3.reactionChannelUrl;
5987
+ var _this$locusInfo4, _this$locusInfo4$cont, _this$locusInfo4$cont2;
5988
+ var reactionChannelUrl = (_this$locusInfo4 = this.locusInfo) === null || _this$locusInfo4 === void 0 ? void 0 : (_this$locusInfo4$cont = _this$locusInfo4.controls) === null || _this$locusInfo4$cont === void 0 ? void 0 : (_this$locusInfo4$cont2 = _this$locusInfo4$cont.reactions) === null || _this$locusInfo4$cont2 === void 0 ? void 0 : _this$locusInfo4$cont2.reactionChannelUrl;
5936
5989
  var participantId = this.members.selfId;
5937
5990
  var reactionData = _reactions.Reactions[reactionType];
5938
5991
  if (!reactionData) {