@webex/plugin-meetings 3.13.0-next.16 → 3.13.0-next.17

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 (89) hide show
  1. package/dist/aiEnableRequest/index.js +1 -1
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/common/events/typed-events-scope.js +135 -0
  5. package/dist/common/events/typed-events-scope.js.map +1 -0
  6. package/dist/common/types.js +7 -0
  7. package/dist/common/types.js.map +1 -0
  8. package/dist/config.js +1 -1
  9. package/dist/constants.js +5 -0
  10. package/dist/constants.js.map +1 -1
  11. package/dist/e2ee/E2eeController.js +581 -0
  12. package/dist/e2ee/E2eeController.js.map +1 -0
  13. package/dist/e2ee/E2eeManager.js +50 -31
  14. package/dist/e2ee/E2eeManager.js.map +1 -1
  15. package/dist/e2ee/E2eeSignaling.js +18 -21
  16. package/dist/e2ee/E2eeSignaling.js.map +1 -1
  17. package/dist/e2ee/MediaEncryptionService.js +2 -5
  18. package/dist/e2ee/MediaEncryptionService.js.map +1 -1
  19. package/dist/e2ee/constants.js +28 -0
  20. package/dist/e2ee/constants.js.map +1 -0
  21. package/dist/e2ee/mls.js +85 -67
  22. package/dist/e2ee/mls.js.map +1 -1
  23. package/dist/e2ee/types.js +52 -13
  24. package/dist/e2ee/types.js.map +1 -1
  25. package/dist/e2ee/wasm.d.js.map +1 -1
  26. package/dist/hashTree/hashTreeParser.js.map +1 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/interpretation/index.js +1 -1
  29. package/dist/interpretation/siLanguage.js +1 -1
  30. package/dist/meeting/index.js +394 -249
  31. package/dist/meeting/index.js.map +1 -1
  32. package/dist/meeting/request.js +69 -58
  33. package/dist/meeting/request.js.map +1 -1
  34. package/dist/meeting/util.js +4 -2
  35. package/dist/meeting/util.js.map +1 -1
  36. package/dist/meetings/index.js +87 -61
  37. package/dist/meetings/index.js.map +1 -1
  38. package/dist/meetings/util.js +10 -0
  39. package/dist/meetings/util.js.map +1 -1
  40. package/dist/metrics/constants.js +2 -1
  41. package/dist/metrics/constants.js.map +1 -1
  42. package/dist/types/common/events/typed-events-scope.d.ts +73 -0
  43. package/dist/types/common/types.d.ts +9 -0
  44. package/dist/types/constants.d.ts +5 -0
  45. package/dist/types/e2ee/E2eeController.d.ts +130 -0
  46. package/dist/types/e2ee/E2eeManager.d.ts +26 -6
  47. package/dist/types/e2ee/E2eeSignaling.d.ts +1 -7
  48. package/dist/types/e2ee/MediaEncryptionService.d.ts +1 -3
  49. package/dist/types/e2ee/constants.d.ts +12 -0
  50. package/dist/types/e2ee/mls.d.ts +16 -10
  51. package/dist/types/e2ee/types.d.ts +92 -35
  52. package/dist/types/hashTree/hashTreeParser.d.ts +1 -1
  53. package/dist/types/index.d.ts +1 -0
  54. package/dist/types/meeting/index.d.ts +34 -0
  55. package/dist/types/meeting/util.d.ts +1 -1
  56. package/dist/types/metrics/constants.d.ts +1 -0
  57. package/dist/webinar/index.js +1 -1
  58. package/package.json +21 -21
  59. package/src/common/events/typed-events-scope.ts +110 -0
  60. package/src/common/types.ts +10 -0
  61. package/src/constants.ts +6 -0
  62. package/src/e2ee/DESIGN.md +363 -0
  63. package/src/e2ee/E2eeController.ts +487 -0
  64. package/src/e2ee/E2eeManager.ts +48 -27
  65. package/src/e2ee/E2eeSignaling.ts +13 -28
  66. package/src/e2ee/MediaEncryptionService.ts +2 -4
  67. package/src/e2ee/constants.ts +34 -0
  68. package/src/e2ee/mls.ts +62 -32
  69. package/src/e2ee/types.ts +99 -34
  70. package/src/e2ee/wasm.d.ts +18 -14
  71. package/src/hashTree/hashTreeParser.ts +1 -1
  72. package/src/index.ts +1 -0
  73. package/src/meeting/index.ts +155 -0
  74. package/src/meeting/request.ts +16 -0
  75. package/src/meeting/util.ts +2 -1
  76. package/src/meetings/index.ts +30 -5
  77. package/src/meetings/util.ts +8 -0
  78. package/src/metrics/constants.ts +1 -0
  79. package/test/unit/spec/common/events/typed-events-scope.ts +88 -0
  80. package/test/unit/spec/e2ee/E2eeController.ts +662 -0
  81. package/test/unit/spec/e2ee/E2eeManager.ts +53 -29
  82. package/test/unit/spec/e2ee/E2eeSignaling.ts +19 -10
  83. package/test/unit/spec/e2ee/mls.ts +84 -32
  84. package/test/unit/spec/meeting/index.js +662 -0
  85. package/test/unit/spec/meeting/request.js +35 -0
  86. package/test/unit/spec/meeting/utils.js +4 -0
  87. package/test/unit/spec/meetings/index.js +36 -1
  88. package/test/unit/spec/meetings/utils.js +15 -0
  89. package/test/utils/webex-config.js +1 -0
@@ -63,6 +63,7 @@ var _reconnectionManager = _interopRequireDefault(require("../reconnection-manag
63
63
  var _reconnectionNotStarted = _interopRequireDefault(require("../common/errors/reconnection-not-started"));
64
64
  var _request = _interopRequireDefault(require("./request"));
65
65
  var _index2 = _interopRequireDefault(require("../members/index"));
66
+ var _types = require("../e2ee/types");
66
67
  var _util2 = _interopRequireDefault(require("./util"));
67
68
  var _util3 = _interopRequireDefault(require("../meetings/util"));
68
69
  var _util4 = _interopRequireDefault(require("../recording-controller/util"));
@@ -94,7 +95,7 @@ var _joinWebinarError = _interopRequireDefault(require("../common/errors/join-we
94
95
  var _brbState = require("./brbState");
95
96
  var _multistreamNotSupportedError = _interopRequireDefault(require("../common/errors/multistream-not-supported-error"));
96
97
  var _joinForbiddenError = _interopRequireDefault(require("../common/errors/join-forbidden-error"));
97
- var _types = require("../locus-info/types");
98
+ var _types2 = require("../locus-info/types");
98
99
  var _aiEnableRequest = _interopRequireDefault(require("../aiEnableRequest"));
99
100
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && r[_Symbol$iterator] || r["@@iterator"]; if (!t) { if (_Array$isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
100
101
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
@@ -440,7 +441,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
440
441
  * @memberof Meeting
441
442
  */
442
443
  function Meeting(attrs, _options, callback) {
443
- var _attrs$callStateForMe, _attrs$callStateForMe2, _this$locusInfo2, _this$locusInfo2$link, _this$locusInfo2$link2, _this$locusInfo2$link3, _this$locusInfo3, _this$locusInfo3$full, _this$locusInfo4, _this$locusInfo5;
444
+ var _attrs$callStateForMe, _attrs$callStateForMe2, _attrs$e2eeManager, _this$locusInfo2, _this$locusInfo2$link, _this$locusInfo2$link2, _this$locusInfo2$link3, _this$locusInfo3, _this$locusInfo3$full, _this$locusInfo4, _this$locusInfo5;
444
445
  var _this;
445
446
  (0, _classCallCheck2.default)(this, Meeting);
446
447
  _this = _callSuper(this, Meeting, [{}, _options]);
@@ -474,6 +475,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
474
475
  (0, _defineProperty3.default)(_this, "meetingInfo", void 0);
475
476
  (0, _defineProperty3.default)(_this, "meetingRequest", void 0);
476
477
  (0, _defineProperty3.default)(_this, "members", void 0);
478
+ (0, _defineProperty3.default)(_this, "e2ee", void 0);
479
+ (0, _defineProperty3.default)(_this, "lastTrustState", void 0);
477
480
  (0, _defineProperty3.default)(_this, "options", void 0);
478
481
  (0, _defineProperty3.default)(_this, "orgId", void 0);
479
482
  (0, _defineProperty3.default)(_this, "owner", void 0);
@@ -740,6 +743,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
740
743
  _ref3$preserveVoiceaC,
741
744
  preserveVoiceaChannel,
742
745
  _this$voiceaChannel,
746
+ _this$e2ee,
743
747
  _args = arguments,
744
748
  _t;
745
749
  return _regenerator.default.wrap(function (_context) {
@@ -784,6 +788,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
784
788
  _context.prev = 4;
785
789
  _this.stopListeningForLLMEvents();
786
790
  _this.llmChannel = undefined;
791
+ (_this$e2ee = _this.e2ee) === null || _this$e2ee === void 0 ? void 0 : _this$e2ee.llmChannelChanged();
787
792
  return _context.finish(4);
788
793
  case 5:
789
794
  case "end":
@@ -1959,6 +1964,28 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1959
1964
  _this.roap = new _index.default({}, {
1960
1965
  parent: _this.webex
1961
1966
  });
1967
+ var e2eeContext = {
1968
+ getCorrelationId: function getCorrelationId() {
1969
+ return _this.correlationId;
1970
+ },
1971
+ getLocusInfo: function getLocusInfo() {
1972
+ return _this.locusInfo;
1973
+ },
1974
+ getLlmChannel: function getLlmChannel() {
1975
+ return _this.llmChannel;
1976
+ },
1977
+ members: _this.members
1978
+ };
1979
+
1980
+ /**
1981
+ * The per-meeting E2EE controller (undefined when no E2EE manager is provided).
1982
+ * @instance
1983
+ * @type {E2eeController}
1984
+ * @private
1985
+ * @memberof Meeting
1986
+ */
1987
+ _this.e2ee = (_attrs$e2eeManager = attrs.e2eeManager) === null || _attrs$e2eeManager === void 0 ? void 0 : _attrs$e2eeManager.createE2eeController(e2eeContext);
1988
+ _this.setupE2eeEventForwarding(_this.e2ee);
1962
1989
  /**
1963
1990
  * indicates if an SDP exchange is happening
1964
1991
  *
@@ -2472,6 +2499,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2472
2499
  });
2473
2500
  _this.setUpLocusInfoListeners();
2474
2501
  _this.locusInfo.init(attrs.locus ? attrs.locus : {});
2502
+ _this.lastTrustState = _this.trustState;
2475
2503
  _this.hasJoinedOnce = false;
2476
2504
 
2477
2505
  /**
@@ -3663,9 +3691,45 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3663
3691
 
3664
3692
  // If user moved to a JOINED state and there is a pending floor grant trigger it
3665
3693
  _this0.requestScreenShareFloorIfPending();
3694
+ _this0.updateE2eeOnSelfChange(payload);
3695
+ _this0.updateTrustState();
3666
3696
  });
3667
3697
  }
3668
3698
 
3699
+ /**
3700
+ * Drives the E2EE MLS lifecycle from self-state changes for this WDM device:
3701
+ * join once the device is JOINED, leave when it is moved back into the lobby.
3702
+ * @param {Object} payload the LOCUS_INFO_UPDATE_SELF payload (oldSelf, newSelf)
3703
+ * @returns {undefined}
3704
+ * @private
3705
+ * @memberof Meeting
3706
+ */
3707
+ }, {
3708
+ key: "updateE2eeOnSelfChange",
3709
+ value: function updateE2eeOnSelfChange(payload) {
3710
+ var _payload$oldSelf, _payload$oldSelf$join, _payload$oldSelf2, _payload$oldSelf2$joi, _payload$newSelf, _payload$newSelf$join, _payload$newSelf2, _payload$newSelf2$joi, _payload$oldSelf3, _payload$newSelf3;
3711
+ // Gate on this WDM device's joinedWith state, not the aggregate self state (which can be JOINED
3712
+ // because another device for the same user joined). Lobby/pre-join selves are never JOINED.
3713
+ var wasDeviceJoined = ((_payload$oldSelf = payload.oldSelf) === null || _payload$oldSelf === void 0 ? void 0 : (_payload$oldSelf$join = _payload$oldSelf.joinedWith) === null || _payload$oldSelf$join === void 0 ? void 0 : _payload$oldSelf$join.url) === this.deviceUrl && ((_payload$oldSelf2 = payload.oldSelf) === null || _payload$oldSelf2 === void 0 ? void 0 : (_payload$oldSelf2$joi = _payload$oldSelf2.joinedWith) === null || _payload$oldSelf2$joi === void 0 ? void 0 : _payload$oldSelf2$joi.state) === _constants.MEETING_STATE.STATES.JOINED;
3714
+ var isDeviceJoined = ((_payload$newSelf = payload.newSelf) === null || _payload$newSelf === void 0 ? void 0 : (_payload$newSelf$join = _payload$newSelf.joinedWith) === null || _payload$newSelf$join === void 0 ? void 0 : _payload$newSelf$join.url) === this.deviceUrl && ((_payload$newSelf2 = payload.newSelf) === null || _payload$newSelf2 === void 0 ? void 0 : (_payload$newSelf2$joi = _payload$newSelf2.joinedWith) === null || _payload$newSelf2$joi === void 0 ? void 0 : _payload$newSelf2$joi.state) === _constants.MEETING_STATE.STATES.JOINED;
3715
+ if (!wasDeviceJoined && isDeviceJoined) {
3716
+ var _this$e2ee2;
3717
+ (_this$e2ee2 = this.e2ee) === null || _this$e2ee2 === void 0 ? void 0 : _this$e2ee2.start().catch(function (error) {
3718
+ _loggerProxy.default.logger.error('Meeting:index#updateE2eeOnSelfChange --> E2EE start failed', error);
3719
+ });
3720
+ }
3721
+
3722
+ // Leave when this device stops being joined or the host moves it back into the lobby.
3723
+ var wasDeviceUnadmitted = ((_payload$oldSelf3 = payload.oldSelf) === null || _payload$oldSelf3 === void 0 ? void 0 : _payload$oldSelf3.isUserUnadmitted) === true;
3724
+ var isDeviceUnadmitted = ((_payload$newSelf3 = payload.newSelf) === null || _payload$newSelf3 === void 0 ? void 0 : _payload$newSelf3.isUserUnadmitted) === true;
3725
+ if (wasDeviceJoined && !isDeviceJoined || !wasDeviceUnadmitted && isDeviceUnadmitted) {
3726
+ var _this$e2ee3;
3727
+ (_this$e2ee3 = this.e2ee) === null || _this$e2ee3 === void 0 ? void 0 : _this$e2ee3.stop().catch(function (error) {
3728
+ _loggerProxy.default.logger.error('Meeting:index#updateE2eeOnSelfChange --> E2EE stop failed', error);
3729
+ });
3730
+ }
3731
+ }
3732
+
3669
3733
  /**
3670
3734
  * Notify any changes on the pstn devices
3671
3735
  * @param {Object} payload
@@ -3678,11 +3742,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3678
3742
  value: function pstnUpdate(payload) {
3679
3743
  var _this1 = this;
3680
3744
  if (this.locusInfo.self) {
3681
- var _payload$newSelf, _payload$newSelf2;
3682
- var dialInPstnDevice = (_payload$newSelf = payload.newSelf) === null || _payload$newSelf === void 0 ? void 0 : _payload$newSelf.pstnDevices.find(function (device) {
3745
+ var _payload$newSelf4, _payload$newSelf5;
3746
+ var dialInPstnDevice = (_payload$newSelf4 = payload.newSelf) === null || _payload$newSelf4 === void 0 ? void 0 : _payload$newSelf4.pstnDevices.find(function (device) {
3683
3747
  return device.url === _this1.dialInUrl;
3684
3748
  });
3685
- var dialOutPstnDevice = (_payload$newSelf2 = payload.newSelf) === null || _payload$newSelf2 === void 0 ? void 0 : _payload$newSelf2.pstnDevices.find(function (device) {
3749
+ var dialOutPstnDevice = (_payload$newSelf5 = payload.newSelf) === null || _payload$newSelf5 === void 0 ? void 0 : _payload$newSelf5.pstnDevices.find(function (device) {
3686
3750
  return device.url === _this1.dialOutUrl;
3687
3751
  });
3688
3752
  var changed = false;
@@ -4453,6 +4517,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4453
4517
  });
4454
4518
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (_ref36) {
4455
4519
  var isInitializing = _ref36.isInitializing;
4520
+ _this17.updateTrustState();
4456
4521
  _this17.updateMeetingActions();
4457
4522
  _this17.recordingController.setDisplayHints(_this17.userDisplayHints);
4458
4523
  _this17.recordingController.setUserPolicy(_this17.selfUserPolicies);
@@ -5063,6 +5128,83 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5063
5128
  return this.members;
5064
5129
  }
5065
5130
 
5131
+ /**
5132
+ * The meeting's overall trust state, derived from the Locus E2EE flags, the MLS join state
5133
+ * and media-service presence. Undefined when the local device is not joined to the meeting.
5134
+ * @returns {TrustState | undefined}
5135
+ * @public
5136
+ * @memberof Meeting
5137
+ */
5138
+ }, {
5139
+ key: "trustState",
5140
+ get: function get() {
5141
+ var _this$locusInfo8, _this$e2ee7, _this$e2ee8;
5142
+ if (!this.isJoined()) {
5143
+ return undefined;
5144
+ }
5145
+ var info = (_this$locusInfo8 = this.locusInfo) === null || _this$locusInfo8 === void 0 ? void 0 : _this$locusInfo8.info;
5146
+ var adaptive = !!(info !== null && info !== void 0 && info.isBestEffortE2EEncryption);
5147
+ var isEncrypted = !!(info !== null && info !== void 0 && info.isV2E2EEncrypted);
5148
+ if (isEncrypted) {
5149
+ var _this$e2ee4, _this$e2ee5, _this$e2ee6;
5150
+ if (((_this$e2ee4 = this.e2ee) === null || _this$e2ee4 === void 0 ? void 0 : _this$e2ee4.state) === _types.E2eeState.Failed) {
5151
+ return _types.TrustState.Failed;
5152
+ }
5153
+ if (((_this$e2ee5 = this.e2ee) === null || _this$e2ee5 === void 0 ? void 0 : _this$e2ee5.state) === _types.E2eeState.Initializing || ((_this$e2ee6 = this.e2ee) === null || _this$e2ee6 === void 0 ? void 0 : _this$e2ee6.state) === _types.E2eeState.Joining) {
5154
+ return _types.TrustState.Calculating;
5155
+ }
5156
+ }
5157
+ var zeroTrust = isEncrypted && ((_this$e2ee7 = this.e2ee) === null || _this$e2ee7 === void 0 ? void 0 : _this$e2ee7.state) === _types.E2eeState.Joined && !((_this$e2ee8 = this.e2ee) !== null && _this$e2ee8 !== void 0 && _this$e2ee8.hasUntrustedMediaServices);
5158
+ if (adaptive) {
5159
+ return zeroTrust ? _types.TrustState.AdaptiveZeroTrust : _types.TrustState.AdaptiveStrong;
5160
+ }
5161
+ return zeroTrust ? _types.TrustState.ZeroTrust : _types.TrustState.Strong;
5162
+ }
5163
+
5164
+ /**
5165
+ * Emits when a Locus or MLS update changes the meeting's overall E2EE trust state.
5166
+ * @returns {void}
5167
+ * @private
5168
+ */
5169
+ }, {
5170
+ key: "updateTrustState",
5171
+ value: function updateTrustState() {
5172
+ var trustState = this.trustState;
5173
+ if (this.lastTrustState === trustState) {
5174
+ return;
5175
+ }
5176
+ this.lastTrustState = trustState;
5177
+ _triggerProxy.default.trigger(this, {
5178
+ file: 'meeting/index',
5179
+ function: 'updateTrustState'
5180
+ }, _constants.EVENT_TRIGGERS.MEETING_TRUST_STATE_CHANGED, {
5181
+ trustState: trustState
5182
+ });
5183
+ }
5184
+
5185
+ /**
5186
+ * Forwards E2EE controller events and updates the derived trust state when relevant E2EE state changes.
5187
+ * @param {E2eeController | undefined} e2ee
5188
+ * @returns {void}
5189
+ * @private
5190
+ */
5191
+ }, {
5192
+ key: "setupE2eeEventForwarding",
5193
+ value: function setupE2eeEventForwarding(e2ee) {
5194
+ var _this23 = this;
5195
+ if (!e2ee) {
5196
+ return;
5197
+ }
5198
+ [_constants.EVENT_TRIGGERS.MEETING_E2EE_SECURITY_CODE_UPDATED, _constants.EVENT_TRIGGERS.MEETING_E2EE_STATE_CHANGED, _constants.EVENT_TRIGGERS.MEETING_E2EE_MEDIA_SERVICES_CHANGED, _constants.EVENT_TRIGGERS.MEETING_E2EE_FAILURE].forEach(function (event) {
5199
+ return _this23.forwardEvent(e2ee, event, event);
5200
+ });
5201
+ [_constants.EVENT_TRIGGERS.MEETING_E2EE_STATE_CHANGED, _constants.EVENT_TRIGGERS.MEETING_E2EE_MEDIA_SERVICES_CHANGED].forEach(function (event) {
5202
+ return e2ee.on(event, function () {
5203
+ return _this23.updateTrustState();
5204
+ });
5205
+ });
5206
+ }
5207
+
5066
5208
  /**
5067
5209
  * Sets the meeting info on the class instance
5068
5210
  * @param {Object} meetingInfo
@@ -5590,7 +5732,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5590
5732
  }, {
5591
5733
  key: "setLogUploadTimer",
5592
5734
  value: function setLogUploadTimer() {
5593
- var _this23 = this;
5735
+ var _this24 = this;
5594
5736
  // start with short timeouts and increase them later on so in case users have very long multi-hour meetings we don't get too fragmented logs
5595
5737
  var LOG_UPLOAD_INTERVALS = [0.1, 15, 30, 60]; // in minutes
5596
5738
 
@@ -5601,15 +5743,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5601
5743
  this.logUploadIntervalIndex += 1;
5602
5744
  }
5603
5745
  this.uploadLogsTimer = (0, _commonTimers.safeSetTimeout)(function () {
5604
- _this23.uploadLogsTimer = undefined;
5605
- _this23.uploadLogs();
5746
+ _this24.uploadLogsTimer = undefined;
5747
+ _this24.uploadLogs();
5606
5748
 
5607
5749
  // just as an extra precaution, to avoid uploading logs forever in case something goes wrong
5608
5750
  // and the page remains opened, we stop it if there is no media connection
5609
- if (!_this23.mediaProperties.webrtcMediaConnection) {
5751
+ if (!_this24.mediaProperties.webrtcMediaConnection) {
5610
5752
  return;
5611
5753
  }
5612
- _this23.setLogUploadTimer();
5754
+ _this24.setLogUploadTimer();
5613
5755
  }, delay);
5614
5756
  }
5615
5757
 
@@ -5676,7 +5818,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5676
5818
  }, {
5677
5819
  key: "closeRemoteStreams",
5678
5820
  value: function closeRemoteStreams() {
5679
- var _this24 = this;
5821
+ var _this25 = this;
5680
5822
  var _this$mediaProperties7 = this.mediaProperties,
5681
5823
  remoteAudioStream = _this$mediaProperties7.remoteAudioStream,
5682
5824
  remoteVideoStream = _this$mediaProperties7.remoteVideoStream,
@@ -5690,7 +5832,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5690
5832
  */
5691
5833
  // eslint-disable-next-line @typescript-eslint/no-shadow
5692
5834
  var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
5693
- _triggerProxy.default.trigger(_this24, {
5835
+ _triggerProxy.default.trigger(_this25, {
5694
5836
  file: 'meeting/index',
5695
5837
  function: 'closeRemoteStreams'
5696
5838
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -6001,24 +6143,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6001
6143
  }, {
6002
6144
  key: "setMercuryListener",
6003
6145
  value: function setMercuryListener() {
6004
- var _this25 = this;
6146
+ var _this26 = this;
6005
6147
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
6006
6148
  // if the meeting has active peer connections, it should try to reconnect.
6007
6149
  this.mercuryOnlineHandler = function () {
6008
6150
  _loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online');
6009
6151
 
6010
6152
  // Only send restore event when it was disconnected before and for connected later
6011
- if (!_this25.hasWebsocketConnected) {
6153
+ if (!_this26.hasWebsocketConnected) {
6012
6154
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
6013
- correlation_id: _this25.correlationId
6155
+ correlation_id: _this26.correlationId
6014
6156
  });
6015
6157
  }
6016
- _this25.hasWebsocketConnected = true;
6158
+ _this26.hasWebsocketConnected = true;
6017
6159
  };
6018
6160
  this.mercuryOfflineHandler = function () {
6019
6161
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
6020
6162
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
6021
- correlation_id: _this25.correlationId
6163
+ correlation_id: _this26.correlationId
6022
6164
  });
6023
6165
  };
6024
6166
 
@@ -6164,7 +6306,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6164
6306
  }, {
6165
6307
  key: "muteAudio",
6166
6308
  value: function muteAudio() {
6167
- var _this26 = this;
6309
+ var _this27 = this;
6168
6310
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
6169
6311
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
6170
6312
  }
@@ -6180,22 +6322,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6180
6322
 
6181
6323
  // First, stop sending the local audio media
6182
6324
  return logRequest(this.audio.handleClientRequest(this, true).then(function () {
6183
- _util2.default.handleAudioLogging(_this26.mediaProperties.audioStream);
6325
+ _util2.default.handleAudioLogging(_this27.mediaProperties.audioStream);
6184
6326
  // @ts-ignore
6185
- _this26.webex.internal.newMetrics.submitClientEvent({
6327
+ _this27.webex.internal.newMetrics.submitClientEvent({
6186
6328
  name: 'client.muted',
6187
6329
  payload: {
6188
6330
  trigger: 'user-interaction',
6189
6331
  mediaType: 'audio'
6190
6332
  },
6191
6333
  options: {
6192
- meetingId: _this26.id
6334
+ meetingId: _this27.id
6193
6335
  }
6194
6336
  });
6195
6337
  }).catch(function (error) {
6196
6338
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
6197
- correlation_id: _this26.correlationId,
6198
- locus_id: _this26.locusUrl.split('/').pop(),
6339
+ correlation_id: _this27.correlationId,
6340
+ locus_id: _this27.locusUrl.split('/').pop(),
6199
6341
  reason: error.message,
6200
6342
  stack: error.stack
6201
6343
  });
@@ -6214,7 +6356,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6214
6356
  }, {
6215
6357
  key: "unmuteAudio",
6216
6358
  value: function unmuteAudio() {
6217
- var _this27 = this;
6359
+ var _this28 = this;
6218
6360
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
6219
6361
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
6220
6362
  }
@@ -6230,22 +6372,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6230
6372
 
6231
6373
  // First, send the control to unmute the participant on the server
6232
6374
  return logRequest(this.audio.handleClientRequest(this, false).then(function () {
6233
- _util2.default.handleAudioLogging(_this27.mediaProperties.audioStream);
6375
+ _util2.default.handleAudioLogging(_this28.mediaProperties.audioStream);
6234
6376
  // @ts-ignore
6235
- _this27.webex.internal.newMetrics.submitClientEvent({
6377
+ _this28.webex.internal.newMetrics.submitClientEvent({
6236
6378
  name: 'client.unmuted',
6237
6379
  payload: {
6238
6380
  trigger: 'user-interaction',
6239
6381
  mediaType: 'audio'
6240
6382
  },
6241
6383
  options: {
6242
- meetingId: _this27.id
6384
+ meetingId: _this28.id
6243
6385
  }
6244
6386
  });
6245
6387
  }).catch(function (error) {
6246
6388
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_AUDIO_FAILURE, {
6247
- correlation_id: _this27.correlationId,
6248
- locus_id: _this27.locusUrl.split('/').pop(),
6389
+ correlation_id: _this28.correlationId,
6390
+ locus_id: _this28.locusUrl.split('/').pop(),
6249
6391
  reason: error.message,
6250
6392
  stack: error.stack
6251
6393
  });
@@ -6264,7 +6406,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6264
6406
  }, {
6265
6407
  key: "muteVideo",
6266
6408
  value: function muteVideo() {
6267
- var _this28 = this;
6409
+ var _this29 = this;
6268
6410
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
6269
6411
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
6270
6412
  }
@@ -6278,22 +6420,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6278
6420
  return _promise.default.reject(new _parameter.default('no video control associated to the meeting'));
6279
6421
  }
6280
6422
  return logRequest(this.video.handleClientRequest(this, true).then(function () {
6281
- _util2.default.handleVideoLogging(_this28.mediaProperties.videoStream);
6423
+ _util2.default.handleVideoLogging(_this29.mediaProperties.videoStream);
6282
6424
  // @ts-ignore
6283
- _this28.webex.internal.newMetrics.submitClientEvent({
6425
+ _this29.webex.internal.newMetrics.submitClientEvent({
6284
6426
  name: 'client.muted',
6285
6427
  payload: {
6286
6428
  trigger: 'user-interaction',
6287
6429
  mediaType: 'video'
6288
6430
  },
6289
6431
  options: {
6290
- meetingId: _this28.id
6432
+ meetingId: _this29.id
6291
6433
  }
6292
6434
  });
6293
6435
  }).catch(function (error) {
6294
6436
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_VIDEO_FAILURE, {
6295
- correlation_id: _this28.correlationId,
6296
- locus_id: _this28.locusUrl.split('/').pop(),
6437
+ correlation_id: _this29.correlationId,
6438
+ locus_id: _this29.locusUrl.split('/').pop(),
6297
6439
  reason: error.message,
6298
6440
  stack: error.stack
6299
6441
  });
@@ -6312,7 +6454,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6312
6454
  }, {
6313
6455
  key: "unmuteVideo",
6314
6456
  value: function unmuteVideo() {
6315
- var _this29 = this;
6457
+ var _this30 = this;
6316
6458
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
6317
6459
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
6318
6460
  }
@@ -6326,22 +6468,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6326
6468
  return _promise.default.reject(new _parameter.default('no audio control associated to the meeting'));
6327
6469
  }
6328
6470
  return logRequest(this.video.handleClientRequest(this, false).then(function () {
6329
- _util2.default.handleVideoLogging(_this29.mediaProperties.videoStream);
6471
+ _util2.default.handleVideoLogging(_this30.mediaProperties.videoStream);
6330
6472
  // @ts-ignore
6331
- _this29.webex.internal.newMetrics.submitClientEvent({
6473
+ _this30.webex.internal.newMetrics.submitClientEvent({
6332
6474
  name: 'client.unmuted',
6333
6475
  payload: {
6334
6476
  trigger: 'user-interaction',
6335
6477
  mediaType: 'video'
6336
6478
  },
6337
6479
  options: {
6338
- meetingId: _this29.id
6480
+ meetingId: _this30.id
6339
6481
  }
6340
6482
  });
6341
6483
  }).catch(function (error) {
6342
6484
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_VIDEO_FAILURE, {
6343
- correlation_id: _this29.correlationId,
6344
- locus_id: _this29.locusUrl.split('/').pop(),
6485
+ correlation_id: _this30.correlationId,
6486
+ locus_id: _this30.locusUrl.split('/').pop(),
6345
6487
  reason: error.message,
6346
6488
  stack: error.stack
6347
6489
  });
@@ -6371,7 +6513,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6371
6513
  key: "joinWithMedia",
6372
6514
  value: (function () {
6373
6515
  var _joinWithMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
6374
- var _this30 = this;
6516
+ var _this31 = this;
6375
6517
  var options,
6376
6518
  mediaOptions,
6377
6519
  _options$joinOptions,
@@ -6490,7 +6632,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6490
6632
  _context17.next = 11;
6491
6633
  return this.addMediaInternal(function () {
6492
6634
  // callback is not called when UserNotJoinedError is thrown
6493
- return _this30.joinWithMediaRetryInfo.retryCount >= 1 ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
6635
+ return _this31.joinWithMediaRetryInfo.retryCount >= 1 ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
6494
6636
  }, forceTurnDiscovery, turnServerInfo, shouldRetryMediaWithOnlyTurnTLS ? 'relay' : undefined, mediaOptions);
6495
6637
  case 11:
6496
6638
  mediaResponse = _context17.sent;
@@ -6611,7 +6753,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6611
6753
  }, {
6612
6754
  key: "reconnect",
6613
6755
  value: function reconnect(options) {
6614
- var _this31 = this;
6756
+ var _this32 = this;
6615
6757
  _loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
6616
6758
  if (!this.reconnectionManager || !this.reconnectionManager.reconnect) {
6617
6759
  return _promise.default.reject(new _parameter.default('Cannot reconnect, ReconnectionManager must first be defined.'));
@@ -6627,10 +6769,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6627
6769
  while (1) switch (_context18.prev = _context18.next) {
6628
6770
  case 0:
6629
6771
  _context18.next = 1;
6630
- return _this31.waitForRemoteSDPAnswer();
6772
+ return _this32.waitForRemoteSDPAnswer();
6631
6773
  case 1:
6632
6774
  _context18.next = 2;
6633
- return _this31.waitForMediaConnectionConnected();
6775
+ return _this32.waitForMediaConnectionConnected();
6634
6776
  case 2:
6635
6777
  case "end":
6636
6778
  return _context18.stop();
@@ -6644,7 +6786,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6644
6786
  return _promise.default.resolve();
6645
6787
  }
6646
6788
  _loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
6647
- _this31.uploadLogs({
6789
+ _this32.uploadLogs({
6648
6790
  file: 'meeting/index',
6649
6791
  function: 'reconnect'
6650
6792
  });
@@ -6675,8 +6817,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6675
6817
  }, {
6676
6818
  key: "isReactionsSupported",
6677
6819
  value: function isReactionsSupported() {
6678
- var _this$locusInfo8, _this$locusInfo8$cont;
6679
- if ((_this$locusInfo8 = this.locusInfo) !== null && _this$locusInfo8 !== void 0 && (_this$locusInfo8$cont = _this$locusInfo8.controls) !== null && _this$locusInfo8$cont !== void 0 && _this$locusInfo8$cont.reactions.enabled) {
6820
+ var _this$locusInfo9, _this$locusInfo9$cont;
6821
+ if ((_this$locusInfo9 = this.locusInfo) !== null && _this$locusInfo9 !== void 0 && (_this$locusInfo9$cont = _this$locusInfo9.controls) !== null && _this$locusInfo9$cont !== void 0 && _this$locusInfo9$cont.reactions.enabled) {
6680
6822
  return true;
6681
6823
  }
6682
6824
  _loggerProxy.default.logger.error('Meeting:index#isReactionsSupported --> Reactions is not supported');
@@ -6691,20 +6833,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6691
6833
  }, {
6692
6834
  key: "setCaptionLanguage",
6693
6835
  value: function setCaptionLanguage(language) {
6694
- var _this32 = this;
6836
+ var _this33 = this;
6695
6837
  return new _promise.default(function (resolve, reject) {
6696
- if (!_this32.isTranscriptionSupported()) {
6838
+ if (!_this33.isTranscriptionSupported()) {
6697
6839
  _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
6698
6840
  reject(new Error('Webex Assistant is not enabled/supported'));
6699
6841
  }
6700
6842
  try {
6701
- var _this32$voiceaChannel2, _this32$voiceaChannel3;
6843
+ var _this33$voiceaChannel2, _this33$voiceaChannel3;
6702
6844
  var _voiceaListenerCaptionUpdate = function voiceaListenerCaptionUpdate(payload) {
6703
- var _this32$voiceaChannel;
6704
- (_this32$voiceaChannel = _this32.voiceaChannel) === null || _this32$voiceaChannel === void 0 ? void 0 : _this32$voiceaChannel.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, _voiceaListenerCaptionUpdate);
6845
+ var _this33$voiceaChannel;
6846
+ (_this33$voiceaChannel = _this33.voiceaChannel) === null || _this33$voiceaChannel === void 0 ? void 0 : _this33$voiceaChannel.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, _voiceaListenerCaptionUpdate);
6705
6847
  var statusCode = payload.statusCode;
6706
6848
  if (statusCode === 200) {
6707
- _this32.transcription.languageOptions = _objectSpread(_objectSpread({}, _this32.transcription.languageOptions), {}, {
6849
+ _this33.transcription.languageOptions = _objectSpread(_objectSpread({}, _this33.transcription.languageOptions), {}, {
6708
6850
  currentCaptionLanguage: language
6709
6851
  });
6710
6852
  resolve(language);
@@ -6712,8 +6854,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6712
6854
  reject(payload);
6713
6855
  }
6714
6856
  };
6715
- (_this32$voiceaChannel2 = _this32.voiceaChannel) === null || _this32$voiceaChannel2 === void 0 ? void 0 : _this32$voiceaChannel2.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, _voiceaListenerCaptionUpdate);
6716
- (_this32$voiceaChannel3 = _this32.voiceaChannel) === null || _this32$voiceaChannel3 === void 0 ? void 0 : _this32$voiceaChannel3.requestLanguage(language);
6857
+ (_this33$voiceaChannel2 = _this33.voiceaChannel) === null || _this33$voiceaChannel2 === void 0 ? void 0 : _this33$voiceaChannel2.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, _voiceaListenerCaptionUpdate);
6858
+ (_this33$voiceaChannel3 = _this33.voiceaChannel) === null || _this33$voiceaChannel3 === void 0 ? void 0 : _this33$voiceaChannel3.requestLanguage(language);
6717
6859
  } catch (error) {
6718
6860
  _loggerProxy.default.logger.error("Meeting:index#setCaptionLanguage --> ".concat(error));
6719
6861
  reject(error);
@@ -6729,24 +6871,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6729
6871
  }, {
6730
6872
  key: "setSpokenLanguage",
6731
6873
  value: function setSpokenLanguage(language) {
6732
- var _this33 = this;
6874
+ var _this34 = this;
6733
6875
  return new _promise.default(function (resolve, reject) {
6734
- if (!_this33.isTranscriptionSupported()) {
6876
+ if (!_this34.isTranscriptionSupported()) {
6735
6877
  _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
6736
6878
  reject(new Error('Webex Assistant is not enabled/supported'));
6737
6879
  }
6738
- if (_this33.getCurUserType() !== 'host') {
6880
+ if (_this34.getCurUserType() !== 'host') {
6739
6881
  _loggerProxy.default.logger.error('Meeting:index#setSpokenLanguage --> Only host can set spoken language');
6740
6882
  reject(new Error('Only host can set spoken language'));
6741
6883
  }
6742
6884
  try {
6743
- var _this33$voiceaChannel2, _this33$voiceaChannel3;
6885
+ var _this34$voiceaChannel2, _this34$voiceaChannel3;
6744
6886
  var _voiceaListenerLanguageUpdate = function voiceaListenerLanguageUpdate(payload) {
6745
- var _this33$voiceaChannel;
6746
- (_this33$voiceaChannel = _this33.voiceaChannel) === null || _this33$voiceaChannel === void 0 ? void 0 : _this33$voiceaChannel.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, _voiceaListenerLanguageUpdate);
6887
+ var _this34$voiceaChannel;
6888
+ (_this34$voiceaChannel = _this34.voiceaChannel) === null || _this34$voiceaChannel === void 0 ? void 0 : _this34$voiceaChannel.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, _voiceaListenerLanguageUpdate);
6747
6889
  var languageCode = payload.languageCode;
6748
6890
  if (languageCode) {
6749
- _this33.transcription.languageOptions = _objectSpread(_objectSpread({}, _this33.transcription.languageOptions), {}, {
6891
+ _this34.transcription.languageOptions = _objectSpread(_objectSpread({}, _this34.transcription.languageOptions), {}, {
6750
6892
  currentSpokenLanguage: languageCode
6751
6893
  });
6752
6894
  resolve(languageCode);
@@ -6754,8 +6896,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6754
6896
  reject(payload);
6755
6897
  }
6756
6898
  };
6757
- (_this33$voiceaChannel2 = _this33.voiceaChannel) === null || _this33$voiceaChannel2 === void 0 ? void 0 : _this33$voiceaChannel2.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, _voiceaListenerLanguageUpdate);
6758
- (_this33$voiceaChannel3 = _this33.voiceaChannel) === null || _this33$voiceaChannel3 === void 0 ? void 0 : _this33$voiceaChannel3.setSpokenLanguage(language);
6899
+ (_this34$voiceaChannel2 = _this34.voiceaChannel) === null || _this34$voiceaChannel2 === void 0 ? void 0 : _this34$voiceaChannel2.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, _voiceaListenerLanguageUpdate);
6900
+ (_this34$voiceaChannel3 = _this34.voiceaChannel) === null || _this34$voiceaChannel3 === void 0 ? void 0 : _this34$voiceaChannel3.setSpokenLanguage(language);
6759
6901
  } catch (error) {
6760
6902
  _loggerProxy.default.logger.error("Meeting:index#setSpokenLanguage --> ".concat(error));
6761
6903
  reject(error);
@@ -6937,7 +7079,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6937
7079
  */
6938
7080
  function () {
6939
7081
  var _join = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
6940
- var _this34 = this;
7082
+ var _this35 = this;
6941
7083
  var options,
6942
7084
  errorMessage,
6943
7085
  error,
@@ -7087,48 +7229,48 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7087
7229
  return _context20.abrupt("return", _promise.default.reject(_t13));
7088
7230
  case 10:
7089
7231
  return _context20.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
7090
- _this34.meetingFiniteStateMachine.join();
7091
- _this34.setupLocusMediaRequest();
7232
+ _this35.meetingFiniteStateMachine.join();
7233
+ _this35.setupLocusMediaRequest();
7092
7234
 
7093
7235
  // @ts-ignore
7094
- _this34.webex.internal.device.meetingStarted();
7236
+ _this35.webex.internal.device.meetingStarted();
7095
7237
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
7096
7238
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
7097
- correlation_id: _this34.correlationId
7239
+ correlation_id: _this35.correlationId
7098
7240
  });
7099
7241
  joinSuccess(join);
7100
- _this34.deferJoin = undefined;
7242
+ _this35.deferJoin = undefined;
7101
7243
  return join;
7102
7244
  }).catch(function (error) {
7103
7245
  var _error$error;
7104
- _this34.meetingFiniteStateMachine.fail(error);
7246
+ _this35.meetingFiniteStateMachine.fail(error);
7105
7247
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
7106
7248
 
7107
7249
  // TODO: change this to error codes and pre defined dictionary
7108
7250
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
7109
- correlation_id: _this34.correlationId,
7251
+ correlation_id: _this35.correlationId,
7110
7252
  reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
7111
7253
  stack: error.stack
7112
7254
  });
7113
7255
 
7114
7256
  // Upload logs on join Failure
7115
- _triggerProxy.default.trigger(_this34, {
7257
+ _triggerProxy.default.trigger(_this35, {
7116
7258
  file: 'meeting/index',
7117
7259
  function: 'join'
7118
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this34);
7260
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this35);
7119
7261
  joinFailed(error);
7120
- _this34.deferJoin = undefined;
7262
+ _this35.deferJoin = undefined;
7121
7263
  return _promise.default.reject(error);
7122
7264
  }).then(function (join) {
7123
- _this34.saveDataChannelToken(join);
7265
+ _this35.saveDataChannelToken(join);
7124
7266
  // @ts-ignore - config coming from registerPlugin
7125
- if (_this34.config.enableAutomaticLLM) {
7126
- _this34.updateLLMConnection({
7267
+ if (_this35.config.enableAutomaticLLM) {
7268
+ _this35.updateLLMConnection({
7127
7269
  isInitialJoinPhase: true
7128
7270
  }).catch(function (error) {
7129
7271
  _loggerProxy.default.logger.error('Meeting:index#join --> Transcription Socket Connection Failed', error);
7130
7272
  _metrics.default.sendBehavioralMetric(_constants2.default.LLM_CONNECTION_AFTER_JOIN_FAILURE, {
7131
- correlation_id: _this34.correlationId,
7273
+ correlation_id: _this35.correlationId,
7132
7274
  reason: error === null || error === void 0 ? void 0 : error.message,
7133
7275
  stack: error.stack
7134
7276
  });
@@ -7158,23 +7300,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7158
7300
  }, {
7159
7301
  key: "startLLMHealthCheckTimer",
7160
7302
  value: function startLLMHealthCheckTimer() {
7161
- var _this35 = this;
7303
+ var _this36 = this;
7162
7304
  // first cancel any existing timer
7163
7305
  this.clearLLMHealthCheckTimer();
7164
7306
  this.llmHealthCheckTimer = setTimeout(function () {
7165
- var _this35$llmChannel$is, _this35$llmChannel;
7166
- var isConnected = (_this35$llmChannel$is = (_this35$llmChannel = _this35.llmChannel) === null || _this35$llmChannel === void 0 ? void 0 : _this35$llmChannel.isConnected()) !== null && _this35$llmChannel$is !== void 0 ? _this35$llmChannel$is : false;
7307
+ var _this36$llmChannel$is, _this36$llmChannel;
7308
+ var isConnected = (_this36$llmChannel$is = (_this36$llmChannel = _this36.llmChannel) === null || _this36$llmChannel === void 0 ? void 0 : _this36$llmChannel.isConnected()) !== null && _this36$llmChannel$is !== void 0 ? _this36$llmChannel$is : false;
7167
7309
  if (!isConnected) {
7168
- var _this35$llmChannel$ha, _this35$llmChannel2;
7169
- var hasEverConnected = (_this35$llmChannel$ha = (_this35$llmChannel2 = _this35.llmChannel) === null || _this35$llmChannel2 === void 0 ? void 0 : _this35$llmChannel2.hasEverConnected) !== null && _this35$llmChannel$ha !== void 0 ? _this35$llmChannel$ha : false;
7310
+ var _this36$llmChannel$ha, _this36$llmChannel2;
7311
+ var hasEverConnected = (_this36$llmChannel$ha = (_this36$llmChannel2 = _this36.llmChannel) === null || _this36$llmChannel2 === void 0 ? void 0 : _this36$llmChannel2.hasEverConnected) !== null && _this36$llmChannel$ha !== void 0 ? _this36$llmChannel$ha : false;
7170
7312
 
7171
7313
  // only send metric if not connected - to avoid too many metrics
7172
7314
  _metrics.default.sendBehavioralMetric(_constants2.default.LLM_HEALTHCHECK_FAILURE, {
7173
- correlation_id: _this35.correlationId,
7315
+ correlation_id: _this36.correlationId,
7174
7316
  hasEverConnected: hasEverConnected
7175
7317
  });
7176
7318
  }
7177
- _this35.llmHealthCheckTimer = undefined;
7319
+ _this36.llmHealthCheckTimer = undefined;
7178
7320
  }, LLM_HEALTHCHECK_TIMER_MS);
7179
7321
  }
7180
7322
 
@@ -7363,8 +7505,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7363
7505
  key: "updateLLMConnection",
7364
7506
  value: (function () {
7365
7507
  var _updateLLMConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
7366
- var _this$_pendingDatacha,
7367
- _this36 = this;
7508
+ var _this$e2ee9,
7509
+ _this$_pendingDatacha,
7510
+ _this37 = this;
7368
7511
  var _ref40,
7369
7512
  _ref40$isInitialJoinP,
7370
7513
  isInitialJoinPhase,
@@ -7419,12 +7562,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7419
7562
  // Create a new LLM channel for this meeting
7420
7563
  // @ts-ignore - Fix type
7421
7564
  this.llmChannel = this.webex.internal.llm.createChannel();
7565
+ (_this$e2ee9 = this.e2ee) === null || _this$e2ee9 === void 0 ? void 0 : _this$e2ee9.llmChannelChanged();
7422
7566
 
7423
7567
  // Get token from pending (saved from join response) or channel
7424
7568
  datachannelToken = (_this$_pendingDatacha = this._pendingDatachannelToken) !== null && _this$_pendingDatacha !== void 0 ? _this$_pendingDatacha : this.llmChannel.getDatachannelToken(); // Set up refresh handler before registration so interceptor-triggered token
7425
7569
  // refresh during register POST can resolve a valid handler.
7426
7570
  this.llmChannel.setRefreshHandler(function () {
7427
- return _this36.refreshDataChannelToken();
7571
+ return _this37.refreshDataChannelToken();
7428
7572
  });
7429
7573
 
7430
7574
  // If we have a pending token, store it on the channel
@@ -7433,61 +7577,61 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7433
7577
  this._pendingDatachannelToken = undefined;
7434
7578
  }
7435
7579
  return _context22.abrupt("return", this.llmChannel.registerAndConnect(url, dataChannelUrl, datachannelToken).then(function (registerAndConnectResult) {
7436
- var _this36$webinar, _this36$webinar$isPra, _this36$webinar2;
7437
- _this36.locusInfo.syncAllHashTreeDatasets({
7580
+ var _this37$webinar, _this37$webinar$isPra, _this37$webinar2;
7581
+ _this37.locusInfo.syncAllHashTreeDatasets({
7438
7582
  onlyLLM: true
7439
7583
  });
7440
7584
 
7441
7585
  // Register event listeners on the channel
7442
- _this36.llmChannel.off('event:relay.event', _this36.processRelayEvent);
7443
- _this36.llmChannel.on('event:relay.event', _this36.processRelayEvent);
7444
- _this36.llmChannel.off(_constants.LOCUS_LLM_EVENT, _this36.processLocusLLMEvent);
7445
- _this36.llmChannel.on(_constants.LOCUS_LLM_EVENT, _this36.processLocusLLMEvent);
7446
- _this36.llmChannel.off('online', _this36.handleLLMOnline);
7447
- _this36.llmChannel.on('online', _this36.handleLLMOnline);
7586
+ _this37.llmChannel.off('event:relay.event', _this37.processRelayEvent);
7587
+ _this37.llmChannel.on('event:relay.event', _this37.processRelayEvent);
7588
+ _this37.llmChannel.off(_constants.LOCUS_LLM_EVENT, _this37.processLocusLLMEvent);
7589
+ _this37.llmChannel.on(_constants.LOCUS_LLM_EVENT, _this37.processLocusLLMEvent);
7590
+ _this37.llmChannel.off('online', _this37.handleLLMOnline);
7591
+ _this37.llmChannel.on('online', _this37.handleLLMOnline);
7448
7592
 
7449
7593
  // Register annotation channel only if not in practice session
7450
7594
  // (practice session manages its own annotation channel via updatePSDataChannel)
7451
- if (!((_this36$webinar = _this36.webinar) !== null && _this36$webinar !== void 0 && _this36$webinar.isJoinPracticeSessionDataChannel())) {
7452
- _this36.annotation.registerChannel(_this36.llmChannel);
7595
+ if (!((_this37$webinar = _this37.webinar) !== null && _this37$webinar !== void 0 && _this37$webinar.isJoinPracticeSessionDataChannel())) {
7596
+ _this37.annotation.registerChannel(_this37.llmChannel);
7453
7597
  }
7454
7598
 
7455
7599
  // Register breakouts channel
7456
- _this36.breakouts.registerLLMChannel(_this36.llmChannel);
7600
+ _this37.breakouts.registerLLMChannel(_this37.llmChannel);
7457
7601
  _loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
7458
- _this36.startLLMHealthCheckTimer();
7602
+ _this37.startLLMHealthCheckTimer();
7459
7603
 
7460
7604
  // Switch voiceaChannel to use the new LLM channel (preserves transcription state).
7461
7605
  // Skip if practice session is active - practice session manages its own voicea binding
7462
7606
  // via updatePSDataChannel, and switching here would break practice session captions.
7463
- var isPracticeSessionActive = (_this36$webinar$isPra = (_this36$webinar2 = _this36.webinar) === null || _this36$webinar2 === void 0 ? void 0 : _this36$webinar2.isPracticeSessionLLMChannelConnected()) !== null && _this36$webinar$isPra !== void 0 ? _this36$webinar$isPra : false;
7464
- if (!_this36.voiceaChannel) {
7607
+ var isPracticeSessionActive = (_this37$webinar$isPra = (_this37$webinar2 = _this37.webinar) === null || _this37$webinar2 === void 0 ? void 0 : _this37$webinar2.isPracticeSessionLLMChannelConnected()) !== null && _this37$webinar$isPra !== void 0 ? _this37$webinar$isPra : false;
7608
+ if (!_this37.voiceaChannel) {
7465
7609
  // @ts-ignore - Fix type
7466
- _this36.voiceaChannel = _this36.webex.internal.voicea.createChannel();
7610
+ _this37.voiceaChannel = _this37.webex.internal.voicea.createChannel();
7467
7611
  }
7468
7612
  if (!isPracticeSessionActive) {
7469
7613
  // Fire-and-forget: caption restoration shouldn't block LLM connection result.
7470
7614
  // transcription is always initialized (reset to initial shape, never null),
7471
7615
  // so no re-init needed here.
7472
- _this36.voiceaChannel.switchLLMChannel(_this36.llmChannel).then(function () {
7473
- _this36.startTranscriptionIfNeeded();
7616
+ _this37.voiceaChannel.switchLLMChannel(_this37.llmChannel).then(function () {
7617
+ _this37.startTranscriptionIfNeeded();
7474
7618
  }).catch(function (error) {
7475
7619
  _loggerProxy.default.logger.warn('Meeting:index#updateLLMConnection --> failed to switch voicea channel:', error);
7476
7620
  });
7477
7621
  }
7478
7622
  if (registerAndConnectResult) {
7479
- var _this36$breakouts;
7623
+ var _this37$breakouts;
7480
7624
  if (isInitialJoinPhase) {
7481
- _this36.sendLLMConnectMetric(registerAndConnectResult);
7625
+ _this37.sendLLMConnectMetric(registerAndConnectResult);
7482
7626
  }
7483
- (_this36$breakouts = _this36.breakouts) === null || _this36$breakouts === void 0 ? void 0 : _this36$breakouts.trigger(_constants.BREAKOUTS.EVENTS.LLM_CONNECT_RESPONSE, {
7484
- meeting: _this36,
7627
+ (_this37$breakouts = _this37.breakouts) === null || _this37$breakouts === void 0 ? void 0 : _this37$breakouts.trigger(_constants.BREAKOUTS.EVENTS.LLM_CONNECT_RESPONSE, {
7628
+ meeting: _this37,
7485
7629
  llmLatency: registerAndConnectResult
7486
7630
  });
7487
7631
  }
7488
7632
  return _promise.default.resolve(registerAndConnectResult);
7489
7633
  }).catch(function (error) {
7490
- var _error$timing$clientL, _error$timing, _this36$breakouts2;
7634
+ var _error$timing$clientL, _error$timing, _this37$breakouts2, _this37$e2ee;
7491
7635
  // Prefer the partial timing registerAndConnect attaches when register succeeded but the
7492
7636
  // websocket connect() failed, so a ws failure isn't misreported as register never completing.
7493
7637
  var llmLatency = {
@@ -7495,16 +7639,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7495
7639
  clientLLMWebSocketConnectTime: 0
7496
7640
  };
7497
7641
  if (isInitialJoinPhase) {
7498
- _this36.sendLLMConnectMetric(llmLatency, error);
7642
+ _this37.sendLLMConnectMetric(llmLatency, error);
7499
7643
  }
7500
- (_this36$breakouts2 = _this36.breakouts) === null || _this36$breakouts2 === void 0 ? void 0 : _this36$breakouts2.trigger(_constants.BREAKOUTS.EVENTS.LLM_CONNECT_RESPONSE, {
7501
- meeting: _this36,
7644
+ (_this37$breakouts2 = _this37.breakouts) === null || _this37$breakouts2 === void 0 ? void 0 : _this37$breakouts2.trigger(_constants.BREAKOUTS.EVENTS.LLM_CONNECT_RESPONSE, {
7645
+ meeting: _this37,
7502
7646
  llmLatency: llmLatency,
7503
7647
  error: error
7504
7648
  });
7505
7649
 
7506
7650
  // Clean up the channel on failure
7507
- _this36.llmChannel = undefined;
7651
+ _this37.llmChannel = undefined;
7652
+ (_this37$e2ee = _this37.e2ee) === null || _this37$e2ee === void 0 ? void 0 : _this37$e2ee.llmChannelChanged();
7508
7653
  return _promise.default.reject(error);
7509
7654
  }));
7510
7655
  case 5:
@@ -7628,7 +7773,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7628
7773
  }, {
7629
7774
  key: "dialInPstn",
7630
7775
  value: function dialInPstn() {
7631
- var _this37 = this;
7776
+ var _this38 = this;
7632
7777
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
7633
7778
  this.pstnCorrelationId = _uuid.default.v4();
7634
7779
  var pstnCorrelationId = this.pstnCorrelationId,
@@ -7644,16 +7789,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7644
7789
  }).catch(function (error) {
7645
7790
  var _error$error2;
7646
7791
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
7647
- correlation_id: _this37.correlationId,
7648
- dial_in_url: _this37.dialInUrl,
7792
+ correlation_id: _this38.correlationId,
7793
+ dial_in_url: _this38.dialInUrl,
7649
7794
  dial_in_correlation_id: pstnCorrelationId,
7650
7795
  locus_id: locusUrl.split('/').pop(),
7651
- client_url: _this37.deviceUrl,
7796
+ client_url: _this38.deviceUrl,
7652
7797
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
7653
7798
  stack: error.stack
7654
7799
  });
7655
- if (_this37.pstnCorrelationId === pstnCorrelationId) {
7656
- _this37.pstnCorrelationId = undefined;
7800
+ if (_this38.pstnCorrelationId === pstnCorrelationId) {
7801
+ _this38.pstnCorrelationId = undefined;
7657
7802
  }
7658
7803
  return _promise.default.reject(error);
7659
7804
  });
@@ -7669,7 +7814,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7669
7814
  }, {
7670
7815
  key: "dialOutPstn",
7671
7816
  value: function dialOutPstn(phoneNumber) {
7672
- var _this38 = this;
7817
+ var _this39 = this;
7673
7818
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
7674
7819
  this.pstnCorrelationId = _uuid.default.v4();
7675
7820
  var locusUrl = this.locusUrl,
@@ -7686,16 +7831,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7686
7831
  }).catch(function (error) {
7687
7832
  var _error$error3;
7688
7833
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
7689
- correlation_id: _this38.correlationId,
7690
- dial_out_url: _this38.dialOutUrl,
7834
+ correlation_id: _this39.correlationId,
7835
+ dial_out_url: _this39.dialOutUrl,
7691
7836
  dial_out_correlation_id: pstnCorrelationId,
7692
7837
  locus_id: locusUrl.split('/').pop(),
7693
- client_url: _this38.deviceUrl,
7838
+ client_url: _this39.deviceUrl,
7694
7839
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
7695
7840
  stack: error.stack
7696
7841
  });
7697
- if (_this38.pstnCorrelationId === pstnCorrelationId) {
7698
- _this38.pstnCorrelationId = undefined;
7842
+ if (_this39.pstnCorrelationId === pstnCorrelationId) {
7843
+ _this39.pstnCorrelationId = undefined;
7699
7844
  }
7700
7845
  return _promise.default.reject(error);
7701
7846
  });
@@ -7711,11 +7856,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7711
7856
  }, {
7712
7857
  key: "disconnectPhoneAudio",
7713
7858
  value: function disconnectPhoneAudio() {
7714
- var _this39 = this;
7859
+ var _this40 = this;
7715
7860
  var correlationToClear = this.pstnCorrelationId;
7716
7861
  return _promise.default.all([this.isPhoneProvisioned(this.dialInDeviceStatus) ? _util2.default.disconnectPhoneAudio(this, this.dialInUrl) : _promise.default.resolve(), this.isPhoneProvisioned(this.dialOutDeviceStatus) ? _util2.default.disconnectPhoneAudio(this, this.dialOutUrl) : _promise.default.resolve()]).then(function () {
7717
- if (_this39.pstnCorrelationId === correlationToClear) {
7718
- _this39.pstnCorrelationId = undefined;
7862
+ if (_this40.pstnCorrelationId === correlationToClear) {
7863
+ _this40.pstnCorrelationId = undefined;
7719
7864
  }
7720
7865
  });
7721
7866
  }
@@ -7730,7 +7875,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7730
7875
  }, {
7731
7876
  key: "moveTo",
7732
7877
  value: function moveTo(resourceId) {
7733
- var _this40 = this;
7878
+ var _this41 = this;
7734
7879
  if (!resourceId) {
7735
7880
  throw new _parameter.default('Cannot move call without a resourceId.');
7736
7881
  }
@@ -7774,12 +7919,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7774
7919
  while (1) switch (_context23.prev = _context23.next) {
7775
7920
  case 0:
7776
7921
  _context23.prev = 0;
7777
- if (!(_this40.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
7922
+ if (!(_this41.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
7778
7923
  _context23.next = 1;
7779
7924
  break;
7780
7925
  }
7781
7926
  _context23.next = 1;
7782
- return _this40.releaseScreenShareFloor();
7927
+ return _this41.releaseScreenShareFloor();
7783
7928
  case 1:
7784
7929
  mediaSettings = {
7785
7930
  mediaDirection: {
@@ -7791,37 +7936,37 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7791
7936
  receiveShare: true
7792
7937
  }
7793
7938
  };
7794
- _this40.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
7795
- _this40.mediaProperties.unsetRemoteMedia();
7939
+ _this41.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
7940
+ _this41.mediaProperties.unsetRemoteMedia();
7796
7941
 
7797
7942
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the device answers the meeting
7798
7943
  // once the device answers we close the old connection and create new media server connection with only share enabled
7799
- if (!_this40.statsAnalyzer) {
7944
+ if (!_this41.statsAnalyzer) {
7800
7945
  _context23.next = 2;
7801
7946
  break;
7802
7947
  }
7803
7948
  _context23.next = 2;
7804
- return _this40.statsAnalyzer.stopAnalyzer();
7949
+ return _this41.statsAnalyzer.stopAnalyzer();
7805
7950
  case 2:
7806
7951
  _context23.next = 3;
7807
- return _this40.closeRemoteStreams();
7952
+ return _this41.closeRemoteStreams();
7808
7953
  case 3:
7809
7954
  _context23.next = 4;
7810
- return _this40.closePeerConnections();
7955
+ return _this41.closePeerConnections();
7811
7956
  case 4:
7812
- _this40.cleanupLocalStreams();
7813
- _this40.unsetRemoteStreams();
7814
- _this40.unsetPeerConnections();
7815
- _this40.reconnectionManager.cleanUp();
7957
+ _this41.cleanupLocalStreams();
7958
+ _this41.unsetRemoteStreams();
7959
+ _this41.unsetPeerConnections();
7960
+ _this41.reconnectionManager.cleanUp();
7816
7961
  _context23.next = 5;
7817
- return _this40.addMedia({
7962
+ return _this41.addMedia({
7818
7963
  audioEnabled: false,
7819
7964
  videoEnabled: false,
7820
7965
  shareVideoEnabled: true
7821
7966
  });
7822
7967
  case 5:
7823
7968
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
7824
- _this40.isMoveToInProgress = false;
7969
+ _this41.isMoveToInProgress = false;
7825
7970
  _context23.next = 7;
7826
7971
  break;
7827
7972
  case 6:
@@ -7829,12 +7974,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7829
7974
  _t15 = _context23["catch"](0);
7830
7975
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _t15);
7831
7976
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
7832
- correlation_id: _this40.correlationId,
7833
- locus_id: _this40.locusUrl.split('/').pop(),
7977
+ correlation_id: _this41.correlationId,
7978
+ locus_id: _this41.locusUrl.split('/').pop(),
7834
7979
  reason: _t15.message,
7835
7980
  stack: _t15.stack
7836
7981
  });
7837
- _this40.isMoveToInProgress = false;
7982
+ _this41.isMoveToInProgress = false;
7838
7983
  case 7:
7839
7984
  case "end":
7840
7985
  return _context23.stop();
@@ -7850,17 +7995,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7850
7995
  resourceId: resourceId,
7851
7996
  moveToResource: true
7852
7997
  }).then(function () {
7853
- _this40.meetingFiniteStateMachine.join();
7998
+ _this41.meetingFiniteStateMachine.join();
7854
7999
  }).catch(function (error) {
7855
- _this40.meetingFiniteStateMachine.fail(error);
8000
+ _this41.meetingFiniteStateMachine.fail(error);
7856
8001
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
7857
- correlation_id: _this40.correlationId,
7858
- locus_id: _this40.locusUrl.split('/').pop(),
8002
+ correlation_id: _this41.correlationId,
8003
+ locus_id: _this41.locusUrl.split('/').pop(),
7859
8004
  reason: error.message,
7860
8005
  stack: error.stack
7861
8006
  });
7862
8007
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', error);
7863
- _this40.isMoveToInProgress = false;
8008
+ _this41.isMoveToInProgress = false;
7864
8009
  return _promise.default.reject(error);
7865
8010
  });
7866
8011
  }
@@ -7875,7 +8020,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7875
8020
  }, {
7876
8021
  key: "moveFrom",
7877
8022
  value: function moveFrom(resourceId) {
7878
- var _this41 = this;
8023
+ var _this42 = this;
7879
8024
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
7880
8025
  if (!resourceId) {
7881
8026
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -7890,19 +8035,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7890
8035
  }
7891
8036
  });
7892
8037
  return _util2.default.joinMeetingOptions(this).then(function () {
7893
- return _util2.default.leaveMeeting(_this41, {
8038
+ return _util2.default.leaveMeeting(_this42, {
7894
8039
  resourceId: resourceId,
7895
8040
  correlationId: oldCorrelationId,
7896
8041
  moveMeeting: true
7897
8042
  }).then(function () {
7898
- _this41.resourceId = '';
8043
+ _this42.resourceId = '';
7899
8044
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
7900
8045
  });
7901
8046
  }).catch(function (error) {
7902
- _this41.meetingFiniteStateMachine.fail(error);
8047
+ _this42.meetingFiniteStateMachine.fail(error);
7903
8048
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
7904
- correlation_id: _this41.correlationId,
7905
- locus_id: _this41.locusUrl.split('/').pop(),
8049
+ correlation_id: _this42.correlationId,
8050
+ locus_id: _this42.locusUrl.split('/').pop(),
7906
8051
  reason: error.message,
7907
8052
  stack: error.stack
7908
8053
  });
@@ -7936,7 +8081,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7936
8081
  key: "isLocusUserFullError",
7937
8082
  value: function isLocusUserFullError(error) {
7938
8083
  var _error6, _error6$body;
7939
- return (error === null || error === void 0 ? void 0 : (_error6 = error.error) === null || _error6 === void 0 ? void 0 : (_error6$body = _error6.body) === null || _error6$body === void 0 ? void 0 : _error6$body.errorCode) === _types.LocusErrorCodes.LOCUS_USER_FULL;
8084
+ return (error === null || error === void 0 ? void 0 : (_error6 = error.error) === null || _error6 === void 0 ? void 0 : (_error6$body = _error6.body) === null || _error6$body === void 0 ? void 0 : _error6$body.errorCode) === _types2.LocusErrorCodes.LOCUS_USER_FULL;
7940
8085
  }
7941
8086
 
7942
8087
  /**
@@ -8101,9 +8246,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8101
8246
  }, {
8102
8247
  key: "forwardEvent",
8103
8248
  value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
8104
- var _this42 = this;
8249
+ var _this43 = this;
8105
8250
  eventEmitter.on(eventTypeToForward, function (data) {
8106
- return _triggerProxy.default.trigger(_this42, {
8251
+ return _triggerProxy.default.trigger(_this43, {
8107
8252
  file: 'meetings',
8108
8253
  function: 'addMedia'
8109
8254
  }, meetingEventType, data);
@@ -8253,7 +8398,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8253
8398
  }, {
8254
8399
  key: "createStatsAnalyzer",
8255
8400
  value: function createStatsAnalyzer() {
8256
- var _this43 = this;
8401
+ var _this44 = this;
8257
8402
  // @ts-ignore - config coming from registerPlugin
8258
8403
  if (this.config.stats.enableStatsAnalyzer) {
8259
8404
  // @ts-ignore - config coming from registerPlugin
@@ -8279,17 +8424,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8279
8424
  // participant in the meeting with unmuted audio.
8280
8425
  // We don't check this.mediaProperties.mediaDirection here, because that's already handled in statsAnalyzer,
8281
8426
  // so we won't get this event if we are not setup to receive any audio
8282
- var atLeastOneUnmutedOtherMember = (0, _values.default)(_this43.members.membersCollection.getAll()).find(function (member) {
8427
+ var atLeastOneUnmutedOtherMember = (0, _values.default)(_this44.members.membersCollection.getAll()).find(function (member) {
8283
8428
  return !member.isSelf && !member.isPairedWithSelf && !member.isAudioMuted;
8284
8429
  });
8285
8430
 
8286
8431
  // we also ignore any issues while we're waiting in the lobby, as we're not receiving any audio yet
8287
- if (atLeastOneUnmutedOtherMember && !_this43.isUserUnadmitted) {
8288
- _this43.mediaProperties.sendMediaIssueMetric('inbound_audio', data.issueSubType, {
8289
- correlationId: _this43.correlationId,
8290
- isMultistream: _this43.isMultistream
8432
+ if (atLeastOneUnmutedOtherMember && !_this44.isUserUnadmitted) {
8433
+ _this44.mediaProperties.sendMediaIssueMetric('inbound_audio', data.issueSubType, {
8434
+ correlationId: _this44.correlationId,
8435
+ isMultistream: _this44.isMultistream
8291
8436
  });
8292
- _triggerProxy.default.trigger(_this43, {
8437
+ _triggerProxy.default.trigger(_this44, {
8293
8438
  file: 'meeting/index',
8294
8439
  function: 'createStatsAnalyzer'
8295
8440
  }, _constants.EVENT_TRIGGERS.MEDIA_INBOUND_AUDIO_ISSUE_DETECTED, data);
@@ -8309,7 +8454,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8309
8454
  key: "waitForRemoteSDPAnswer",
8310
8455
  value: (function () {
8311
8456
  var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28() {
8312
- var _this44 = this;
8457
+ var _this45 = this;
8313
8458
  var LOG_HEADER, deferSDPAnswer;
8314
8459
  return _regenerator.default.wrap(function (_context28) {
8315
8460
  while (1) switch (_context28.prev = _context28.next) {
@@ -8328,18 +8473,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8328
8473
  var error = new _webexErrors.SdpResponseTimeoutError();
8329
8474
 
8330
8475
  // @ts-ignore
8331
- _this44.webex.internal.newMetrics.submitClientEvent({
8476
+ _this45.webex.internal.newMetrics.submitClientEvent({
8332
8477
  name: 'client.media-engine.remote-sdp-received',
8333
8478
  payload: {
8334
8479
  canProceed: false,
8335
8480
  errors: [
8336
8481
  // @ts-ignore
8337
- _this44.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
8482
+ _this45.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
8338
8483
  clientErrorCode: _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MISSING_ROAP_ANSWER_CLIENT_CODE
8339
8484
  })]
8340
8485
  },
8341
8486
  options: {
8342
- meetingId: _this44.id,
8487
+ meetingId: _this45.id,
8343
8488
  rawError: error
8344
8489
  }
8345
8490
  });
@@ -8850,7 +8995,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8850
8995
  value: function setupLocusMediaRequest() {
8851
8996
  var _this$webex$meetings$2,
8852
8997
  _this$webex$meetings$3,
8853
- _this45 = this;
8998
+ _this46 = this;
8854
8999
  this.locusMediaRequest = new _locusMediaRequest.LocusMediaRequest({
8855
9000
  correlationId: this.correlationId,
8856
9001
  meetingId: this.id,
@@ -8865,10 +9010,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8865
9010
  },
8866
9011
  preferTranscoding: !this.isMultistream,
8867
9012
  getCurrentSelfUrl: function getCurrentSelfUrl() {
8868
- return _this45.selfUrl;
9013
+ return _this46.selfUrl;
8869
9014
  },
8870
9015
  waitForSelfUrlChange: function waitForSelfUrlChange() {
8871
- return _this45.waitForSelfUrlChange();
9016
+ return _this46.waitForSelfUrlChange();
8872
9017
  }
8873
9018
  }, {
8874
9019
  // @ts-ignore
@@ -8885,7 +9030,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8885
9030
  }, {
8886
9031
  key: "waitForSelfUrlChange",
8887
9032
  value: function waitForSelfUrlChange() {
8888
- var _this46 = this;
9033
+ var _this47 = this;
8889
9034
  if (this.joinWithMediaRetryInfo.retryCount > 0) {
8890
9035
  /* During joinWithMedia() retries we can get 403/409 from Locus and it doesn't mean
8891
9036
  * that the selfUrl will change, it is usually caused by Locus dropping us as a result of
@@ -8898,8 +9043,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8898
9043
  var pendingSelfUrlUpdate = new _common.Defer();
8899
9044
  this.promisesWaitingForPropUpdate.selfUrl = pendingSelfUrlUpdate;
8900
9045
  setTimeout(function () {
8901
- if (_this46.promisesWaitingForPropUpdate.selfUrl === pendingSelfUrlUpdate) {
8902
- delete _this46.promisesWaitingForPropUpdate.selfUrl;
9046
+ if (_this47.promisesWaitingForPropUpdate.selfUrl === pendingSelfUrlUpdate) {
9047
+ delete _this47.promisesWaitingForPropUpdate.selfUrl;
8903
9048
  pendingSelfUrlUpdate.resolve();
8904
9049
  }
8905
9050
  }, 5000);
@@ -8918,10 +9063,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8918
9063
  }, {
8919
9064
  key: "addMedia",
8920
9065
  value: function addMedia() {
8921
- var _this47 = this;
9066
+ var _this48 = this;
8922
9067
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8923
9068
  return this.addMediaInternal(function () {
8924
- return _this47.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
9069
+ return _this48.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
8925
9070
  }, false, undefined /* turnServerInfo - it will be fetched via doTurnDiscovery() */, undefined /* iceTransportPolicy - we're relying on the default value */, options);
8926
9071
  }
8927
9072
 
@@ -9281,7 +9426,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9281
9426
  * @memberof Meeting
9282
9427
  */
9283
9428
  function enqueueMediaUpdate(mediaUpdateType) {
9284
- var _this48 = this;
9429
+ var _this49 = this;
9285
9430
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9286
9431
  var canUpdateMediaNow = this.canUpdateMedia();
9287
9432
  return new _promise.default(function (resolve, reject) {
@@ -9292,9 +9437,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9292
9437
  options: options
9293
9438
  };
9294
9439
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
9295
- _this48.queuedMediaUpdates.push(queueItem);
9440
+ _this49.queuedMediaUpdates.push(queueItem);
9296
9441
  if (canUpdateMediaNow) {
9297
- _this48.processNextQueuedMediaUpdate();
9442
+ _this49.processNextQueuedMediaUpdate();
9298
9443
  }
9299
9444
  });
9300
9445
  }
@@ -9399,7 +9544,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9399
9544
  }, {
9400
9545
  key: "acknowledge",
9401
9546
  value: function acknowledge(type) {
9402
- var _this49 = this;
9547
+ var _this50 = this;
9403
9548
  if (!type) {
9404
9549
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
9405
9550
  }
@@ -9411,12 +9556,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9411
9556
  }).then(function (response) {
9412
9557
  return _promise.default.resolve(response);
9413
9558
  }).then(function (response) {
9414
- _this49.meetingFiniteStateMachine.ring(type);
9559
+ _this50.meetingFiniteStateMachine.ring(type);
9415
9560
  // @ts-ignore
9416
- _this49.webex.internal.newMetrics.submitClientEvent({
9561
+ _this50.webex.internal.newMetrics.submitClientEvent({
9417
9562
  name: 'client.alert.displayed',
9418
9563
  options: {
9419
- meetingId: _this49.id
9564
+ meetingId: _this50.id
9420
9565
  }
9421
9566
  });
9422
9567
  return _promise.default.resolve({
@@ -9441,12 +9586,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9441
9586
  }, {
9442
9587
  key: "decline",
9443
9588
  value: function decline(reason) {
9444
- var _this50 = this;
9589
+ var _this51 = this;
9445
9590
  return _util2.default.declineMeeting(this, reason).then(function (decline) {
9446
- _this50.meetingFiniteStateMachine.decline();
9591
+ _this51.meetingFiniteStateMachine.decline();
9447
9592
  return _promise.default.resolve(decline);
9448
9593
  }).catch(function (error) {
9449
- _this50.meetingFiniteStateMachine.fail(error);
9594
+ _this51.meetingFiniteStateMachine.fail(error);
9450
9595
  return _promise.default.reject(error);
9451
9596
  });
9452
9597
  }
@@ -9497,7 +9642,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9497
9642
  }, {
9498
9643
  key: "leave",
9499
9644
  value: function leave() {
9500
- var _this51 = this;
9645
+ var _this52 = this;
9501
9646
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9502
9647
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
9503
9648
 
@@ -9509,7 +9654,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9509
9654
  var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9510
9655
  return (
9511
9656
  // @ts-ignore
9512
- _this51.webex.internal.newMetrics.submitClientEvent({
9657
+ _this52.webex.internal.newMetrics.submitClientEvent({
9513
9658
  name: 'client.call.leave',
9514
9659
  payload: _objectSpread({
9515
9660
  trigger: 'user-interaction',
@@ -9517,7 +9662,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9517
9662
  leaveReason: options.clientEventLeaveReason
9518
9663
  }, payload),
9519
9664
  options: {
9520
- meetingId: _this51.id
9665
+ meetingId: _this52.id
9521
9666
  }
9522
9667
  })
9523
9668
  );
@@ -9531,25 +9676,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9531
9676
  case 0:
9532
9677
  // CA team recommends submitting this *after* locus /leave
9533
9678
  submitLeaveMetric();
9534
- _this51.meetingFiniteStateMachine.leave();
9679
+ _this52.meetingFiniteStateMachine.leave();
9535
9680
  _context40.next = 1;
9536
- return _this51.clearMeetingData();
9681
+ return _this52.clearMeetingData();
9537
9682
  case 1:
9538
9683
  // upload logs on leave irrespective of meeting delete
9539
- _triggerProxy.default.trigger(_this51, {
9684
+ _triggerProxy.default.trigger(_this52, {
9540
9685
  file: 'meeting/index',
9541
9686
  function: 'leave'
9542
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this51);
9687
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this52);
9543
9688
 
9544
9689
  // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
9545
- if (_this51.wirelessShare || _this51.guest) {
9690
+ if (_this52.wirelessShare || _this52.guest) {
9546
9691
  // If screen sharing clean the meeting object
9547
- _triggerProxy.default.trigger(_this51, {
9692
+ _triggerProxy.default.trigger(_this52, {
9548
9693
  file: 'meeting/index',
9549
9694
  function: 'leave'
9550
9695
  }, _constants.EVENTS.DESTROY_MEETING, {
9551
9696
  reason: options.reason,
9552
- meetingId: _this51.id
9697
+ meetingId: _this52.id
9553
9698
  });
9554
9699
  }
9555
9700
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
@@ -9575,16 +9720,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9575
9720
  shownToUser: false
9576
9721
  }]
9577
9722
  });
9578
- _this51.meetingFiniteStateMachine.fail(error);
9723
+ _this52.meetingFiniteStateMachine.fail(error);
9579
9724
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
9580
9725
  // upload logs on leave irrespective of meeting delete
9581
- _triggerProxy.default.trigger(_this51, {
9726
+ _triggerProxy.default.trigger(_this52, {
9582
9727
  file: 'meeting/index',
9583
9728
  function: 'leave'
9584
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this51);
9729
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this52);
9585
9730
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
9586
- correlation_id: _this51.correlationId,
9587
- locus_id: _this51.locusUrl.split('/').pop(),
9731
+ correlation_id: _this52.correlationId,
9732
+ locus_id: _this52.locusUrl.split('/').pop(),
9588
9733
  reason: error.message,
9589
9734
  stack: error.stack,
9590
9735
  code: error.code
@@ -9604,7 +9749,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9604
9749
  }, {
9605
9750
  key: "startWhiteboardShare",
9606
9751
  value: function startWhiteboardShare(channelUrl, resourceToken) {
9607
- var _this52 = this;
9752
+ var _this53 = this;
9608
9753
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
9609
9754
  return element.name === 'whiteboard';
9610
9755
  });
@@ -9637,13 +9782,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9637
9782
  body.resourceToken = resourceToken;
9638
9783
  }
9639
9784
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
9640
- _this52.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
9785
+ _this53.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
9641
9786
  return _promise.default.resolve();
9642
9787
  }).catch(function (error) {
9643
9788
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
9644
9789
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
9645
- correlation_id: _this52.correlationId,
9646
- locus_id: _this52.locusUrl.split('/').pop(),
9790
+ correlation_id: _this53.correlationId,
9791
+ locus_id: _this53.locusUrl.split('/').pop(),
9647
9792
  reason: error.message,
9648
9793
  stack: error.stack,
9649
9794
  board: {
@@ -9666,7 +9811,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9666
9811
  }, {
9667
9812
  key: "stopWhiteboardShare",
9668
9813
  value: function stopWhiteboardShare(channelUrl) {
9669
- var _this53 = this;
9814
+ var _this54 = this;
9670
9815
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
9671
9816
  return element.name === 'whiteboard';
9672
9817
  });
@@ -9695,8 +9840,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9695
9840
  }).catch(function (error) {
9696
9841
  _loggerProxy.default.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
9697
9842
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_STOP_WHITEBOARD_SHARE_FAILURE, {
9698
- correlation_id: _this53.correlationId,
9699
- locus_id: _this53.locusUrl.split('/').pop(),
9843
+ correlation_id: _this54.correlationId,
9844
+ locus_id: _this54.locusUrl.split('/').pop(),
9700
9845
  reason: error.message,
9701
9846
  stack: error.stack,
9702
9847
  board: {
@@ -9718,7 +9863,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9718
9863
  }, {
9719
9864
  key: "requestScreenShareFloor",
9720
9865
  value: function requestScreenShareFloor() {
9721
- var _this54 = this;
9866
+ var _this55 = this;
9722
9867
  if (!this.mediaProperties.hasLocalShareStream() || !this.mediaProperties.mediaDirection.sendShare) {
9723
9868
  _loggerProxy.default.logger.log("Meeting:index#requestScreenShareFloor --> NOT requesting floor, because we don't have the share stream anymore (shareStream=".concat(this.mediaProperties.shareVideoStream ? 'yes' : 'no', ", sendShare=").concat(this.mediaProperties.mediaDirection.sendShare, ")"));
9724
9869
  this.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
@@ -9749,34 +9894,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9749
9894
  resourceUrl: this.resourceUrl,
9750
9895
  shareInstanceId: this.localShareInstanceId
9751
9896
  }).then(function () {
9752
- _this54.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
9897
+ _this55.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
9753
9898
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_SUCCESS, {
9754
- correlation_id: _this54.correlationId,
9755
- locus_id: _this54.locusUrl.split('/').pop()
9899
+ correlation_id: _this55.correlationId,
9900
+ locus_id: _this55.locusUrl.split('/').pop()
9756
9901
  });
9757
9902
  return _promise.default.resolve();
9758
9903
  }).catch(function (error) {
9759
9904
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
9760
9905
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
9761
- correlation_id: _this54.correlationId,
9762
- locus_id: _this54.locusUrl.split('/').pop(),
9906
+ correlation_id: _this55.correlationId,
9907
+ locus_id: _this55.locusUrl.split('/').pop(),
9763
9908
  reason: error.message,
9764
9909
  stack: error.stack
9765
9910
  });
9766
9911
 
9767
9912
  // @ts-ignore
9768
- _this54.webex.internal.newMetrics.submitClientEvent({
9913
+ _this55.webex.internal.newMetrics.submitClientEvent({
9769
9914
  name: 'client.share.floor-granted.local',
9770
9915
  payload: {
9771
9916
  mediaType: 'share',
9772
9917
  errors: _util2.default.getChangeMeetingFloorErrorPayload(error.message),
9773
- shareInstanceId: _this54.localShareInstanceId
9918
+ shareInstanceId: _this55.localShareInstanceId
9774
9919
  },
9775
9920
  options: {
9776
- meetingId: _this54.id
9921
+ meetingId: _this55.id
9777
9922
  }
9778
9923
  });
9779
- _this54.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
9924
+ _this55.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
9780
9925
  return _promise.default.reject(error);
9781
9926
  });
9782
9927
  }
@@ -9799,10 +9944,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9799
9944
  }, {
9800
9945
  key: "requestScreenShareFloorIfPending",
9801
9946
  value: function requestScreenShareFloorIfPending() {
9802
- var _this55 = this;
9947
+ var _this56 = this;
9803
9948
  if (this.floorGrantPending && this.state === _constants.MEETING_STATE.STATES.JOINED) {
9804
9949
  this.requestScreenShareFloor().then(function () {
9805
- _this55.floorGrantPending = false;
9950
+ _this56.floorGrantPending = false;
9806
9951
  });
9807
9952
  }
9808
9953
  }
@@ -9816,7 +9961,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9816
9961
  }, {
9817
9962
  key: "releaseScreenShareFloor",
9818
9963
  value: function releaseScreenShareFloor() {
9819
- var _this56 = this;
9964
+ var _this57 = this;
9820
9965
  var content = this.locusInfo.mediaShares.find(function (element) {
9821
9966
  return element.name === _constants.CONTENT;
9822
9967
  });
@@ -9857,8 +10002,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9857
10002
  }).catch(function (error) {
9858
10003
  _loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
9859
10004
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
9860
- correlation_id: _this56.correlationId,
9861
- locus_id: _this56.locusUrl.split('/').pop(),
10005
+ correlation_id: _this57.correlationId,
10006
+ locus_id: _this57.locusUrl.split('/').pop(),
9862
10007
  reason: error.message,
9863
10008
  stack: error.stack
9864
10009
  });
@@ -10038,7 +10183,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10038
10183
  }, {
10039
10184
  key: "changeVideoLayout",
10040
10185
  value: function changeVideoLayout(layoutType) {
10041
- var _this57 = this;
10186
+ var _this58 = this;
10042
10187
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10043
10188
  var main = renderInfo.main,
10044
10189
  content = renderInfo.content;
@@ -10092,7 +10237,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10092
10237
  }
10093
10238
  this.lastVideoLayoutInfo = (0, _lodash.cloneDeep)(layoutInfo);
10094
10239
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
10095
- _triggerProxy.default.trigger(_this57, {
10240
+ _triggerProxy.default.trigger(_this58, {
10096
10241
  file: 'meeting/index',
10097
10242
  function: 'changeVideoLayout'
10098
10243
  }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
@@ -10208,7 +10353,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10208
10353
  }, {
10209
10354
  key: "endMeetingForAll",
10210
10355
  value: function endMeetingForAll() {
10211
- var _this58 = this;
10356
+ var _this59 = this;
10212
10357
  // @ts-ignore
10213
10358
  this.webex.internal.newMetrics.submitClientEvent({
10214
10359
  name: 'client.call.leave',
@@ -10231,15 +10376,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10231
10376
  return _regenerator.default.wrap(function (_context41) {
10232
10377
  while (1) switch (_context41.prev = _context41.next) {
10233
10378
  case 0:
10234
- _this58.meetingFiniteStateMachine.end();
10379
+ _this59.meetingFiniteStateMachine.end();
10235
10380
  _context41.next = 1;
10236
- return _this58.clearMeetingData();
10381
+ return _this59.clearMeetingData();
10237
10382
  case 1:
10238
10383
  // upload logs on leave irrespective of meeting delete
10239
- _triggerProxy.default.trigger(_this58, {
10384
+ _triggerProxy.default.trigger(_this59, {
10240
10385
  file: 'meeting/index',
10241
10386
  function: 'endMeetingForAll'
10242
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this58);
10387
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this59);
10243
10388
  return _context41.abrupt("return", end);
10244
10389
  case 2:
10245
10390
  case "end":
@@ -10251,16 +10396,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10251
10396
  return _ref47.apply(this, arguments);
10252
10397
  };
10253
10398
  }()).catch(function (error) {
10254
- _this58.meetingFiniteStateMachine.fail(error);
10399
+ _this59.meetingFiniteStateMachine.fail(error);
10255
10400
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
10256
10401
  // upload logs on leave irrespective of meeting delete
10257
- _triggerProxy.default.trigger(_this58, {
10402
+ _triggerProxy.default.trigger(_this59, {
10258
10403
  file: 'meeting/index',
10259
10404
  function: 'endMeetingForAll'
10260
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this58);
10405
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this59);
10261
10406
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
10262
- correlation_id: _this58.correlationId,
10263
- locus_id: _this58.locusUrl.split('/').pop(),
10407
+ correlation_id: _this59.correlationId,
10408
+ locus_id: _this59.locusUrl.split('/').pop(),
10264
10409
  reason: error.message,
10265
10410
  stack: error.stack,
10266
10411
  code: error.code
@@ -10281,8 +10426,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10281
10426
  * @memberof Meeting
10282
10427
  */
10283
10428
  function sendReaction(reactionType, skinToneType) {
10284
- var _this$locusInfo9, _this$locusInfo9$cont, _this$locusInfo9$cont2;
10285
- var reactionChannelUrl = (_this$locusInfo9 = this.locusInfo) === null || _this$locusInfo9 === void 0 ? void 0 : (_this$locusInfo9$cont = _this$locusInfo9.controls) === null || _this$locusInfo9$cont === void 0 ? void 0 : (_this$locusInfo9$cont2 = _this$locusInfo9$cont.reactions) === null || _this$locusInfo9$cont2 === void 0 ? void 0 : _this$locusInfo9$cont2.reactionChannelUrl;
10429
+ var _this$locusInfo0, _this$locusInfo0$cont, _this$locusInfo0$cont2;
10430
+ var reactionChannelUrl = (_this$locusInfo0 = this.locusInfo) === null || _this$locusInfo0 === void 0 ? void 0 : (_this$locusInfo0$cont = _this$locusInfo0.controls) === null || _this$locusInfo0$cont === void 0 ? void 0 : (_this$locusInfo0$cont2 = _this$locusInfo0$cont.reactions) === null || _this$locusInfo0$cont2 === void 0 ? void 0 : _this$locusInfo0$cont2.reactionChannelUrl;
10286
10431
  var participantId = this.members.selfId;
10287
10432
  var reactionData = _reactions.Reactions[reactionType] || {
10288
10433
  type: reactionType
@@ -10342,8 +10487,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10342
10487
  }, {
10343
10488
  key: "toggleReactions",
10344
10489
  value: function toggleReactions(enable) {
10345
- var _this$locusInfo0, _this$locusInfo0$cont, _this$locusInfo0$cont2;
10346
- var isEnabled = (_this$locusInfo0 = this.locusInfo) === null || _this$locusInfo0 === void 0 ? void 0 : (_this$locusInfo0$cont = _this$locusInfo0.controls) === null || _this$locusInfo0$cont === void 0 ? void 0 : (_this$locusInfo0$cont2 = _this$locusInfo0$cont.reactions) === null || _this$locusInfo0$cont2 === void 0 ? void 0 : _this$locusInfo0$cont2.enabled;
10490
+ var _this$locusInfo1, _this$locusInfo1$cont, _this$locusInfo1$cont2;
10491
+ var isEnabled = (_this$locusInfo1 = this.locusInfo) === null || _this$locusInfo1 === void 0 ? void 0 : (_this$locusInfo1$cont = _this$locusInfo1.controls) === null || _this$locusInfo1$cont === void 0 ? void 0 : (_this$locusInfo1$cont2 = _this$locusInfo1$cont.reactions) === null || _this$locusInfo1$cont2 === void 0 ? void 0 : _this$locusInfo1$cont2.enabled;
10347
10492
  if (isEnabled && enable || !isEnabled && !enable) {
10348
10493
  return _promise.default.resolve("Reactions are already ".concat(isEnabled ? 'enabled' : 'disabled', "."));
10349
10494
  }
@@ -10450,7 +10595,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10450
10595
  _this$mediaProperties42,
10451
10596
  _this$mediaProperties43,
10452
10597
  _this$mediaProperties44,
10453
- _this59 = this;
10598
+ _this60 = this;
10454
10599
  var LOG_HEADER = 'Meeting:index#updateTranscodedMediaConnection -->';
10455
10600
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " starting"));
10456
10601
  if (!this.canUpdateMedia()) {
@@ -10475,8 +10620,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10475
10620
  }).catch(function (error) {
10476
10621
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error: "), error);
10477
10622
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
10478
- correlation_id: _this59.correlationId,
10479
- locus_id: _this59.locusUrl.split('/').pop(),
10623
+ correlation_id: _this60.correlationId,
10624
+ locus_id: _this60.locusUrl.split('/').pop(),
10480
10625
  reason: error.message,
10481
10626
  stack: error.stack
10482
10627
  });