@webex/plugin-meetings 3.7.0-next.21 → 3.7.0-next.23

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 (46) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/constants.js +2 -0
  4. package/dist/constants.js.map +1 -1
  5. package/dist/interpretation/index.js +1 -1
  6. package/dist/interpretation/siLanguage.js +1 -1
  7. package/dist/locus-info/index.js +8 -0
  8. package/dist/locus-info/index.js.map +1 -1
  9. package/dist/locus-info/selfUtils.js +20 -11
  10. package/dist/locus-info/selfUtils.js.map +1 -1
  11. package/dist/meeting/index.js +718 -646
  12. package/dist/meeting/index.js.map +1 -1
  13. package/dist/meeting/request.js +30 -0
  14. package/dist/meeting/request.js.map +1 -1
  15. package/dist/meeting/request.type.js.map +1 -1
  16. package/dist/member/index.js +9 -0
  17. package/dist/member/index.js.map +1 -1
  18. package/dist/member/types.js.map +1 -1
  19. package/dist/member/util.js +39 -28
  20. package/dist/member/util.js.map +1 -1
  21. package/dist/multistream/sendSlotManager.js +24 -0
  22. package/dist/multistream/sendSlotManager.js.map +1 -1
  23. package/dist/types/constants.d.ts +2 -0
  24. package/dist/types/meeting/index.d.ts +8 -0
  25. package/dist/types/meeting/request.d.ts +12 -1
  26. package/dist/types/meeting/request.type.d.ts +6 -0
  27. package/dist/types/member/index.d.ts +1 -0
  28. package/dist/types/member/types.d.ts +7 -0
  29. package/dist/types/multistream/sendSlotManager.d.ts +8 -1
  30. package/dist/webinar/index.js +1 -1
  31. package/package.json +3 -3
  32. package/src/constants.ts +2 -0
  33. package/src/locus-info/index.ts +13 -0
  34. package/src/locus-info/selfUtils.ts +6 -0
  35. package/src/meeting/index.ts +67 -0
  36. package/src/meeting/request.ts +26 -1
  37. package/src/meeting/request.type.ts +7 -0
  38. package/src/member/index.ts +9 -0
  39. package/src/member/types.ts +8 -0
  40. package/src/member/util.ts +34 -24
  41. package/src/multistream/sendSlotManager.ts +31 -0
  42. package/test/unit/spec/locus-info/index.js +93 -0
  43. package/test/unit/spec/locus-info/selfConstant.js +7 -0
  44. package/test/unit/spec/locus-info/selfUtils.js +39 -0
  45. package/test/unit/spec/meeting/index.js +153 -0
  46. package/test/unit/spec/member/util.js +46 -11
@@ -18,10 +18,10 @@ _Object$defineProperty(exports, "__esModule", {
18
18
  exports.default = exports.ScreenShareFloorStatus = exports.MEDIA_UPDATE_TYPE = void 0;
19
19
  var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
20
20
  var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
21
+ var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
21
22
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
22
23
  var _map = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/map"));
23
24
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
24
- var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
25
25
  var _weakMap = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/weak-map"));
26
26
  var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/typeof"));
27
27
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
@@ -1027,6 +1027,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1027
1027
  options.data.intervalMetadata.peerReflexiveIP =
1028
1028
  // @ts-ignore
1029
1029
  ((_this$webex$meetings$ = _this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$ === void 0 ? void 0 : _this$webex$meetings$.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
1030
+ var members = _this.getMembers().membersCollection.members;
1031
+
1032
+ // Count members that are in the meeting
1033
+ options.data.intervalMetadata.meetingUserCount = (0, _values.default)(members).filter(function (member) {
1034
+ return member.isInMeeting;
1035
+ }).length;
1036
+
1030
1037
  // @ts-ignore
1031
1038
  _this.webex.internal.newMetrics.submitMQE({
1032
1039
  name: 'client.mediaquality.event',
@@ -3861,6 +3868,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3861
3868
  _this20.setSendNamedMediaGroup(_internalMediaCore.MediaType.AudioMain);
3862
3869
  }
3863
3870
  });
3871
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_MEETING_BRB_CHANGED, function (payload) {
3872
+ _triggerProxy.default.trigger(_this20, {
3873
+ file: 'meeting/index',
3874
+ function: 'setUpLocusInfoSelfListener'
3875
+ }, _constants.EVENT_TRIGGERS.MEETING_SELF_BRB_UPDATE, {
3876
+ payload: payload
3877
+ });
3878
+ });
3864
3879
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ROLES_CHANGED, function (payload) {
3865
3880
  var _payload$newRoles, _payload$newRoles2, _payload$newRoles3;
3866
3881
  var isModeratorOrCohost = ((_payload$newRoles = payload.newRoles) === null || _payload$newRoles === void 0 ? void 0 : _payload$newRoles.includes(_constants.SELF_ROLES.MODERATOR)) || ((_payload$newRoles2 = payload.newRoles) === null || _payload$newRoles2 === void 0 ? void 0 : _payload$newRoles2.includes(_constants.SELF_ROLES.COHOST));
@@ -4059,6 +4074,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4059
4074
  return this.members.admitMembers(memberIds, locusUrls);
4060
4075
  }
4061
4076
 
4077
+ /**
4078
+ * Manages be right back status updates for the current participant.
4079
+ *
4080
+ * @param {boolean} enabled - Indicates whether the user enabled brb or not.
4081
+ * @returns {Promise<void>} resolves when the brb status is updated or does nothing if not in a multistream meeting.
4082
+ * @throws {Error} - Throws an error if the request fails.
4083
+ */
4084
+ }, {
4085
+ key: "beRightBack",
4086
+ value: (function () {
4087
+ var _beRightBack = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(enabled) {
4088
+ var _this23 = this;
4089
+ var errorMessage, error, _errorMessage, _error;
4090
+ return _regenerator.default.wrap(function _callee11$(_context11) {
4091
+ while (1) switch (_context11.prev = _context11.next) {
4092
+ case 0:
4093
+ if (this.isMultistream) {
4094
+ _context11.next = 5;
4095
+ break;
4096
+ }
4097
+ errorMessage = 'Meeting:index#beRightBack --> Not a multistream meeting';
4098
+ error = new Error(errorMessage);
4099
+ _loggerProxy.default.logger.error(error);
4100
+ return _context11.abrupt("return", _promise.default.reject(error));
4101
+ case 5:
4102
+ if (this.mediaProperties.webrtcMediaConnection) {
4103
+ _context11.next = 10;
4104
+ break;
4105
+ }
4106
+ _errorMessage = 'Meeting:index#beRightBack --> WebRTC media connection is not defined';
4107
+ _error = new Error(_errorMessage);
4108
+ _loggerProxy.default.logger.error(_error);
4109
+ return _context11.abrupt("return", _promise.default.reject(_error));
4110
+ case 10:
4111
+ return _context11.abrupt("return", this.meetingRequest.setBrb({
4112
+ enabled: enabled,
4113
+ locusUrl: this.locusUrl,
4114
+ deviceUrl: this.deviceUrl,
4115
+ selfId: this.selfId
4116
+ }).then(function () {
4117
+ _this23.sendSlotManager.setSourceStateOverride(_internalMediaCore.MediaType.VideoMain, enabled ? 'away' : null);
4118
+ }).catch(function (error) {
4119
+ _loggerProxy.default.logger.error('Meeting:index#beRightBack --> Error ', error);
4120
+ return _promise.default.reject(error);
4121
+ }));
4122
+ case 11:
4123
+ case "end":
4124
+ return _context11.stop();
4125
+ }
4126
+ }, _callee11, this);
4127
+ }));
4128
+ function beRightBack(_x11) {
4129
+ return _beRightBack.apply(this, arguments);
4130
+ }
4131
+ return beRightBack;
4132
+ }()
4062
4133
  /**
4063
4134
  * Remove the member from the meeting, boot them
4064
4135
  * @param {String} memberId
@@ -4066,6 +4137,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4066
4137
  * @public
4067
4138
  * @memberof Meeting
4068
4139
  */
4140
+ )
4069
4141
  }, {
4070
4142
  key: "remove",
4071
4143
  value: function remove(memberId) {
@@ -4540,7 +4612,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4540
4612
  }, {
4541
4613
  key: "setLogUploadTimer",
4542
4614
  value: function setLogUploadTimer() {
4543
- var _this23 = this;
4615
+ var _this24 = this;
4544
4616
  // 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
4545
4617
  var LOG_UPLOAD_INTERVALS = [0.1, 15, 30, 60]; // in minutes
4546
4618
 
@@ -4551,15 +4623,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4551
4623
  this.logUploadIntervalIndex += 1;
4552
4624
  }
4553
4625
  this.uploadLogsTimer = (0, _commonTimers.safeSetTimeout)(function () {
4554
- _this23.uploadLogsTimer = undefined;
4555
- _this23.uploadLogs();
4626
+ _this24.uploadLogsTimer = undefined;
4627
+ _this24.uploadLogs();
4556
4628
 
4557
4629
  // just as an extra precaution, to avoid uploading logs forever in case something goes wrong
4558
4630
  // and the page remains opened, we stop it if there is no media connection
4559
- if (!_this23.mediaProperties.webrtcMediaConnection) {
4631
+ if (!_this24.mediaProperties.webrtcMediaConnection) {
4560
4632
  return;
4561
4633
  }
4562
- _this23.setLogUploadTimer();
4634
+ _this24.setLogUploadTimer();
4563
4635
  }, delay);
4564
4636
  }
4565
4637
 
@@ -4626,7 +4698,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4626
4698
  }, {
4627
4699
  key: "closeRemoteStreams",
4628
4700
  value: function closeRemoteStreams() {
4629
- var _this24 = this;
4701
+ var _this25 = this;
4630
4702
  var _this$mediaProperties4 = this.mediaProperties,
4631
4703
  remoteAudioStream = _this$mediaProperties4.remoteAudioStream,
4632
4704
  remoteVideoStream = _this$mediaProperties4.remoteVideoStream,
@@ -4640,7 +4712,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4640
4712
  */
4641
4713
  // eslint-disable-next-line @typescript-eslint/no-shadow
4642
4714
  var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
4643
- _triggerProxy.default.trigger(_this24, {
4715
+ _triggerProxy.default.trigger(_this25, {
4644
4716
  file: 'meeting/index',
4645
4717
  function: 'closeRemoteStreams'
4646
4718
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -4674,11 +4746,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4674
4746
  }, {
4675
4747
  key: "setLocalAudioStream",
4676
4748
  value: (function () {
4677
- var _setLocalAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(localStream) {
4749
+ var _setLocalAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(localStream) {
4678
4750
  var _this$audio2;
4679
4751
  var oldStream;
4680
- return _regenerator.default.wrap(function _callee11$(_context11) {
4681
- while (1) switch (_context11.prev = _context11.next) {
4752
+ return _regenerator.default.wrap(function _callee12$(_context12) {
4753
+ while (1) switch (_context12.prev = _context12.next) {
4682
4754
  case 0:
4683
4755
  oldStream = this.mediaProperties.audioStream;
4684
4756
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localAudioStreamMuteStateHandler);
@@ -4692,21 +4764,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4692
4764
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localAudioStreamMuteStateHandler);
4693
4765
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4694
4766
  if (!(!this.isMultistream || !localStream)) {
4695
- _context11.next = 12;
4767
+ _context12.next = 12;
4696
4768
  break;
4697
4769
  }
4698
- _context11.next = 12;
4770
+ _context12.next = 12;
4699
4771
  return this.unpublishStream(_internalMediaCore.MediaType.AudioMain, oldStream);
4700
4772
  case 12:
4701
- _context11.next = 14;
4773
+ _context12.next = 14;
4702
4774
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
4703
4775
  case 14:
4704
4776
  case "end":
4705
- return _context11.stop();
4777
+ return _context12.stop();
4706
4778
  }
4707
- }, _callee11, this);
4779
+ }, _callee12, this);
4708
4780
  }));
4709
- function setLocalAudioStream(_x11) {
4781
+ function setLocalAudioStream(_x12) {
4710
4782
  return _setLocalAudioStream.apply(this, arguments);
4711
4783
  }
4712
4784
  return setLocalAudioStream;
@@ -4722,11 +4794,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4722
4794
  }, {
4723
4795
  key: "setLocalVideoStream",
4724
4796
  value: (function () {
4725
- var _setLocalVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(localStream) {
4797
+ var _setLocalVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(localStream) {
4726
4798
  var _this$video2;
4727
4799
  var oldStream;
4728
- return _regenerator.default.wrap(function _callee12$(_context12) {
4729
- while (1) switch (_context12.prev = _context12.next) {
4800
+ return _regenerator.default.wrap(function _callee13$(_context13) {
4801
+ while (1) switch (_context13.prev = _context13.next) {
4730
4802
  case 0:
4731
4803
  oldStream = this.mediaProperties.videoStream;
4732
4804
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localVideoStreamMuteStateHandler);
@@ -4740,21 +4812,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4740
4812
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localVideoStreamMuteStateHandler);
4741
4813
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4742
4814
  if (!(!this.isMultistream || !localStream)) {
4743
- _context12.next = 12;
4815
+ _context13.next = 12;
4744
4816
  break;
4745
4817
  }
4746
- _context12.next = 12;
4818
+ _context13.next = 12;
4747
4819
  return this.unpublishStream(_internalMediaCore.MediaType.VideoMain, oldStream);
4748
4820
  case 12:
4749
- _context12.next = 14;
4821
+ _context13.next = 14;
4750
4822
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
4751
4823
  case 14:
4752
4824
  case "end":
4753
- return _context12.stop();
4825
+ return _context13.stop();
4754
4826
  }
4755
- }, _callee12, this);
4827
+ }, _callee13, this);
4756
4828
  }));
4757
- function setLocalVideoStream(_x12) {
4829
+ function setLocalVideoStream(_x13) {
4758
4830
  return _setLocalVideoStream.apply(this, arguments);
4759
4831
  }
4760
4832
  return setLocalVideoStream;
@@ -4771,10 +4843,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4771
4843
  }, {
4772
4844
  key: "setLocalShareVideoStream",
4773
4845
  value: (function () {
4774
- var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(localDisplayStream) {
4846
+ var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(localDisplayStream) {
4775
4847
  var oldStream;
4776
- return _regenerator.default.wrap(function _callee13$(_context13) {
4777
- while (1) switch (_context13.prev = _context13.next) {
4848
+ return _regenerator.default.wrap(function _callee14$(_context14) {
4849
+ while (1) switch (_context14.prev = _context14.next) {
4778
4850
  case 0:
4779
4851
  oldStream = this.mediaProperties.shareVideoStream;
4780
4852
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.handleShareVideoStreamMuteStateChange);
@@ -4786,21 +4858,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4786
4858
  localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4787
4859
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
4788
4860
  if (!(!this.isMultistream || !localDisplayStream)) {
4789
- _context13.next = 12;
4861
+ _context14.next = 12;
4790
4862
  break;
4791
4863
  }
4792
- _context13.next = 12;
4864
+ _context14.next = 12;
4793
4865
  return this.unpublishStream(_internalMediaCore.MediaType.VideoSlides, oldStream);
4794
4866
  case 12:
4795
- _context13.next = 14;
4867
+ _context14.next = 14;
4796
4868
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
4797
4869
  case 14:
4798
4870
  case "end":
4799
- return _context13.stop();
4871
+ return _context14.stop();
4800
4872
  }
4801
- }, _callee13, this);
4873
+ }, _callee14, this);
4802
4874
  }));
4803
- function setLocalShareVideoStream(_x13) {
4875
+ function setLocalShareVideoStream(_x14) {
4804
4876
  return _setLocalShareVideoStream.apply(this, arguments);
4805
4877
  }
4806
4878
  return setLocalShareVideoStream;
@@ -4816,10 +4888,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4816
4888
  }, {
4817
4889
  key: "setLocalShareAudioStream",
4818
4890
  value: (function () {
4819
- var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(localSystemAudioStream) {
4891
+ var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(localSystemAudioStream) {
4820
4892
  var oldStream;
4821
- return _regenerator.default.wrap(function _callee14$(_context14) {
4822
- while (1) switch (_context14.prev = _context14.next) {
4893
+ return _regenerator.default.wrap(function _callee15$(_context15) {
4894
+ while (1) switch (_context15.prev = _context15.next) {
4823
4895
  case 0:
4824
4896
  oldStream = this.mediaProperties.shareAudioStream;
4825
4897
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareAudioStreamEnded);
@@ -4829,21 +4901,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4829
4901
  localSystemAudioStream === null || localSystemAudioStream === void 0 ? void 0 : localSystemAudioStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4830
4902
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
4831
4903
  if (!(!this.isMultistream || !localSystemAudioStream)) {
4832
- _context14.next = 10;
4904
+ _context15.next = 10;
4833
4905
  break;
4834
4906
  }
4835
- _context14.next = 10;
4907
+ _context15.next = 10;
4836
4908
  return this.unpublishStream(_internalMediaCore.MediaType.AudioSlides, oldStream);
4837
4909
  case 10:
4838
- _context14.next = 12;
4910
+ _context15.next = 12;
4839
4911
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
4840
4912
  case 12:
4841
4913
  case "end":
4842
- return _context14.stop();
4914
+ return _context15.stop();
4843
4915
  }
4844
- }, _callee14, this);
4916
+ }, _callee15, this);
4845
4917
  }));
4846
- function setLocalShareAudioStream(_x14) {
4918
+ function setLocalShareAudioStream(_x15) {
4847
4919
  return _setLocalShareAudioStream.apply(this, arguments);
4848
4920
  }
4849
4921
  return setLocalShareAudioStream;
@@ -4948,7 +5020,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4948
5020
  }, {
4949
5021
  key: "setMercuryListener",
4950
5022
  value: function setMercuryListener() {
4951
- var _this25 = this;
5023
+ var _this26 = this;
4952
5024
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
4953
5025
  // if the meeting has active peer connections, it should try to reconnect.
4954
5026
  // @ts-ignore
@@ -4956,33 +5028,33 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4956
5028
  _loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online');
4957
5029
 
4958
5030
  // Only send restore event when it was disconnected before and for connected later
4959
- if (!_this25.hasWebsocketConnected) {
5031
+ if (!_this26.hasWebsocketConnected) {
4960
5032
  // @ts-ignore
4961
- _this25.webex.internal.newMetrics.submitClientEvent({
5033
+ _this26.webex.internal.newMetrics.submitClientEvent({
4962
5034
  name: 'client.mercury.connection.restored',
4963
5035
  options: {
4964
- meetingId: _this25.id
5036
+ meetingId: _this26.id
4965
5037
  }
4966
5038
  });
4967
5039
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
4968
- correlation_id: _this25.correlationId
5040
+ correlation_id: _this26.correlationId
4969
5041
  });
4970
5042
  }
4971
- _this25.hasWebsocketConnected = true;
5043
+ _this26.hasWebsocketConnected = true;
4972
5044
  });
4973
5045
 
4974
5046
  // @ts-ignore
4975
5047
  this.webex.internal.mercury.on(_constants.OFFLINE, function () {
4976
5048
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
4977
5049
  // @ts-ignore
4978
- _this25.webex.internal.newMetrics.submitClientEvent({
5050
+ _this26.webex.internal.newMetrics.submitClientEvent({
4979
5051
  name: 'client.mercury.connection.lost',
4980
5052
  options: {
4981
- meetingId: _this25.id
5053
+ meetingId: _this26.id
4982
5054
  }
4983
5055
  });
4984
5056
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
4985
- correlation_id: _this25.correlationId
5057
+ correlation_id: _this26.correlationId
4986
5058
  });
4987
5059
  });
4988
5060
  }
@@ -5084,7 +5156,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5084
5156
  }, {
5085
5157
  key: "muteAudio",
5086
5158
  value: function muteAudio() {
5087
- var _this26 = this;
5159
+ var _this27 = this;
5088
5160
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5089
5161
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5090
5162
  }
@@ -5100,22 +5172,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5100
5172
 
5101
5173
  // First, stop sending the local audio media
5102
5174
  return logRequest(this.audio.handleClientRequest(this, true).then(function () {
5103
- _util2.default.handleAudioLogging(_this26.mediaProperties.audioStream);
5175
+ _util2.default.handleAudioLogging(_this27.mediaProperties.audioStream);
5104
5176
  // @ts-ignore
5105
- _this26.webex.internal.newMetrics.submitClientEvent({
5177
+ _this27.webex.internal.newMetrics.submitClientEvent({
5106
5178
  name: 'client.muted',
5107
5179
  payload: {
5108
5180
  trigger: 'user-interaction',
5109
5181
  mediaType: 'audio'
5110
5182
  },
5111
5183
  options: {
5112
- meetingId: _this26.id
5184
+ meetingId: _this27.id
5113
5185
  }
5114
5186
  });
5115
5187
  }).catch(function (error) {
5116
5188
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
5117
- correlation_id: _this26.correlationId,
5118
- locus_id: _this26.locusUrl.split('/').pop(),
5189
+ correlation_id: _this27.correlationId,
5190
+ locus_id: _this27.locusUrl.split('/').pop(),
5119
5191
  reason: error.message,
5120
5192
  stack: error.stack
5121
5193
  });
@@ -5134,7 +5206,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5134
5206
  }, {
5135
5207
  key: "unmuteAudio",
5136
5208
  value: function unmuteAudio() {
5137
- var _this27 = this;
5209
+ var _this28 = this;
5138
5210
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5139
5211
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5140
5212
  }
@@ -5150,22 +5222,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5150
5222
 
5151
5223
  // First, send the control to unmute the participant on the server
5152
5224
  return logRequest(this.audio.handleClientRequest(this, false).then(function () {
5153
- _util2.default.handleAudioLogging(_this27.mediaProperties.audioStream);
5225
+ _util2.default.handleAudioLogging(_this28.mediaProperties.audioStream);
5154
5226
  // @ts-ignore
5155
- _this27.webex.internal.newMetrics.submitClientEvent({
5227
+ _this28.webex.internal.newMetrics.submitClientEvent({
5156
5228
  name: 'client.unmuted',
5157
5229
  payload: {
5158
5230
  trigger: 'user-interaction',
5159
5231
  mediaType: 'audio'
5160
5232
  },
5161
5233
  options: {
5162
- meetingId: _this27.id
5234
+ meetingId: _this28.id
5163
5235
  }
5164
5236
  });
5165
5237
  }).catch(function (error) {
5166
5238
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_AUDIO_FAILURE, {
5167
- correlation_id: _this27.correlationId,
5168
- locus_id: _this27.locusUrl.split('/').pop(),
5239
+ correlation_id: _this28.correlationId,
5240
+ locus_id: _this28.locusUrl.split('/').pop(),
5169
5241
  reason: error.message,
5170
5242
  stack: error.stack
5171
5243
  });
@@ -5184,7 +5256,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5184
5256
  }, {
5185
5257
  key: "muteVideo",
5186
5258
  value: function muteVideo() {
5187
- var _this28 = this;
5259
+ var _this29 = this;
5188
5260
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5189
5261
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5190
5262
  }
@@ -5198,22 +5270,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5198
5270
  return _promise.default.reject(new _parameter.default('no video control associated to the meeting'));
5199
5271
  }
5200
5272
  return logRequest(this.video.handleClientRequest(this, true).then(function () {
5201
- _util2.default.handleVideoLogging(_this28.mediaProperties.videoStream);
5273
+ _util2.default.handleVideoLogging(_this29.mediaProperties.videoStream);
5202
5274
  // @ts-ignore
5203
- _this28.webex.internal.newMetrics.submitClientEvent({
5275
+ _this29.webex.internal.newMetrics.submitClientEvent({
5204
5276
  name: 'client.muted',
5205
5277
  payload: {
5206
5278
  trigger: 'user-interaction',
5207
5279
  mediaType: 'video'
5208
5280
  },
5209
5281
  options: {
5210
- meetingId: _this28.id
5282
+ meetingId: _this29.id
5211
5283
  }
5212
5284
  });
5213
5285
  }).catch(function (error) {
5214
5286
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_VIDEO_FAILURE, {
5215
- correlation_id: _this28.correlationId,
5216
- locus_id: _this28.locusUrl.split('/').pop(),
5287
+ correlation_id: _this29.correlationId,
5288
+ locus_id: _this29.locusUrl.split('/').pop(),
5217
5289
  reason: error.message,
5218
5290
  stack: error.stack
5219
5291
  });
@@ -5232,7 +5304,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5232
5304
  }, {
5233
5305
  key: "unmuteVideo",
5234
5306
  value: function unmuteVideo() {
5235
- var _this29 = this;
5307
+ var _this30 = this;
5236
5308
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5237
5309
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5238
5310
  }
@@ -5246,22 +5318,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5246
5318
  return _promise.default.reject(new _parameter.default('no audio control associated to the meeting'));
5247
5319
  }
5248
5320
  return logRequest(this.video.handleClientRequest(this, false).then(function () {
5249
- _util2.default.handleVideoLogging(_this29.mediaProperties.videoStream);
5321
+ _util2.default.handleVideoLogging(_this30.mediaProperties.videoStream);
5250
5322
  // @ts-ignore
5251
- _this29.webex.internal.newMetrics.submitClientEvent({
5323
+ _this30.webex.internal.newMetrics.submitClientEvent({
5252
5324
  name: 'client.unmuted',
5253
5325
  payload: {
5254
5326
  trigger: 'user-interaction',
5255
5327
  mediaType: 'video'
5256
5328
  },
5257
5329
  options: {
5258
- meetingId: _this29.id
5330
+ meetingId: _this30.id
5259
5331
  }
5260
5332
  });
5261
5333
  }).catch(function (error) {
5262
5334
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_VIDEO_FAILURE, {
5263
- correlation_id: _this29.correlationId,
5264
- locus_id: _this29.locusUrl.split('/').pop(),
5335
+ correlation_id: _this30.correlationId,
5336
+ locus_id: _this30.locusUrl.split('/').pop(),
5265
5337
  reason: error.message,
5266
5338
  stack: error.stack
5267
5339
  });
@@ -5290,8 +5362,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5290
5362
  }, {
5291
5363
  key: "joinWithMedia",
5292
5364
  value: (function () {
5293
- var _joinWithMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
5294
- var _this30 = this;
5365
+ var _joinWithMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5366
+ var _this31 = this;
5295
5367
  var options,
5296
5368
  mediaOptions,
5297
5369
  _options$joinOptions,
@@ -5311,51 +5383,51 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5311
5383
  _leaveError,
5312
5384
  leaveError,
5313
5385
  shouldRetry,
5314
- _args15 = arguments;
5315
- return _regenerator.default.wrap(function _callee15$(_context15) {
5316
- while (1) switch (_context15.prev = _context15.next) {
5386
+ _args16 = arguments;
5387
+ return _regenerator.default.wrap(function _callee16$(_context16) {
5388
+ while (1) switch (_context16.prev = _context16.next) {
5317
5389
  case 0:
5318
- options = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
5390
+ options = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
5319
5391
  mediaOptions = options.mediaOptions, _options$joinOptions = options.joinOptions, joinOptions = _options$joinOptions === void 0 ? {} : _options$joinOptions;
5320
5392
  _this$joinWithMediaRe = this.joinWithMediaRetryInfo, isRetry = _this$joinWithMediaRe.isRetry, prevJoinResponse = _this$joinWithMediaRe.prevJoinResponse;
5321
5393
  if (mediaOptions !== null && mediaOptions !== void 0 && mediaOptions.allowMediaInLobby) {
5322
- _context15.next = 5;
5394
+ _context16.next = 5;
5323
5395
  break;
5324
5396
  }
5325
- return _context15.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
5397
+ return _context16.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
5326
5398
  case 5:
5327
5399
  this.allowMediaInLobby = true;
5328
5400
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia called');
5329
5401
  joined = false;
5330
5402
  joinResponse = prevJoinResponse;
5331
- _context15.prev = 9;
5403
+ _context16.prev = 9;
5332
5404
  forceTurnDiscovery = false;
5333
5405
  if (joinResponse) {
5334
- _context15.next = 33;
5406
+ _context16.next = 33;
5335
5407
  break;
5336
5408
  }
5337
- _context15.next = 14;
5409
+ _context16.next = 14;
5338
5410
  return this.roap.generateTurnDiscoveryRequestMessage(this, true);
5339
5411
  case 14:
5340
- turnDiscoveryRequest = _context15.sent;
5412
+ turnDiscoveryRequest = _context16.sent;
5341
5413
  turnDiscoverySkippedReason = turnDiscoveryRequest.turnDiscoverySkippedReason;
5342
5414
  joinOptions.roapMessage = turnDiscoveryRequest.roapMessage;
5343
5415
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia ---> calling join with joinOptions, ', joinOptions);
5344
- _context15.next = 20;
5416
+ _context16.next = 20;
5345
5417
  return this.join(joinOptions);
5346
5418
  case 20:
5347
- joinResponse = _context15.sent;
5419
+ joinResponse = _context16.sent;
5348
5420
  joined = true;
5349
5421
 
5350
5422
  // if we sent out TURN discovery Roap message with join, process the TURN discovery response
5351
5423
  if (!joinOptions.roapMessage) {
5352
- _context15.next = 31;
5424
+ _context16.next = 31;
5353
5425
  break;
5354
5426
  }
5355
- _context15.next = 25;
5427
+ _context16.next = 25;
5356
5428
  return this.roap.handleTurnDiscoveryHttpResponse(this, joinResponse);
5357
5429
  case 25:
5358
- _yield$this$roap$hand = _context15.sent;
5430
+ _yield$this$roap$hand = _context16.sent;
5359
5431
  turnServerInfo = _yield$this$roap$hand.turnServerInfo;
5360
5432
  turnDiscoverySkippedReason = _yield$this$roap$hand.turnDiscoverySkippedReason;
5361
5433
  this.turnDiscoverySkippedReason = turnDiscoverySkippedReason;
@@ -5364,7 +5436,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5364
5436
  this.roap.abortTurnDiscovery();
5365
5437
  }
5366
5438
  case 31:
5367
- _context15.next = 35;
5439
+ _context16.next = 35;
5368
5440
  break;
5369
5441
  case 33:
5370
5442
  // This is a retry, when join succeeded but addMedia failed, so we'll just call addMedia() again,
@@ -5372,82 +5444,82 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5372
5444
  forceTurnDiscovery = true;
5373
5445
  joined = true;
5374
5446
  case 35:
5375
- _context15.next = 37;
5447
+ _context16.next = 37;
5376
5448
  return this.addMediaInternal(function () {
5377
- return _this30.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
5449
+ return _this31.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
5378
5450
  }, turnServerInfo, forceTurnDiscovery, mediaOptions);
5379
5451
  case 37:
5380
- mediaResponse = _context15.sent;
5452
+ mediaResponse = _context16.sent;
5381
5453
  this.joinWithMediaRetryInfo = {
5382
5454
  isRetry: false,
5383
5455
  prevJoinResponse: undefined
5384
5456
  };
5385
- return _context15.abrupt("return", {
5457
+ return _context16.abrupt("return", {
5386
5458
  join: joinResponse,
5387
5459
  media: mediaResponse
5388
5460
  });
5389
5461
  case 42:
5390
- _context15.prev = 42;
5391
- _context15.t0 = _context15["catch"](9);
5392
- _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _context15.t0);
5462
+ _context16.prev = 42;
5463
+ _context16.t0 = _context16["catch"](9);
5464
+ _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _context16.t0);
5393
5465
  this.roap.abortTurnDiscovery();
5394
5466
  if (!(joined && isRetry)) {
5395
- _context15.next = 56;
5467
+ _context16.next = 56;
5396
5468
  break;
5397
5469
  }
5398
- _context15.prev = 47;
5399
- _context15.next = 50;
5470
+ _context16.prev = 47;
5471
+ _context16.next = 50;
5400
5472
  return this.leave({
5401
5473
  resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
5402
5474
  reason: 'joinWithMedia failure'
5403
5475
  });
5404
5476
  case 50:
5405
- _context15.next = 56;
5477
+ _context16.next = 56;
5406
5478
  break;
5407
5479
  case 52:
5408
- _context15.prev = 52;
5409
- _context15.t1 = _context15["catch"](47);
5410
- _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _context15.t1);
5411
- leaveError = _context15.t1;
5480
+ _context16.prev = 52;
5481
+ _context16.t1 = _context16["catch"](47);
5482
+ _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _context16.t1);
5483
+ leaveError = _context16.t1;
5412
5484
  case 56:
5413
5485
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
5414
5486
  correlation_id: this.correlationId,
5415
5487
  locus_id: (_this$locusUrl = this.locusUrl) === null || _this$locusUrl === void 0 ? void 0 : _this$locusUrl.split('/').pop(),
5416
5488
  // if join fails, we may end up with no locusUrl
5417
- reason: _context15.t0.message,
5418
- stack: _context15.t0.stack,
5489
+ reason: _context16.t0.message,
5490
+ stack: _context16.t0.stack,
5419
5491
  leaveErrorReason: (_leaveError = leaveError) === null || _leaveError === void 0 ? void 0 : _leaveError.message,
5420
5492
  isRetry: isRetry
5421
5493
  }, {
5422
- type: _context15.t0.name
5494
+ type: _context16.t0.name
5423
5495
  });
5424
5496
 
5425
5497
  // if this was the first attempt, let's do a retry
5426
5498
  shouldRetry = !isRetry;
5427
- if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_context15.t0)) {
5499
+ if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_context16.t0)) {
5428
5500
  // errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
5429
5501
  // so there is no point doing a retry
5430
5502
  shouldRetry = false;
5431
5503
  }
5432
5504
  if (!shouldRetry) {
5433
- _context15.next = 64;
5505
+ _context16.next = 64;
5434
5506
  break;
5435
5507
  }
5436
5508
  _loggerProxy.default.logger.warn('Meeting:index#joinWithMedia --> retrying call to joinWithMedia');
5437
5509
  this.joinWithMediaRetryInfo.isRetry = true;
5438
5510
  this.joinWithMediaRetryInfo.prevJoinResponse = joinResponse;
5439
- return _context15.abrupt("return", this.joinWithMedia(options));
5511
+ return _context16.abrupt("return", this.joinWithMedia(options));
5440
5512
  case 64:
5441
5513
  this.joinWithMediaRetryInfo = {
5442
5514
  isRetry: false,
5443
5515
  prevJoinResponse: undefined
5444
5516
  };
5445
- throw _context15.t0;
5517
+ throw _context16.t0;
5446
5518
  case 66:
5447
5519
  case "end":
5448
- return _context15.stop();
5520
+ return _context16.stop();
5449
5521
  }
5450
- }, _callee15, this, [[9, 42], [47, 52]]);
5522
+ }, _callee16, this, [[9, 42], [47, 52]]);
5451
5523
  }));
5452
5524
  function joinWithMedia() {
5453
5525
  return _joinWithMedia.apply(this, arguments);
@@ -5466,7 +5538,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5466
5538
  }, {
5467
5539
  key: "reconnect",
5468
5540
  value: function reconnect(options) {
5469
- var _this31 = this;
5541
+ var _this32 = this;
5470
5542
  _loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
5471
5543
  if (!this.reconnectionManager || !this.reconnectionManager.reconnect) {
5472
5544
  return _promise.default.reject(new _parameter.default('Cannot reconnect, ReconnectionManager must first be defined.'));
@@ -5477,20 +5549,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5477
5549
  return _promise.default.reject(new _parameter.default('Cannot reconnect, Media has not established to reconnect'));
5478
5550
  }
5479
5551
  this.cleanUpBeforeReconnection();
5480
- return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5481
- return _regenerator.default.wrap(function _callee16$(_context16) {
5482
- while (1) switch (_context16.prev = _context16.next) {
5552
+ return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
5553
+ return _regenerator.default.wrap(function _callee17$(_context17) {
5554
+ while (1) switch (_context17.prev = _context17.next) {
5483
5555
  case 0:
5484
- _context16.next = 2;
5485
- return _this31.waitForRemoteSDPAnswer();
5556
+ _context17.next = 2;
5557
+ return _this32.waitForRemoteSDPAnswer();
5486
5558
  case 2:
5487
- _context16.next = 4;
5488
- return _this31.waitForMediaConnectionConnected();
5559
+ _context17.next = 4;
5560
+ return _this32.waitForMediaConnectionConnected();
5489
5561
  case 4:
5490
5562
  case "end":
5491
- return _context16.stop();
5563
+ return _context17.stop();
5492
5564
  }
5493
- }, _callee16);
5565
+ }, _callee17);
5494
5566
  }))).then(function () {
5495
5567
  _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
5496
5568
  }).catch(function (error) {
@@ -5499,7 +5571,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5499
5571
  return _promise.default.resolve();
5500
5572
  }
5501
5573
  _loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
5502
- _this31.uploadLogs({
5574
+ _this32.uploadLogs({
5503
5575
  file: 'meeting/index',
5504
5576
  function: 'reconnect'
5505
5577
  });
@@ -5546,19 +5618,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5546
5618
  }, {
5547
5619
  key: "setCaptionLanguage",
5548
5620
  value: function setCaptionLanguage(language) {
5549
- var _this32 = this;
5621
+ var _this33 = this;
5550
5622
  return new _promise.default(function (resolve, reject) {
5551
- if (!_this32.isTranscriptionSupported()) {
5623
+ if (!_this33.isTranscriptionSupported()) {
5552
5624
  _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
5553
5625
  reject(new Error('Webex Assistant is not enabled/supported'));
5554
5626
  }
5555
5627
  try {
5556
5628
  var voiceaListenerCaptionUpdate = function voiceaListenerCaptionUpdate(payload) {
5557
5629
  // @ts-ignore
5558
- _this32.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5630
+ _this33.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5559
5631
  var statusCode = payload.statusCode;
5560
5632
  if (statusCode === 200) {
5561
- _this32.transcription.languageOptions = _objectSpread(_objectSpread({}, _this32.transcription.languageOptions), {}, {
5633
+ _this33.transcription.languageOptions = _objectSpread(_objectSpread({}, _this33.transcription.languageOptions), {}, {
5562
5634
  currentCaptionLanguage: language
5563
5635
  });
5564
5636
  resolve(language);
@@ -5567,9 +5639,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5567
5639
  }
5568
5640
  };
5569
5641
  // @ts-ignore
5570
- _this32.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5642
+ _this33.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5571
5643
  // @ts-ignore
5572
- _this32.webex.internal.voicea.requestLanguage(language);
5644
+ _this33.webex.internal.voicea.requestLanguage(language);
5573
5645
  } catch (error) {
5574
5646
  _loggerProxy.default.logger.error("Meeting:index#setCaptionLanguage --> ".concat(error));
5575
5647
  reject(error);
@@ -5585,23 +5657,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5585
5657
  }, {
5586
5658
  key: "setSpokenLanguage",
5587
5659
  value: function setSpokenLanguage(language) {
5588
- var _this33 = this;
5660
+ var _this34 = this;
5589
5661
  return new _promise.default(function (resolve, reject) {
5590
- if (!_this33.isTranscriptionSupported()) {
5662
+ if (!_this34.isTranscriptionSupported()) {
5591
5663
  _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
5592
5664
  reject(new Error('Webex Assistant is not enabled/supported'));
5593
5665
  }
5594
- if (_this33.getCurUserType() !== 'host') {
5666
+ if (_this34.getCurUserType() !== 'host') {
5595
5667
  _loggerProxy.default.logger.error('Meeting:index#setSpokenLanguage --> Only host can set spoken language');
5596
5668
  reject(new Error('Only host can set spoken language'));
5597
5669
  }
5598
5670
  try {
5599
5671
  var voiceaListenerLanguageUpdate = function voiceaListenerLanguageUpdate(payload) {
5600
5672
  // @ts-ignore
5601
- _this33.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5673
+ _this34.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5602
5674
  var languageCode = payload.languageCode;
5603
5675
  if (languageCode) {
5604
- _this33.transcription.languageOptions = _objectSpread(_objectSpread({}, _this33.transcription.languageOptions), {}, {
5676
+ _this34.transcription.languageOptions = _objectSpread(_objectSpread({}, _this34.transcription.languageOptions), {}, {
5605
5677
  currentSpokenLanguage: languageCode
5606
5678
  });
5607
5679
  resolve(languageCode);
@@ -5611,10 +5683,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5611
5683
  };
5612
5684
 
5613
5685
  // @ts-ignore
5614
- _this33.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5686
+ _this34.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5615
5687
 
5616
5688
  // @ts-ignore
5617
- _this33.webex.internal.voicea.setSpokenLanguage(language);
5689
+ _this34.webex.internal.voicea.setSpokenLanguage(language);
5618
5690
  } catch (error) {
5619
5691
  _loggerProxy.default.logger.error("Meeting:index#setSpokenLanguage --> ".concat(error));
5620
5692
  reject(error);
@@ -5631,48 +5703,48 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5631
5703
  }, {
5632
5704
  key: "startTranscription",
5633
5705
  value: (function () {
5634
- var _startTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(options) {
5635
- return _regenerator.default.wrap(function _callee17$(_context17) {
5636
- while (1) switch (_context17.prev = _context17.next) {
5706
+ var _startTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(options) {
5707
+ return _regenerator.default.wrap(function _callee18$(_context18) {
5708
+ while (1) switch (_context18.prev = _context18.next) {
5637
5709
  case 0:
5638
5710
  if (!this.isJoined()) {
5639
- _context17.next = 14;
5711
+ _context18.next = 14;
5640
5712
  break;
5641
5713
  }
5642
5714
  _loggerProxy.default.logger.info('Meeting:index#startTranscription --> Attempting to enable transcription!');
5643
- _context17.prev = 2;
5715
+ _context18.prev = 2;
5644
5716
  if (!this.areVoiceaEventsSetup) {
5645
5717
  this.setUpVoiceaListeners();
5646
5718
  }
5647
5719
 
5648
5720
  // @ts-ignore
5649
- _context17.next = 6;
5721
+ _context18.next = 6;
5650
5722
  return this.webex.internal.voicea.turnOnCaptions(options === null || options === void 0 ? void 0 : options.spokenLanguage);
5651
5723
  case 6:
5652
- _context17.next = 12;
5724
+ _context18.next = 12;
5653
5725
  break;
5654
5726
  case 8:
5655
- _context17.prev = 8;
5656
- _context17.t0 = _context17["catch"](2);
5657
- _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_context17.t0));
5727
+ _context18.prev = 8;
5728
+ _context18.t0 = _context18["catch"](2);
5729
+ _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_context18.t0));
5658
5730
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
5659
5731
  correlation_id: this.correlationId,
5660
- reason: _context17.t0.message,
5661
- stack: _context17.t0.stack
5732
+ reason: _context18.t0.message,
5733
+ stack: _context18.t0.stack
5662
5734
  });
5663
5735
  case 12:
5664
- _context17.next = 16;
5736
+ _context18.next = 16;
5665
5737
  break;
5666
5738
  case 14:
5667
5739
  _loggerProxy.default.logger.error("Meeting:index#startTranscription --> meeting joined : ".concat(this.isJoined()));
5668
5740
  throw new Error('Meeting is not joined');
5669
5741
  case 16:
5670
5742
  case "end":
5671
- return _context17.stop();
5743
+ return _context18.stop();
5672
5744
  }
5673
- }, _callee17, this, [[2, 8]]);
5745
+ }, _callee18, this, [[2, 8]]);
5674
5746
  }));
5675
- function startTranscription(_x15) {
5747
+ function startTranscription(_x16) {
5676
5748
  return _startTranscription.apply(this, arguments);
5677
5749
  }
5678
5750
  return startTranscription;
@@ -5733,36 +5805,36 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5733
5805
  * Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId)
5734
5806
  */
5735
5807
  function () {
5736
- var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18() {
5737
- var _this34 = this;
5808
+ var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
5809
+ var _this35 = this;
5738
5810
  var options,
5739
5811
  errorMessage,
5740
5812
  error,
5741
5813
  joinFailed,
5742
5814
  joinSuccess,
5743
- _errorMessage,
5744
- _error,
5745
5815
  _errorMessage2,
5746
5816
  _error2,
5747
- _args18 = arguments;
5748
- return _regenerator.default.wrap(function _callee18$(_context18) {
5749
- while (1) switch (_context18.prev = _context18.next) {
5817
+ _errorMessage3,
5818
+ _error3,
5819
+ _args19 = arguments;
5820
+ return _regenerator.default.wrap(function _callee19$(_context19) {
5821
+ while (1) switch (_context19.prev = _context19.next) {
5750
5822
  case 0:
5751
- options = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
5823
+ options = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : {};
5752
5824
  if (this.webex.meetings.registered) {
5753
- _context18.next = 6;
5825
+ _context19.next = 6;
5754
5826
  break;
5755
5827
  }
5756
5828
  errorMessage = 'Meeting:index#join --> Device not registered';
5757
5829
  error = new Error(errorMessage);
5758
5830
  _loggerProxy.default.logger.error(errorMessage);
5759
- return _context18.abrupt("return", _promise.default.reject(error));
5831
+ return _context19.abrupt("return", _promise.default.reject(error));
5760
5832
  case 6:
5761
5833
  if (!this.deferJoin) {
5762
- _context18.next = 8;
5834
+ _context19.next = 8;
5763
5835
  break;
5764
5836
  }
5765
- return _context18.abrupt("return", this.deferJoin);
5837
+ return _context19.abrupt("return", this.deferJoin);
5766
5838
  case 8:
5767
5839
  // Create a deferred promise for a consistent resolve value from utils.
5768
5840
  // This also prevents redundant API calls.
@@ -5814,131 +5886,131 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5814
5886
  this.wirelessShare = true;
5815
5887
  }
5816
5888
  if (!options.meetingQuality) {
5817
- _context18.next = 36;
5889
+ _context19.next = 36;
5818
5890
  break;
5819
5891
  }
5820
5892
  if (!(typeof options.meetingQuality === 'string')) {
5821
- _context18.next = 27;
5893
+ _context19.next = 27;
5822
5894
  break;
5823
5895
  }
5824
5896
  if (_constants.QUALITY_LEVELS[options.meetingQuality]) {
5825
- _context18.next = 26;
5897
+ _context19.next = 26;
5826
5898
  break;
5827
5899
  }
5828
- _errorMessage = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
5829
- _error = new Error(_errorMessage);
5830
- _loggerProxy.default.logger.error(_errorMessage);
5831
- joinFailed(_error);
5900
+ _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
5901
+ _error2 = new Error(_errorMessage2);
5902
+ _loggerProxy.default.logger.error(_errorMessage2);
5903
+ joinFailed(_error2);
5832
5904
  this.deferJoin = undefined;
5833
- return _context18.abrupt("return", _promise.default.reject(_error));
5905
+ return _context19.abrupt("return", _promise.default.reject(_error2));
5834
5906
  case 26:
5835
5907
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
5836
5908
  case 27:
5837
5909
  if (!((0, _typeof2.default)(options.meetingQuality) === 'object')) {
5838
- _context18.next = 36;
5910
+ _context19.next = 36;
5839
5911
  break;
5840
5912
  }
5841
5913
  if (_constants.QUALITY_LEVELS[options.meetingQuality.remote]) {
5842
- _context18.next = 35;
5914
+ _context19.next = 35;
5843
5915
  break;
5844
5916
  }
5845
- _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
5846
- _loggerProxy.default.logger.error(_errorMessage2);
5847
- _error2 = new Error(_errorMessage2);
5848
- joinFailed(_error2);
5917
+ _errorMessage3 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
5918
+ _loggerProxy.default.logger.error(_errorMessage3);
5919
+ _error3 = new Error(_errorMessage3);
5920
+ joinFailed(_error3);
5849
5921
  this.deferJoin = undefined;
5850
- return _context18.abrupt("return", _promise.default.reject(new Error(_errorMessage2)));
5922
+ return _context19.abrupt("return", _promise.default.reject(new Error(_errorMessage3)));
5851
5923
  case 35:
5852
5924
  if (options.meetingQuality.remote) {
5853
5925
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality.remote);
5854
5926
  }
5855
5927
  case 36:
5856
5928
  this.isMultistream = !!options.enableMultistream;
5857
- _context18.prev = 37;
5858
- _context18.next = 40;
5929
+ _context19.prev = 37;
5930
+ _context19.next = 40;
5859
5931
  return this.checkAndRefreshPermissionToken(_constants.MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC, _constants.MEETING_PERMISSION_TOKEN_REFRESH_REASON);
5860
5932
  case 40:
5861
- _context18.next = 51;
5933
+ _context19.next = 51;
5862
5934
  break;
5863
5935
  case 42:
5864
- _context18.prev = 42;
5865
- _context18.t0 = _context18["catch"](37);
5866
- _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _context18.t0);
5867
- if (!(_context18.t0 instanceof _captchaError.default || _context18.t0 instanceof _passwordError.default || _context18.t0 instanceof _permission.default)) {
5868
- _context18.next = 51;
5936
+ _context19.prev = 42;
5937
+ _context19.t0 = _context19["catch"](37);
5938
+ _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _context19.t0);
5939
+ if (!(_context19.t0 instanceof _captchaError.default || _context19.t0 instanceof _passwordError.default || _context19.t0 instanceof _permission.default)) {
5940
+ _context19.next = 51;
5869
5941
  break;
5870
5942
  }
5871
- this.meetingFiniteStateMachine.fail(_context18.t0);
5943
+ this.meetingFiniteStateMachine.fail(_context19.t0);
5872
5944
 
5873
5945
  // Upload logs on refreshpermissionToken refresh Failure
5874
5946
  _triggerProxy.default.trigger(this, {
5875
5947
  file: 'meeting/index',
5876
5948
  function: 'join'
5877
5949
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
5878
- joinFailed(_context18.t0);
5950
+ joinFailed(_context19.t0);
5879
5951
  this.deferJoin = undefined;
5880
5952
 
5881
5953
  // if refresh permission token requires captcha, password or permission, we are throwing the errors
5882
5954
  // and bubble it up to client
5883
- return _context18.abrupt("return", _promise.default.reject(_context18.t0));
5955
+ return _context19.abrupt("return", _promise.default.reject(_context19.t0));
5884
5956
  case 51:
5885
- return _context18.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
5886
- _this34.meetingFiniteStateMachine.join();
5887
- _this34.setupLocusMediaRequest();
5957
+ return _context19.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
5958
+ _this35.meetingFiniteStateMachine.join();
5959
+ _this35.setupLocusMediaRequest();
5888
5960
 
5889
5961
  // @ts-ignore
5890
- _this34.webex.internal.device.meetingStarted();
5891
- (0, _classPrivateFieldSet2.default)(_this34, _isoLocalClientMeetingJoinTime, new Date().toISOString());
5962
+ _this35.webex.internal.device.meetingStarted();
5963
+ (0, _classPrivateFieldSet2.default)(_this35, _isoLocalClientMeetingJoinTime, new Date().toISOString());
5892
5964
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
5893
5965
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
5894
- correlation_id: _this34.correlationId
5966
+ correlation_id: _this35.correlationId
5895
5967
  });
5896
5968
  joinSuccess(join);
5897
- _this34.deferJoin = undefined;
5969
+ _this35.deferJoin = undefined;
5898
5970
  return join;
5899
5971
  }).catch(function (error) {
5900
- var _this34$meetingInfo, _error$error;
5901
- _this34.meetingFiniteStateMachine.fail(error);
5972
+ var _this35$meetingInfo, _error$error;
5973
+ _this35.meetingFiniteStateMachine.fail(error);
5902
5974
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
5903
5975
 
5904
5976
  // @ts-ignore
5905
- _this34.webex.internal.newMetrics.submitClientEvent({
5977
+ _this35.webex.internal.newMetrics.submitClientEvent({
5906
5978
  name: 'client.locus.join.response',
5907
5979
  payload: {
5908
5980
  identifiers: {
5909
- meetingLookupUrl: (_this34$meetingInfo = _this34.meetingInfo) === null || _this34$meetingInfo === void 0 ? void 0 : _this34$meetingInfo.meetingLookupUrl
5981
+ meetingLookupUrl: (_this35$meetingInfo = _this35.meetingInfo) === null || _this35$meetingInfo === void 0 ? void 0 : _this35$meetingInfo.meetingLookupUrl
5910
5982
  }
5911
5983
  },
5912
5984
  options: {
5913
- meetingId: _this34.id,
5985
+ meetingId: _this35.id,
5914
5986
  rawError: error
5915
5987
  }
5916
5988
  });
5917
5989
 
5918
5990
  // TODO: change this to error codes and pre defined dictionary
5919
5991
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
5920
- correlation_id: _this34.correlationId,
5992
+ correlation_id: _this35.correlationId,
5921
5993
  reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
5922
5994
  stack: error.stack
5923
5995
  });
5924
5996
 
5925
5997
  // Upload logs on join Failure
5926
- _triggerProxy.default.trigger(_this34, {
5998
+ _triggerProxy.default.trigger(_this35, {
5927
5999
  file: 'meeting/index',
5928
6000
  function: 'join'
5929
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this34);
6001
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this35);
5930
6002
  joinFailed(error);
5931
- _this34.deferJoin = undefined;
6003
+ _this35.deferJoin = undefined;
5932
6004
  return _promise.default.reject(error);
5933
6005
  }).then(function (join) {
5934
6006
  // @ts-ignore - config coming from registerPlugin
5935
- if (_this34.config.enableAutomaticLLM) {
6007
+ if (_this35.config.enableAutomaticLLM) {
5936
6008
  // @ts-ignore
5937
- _this34.webex.internal.llm.on('online', _this34.handleLLMOnline);
5938
- _this34.updateLLMConnection().catch(function (error) {
6009
+ _this35.webex.internal.llm.on('online', _this35.handleLLMOnline);
6010
+ _this35.updateLLMConnection().catch(function (error) {
5939
6011
  _loggerProxy.default.logger.error('Meeting:index#join --> Transcription Socket Connection Failed', error);
5940
6012
  _metrics.default.sendBehavioralMetric(_constants2.default.LLM_CONNECTION_AFTER_JOIN_FAILURE, {
5941
- correlation_id: _this34.correlationId,
6013
+ correlation_id: _this35.correlationId,
5942
6014
  reason: error === null || error === void 0 ? void 0 : error.message,
5943
6015
  stack: error.stack
5944
6016
  });
@@ -5950,9 +6022,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5950
6022
  }));
5951
6023
  case 52:
5952
6024
  case "end":
5953
- return _context18.stop();
6025
+ return _context19.stop();
5954
6026
  }
5955
- }, _callee18, this, [[37, 42]]);
6027
+ }, _callee19, this, [[37, 42]]);
5956
6028
  }));
5957
6029
  function join() {
5958
6030
  return _join.apply(this, arguments);
@@ -5969,18 +6041,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5969
6041
  }, {
5970
6042
  key: "updateLLMConnection",
5971
6043
  value: (function () {
5972
- var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
5973
- var _this35 = this;
6044
+ var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
6045
+ var _this36 = this;
5974
6046
  var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, practiceSessionDatachannelUrl, isJoined, dataChannelUrl;
5975
- return _regenerator.default.wrap(function _callee19$(_context19) {
5976
- while (1) switch (_context19.prev = _context19.next) {
6047
+ return _regenerator.default.wrap(function _callee20$(_context20) {
6048
+ while (1) switch (_context20.prev = _context20.next) {
5977
6049
  case 0:
5978
6050
  // @ts-ignore - Fix type
5979
6051
  _this$locusInfo6 = this.locusInfo, url = _this$locusInfo6.url, _this$locusInfo6$info = _this$locusInfo6.info, _this$locusInfo6$info2 = _this$locusInfo6$info === void 0 ? {} : _this$locusInfo6$info, datachannelUrl = _this$locusInfo6$info2.datachannelUrl, practiceSessionDatachannelUrl = _this$locusInfo6$info2.practiceSessionDatachannelUrl;
5980
6052
  isJoined = this.isJoined(); // webinar panelist should use new data channel in practice session
5981
6053
  dataChannelUrl = this.webinar.isJoinPracticeSessionDataChannel() && practiceSessionDatachannelUrl ? practiceSessionDatachannelUrl : datachannelUrl; // @ts-ignore - Fix type
5982
6054
  if (!this.webex.internal.llm.isConnected()) {
5983
- _context19.next = 9;
6055
+ _context20.next = 9;
5984
6056
  break;
5985
6057
  }
5986
6058
  if (!(
@@ -5988,36 +6060,36 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5988
6060
  url === this.webex.internal.llm.getLocusUrl() &&
5989
6061
  // @ts-ignore - Fix type
5990
6062
  dataChannelUrl === this.webex.internal.llm.getDatachannelUrl() && isJoined)) {
5991
- _context19.next = 6;
6063
+ _context20.next = 6;
5992
6064
  break;
5993
6065
  }
5994
- return _context19.abrupt("return", undefined);
6066
+ return _context20.abrupt("return", undefined);
5995
6067
  case 6:
5996
- _context19.next = 8;
6068
+ _context20.next = 8;
5997
6069
  return this.webex.internal.llm.disconnectLLM();
5998
6070
  case 8:
5999
6071
  // @ts-ignore - Fix type
6000
6072
  this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
6001
6073
  case 9:
6002
6074
  if (isJoined) {
6003
- _context19.next = 11;
6075
+ _context20.next = 11;
6004
6076
  break;
6005
6077
  }
6006
- return _context19.abrupt("return", undefined);
6078
+ return _context20.abrupt("return", undefined);
6007
6079
  case 11:
6008
- return _context19.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl).then(function (registerAndConnectResult) {
6080
+ return _context20.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl).then(function (registerAndConnectResult) {
6009
6081
  // @ts-ignore - Fix type
6010
- _this35.webex.internal.llm.off('event:relay.event', _this35.processRelayEvent);
6082
+ _this36.webex.internal.llm.off('event:relay.event', _this36.processRelayEvent);
6011
6083
  // @ts-ignore - Fix type
6012
- _this35.webex.internal.llm.on('event:relay.event', _this35.processRelayEvent);
6084
+ _this36.webex.internal.llm.on('event:relay.event', _this36.processRelayEvent);
6013
6085
  _loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
6014
6086
  return _promise.default.resolve(registerAndConnectResult);
6015
6087
  }));
6016
6088
  case 12:
6017
6089
  case "end":
6018
- return _context19.stop();
6090
+ return _context20.stop();
6019
6091
  }
6020
- }, _callee19, this);
6092
+ }, _callee20, this);
6021
6093
  }));
6022
6094
  function updateLLMConnection() {
6023
6095
  return _updateLLMConnection.apply(this, arguments);
@@ -6063,7 +6135,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6063
6135
  }, {
6064
6136
  key: "dialInPstn",
6065
6137
  value: function dialInPstn() {
6066
- var _this36 = this;
6138
+ var _this37 = this;
6067
6139
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
6068
6140
 
6069
6141
  var correlationId = this.correlationId,
@@ -6079,10 +6151,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6079
6151
  }).catch(function (error) {
6080
6152
  var _error$error2;
6081
6153
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
6082
- correlation_id: _this36.correlationId,
6083
- dial_in_url: _this36.dialInUrl,
6154
+ correlation_id: _this37.correlationId,
6155
+ dial_in_url: _this37.dialInUrl,
6084
6156
  locus_id: locusUrl.split('/').pop(),
6085
- client_url: _this36.deviceUrl,
6157
+ client_url: _this37.deviceUrl,
6086
6158
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
6087
6159
  stack: error.stack
6088
6160
  });
@@ -6100,7 +6172,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6100
6172
  }, {
6101
6173
  key: "dialOutPstn",
6102
6174
  value: function dialOutPstn(phoneNumber) {
6103
- var _this37 = this;
6175
+ var _this38 = this;
6104
6176
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
6105
6177
 
6106
6178
  var correlationId = this.correlationId,
@@ -6117,10 +6189,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6117
6189
  }).catch(function (error) {
6118
6190
  var _error$error3;
6119
6191
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
6120
- correlation_id: _this37.correlationId,
6121
- dial_out_url: _this37.dialOutUrl,
6192
+ correlation_id: _this38.correlationId,
6193
+ dial_out_url: _this38.dialOutUrl,
6122
6194
  locus_id: locusUrl.split('/').pop(),
6123
- client_url: _this37.deviceUrl,
6195
+ client_url: _this38.deviceUrl,
6124
6196
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
6125
6197
  stack: error.stack
6126
6198
  });
@@ -6151,7 +6223,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6151
6223
  }, {
6152
6224
  key: "moveTo",
6153
6225
  value: function moveTo(resourceId) {
6154
- var _this38 = this;
6226
+ var _this39 = this;
6155
6227
  if (!resourceId) {
6156
6228
  throw new _parameter.default('Cannot move call without a resourceId.');
6157
6229
  }
@@ -6189,18 +6261,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6189
6261
  meetingId: this.id
6190
6262
  }
6191
6263
  });
6192
- this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
6264
+ this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
6193
6265
  var mediaSettings;
6194
- return _regenerator.default.wrap(function _callee20$(_context20) {
6195
- while (1) switch (_context20.prev = _context20.next) {
6266
+ return _regenerator.default.wrap(function _callee21$(_context21) {
6267
+ while (1) switch (_context21.prev = _context21.next) {
6196
6268
  case 0:
6197
- _context20.prev = 0;
6198
- if (!(_this38.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6199
- _context20.next = 4;
6269
+ _context21.prev = 0;
6270
+ if (!(_this39.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6271
+ _context21.next = 4;
6200
6272
  break;
6201
6273
  }
6202
- _context20.next = 4;
6203
- return _this38.releaseScreenShareFloor();
6274
+ _context21.next = 4;
6275
+ return _this39.releaseScreenShareFloor();
6204
6276
  case 4:
6205
6277
  mediaSettings = {
6206
6278
  mediaDirection: {
@@ -6212,55 +6284,55 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6212
6284
  receiveShare: true
6213
6285
  }
6214
6286
  };
6215
- _this38.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6216
- _this38.mediaProperties.unsetRemoteMedia();
6287
+ _this39.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6288
+ _this39.mediaProperties.unsetRemoteMedia();
6217
6289
 
6218
6290
  // 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
6219
6291
  // once the device answers we close the old connection and create new media server connection with only share enabled
6220
- if (!_this38.statsAnalyzer) {
6221
- _context20.next = 10;
6292
+ if (!_this39.statsAnalyzer) {
6293
+ _context21.next = 10;
6222
6294
  break;
6223
6295
  }
6224
- _context20.next = 10;
6225
- return _this38.statsAnalyzer.stopAnalyzer();
6296
+ _context21.next = 10;
6297
+ return _this39.statsAnalyzer.stopAnalyzer();
6226
6298
  case 10:
6227
- _context20.next = 12;
6228
- return _this38.closeRemoteStreams();
6299
+ _context21.next = 12;
6300
+ return _this39.closeRemoteStreams();
6229
6301
  case 12:
6230
- _context20.next = 14;
6231
- return _this38.closePeerConnections();
6302
+ _context21.next = 14;
6303
+ return _this39.closePeerConnections();
6232
6304
  case 14:
6233
- _this38.cleanupLocalStreams();
6234
- _this38.unsetRemoteStreams();
6235
- _this38.unsetPeerConnections();
6236
- _this38.reconnectionManager.cleanUp();
6237
- _context20.next = 20;
6238
- return _this38.addMedia({
6305
+ _this39.cleanupLocalStreams();
6306
+ _this39.unsetRemoteStreams();
6307
+ _this39.unsetPeerConnections();
6308
+ _this39.reconnectionManager.cleanUp();
6309
+ _context21.next = 20;
6310
+ return _this39.addMedia({
6239
6311
  audioEnabled: false,
6240
6312
  videoEnabled: false,
6241
6313
  shareVideoEnabled: true
6242
6314
  });
6243
6315
  case 20:
6244
6316
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
6245
- _this38.isMoveToInProgress = false;
6246
- _context20.next = 29;
6317
+ _this39.isMoveToInProgress = false;
6318
+ _context21.next = 29;
6247
6319
  break;
6248
6320
  case 24:
6249
- _context20.prev = 24;
6250
- _context20.t0 = _context20["catch"](0);
6251
- _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context20.t0);
6321
+ _context21.prev = 24;
6322
+ _context21.t0 = _context21["catch"](0);
6323
+ _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context21.t0);
6252
6324
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6253
- correlation_id: _this38.correlationId,
6254
- locus_id: _this38.locusUrl.split('/').pop(),
6255
- reason: _context20.t0.message,
6256
- stack: _context20.t0.stack
6325
+ correlation_id: _this39.correlationId,
6326
+ locus_id: _this39.locusUrl.split('/').pop(),
6327
+ reason: _context21.t0.message,
6328
+ stack: _context21.t0.stack
6257
6329
  });
6258
- _this38.isMoveToInProgress = false;
6330
+ _this39.isMoveToInProgress = false;
6259
6331
  case 29:
6260
6332
  case "end":
6261
- return _context20.stop();
6333
+ return _context21.stop();
6262
6334
  }
6263
- }, _callee20, null, [[0, 24]]);
6335
+ }, _callee21, null, [[0, 24]]);
6264
6336
  })));
6265
6337
  _loggerProxy.default.logger.info('Meeting:index#moveTo --> Initated moved to using resourceId', resourceId);
6266
6338
 
@@ -6271,17 +6343,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6271
6343
  resourceId: resourceId,
6272
6344
  moveToResource: true
6273
6345
  }).then(function () {
6274
- _this38.meetingFiniteStateMachine.join();
6346
+ _this39.meetingFiniteStateMachine.join();
6275
6347
  }).catch(function (error) {
6276
- _this38.meetingFiniteStateMachine.fail(error);
6348
+ _this39.meetingFiniteStateMachine.fail(error);
6277
6349
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6278
- correlation_id: _this38.correlationId,
6279
- locus_id: _this38.locusUrl.split('/').pop(),
6350
+ correlation_id: _this39.correlationId,
6351
+ locus_id: _this39.locusUrl.split('/').pop(),
6280
6352
  reason: error.message,
6281
6353
  stack: error.stack
6282
6354
  });
6283
6355
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', error);
6284
- _this38.isMoveToInProgress = false;
6356
+ _this39.isMoveToInProgress = false;
6285
6357
  return _promise.default.reject(error);
6286
6358
  });
6287
6359
  }
@@ -6296,7 +6368,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6296
6368
  }, {
6297
6369
  key: "moveFrom",
6298
6370
  value: function moveFrom(resourceId) {
6299
- var _this39 = this;
6371
+ var _this40 = this;
6300
6372
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
6301
6373
  if (!resourceId) {
6302
6374
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -6311,19 +6383,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6311
6383
  }
6312
6384
  });
6313
6385
  return _util2.default.joinMeetingOptions(this).then(function () {
6314
- return _util2.default.leaveMeeting(_this39, {
6386
+ return _util2.default.leaveMeeting(_this40, {
6315
6387
  resourceId: resourceId,
6316
6388
  correlationId: oldCorrelationId,
6317
6389
  moveMeeting: true
6318
6390
  }).then(function () {
6319
- _this39.resourceId = '';
6391
+ _this40.resourceId = '';
6320
6392
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
6321
6393
  });
6322
6394
  }).catch(function (error) {
6323
- _this39.meetingFiniteStateMachine.fail(error);
6395
+ _this40.meetingFiniteStateMachine.fail(error);
6324
6396
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
6325
- correlation_id: _this39.correlationId,
6326
- locus_id: _this39.locusUrl.split('/').pop(),
6397
+ correlation_id: _this40.correlationId,
6398
+ locus_id: _this40.locusUrl.split('/').pop(),
6327
6399
  reason: error.message,
6328
6400
  stack: error.stack
6329
6401
  });
@@ -6348,10 +6420,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6348
6420
  }, {
6349
6421
  key: "createMediaConnection",
6350
6422
  value: (function () {
6351
- var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(turnServerInfo, bundlePolicy) {
6423
+ var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(turnServerInfo, bundlePolicy) {
6352
6424
  var mc, audioEnabled, videoEnabled, shareEnabled;
6353
- return _regenerator.default.wrap(function _callee21$(_context21) {
6354
- while (1) switch (_context21.prev = _context21.next) {
6425
+ return _regenerator.default.wrap(function _callee22$(_context22) {
6426
+ while (1) switch (_context22.prev = _context22.next) {
6355
6427
  case 0:
6356
6428
  this.rtcMetrics = this.isMultistream ?
6357
6429
  // @ts-ignore
@@ -6383,42 +6455,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6383
6455
 
6384
6456
  // publish the streams
6385
6457
  if (!this.mediaProperties.audioStream) {
6386
- _context21.next = 9;
6458
+ _context22.next = 9;
6387
6459
  break;
6388
6460
  }
6389
6461
  this.setSendNamedMediaGroup(_internalMediaCore.MediaType.AudioMain);
6390
- _context21.next = 9;
6462
+ _context22.next = 9;
6391
6463
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
6392
6464
  case 9:
6393
6465
  if (!this.mediaProperties.videoStream) {
6394
- _context21.next = 12;
6466
+ _context22.next = 12;
6395
6467
  break;
6396
6468
  }
6397
- _context21.next = 12;
6469
+ _context22.next = 12;
6398
6470
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
6399
6471
  case 12:
6400
6472
  if (!this.mediaProperties.shareVideoStream) {
6401
- _context21.next = 15;
6473
+ _context22.next = 15;
6402
6474
  break;
6403
6475
  }
6404
- _context21.next = 15;
6476
+ _context22.next = 15;
6405
6477
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
6406
6478
  case 15:
6407
6479
  if (!(this.isMultistream && this.mediaProperties.shareAudioStream)) {
6408
- _context21.next = 18;
6480
+ _context22.next = 18;
6409
6481
  break;
6410
6482
  }
6411
- _context21.next = 18;
6483
+ _context22.next = 18;
6412
6484
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
6413
6485
  case 18:
6414
- return _context21.abrupt("return", mc);
6486
+ return _context22.abrupt("return", mc);
6415
6487
  case 19:
6416
6488
  case "end":
6417
- return _context21.stop();
6489
+ return _context22.stop();
6418
6490
  }
6419
- }, _callee21, this);
6491
+ }, _callee22, this);
6420
6492
  }));
6421
- function createMediaConnection(_x16, _x17) {
6493
+ function createMediaConnection(_x17, _x18) {
6422
6494
  return _createMediaConnection.apply(this, arguments);
6423
6495
  }
6424
6496
  return createMediaConnection;
@@ -6436,9 +6508,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6436
6508
  }, {
6437
6509
  key: "forwardEvent",
6438
6510
  value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
6439
- var _this40 = this;
6511
+ var _this41 = this;
6440
6512
  eventEmitter.on(eventTypeToForward, function (data) {
6441
- return _triggerProxy.default.trigger(_this40, {
6513
+ return _triggerProxy.default.trigger(_this41, {
6442
6514
  file: 'meetings',
6443
6515
  function: 'addMedia'
6444
6516
  }, meetingEventType, data);
@@ -6456,11 +6528,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6456
6528
  }, {
6457
6529
  key: "setUpLocalStreamReferences",
6458
6530
  value: (function () {
6459
- var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(localStreams) {
6531
+ var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(localStreams) {
6460
6532
  var _localStreams$microph, _localStreams$camera, _localStreams$screenS, _localStreams$screenS2, _localStreams$screenS3, _localStreams$screenS4, _localStreams$screenS5, _localStreams$screenS6;
6461
6533
  var setUpStreamPromises;
6462
- return _regenerator.default.wrap(function _callee22$(_context22) {
6463
- while (1) switch (_context22.prev = _context22.next) {
6534
+ return _regenerator.default.wrap(function _callee23$(_context23) {
6535
+ while (1) switch (_context23.prev = _context23.next) {
6464
6536
  case 0:
6465
6537
  setUpStreamPromises = [];
6466
6538
  if (localStreams !== null && localStreams !== void 0 && localStreams.microphone && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$microph = localStreams.microphone) === null || _localStreams$microph === void 0 ? void 0 : _localStreams$microph.readyState) !== 'ended') {
@@ -6475,24 +6547,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6475
6547
  if (localStreams !== null && localStreams !== void 0 && (_localStreams$screenS4 = localStreams.screenShare) !== null && _localStreams$screenS4 !== void 0 && _localStreams$screenS4.audio && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$screenS5 = localStreams.screenShare) === null || _localStreams$screenS5 === void 0 ? void 0 : (_localStreams$screenS6 = _localStreams$screenS5.audio) === null || _localStreams$screenS6 === void 0 ? void 0 : _localStreams$screenS6.readyState) !== 'ended') {
6476
6548
  setUpStreamPromises.push(this.setLocalShareAudioStream(localStreams.screenShare.audio));
6477
6549
  }
6478
- _context22.prev = 5;
6479
- _context22.next = 8;
6550
+ _context23.prev = 5;
6551
+ _context23.next = 8;
6480
6552
  return _promise.default.all(setUpStreamPromises);
6481
6553
  case 8:
6482
- _context22.next = 14;
6554
+ _context23.next = 14;
6483
6555
  break;
6484
6556
  case 10:
6485
- _context22.prev = 10;
6486
- _context22.t0 = _context22["catch"](5);
6487
- _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _context22.t0);
6488
- throw _context22.t0;
6557
+ _context23.prev = 10;
6558
+ _context23.t0 = _context23["catch"](5);
6559
+ _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _context23.t0);
6560
+ throw _context23.t0;
6489
6561
  case 14:
6490
6562
  case "end":
6491
- return _context22.stop();
6563
+ return _context23.stop();
6492
6564
  }
6493
- }, _callee22, this, [[5, 10]]);
6565
+ }, _callee23, this, [[5, 10]]);
6494
6566
  }));
6495
- function setUpLocalStreamReferences(_x18) {
6567
+ function setUpLocalStreamReferences(_x19) {
6496
6568
  return _setUpLocalStreamReferences.apply(this, arguments);
6497
6569
  }
6498
6570
  return setUpLocalStreamReferences;
@@ -6507,72 +6579,72 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6507
6579
  }, {
6508
6580
  key: "waitForMediaConnectionConnected",
6509
6581
  value: (function () {
6510
- var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
6582
+ var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
6511
6583
  var iceConnected, _this$mediaProperties6, _this$mediaProperties7, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12;
6512
- return _regenerator.default.wrap(function _callee23$(_context23) {
6513
- while (1) switch (_context23.prev = _context23.next) {
6584
+ return _regenerator.default.wrap(function _callee24$(_context24) {
6585
+ while (1) switch (_context24.prev = _context24.next) {
6514
6586
  case 0:
6515
- _context23.prev = 0;
6516
- _context23.next = 3;
6587
+ _context24.prev = 0;
6588
+ _context24.next = 3;
6517
6589
  return this.mediaProperties.waitForMediaConnectionConnected();
6518
6590
  case 3:
6519
- _context23.next = 30;
6591
+ _context24.next = 30;
6520
6592
  break;
6521
6593
  case 5:
6522
- _context23.prev = 5;
6523
- _context23.t0 = _context23["catch"](0);
6524
- iceConnected = _context23.t0.iceConnected;
6594
+ _context24.prev = 5;
6595
+ _context24.t0 = _context24["catch"](0);
6596
+ iceConnected = _context24.t0.iceConnected;
6525
6597
  if (this.hasMediaConnectionConnectedAtLeastOnce) {
6526
- _context23.next = 29;
6598
+ _context24.next = 29;
6527
6599
  break;
6528
6600
  }
6529
- _context23.t1 = this.webex.internal.newMetrics;
6530
- _context23.t2 = !this.turnServerUsed;
6531
- _context23.t3 = this.addMediaData.icePhaseCallback();
6532
- _context23.t4 = this.webex.internal.newMetrics.callDiagnosticMetrics;
6533
- _context23.t5 = _internalPluginMetrics.CallDiagnosticUtils;
6534
- _context23.t6 = ((_this$mediaProperties6 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties6 === void 0 ? void 0 : (_this$mediaProperties7 = _this$mediaProperties6.multistreamConnection) === null || _this$mediaProperties7 === void 0 ? void 0 : (_this$mediaProperties8 = _this$mediaProperties7.pc) === null || _this$mediaProperties8 === void 0 ? void 0 : (_this$mediaProperties9 = _this$mediaProperties8.pc) === null || _this$mediaProperties9 === void 0 ? void 0 : _this$mediaProperties9.signalingState) || ((_this$mediaProperties10 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties10 === void 0 ? void 0 : (_this$mediaProperties11 = _this$mediaProperties10.mediaConnection) === null || _this$mediaProperties11 === void 0 ? void 0 : (_this$mediaProperties12 = _this$mediaProperties11.pc) === null || _this$mediaProperties12 === void 0 ? void 0 : _this$mediaProperties12.signalingState) || 'unknown';
6535
- _context23.t7 = iceConnected;
6536
- _context23.t8 = this.turnServerUsed;
6537
- _context23.next = 19;
6601
+ _context24.t1 = this.webex.internal.newMetrics;
6602
+ _context24.t2 = !this.turnServerUsed;
6603
+ _context24.t3 = this.addMediaData.icePhaseCallback();
6604
+ _context24.t4 = this.webex.internal.newMetrics.callDiagnosticMetrics;
6605
+ _context24.t5 = _internalPluginMetrics.CallDiagnosticUtils;
6606
+ _context24.t6 = ((_this$mediaProperties6 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties6 === void 0 ? void 0 : (_this$mediaProperties7 = _this$mediaProperties6.multistreamConnection) === null || _this$mediaProperties7 === void 0 ? void 0 : (_this$mediaProperties8 = _this$mediaProperties7.pc) === null || _this$mediaProperties8 === void 0 ? void 0 : (_this$mediaProperties9 = _this$mediaProperties8.pc) === null || _this$mediaProperties9 === void 0 ? void 0 : _this$mediaProperties9.signalingState) || ((_this$mediaProperties10 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties10 === void 0 ? void 0 : (_this$mediaProperties11 = _this$mediaProperties10.mediaConnection) === null || _this$mediaProperties11 === void 0 ? void 0 : (_this$mediaProperties12 = _this$mediaProperties11.pc) === null || _this$mediaProperties12 === void 0 ? void 0 : _this$mediaProperties12.signalingState) || 'unknown';
6607
+ _context24.t7 = iceConnected;
6608
+ _context24.t8 = this.turnServerUsed;
6609
+ _context24.next = 19;
6538
6610
  return this.webex.meetings.reachability.isWebexMediaBackendUnreachable().catch(function () {
6539
6611
  return false;
6540
6612
  });
6541
6613
  case 19:
6542
- _context23.t9 = _context23.sent;
6543
- _context23.t10 = {
6544
- signalingState: _context23.t6,
6545
- iceConnected: _context23.t7,
6546
- turnServerUsed: _context23.t8,
6547
- unreachable: _context23.t9
6614
+ _context24.t9 = _context24.sent;
6615
+ _context24.t10 = {
6616
+ signalingState: _context24.t6,
6617
+ iceConnected: _context24.t7,
6618
+ turnServerUsed: _context24.t8,
6619
+ unreachable: _context24.t9
6548
6620
  };
6549
- _context23.t11 = _context23.t5.generateClientErrorCodeForIceFailure.call(_context23.t5, _context23.t10);
6550
- _context23.t12 = {
6551
- clientErrorCode: _context23.t11
6621
+ _context24.t11 = _context24.t5.generateClientErrorCodeForIceFailure.call(_context24.t5, _context24.t10);
6622
+ _context24.t12 = {
6623
+ clientErrorCode: _context24.t11
6552
6624
  };
6553
- _context23.t13 = _context23.t4.getErrorPayloadForClientErrorCode.call(_context23.t4, _context23.t12);
6554
- _context23.t14 = [_context23.t13];
6555
- _context23.t15 = {
6556
- canProceed: _context23.t2,
6557
- icePhase: _context23.t3,
6558
- errors: _context23.t14
6625
+ _context24.t13 = _context24.t4.getErrorPayloadForClientErrorCode.call(_context24.t4, _context24.t12);
6626
+ _context24.t14 = [_context24.t13];
6627
+ _context24.t15 = {
6628
+ canProceed: _context24.t2,
6629
+ icePhase: _context24.t3,
6630
+ errors: _context24.t14
6559
6631
  };
6560
- _context23.t16 = {
6632
+ _context24.t16 = {
6561
6633
  meetingId: this.id
6562
6634
  };
6563
- _context23.t17 = {
6635
+ _context24.t17 = {
6564
6636
  name: 'client.ice.end',
6565
- payload: _context23.t15,
6566
- options: _context23.t16
6637
+ payload: _context24.t15,
6638
+ options: _context24.t16
6567
6639
  };
6568
- _context23.t1.submitClientEvent.call(_context23.t1, _context23.t17);
6640
+ _context24.t1.submitClientEvent.call(_context24.t1, _context24.t17);
6569
6641
  case 29:
6570
6642
  throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
6571
6643
  case 30:
6572
6644
  case "end":
6573
- return _context23.stop();
6645
+ return _context24.stop();
6574
6646
  }
6575
- }, _callee23, this, [[0, 5]]);
6647
+ }, _callee24, this, [[0, 5]]);
6576
6648
  }));
6577
6649
  function waitForMediaConnectionConnected() {
6578
6650
  return _waitForMediaConnectionConnected.apply(this, arguments);
@@ -6614,48 +6686,48 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6614
6686
  }, {
6615
6687
  key: "waitForRemoteSDPAnswer",
6616
6688
  value: (function () {
6617
- var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
6618
- var _this41 = this;
6689
+ var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
6690
+ var _this42 = this;
6619
6691
  var LOG_HEADER, deferSDPAnswer;
6620
- return _regenerator.default.wrap(function _callee24$(_context24) {
6621
- while (1) switch (_context24.prev = _context24.next) {
6692
+ return _regenerator.default.wrap(function _callee25$(_context25) {
6693
+ while (1) switch (_context25.prev = _context25.next) {
6622
6694
  case 0:
6623
6695
  LOG_HEADER = 'Meeting:index#addMedia():waitForRemoteSDPAnswer -->';
6624
6696
  if (this.deferSDPAnswer) {
6625
- _context24.next = 4;
6697
+ _context25.next = 4;
6626
6698
  break;
6627
6699
  }
6628
6700
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " offer not created yet"));
6629
- return _context24.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
6701
+ return _context25.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
6630
6702
  case 4:
6631
6703
  deferSDPAnswer = this.deferSDPAnswer;
6632
6704
  this.sdpResponseTimer = setTimeout(function () {
6633
6705
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " timeout! no REMOTE SDP ANSWER received within ").concat(_constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT / 1000, " seconds"));
6634
6706
  // @ts-ignore
6635
- _this41.webex.internal.newMetrics.submitClientEvent({
6707
+ _this42.webex.internal.newMetrics.submitClientEvent({
6636
6708
  name: 'client.media-engine.remote-sdp-received',
6637
6709
  payload: {
6638
6710
  canProceed: false,
6639
6711
  errors: [
6640
6712
  // @ts-ignore
6641
- _this41.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
6713
+ _this42.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
6642
6714
  clientErrorCode: _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MISSING_ROAP_ANSWER_CLIENT_CODE
6643
6715
  })]
6644
6716
  },
6645
6717
  options: {
6646
- meetingId: _this41.id,
6718
+ meetingId: _this42.id,
6647
6719
  rawError: new Error('Timeout waiting for SDP answer')
6648
6720
  }
6649
6721
  });
6650
6722
  deferSDPAnswer.reject(new Error('Timed out waiting for REMOTE SDP ANSWER'));
6651
6723
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
6652
6724
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
6653
- return _context24.abrupt("return", deferSDPAnswer.promise);
6725
+ return _context25.abrupt("return", deferSDPAnswer.promise);
6654
6726
  case 8:
6655
6727
  case "end":
6656
- return _context24.stop();
6728
+ return _context25.stop();
6657
6729
  }
6658
- }, _callee24, this);
6730
+ }, _callee25, this);
6659
6731
  }));
6660
6732
  function waitForRemoteSDPAnswer() {
6661
6733
  return _waitForRemoteSDPAnswer.apply(this, arguments);
@@ -6674,30 +6746,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6674
6746
  }, {
6675
6747
  key: "retryEstablishMediaConnectionWithForcedTurnDiscovery",
6676
6748
  value: (function () {
6677
- var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(remoteMediaManagerConfig, bundlePolicy) {
6749
+ var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(remoteMediaManagerConfig, bundlePolicy) {
6678
6750
  var LOG_HEADER;
6679
- return _regenerator.default.wrap(function _callee25$(_context25) {
6680
- while (1) switch (_context25.prev = _context25.next) {
6751
+ return _regenerator.default.wrap(function _callee26$(_context26) {
6752
+ while (1) switch (_context26.prev = _context26.next) {
6681
6753
  case 0:
6682
6754
  LOG_HEADER = 'Meeting:index#addMedia():retryEstablishMediaConnectionWithForcedTurnDiscovery -->';
6683
- _context25.prev = 1;
6684
- _context25.next = 4;
6755
+ _context26.prev = 1;
6756
+ _context26.next = 4;
6685
6757
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
6686
6758
  case 4:
6687
- _context25.next = 10;
6759
+ _context26.next = 10;
6688
6760
  break;
6689
6761
  case 6:
6690
- _context25.prev = 6;
6691
- _context25.t0 = _context25["catch"](1);
6692
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _context25.t0);
6693
- throw _context25.t0;
6762
+ _context26.prev = 6;
6763
+ _context26.t0 = _context26["catch"](1);
6764
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _context26.t0);
6765
+ throw _context26.t0;
6694
6766
  case 10:
6695
6767
  case "end":
6696
- return _context25.stop();
6768
+ return _context26.stop();
6697
6769
  }
6698
- }, _callee25, this, [[1, 6]]);
6770
+ }, _callee26, this, [[1, 6]]);
6699
6771
  }));
6700
- function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x19, _x20) {
6772
+ function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x20, _x21) {
6701
6773
  return _retryEstablishMediaConnectionWithForcedTurnDiscovery.apply(this, arguments);
6702
6774
  }
6703
6775
  return retryEstablishMediaConnectionWithForcedTurnDiscovery;
@@ -6715,14 +6787,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6715
6787
  }, {
6716
6788
  key: "retryWithForcedTurnDiscovery",
6717
6789
  value: (function () {
6718
- var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(remoteMediaManagerConfig, bundlePolicy) {
6790
+ var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(remoteMediaManagerConfig, bundlePolicy) {
6719
6791
  var LOG_HEADER;
6720
- return _regenerator.default.wrap(function _callee26$(_context26) {
6721
- while (1) switch (_context26.prev = _context26.next) {
6792
+ return _regenerator.default.wrap(function _callee27$(_context27) {
6793
+ while (1) switch (_context27.prev = _context27.next) {
6722
6794
  case 0:
6723
6795
  this.addMediaData.retriedWithTurnServer = true;
6724
6796
  LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
6725
- _context26.next = 4;
6797
+ _context27.next = 4;
6726
6798
  return this.cleanUpBeforeRetryWithTurnServer();
6727
6799
  case 4:
6728
6800
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_RETRY, {
@@ -6732,24 +6804,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6732
6804
  reason: 'forcingTurnTls'
6733
6805
  });
6734
6806
  if (!(this.state === _constants.MEETING_STATE.STATES.LEFT)) {
6735
- _context26.next = 9;
6807
+ _context27.next = 9;
6736
6808
  break;
6737
6809
  }
6738
6810
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. "));
6739
- _context26.next = 9;
6811
+ _context27.next = 9;
6740
6812
  return this.join({
6741
6813
  rejoin: true
6742
6814
  });
6743
6815
  case 9:
6744
- _context26.next = 11;
6816
+ _context27.next = 11;
6745
6817
  return this.retryEstablishMediaConnectionWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
6746
6818
  case 11:
6747
6819
  case "end":
6748
- return _context26.stop();
6820
+ return _context27.stop();
6749
6821
  }
6750
- }, _callee26, this);
6822
+ }, _callee27, this);
6751
6823
  }));
6752
- function retryWithForcedTurnDiscovery(_x21, _x22) {
6824
+ function retryWithForcedTurnDiscovery(_x22, _x23) {
6753
6825
  return _retryWithForcedTurnDiscovery.apply(this, arguments);
6754
6826
  }
6755
6827
  return retryWithForcedTurnDiscovery;
@@ -6769,32 +6841,32 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6769
6841
  }, {
6770
6842
  key: "handleWaitForMediaConnectionConnectedError",
6771
6843
  value: (function () {
6772
- var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(error, remoteMediaManagerConfig, bundlePolicy) {
6844
+ var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(error, remoteMediaManagerConfig, bundlePolicy) {
6773
6845
  var LOG_HEADER;
6774
- return _regenerator.default.wrap(function _callee27$(_context27) {
6775
- while (1) switch (_context27.prev = _context27.next) {
6846
+ return _regenerator.default.wrap(function _callee28$(_context28) {
6847
+ while (1) switch (_context28.prev = _context28.next) {
6776
6848
  case 0:
6777
6849
  LOG_HEADER = 'Meeting:index#addMedia():handleWaitForMediaConnectionConnectedError -->'; // @ts-ignore - config coming from registerPlugin
6778
6850
  if (this.turnServerUsed) {
6779
- _context27.next = 7;
6851
+ _context28.next = 7;
6780
6852
  break;
6781
6853
  }
6782
6854
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " error waiting for media to connect on UDP, TCP, retrying using TURN-TLS, "), error);
6783
- _context27.next = 5;
6855
+ _context28.next = 5;
6784
6856
  return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
6785
6857
  case 5:
6786
- _context27.next = 9;
6858
+ _context28.next = 9;
6787
6859
  break;
6788
6860
  case 7:
6789
6861
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
6790
6862
  throw new _webexErrors.AddMediaFailed();
6791
6863
  case 9:
6792
6864
  case "end":
6793
- return _context27.stop();
6865
+ return _context28.stop();
6794
6866
  }
6795
- }, _callee27, this);
6867
+ }, _callee28, this);
6796
6868
  }));
6797
- function handleWaitForMediaConnectionConnectedError(_x23, _x24, _x25) {
6869
+ function handleWaitForMediaConnectionConnectedError(_x24, _x25, _x26) {
6798
6870
  return _handleWaitForMediaConnectionConnectedError.apply(this, arguments);
6799
6871
  }
6800
6872
  return handleWaitForMediaConnectionConnectedError;
@@ -6810,20 +6882,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6810
6882
  }, {
6811
6883
  key: "doTurnDiscovery",
6812
6884
  value: (function () {
6813
- var _doTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(isReconnecting, isForced) {
6885
+ var _doTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(isReconnecting, isForced) {
6814
6886
  var cdl, turnDiscoveryResult;
6815
- return _regenerator.default.wrap(function _callee28$(_context28) {
6816
- while (1) switch (_context28.prev = _context28.next) {
6887
+ return _regenerator.default.wrap(function _callee29$(_context29) {
6888
+ while (1) switch (_context29.prev = _context29.next) {
6817
6889
  case 0:
6818
6890
  // @ts-ignore
6819
6891
  cdl = this.webex.internal.newMetrics.callDiagnosticLatencies; // @ts-ignore
6820
6892
  this.webex.internal.newMetrics.submitInternalEvent({
6821
6893
  name: 'internal.client.add-media.turn-discovery.start'
6822
6894
  });
6823
- _context28.next = 4;
6895
+ _context29.next = 4;
6824
6896
  return this.roap.doTurnDiscovery(this, isReconnecting, isForced);
6825
6897
  case 4:
6826
- turnDiscoveryResult = _context28.sent;
6898
+ turnDiscoveryResult = _context29.sent;
6827
6899
  this.turnDiscoverySkippedReason = turnDiscoveryResult === null || turnDiscoveryResult === void 0 ? void 0 : turnDiscoveryResult.turnDiscoverySkippedReason;
6828
6900
  this.turnServerUsed = !this.turnDiscoverySkippedReason;
6829
6901
 
@@ -6839,14 +6911,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6839
6911
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer
6840
6912
  });
6841
6913
  }
6842
- return _context28.abrupt("return", turnDiscoveryResult);
6914
+ return _context29.abrupt("return", turnDiscoveryResult);
6843
6915
  case 10:
6844
6916
  case "end":
6845
- return _context28.stop();
6917
+ return _context29.stop();
6846
6918
  }
6847
- }, _callee28, this);
6919
+ }, _callee29, this);
6848
6920
  }));
6849
- function doTurnDiscovery(_x26, _x27) {
6921
+ function doTurnDiscovery(_x27, _x28) {
6850
6922
  return _doTurnDiscovery.apply(this, arguments);
6851
6923
  }
6852
6924
  return doTurnDiscovery;
@@ -6865,35 +6937,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6865
6937
  }, {
6866
6938
  key: "establishMediaConnection",
6867
6939
  value: (function () {
6868
- var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
6940
+ var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
6869
6941
  var _this$locusMediaReque;
6870
6942
  var LOG_HEADER, isReconnecting, _yield$this$doTurnDis, mc;
6871
- return _regenerator.default.wrap(function _callee29$(_context29) {
6872
- while (1) switch (_context29.prev = _context29.next) {
6943
+ return _regenerator.default.wrap(function _callee30$(_context30) {
6944
+ while (1) switch (_context30.prev = _context30.next) {
6873
6945
  case 0:
6874
6946
  LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->';
6875
6947
  isReconnecting = this.isMoveToInProgress || !!((_this$locusMediaReque = this.locusMediaRequest) !== null && _this$locusMediaReque !== void 0 && _this$locusMediaReque.isConfluenceCreated()); // We are forcing turn discovery if the case is moveTo and a turn server was used already
6876
6948
  if (this.isMoveToInProgress && this.turnServerUsed) {
6877
6949
  isForced = true;
6878
6950
  }
6879
- _context29.prev = 3;
6951
+ _context30.prev = 3;
6880
6952
  if (turnServerInfo) {
6881
- _context29.next = 9;
6953
+ _context30.next = 9;
6882
6954
  break;
6883
6955
  }
6884
- _context29.next = 7;
6956
+ _context30.next = 7;
6885
6957
  return this.doTurnDiscovery(isReconnecting, isForced);
6886
6958
  case 7:
6887
- _yield$this$doTurnDis = _context29.sent;
6959
+ _yield$this$doTurnDis = _context30.sent;
6888
6960
  turnServerInfo = _yield$this$doTurnDis.turnServerInfo;
6889
6961
  case 9:
6890
- _context29.next = 11;
6962
+ _context30.next = 11;
6891
6963
  return this.createMediaConnection(turnServerInfo, bundlePolicy);
6892
6964
  case 11:
6893
- mc = _context29.sent;
6965
+ mc = _context30.sent;
6894
6966
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created"));
6895
6967
  if (!this.isMultistream) {
6896
- _context29.next = 21;
6968
+ _context30.next = 21;
6897
6969
  break;
6898
6970
  }
6899
6971
  this.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(this.receiveSlotManager, this.mediaRequestManagers, remoteMediaManagerConfig);
@@ -6901,42 +6973,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6901
6973
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.InterpretationAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_INTERPRETATION_AUDIO_CREATED);
6902
6974
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
6903
6975
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
6904
- _context29.next = 21;
6976
+ _context30.next = 21;
6905
6977
  return this.remoteMediaManager.start();
6906
6978
  case 21:
6907
- _context29.next = 23;
6979
+ _context30.next = 23;
6908
6980
  return mc.initiateOffer();
6909
6981
  case 23:
6910
- _context29.next = 25;
6982
+ _context30.next = 25;
6911
6983
  return this.waitForRemoteSDPAnswer();
6912
6984
  case 25:
6913
6985
  this.handleMediaLogging(this.mediaProperties);
6914
- _context29.next = 32;
6986
+ _context30.next = 32;
6915
6987
  break;
6916
6988
  case 28:
6917
- _context29.prev = 28;
6918
- _context29.t0 = _context29["catch"](3);
6919
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _context29.t0);
6920
- throw _context29.t0;
6989
+ _context30.prev = 28;
6990
+ _context30.t0 = _context30["catch"](3);
6991
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _context30.t0);
6992
+ throw _context30.t0;
6921
6993
  case 32:
6922
- _context29.prev = 32;
6923
- _context29.next = 35;
6994
+ _context30.prev = 32;
6995
+ _context30.next = 35;
6924
6996
  return this.waitForMediaConnectionConnected();
6925
6997
  case 35:
6926
- _context29.next = 41;
6998
+ _context30.next = 41;
6927
6999
  break;
6928
7000
  case 37:
6929
- _context29.prev = 37;
6930
- _context29.t1 = _context29["catch"](32);
6931
- _context29.next = 41;
6932
- return this.handleWaitForMediaConnectionConnectedError(_context29.t1, remoteMediaManagerConfig, bundlePolicy);
7001
+ _context30.prev = 37;
7002
+ _context30.t1 = _context30["catch"](32);
7003
+ _context30.next = 41;
7004
+ return this.handleWaitForMediaConnectionConnectedError(_context30.t1, remoteMediaManagerConfig, bundlePolicy);
6933
7005
  case 41:
6934
7006
  case "end":
6935
- return _context29.stop();
7007
+ return _context30.stop();
6936
7008
  }
6937
- }, _callee29, this, [[3, 28], [32, 37]]);
7009
+ }, _callee30, this, [[3, 28], [32, 37]]);
6938
7010
  }));
6939
- function establishMediaConnection(_x28, _x29, _x30, _x31) {
7011
+ function establishMediaConnection(_x29, _x30, _x31, _x32) {
6940
7012
  return _establishMediaConnection.apply(this, arguments);
6941
7013
  }
6942
7014
  return establishMediaConnection;
@@ -6951,22 +7023,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6951
7023
  }, {
6952
7024
  key: "cleanUpOnAddMediaFailure",
6953
7025
  value: (function () {
6954
- var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30() {
6955
- return _regenerator.default.wrap(function _callee30$(_context30) {
6956
- while (1) switch (_context30.prev = _context30.next) {
7026
+ var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31() {
7027
+ return _regenerator.default.wrap(function _callee31$(_context31) {
7028
+ while (1) switch (_context31.prev = _context31.next) {
6957
7029
  case 0:
6958
7030
  if (!this.statsAnalyzer) {
6959
- _context30.next = 3;
7031
+ _context31.next = 3;
6960
7032
  break;
6961
7033
  }
6962
- _context30.next = 3;
7034
+ _context31.next = 3;
6963
7035
  return this.statsAnalyzer.stopAnalyzer();
6964
7036
  case 3:
6965
7037
  this.statsAnalyzer = null;
6966
7038
 
6967
7039
  // when media fails, we want to upload a webrtc dump to see whats going on
6968
7040
  // this function is async, but returns once the stats have been gathered
6969
- _context30.next = 6;
7041
+ _context31.next = 6;
6970
7042
  return this.forceSendStatsReport({
6971
7043
  callFrom: 'addMedia'
6972
7044
  });
@@ -6977,9 +7049,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6977
7049
  }
6978
7050
  case 7:
6979
7051
  case "end":
6980
- return _context30.stop();
7052
+ return _context31.stop();
6981
7053
  }
6982
- }, _callee30, this);
7054
+ }, _callee31, this);
6983
7055
  }));
6984
7056
  function cleanUpOnAddMediaFailure() {
6985
7057
  return _cleanUpOnAddMediaFailure.apply(this, arguments);
@@ -6997,11 +7069,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6997
7069
  }, {
6998
7070
  key: "cleanUpBeforeRetryWithTurnServer",
6999
7071
  value: (function () {
7000
- var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31() {
7001
- return _regenerator.default.wrap(function _callee31$(_context31) {
7002
- while (1) switch (_context31.prev = _context31.next) {
7072
+ var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
7073
+ return _regenerator.default.wrap(function _callee32$(_context32) {
7074
+ while (1) switch (_context32.prev = _context32.next) {
7003
7075
  case 0:
7004
- _context31.next = 2;
7076
+ _context32.next = 2;
7005
7077
  return this.forceSendStatsReport({
7006
7078
  callFrom: 'cleanUpBeforeRetryWithTurnServer'
7007
7079
  });
@@ -7021,9 +7093,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7021
7093
  }
7022
7094
  case 3:
7023
7095
  case "end":
7024
- return _context31.stop();
7096
+ return _context32.stop();
7025
7097
  }
7026
- }, _callee31, this);
7098
+ }, _callee32, this);
7027
7099
  }));
7028
7100
  function cleanUpBeforeRetryWithTurnServer() {
7029
7101
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
@@ -7033,34 +7105,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7033
7105
  }, {
7034
7106
  key: "cleanUpBeforeReconnection",
7035
7107
  value: function () {
7036
- var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
7037
- return _regenerator.default.wrap(function _callee32$(_context32) {
7038
- while (1) switch (_context32.prev = _context32.next) {
7108
+ var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33() {
7109
+ return _regenerator.default.wrap(function _callee33$(_context33) {
7110
+ while (1) switch (_context33.prev = _context33.next) {
7039
7111
  case 0:
7040
- _context32.prev = 0;
7041
- _context32.next = 3;
7112
+ _context33.prev = 0;
7113
+ _context33.next = 3;
7042
7114
  return this.forceSendStatsReport({
7043
7115
  callFrom: 'cleanUpBeforeReconnection'
7044
7116
  });
7045
7117
  case 3:
7046
7118
  if (!this.statsAnalyzer) {
7047
- _context32.next = 6;
7119
+ _context33.next = 6;
7048
7120
  break;
7049
7121
  }
7050
- _context32.next = 6;
7122
+ _context33.next = 6;
7051
7123
  return this.statsAnalyzer.stopAnalyzer();
7052
7124
  case 6:
7053
- _context32.next = 11;
7125
+ _context33.next = 11;
7054
7126
  break;
7055
7127
  case 8:
7056
- _context32.prev = 8;
7057
- _context32.t0 = _context32["catch"](0);
7058
- _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _context32.t0);
7128
+ _context33.prev = 8;
7129
+ _context33.t0 = _context33["catch"](0);
7130
+ _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _context33.t0);
7059
7131
  case 11:
7060
7132
  case "end":
7061
- return _context32.stop();
7133
+ return _context33.stop();
7062
7134
  }
7063
- }, _callee32, this, [[0, 8]]);
7135
+ }, _callee33, this, [[0, 8]]);
7064
7136
  }));
7065
7137
  function cleanUpBeforeReconnection() {
7066
7138
  return _cleanUpBeforeReconnection.apply(this, arguments);
@@ -7107,10 +7179,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7107
7179
  }, {
7108
7180
  key: "addMedia",
7109
7181
  value: function addMedia() {
7110
- var _this42 = this;
7182
+ var _this43 = this;
7111
7183
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7112
7184
  return this.addMediaInternal(function () {
7113
- return _this42.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7185
+ return _this43.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7114
7186
  }, undefined, false, options);
7115
7187
  }
7116
7188
 
@@ -7128,7 +7200,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7128
7200
  }, {
7129
7201
  key: "addMediaInternal",
7130
7202
  value: (function () {
7131
- var _addMediaInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
7203
+ var _addMediaInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
7132
7204
  var options,
7133
7205
  LOG_HEADER,
7134
7206
  localStreams,
@@ -7176,24 +7248,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7176
7248
  _selectedCandidatePairChanges,
7177
7249
  _numTransports,
7178
7250
  _iceCandidateErrors,
7179
- _args33 = arguments;
7180
- return _regenerator.default.wrap(function _callee33$(_context33) {
7181
- while (1) switch (_context33.prev = _context33.next) {
7251
+ _args34 = arguments;
7252
+ return _regenerator.default.wrap(function _callee34$(_context34) {
7253
+ while (1) switch (_context34.prev = _context34.next) {
7182
7254
  case 0:
7183
- options = _args33.length > 3 && _args33[3] !== undefined ? _args33[3] : {};
7255
+ options = _args34.length > 3 && _args34[3] !== undefined ? _args34[3] : {};
7184
7256
  this.addMediaData.retriedWithTurnServer = false;
7185
7257
  this.addMediaData.icePhaseCallback = icePhaseCallback;
7186
7258
  this.hasMediaConnectionConnectedAtLeastOnce = false;
7187
7259
  LOG_HEADER = 'Meeting:index#addMedia -->';
7188
7260
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: options=").concat((0, _stringify.default)(options), ", turnServerInfo=").concat((0, _stringify.default)(turnServerInfo), ", forceTurnDiscovery=").concat(forceTurnDiscovery));
7189
7261
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
7190
- _context33.next = 8;
7262
+ _context34.next = 8;
7191
7263
  break;
7192
7264
  }
7193
7265
  throw new _webexErrors.MeetingNotActiveError();
7194
7266
  case 8:
7195
7267
  if (!_util2.default.isUserInLeftState(this.locusInfo)) {
7196
- _context33.next = 10;
7268
+ _context34.next = 10;
7197
7269
  break;
7198
7270
  }
7199
7271
  throw new _webexErrors.UserNotJoinedError();
@@ -7204,7 +7276,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7204
7276
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
7205
7277
  // @ts-ignore - isUserUnadmitted coming from SelfUtil
7206
7278
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
7207
- _context33.next = 14;
7279
+ _context34.next = 14;
7208
7280
  break;
7209
7281
  }
7210
7282
  throw new _webexErrors.UserInLobbyError();
@@ -7247,33 +7319,33 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7247
7319
  });
7248
7320
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
7249
7321
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
7250
- _context33.prev = 18;
7251
- _context33.next = 21;
7322
+ _context34.prev = 18;
7323
+ _context34.next = 21;
7252
7324
  return this.setUpLocalStreamReferences(localStreams);
7253
7325
  case 21:
7254
7326
  this.setMercuryListener();
7255
7327
  this.createStatsAnalyzer();
7256
- _context33.next = 25;
7328
+ _context34.next = 25;
7257
7329
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
7258
7330
  case 25:
7259
7331
  if (!this.mediaProperties.hasLocalShareStream()) {
7260
- _context33.next = 28;
7332
+ _context34.next = 28;
7261
7333
  break;
7262
7334
  }
7263
- _context33.next = 28;
7335
+ _context34.next = 28;
7264
7336
  return this.enqueueScreenShareFloorRequest();
7265
7337
  case 28:
7266
- _context33.next = 30;
7338
+ _context34.next = 30;
7267
7339
  return this.mediaProperties.getCurrentConnectionInfo();
7268
7340
  case 30:
7269
- _yield$this$mediaProp = _context33.sent;
7341
+ _yield$this$mediaProp = _context34.sent;
7270
7342
  connectionType = _yield$this$mediaProp.connectionType;
7271
7343
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
7272
7344
  numTransports = _yield$this$mediaProp.numTransports;
7273
- _context33.next = 36;
7345
+ _context34.next = 36;
7274
7346
  return this.webex.meetings.reachability.getReachabilityMetrics();
7275
7347
  case 36:
7276
- reachabilityStats = _context33.sent;
7348
+ reachabilityStats = _context34.sent;
7277
7349
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7278
7350
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
7279
7351
  correlation_id: this.correlationId,
@@ -7299,31 +7371,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7299
7371
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
7300
7372
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
7301
7373
  this.startPeriodicLogUpload();
7302
- _context33.next = 63;
7374
+ _context34.next = 63;
7303
7375
  break;
7304
7376
  case 45:
7305
- _context33.prev = 45;
7306
- _context33.t0 = _context33["catch"](18);
7307
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context33.t0);
7377
+ _context34.prev = 45;
7378
+ _context34.t0 = _context34["catch"](18);
7379
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context34.t0);
7308
7380
 
7309
7381
  // @ts-ignore
7310
- _context33.next = 50;
7382
+ _context34.next = 50;
7311
7383
  return this.webex.meetings.reachability.getReachabilityMetrics();
7312
7384
  case 50:
7313
- reachabilityMetrics = _context33.sent;
7314
- _context33.next = 53;
7385
+ reachabilityMetrics = _context34.sent;
7386
+ _context34.next = 53;
7315
7387
  return this.mediaProperties.getCurrentConnectionInfo();
7316
7388
  case 53:
7317
- _yield$this$mediaProp2 = _context33.sent;
7389
+ _yield$this$mediaProp2 = _context34.sent;
7318
7390
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
7319
7391
  _numTransports = _yield$this$mediaProp2.numTransports;
7320
7392
  _iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7321
7393
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread(_objectSpread(_objectSpread({
7322
7394
  correlation_id: this.correlationId,
7323
7395
  locus_id: this.locusUrl.split('/').pop(),
7324
- reason: _context33.t0.message,
7325
- stack: _context33.t0.stack,
7326
- code: _context33.t0.code,
7396
+ reason: _context34.t0.message,
7397
+ stack: _context34.t0.stack,
7398
+ code: _context34.t0.code,
7327
7399
  selectedCandidatePairChanges: _selectedCandidatePairChanges,
7328
7400
  numTransports: _numTransports,
7329
7401
  turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
@@ -7337,7 +7409,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7337
7409
  }, reachabilityMetrics), _iceCandidateErrors), {}, {
7338
7410
  iceCandidatesCount: this.iceCandidatesCount
7339
7411
  }));
7340
- _context33.next = 60;
7412
+ _context34.next = 60;
7341
7413
  return this.cleanUpOnAddMediaFailure();
7342
7414
  case 60:
7343
7415
  // Upload logs on error while adding media
@@ -7345,23 +7417,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7345
7417
  file: 'meeting/index',
7346
7418
  function: 'addMedia'
7347
7419
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
7348
- if (_context33.t0 instanceof _internalMediaCore.Errors.SdpError) {
7420
+ if (_context34.t0 instanceof _internalMediaCore.Errors.SdpError) {
7349
7421
  this.leave({
7350
7422
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
7351
7423
  });
7352
7424
  }
7353
- throw _context33.t0;
7425
+ throw _context34.t0;
7354
7426
  case 63:
7355
- _context33.prev = 63;
7427
+ _context34.prev = 63;
7356
7428
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
7357
- return _context33.finish(63);
7429
+ return _context34.finish(63);
7358
7430
  case 66:
7359
7431
  case "end":
7360
- return _context33.stop();
7432
+ return _context34.stop();
7361
7433
  }
7362
- }, _callee33, this, [[18, 45, 63, 66]]);
7434
+ }, _callee34, this, [[18, 45, 63, 66]]);
7363
7435
  }));
7364
- function addMediaInternal(_x32, _x33, _x34) {
7436
+ function addMediaInternal(_x33, _x34, _x35) {
7365
7437
  return _addMediaInternal.apply(this, arguments);
7366
7438
  }
7367
7439
  return addMediaInternal;
@@ -7391,7 +7463,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7391
7463
  * @memberof Meeting
7392
7464
  */
7393
7465
  function enqueueMediaUpdate(mediaUpdateType) {
7394
- var _this43 = this;
7466
+ var _this44 = this;
7395
7467
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7396
7468
  var canUpdateMediaNow = this.canUpdateMedia();
7397
7469
  return new _promise.default(function (resolve, reject) {
@@ -7402,9 +7474,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7402
7474
  options: options
7403
7475
  };
7404
7476
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
7405
- _this43.queuedMediaUpdates.push(queueItem);
7477
+ _this44.queuedMediaUpdates.push(queueItem);
7406
7478
  if (canUpdateMediaNow) {
7407
- _this43.processNextQueuedMediaUpdate();
7479
+ _this44.processNextQueuedMediaUpdate();
7408
7480
  }
7409
7481
  });
7410
7482
  }
@@ -7427,35 +7499,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7427
7499
  * @memberof Meeting
7428
7500
  */
7429
7501
  function () {
7430
- var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(options) {
7502
+ var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(options) {
7431
7503
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled, _this$audio3, _this$video3;
7432
- return _regenerator.default.wrap(function _callee34$(_context34) {
7433
- while (1) switch (_context34.prev = _context34.next) {
7504
+ return _regenerator.default.wrap(function _callee35$(_context35) {
7505
+ while (1) switch (_context35.prev = _context35.next) {
7434
7506
  case 0:
7435
7507
  this.checkMediaConnection();
7436
7508
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
7437
7509
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
7438
7510
  if (this.canUpdateMedia()) {
7439
- _context34.next = 5;
7511
+ _context35.next = 5;
7440
7512
  break;
7441
7513
  }
7442
- return _context34.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
7514
+ return _context35.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
7443
7515
  case 5:
7444
7516
  if (!this.isMultistream) {
7445
- _context34.next = 10;
7517
+ _context35.next = 10;
7446
7518
  break;
7447
7519
  }
7448
7520
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
7449
- _context34.next = 8;
7521
+ _context35.next = 8;
7450
7522
  break;
7451
7523
  }
7452
7524
  throw new Error('toggling shareAudioEnabled or shareVideoEnabled in a multistream meeting is not supported, to control receiving screen share call meeting.remoteMediaManager.setLayout() with appropriate layout');
7453
7525
  case 8:
7454
- _context34.next = 12;
7526
+ _context35.next = 12;
7455
7527
  break;
7456
7528
  case 10:
7457
7529
  if (!(shareAudioEnabled !== undefined)) {
7458
- _context34.next = 12;
7530
+ _context35.next = 12;
7459
7531
  break;
7460
7532
  }
7461
7533
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -7480,20 +7552,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7480
7552
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
7481
7553
  }
7482
7554
  if (this.isMultistream) {
7483
- _context34.next = 18;
7555
+ _context35.next = 18;
7484
7556
  break;
7485
7557
  }
7486
- _context34.next = 18;
7558
+ _context35.next = 18;
7487
7559
  return this.updateTranscodedMediaConnection();
7488
7560
  case 18:
7489
- return _context34.abrupt("return", undefined);
7561
+ return _context35.abrupt("return", undefined);
7490
7562
  case 19:
7491
7563
  case "end":
7492
- return _context34.stop();
7564
+ return _context35.stop();
7493
7565
  }
7494
- }, _callee34, this);
7566
+ }, _callee35, this);
7495
7567
  }));
7496
- function updateMedia(_x35) {
7568
+ function updateMedia(_x36) {
7497
7569
  return _updateMedia.apply(this, arguments);
7498
7570
  }
7499
7571
  return updateMedia;
@@ -7509,7 +7581,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7509
7581
  }, {
7510
7582
  key: "acknowledge",
7511
7583
  value: function acknowledge(type) {
7512
- var _this44 = this;
7584
+ var _this45 = this;
7513
7585
  if (!type) {
7514
7586
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
7515
7587
  }
@@ -7521,12 +7593,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7521
7593
  }).then(function (response) {
7522
7594
  return _promise.default.resolve(response);
7523
7595
  }).then(function (response) {
7524
- _this44.meetingFiniteStateMachine.ring(type);
7596
+ _this45.meetingFiniteStateMachine.ring(type);
7525
7597
  // @ts-ignore
7526
- _this44.webex.internal.newMetrics.submitClientEvent({
7598
+ _this45.webex.internal.newMetrics.submitClientEvent({
7527
7599
  name: 'client.alert.displayed',
7528
7600
  options: {
7529
- meetingId: _this44.id
7601
+ meetingId: _this45.id
7530
7602
  }
7531
7603
  });
7532
7604
  return _promise.default.resolve({
@@ -7551,12 +7623,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7551
7623
  }, {
7552
7624
  key: "decline",
7553
7625
  value: function decline(reason) {
7554
- var _this45 = this;
7626
+ var _this46 = this;
7555
7627
  return _util2.default.declineMeeting(this, reason).then(function (decline) {
7556
- _this45.meetingFiniteStateMachine.decline();
7628
+ _this46.meetingFiniteStateMachine.decline();
7557
7629
  return _promise.default.resolve(decline);
7558
7630
  }).catch(function (error) {
7559
- _this45.meetingFiniteStateMachine.fail(error);
7631
+ _this46.meetingFiniteStateMachine.fail(error);
7560
7632
  return _promise.default.reject(error);
7561
7633
  });
7562
7634
  }
@@ -7607,7 +7679,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7607
7679
  }, {
7608
7680
  key: "leave",
7609
7681
  value: function leave() {
7610
- var _this46 = this;
7682
+ var _this47 = this;
7611
7683
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7612
7684
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
7613
7685
 
@@ -7619,7 +7691,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7619
7691
  var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7620
7692
  return (
7621
7693
  // @ts-ignore
7622
- _this46.webex.internal.newMetrics.submitClientEvent({
7694
+ _this47.webex.internal.newMetrics.submitClientEvent({
7623
7695
  name: 'client.call.leave',
7624
7696
  payload: _objectSpread({
7625
7697
  trigger: 'user-interaction',
@@ -7627,7 +7699,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7627
7699
  leaveReason: options.clientEventLeaveReason
7628
7700
  }, payload),
7629
7701
  options: {
7630
- meetingId: _this46.id
7702
+ meetingId: _this47.id
7631
7703
  }
7632
7704
  })
7633
7705
  );
@@ -7636,24 +7708,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7636
7708
  return _util2.default.leaveMeeting(this, options).then(function (leave) {
7637
7709
  // CA team recommends submitting this *after* locus /leave
7638
7710
  submitLeaveMetric();
7639
- _this46.meetingFiniteStateMachine.leave();
7640
- _this46.clearMeetingData();
7711
+ _this47.meetingFiniteStateMachine.leave();
7712
+ _this47.clearMeetingData();
7641
7713
 
7642
7714
  // upload logs on leave irrespective of meeting delete
7643
- _triggerProxy.default.trigger(_this46, {
7715
+ _triggerProxy.default.trigger(_this47, {
7644
7716
  file: 'meeting/index',
7645
7717
  function: 'leave'
7646
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this46);
7718
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
7647
7719
 
7648
7720
  // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
7649
- if (_this46.wirelessShare || _this46.guest) {
7721
+ if (_this47.wirelessShare || _this47.guest) {
7650
7722
  // If screen sharing clean the meeting object
7651
- _triggerProxy.default.trigger(_this46, {
7723
+ _triggerProxy.default.trigger(_this47, {
7652
7724
  file: 'meeting/index',
7653
7725
  function: 'leave'
7654
7726
  }, _constants.EVENTS.DESTROY_MEETING, {
7655
7727
  reason: options.reason,
7656
- meetingId: _this46.id
7728
+ meetingId: _this47.id
7657
7729
  });
7658
7730
  }
7659
7731
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
@@ -7670,16 +7742,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7670
7742
  shownToUser: false
7671
7743
  }]
7672
7744
  });
7673
- _this46.meetingFiniteStateMachine.fail(error);
7745
+ _this47.meetingFiniteStateMachine.fail(error);
7674
7746
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
7675
7747
  // upload logs on leave irrespective of meeting delete
7676
- _triggerProxy.default.trigger(_this46, {
7748
+ _triggerProxy.default.trigger(_this47, {
7677
7749
  file: 'meeting/index',
7678
7750
  function: 'leave'
7679
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this46);
7751
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
7680
7752
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
7681
- correlation_id: _this46.correlationId,
7682
- locus_id: _this46.locusUrl.split('/').pop(),
7753
+ correlation_id: _this47.correlationId,
7754
+ locus_id: _this47.locusUrl.split('/').pop(),
7683
7755
  reason: error.message,
7684
7756
  stack: error.stack,
7685
7757
  code: error.code
@@ -7699,7 +7771,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7699
7771
  }, {
7700
7772
  key: "startWhiteboardShare",
7701
7773
  value: function startWhiteboardShare(channelUrl, resourceToken) {
7702
- var _this47 = this;
7774
+ var _this48 = this;
7703
7775
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
7704
7776
  return element.name === 'whiteboard';
7705
7777
  });
@@ -7728,13 +7800,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7728
7800
  body.resourceToken = resourceToken;
7729
7801
  }
7730
7802
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
7731
- _this47.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
7803
+ _this48.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
7732
7804
  return _promise.default.resolve();
7733
7805
  }).catch(function (error) {
7734
7806
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
7735
7807
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
7736
- correlation_id: _this47.correlationId,
7737
- locus_id: _this47.locusUrl.split('/').pop(),
7808
+ correlation_id: _this48.correlationId,
7809
+ locus_id: _this48.locusUrl.split('/').pop(),
7738
7810
  reason: error.message,
7739
7811
  stack: error.stack,
7740
7812
  board: {
@@ -7757,7 +7829,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7757
7829
  }, {
7758
7830
  key: "stopWhiteboardShare",
7759
7831
  value: function stopWhiteboardShare(channelUrl) {
7760
- var _this48 = this;
7832
+ var _this49 = this;
7761
7833
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
7762
7834
  return element.name === 'whiteboard';
7763
7835
  });
@@ -7780,8 +7852,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7780
7852
  }).catch(function (error) {
7781
7853
  _loggerProxy.default.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
7782
7854
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_STOP_WHITEBOARD_SHARE_FAILURE, {
7783
- correlation_id: _this48.correlationId,
7784
- locus_id: _this48.locusUrl.split('/').pop(),
7855
+ correlation_id: _this49.correlationId,
7856
+ locus_id: _this49.locusUrl.split('/').pop(),
7785
7857
  reason: error.message,
7786
7858
  stack: error.stack,
7787
7859
  board: {
@@ -7803,7 +7875,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7803
7875
  }, {
7804
7876
  key: "requestScreenShareFloor",
7805
7877
  value: function requestScreenShareFloor() {
7806
- var _this49 = this;
7878
+ var _this50 = this;
7807
7879
  if (!this.mediaProperties.hasLocalShareStream() || !this.mediaProperties.mediaDirection.sendShare) {
7808
7880
  _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, ")"));
7809
7881
  this.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
@@ -7834,34 +7906,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7834
7906
  resourceUrl: this.resourceUrl,
7835
7907
  shareInstanceId: this.localShareInstanceId
7836
7908
  }).then(function () {
7837
- _this49.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
7909
+ _this50.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
7838
7910
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_SUCCESS, {
7839
- correlation_id: _this49.correlationId,
7840
- locus_id: _this49.locusUrl.split('/').pop()
7911
+ correlation_id: _this50.correlationId,
7912
+ locus_id: _this50.locusUrl.split('/').pop()
7841
7913
  });
7842
7914
  return _promise.default.resolve();
7843
7915
  }).catch(function (error) {
7844
7916
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
7845
7917
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
7846
- correlation_id: _this49.correlationId,
7847
- locus_id: _this49.locusUrl.split('/').pop(),
7918
+ correlation_id: _this50.correlationId,
7919
+ locus_id: _this50.locusUrl.split('/').pop(),
7848
7920
  reason: error.message,
7849
7921
  stack: error.stack
7850
7922
  });
7851
7923
 
7852
7924
  // @ts-ignore
7853
- _this49.webex.internal.newMetrics.submitClientEvent({
7925
+ _this50.webex.internal.newMetrics.submitClientEvent({
7854
7926
  name: 'client.share.floor-granted.local',
7855
7927
  payload: {
7856
7928
  mediaType: 'share',
7857
7929
  errors: _util2.default.getChangeMeetingFloorErrorPayload(error.message),
7858
- shareInstanceId: _this49.localShareInstanceId
7930
+ shareInstanceId: _this50.localShareInstanceId
7859
7931
  },
7860
7932
  options: {
7861
- meetingId: _this49.id
7933
+ meetingId: _this50.id
7862
7934
  }
7863
7935
  });
7864
- _this49.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
7936
+ _this50.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
7865
7937
  return _promise.default.reject(error);
7866
7938
  });
7867
7939
  }
@@ -7884,10 +7956,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7884
7956
  }, {
7885
7957
  key: "requestScreenShareFloorIfPending",
7886
7958
  value: function requestScreenShareFloorIfPending() {
7887
- var _this50 = this;
7959
+ var _this51 = this;
7888
7960
  if (this.floorGrantPending && this.state === _constants.MEETING_STATE.STATES.JOINED) {
7889
7961
  this.requestScreenShareFloor().then(function () {
7890
- _this50.floorGrantPending = false;
7962
+ _this51.floorGrantPending = false;
7891
7963
  });
7892
7964
  }
7893
7965
  }
@@ -7901,7 +7973,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7901
7973
  }, {
7902
7974
  key: "releaseScreenShareFloor",
7903
7975
  value: function releaseScreenShareFloor() {
7904
- var _this51 = this;
7976
+ var _this52 = this;
7905
7977
  var content = this.locusInfo.mediaShares.find(function (element) {
7906
7978
  return element.name === _constants.CONTENT;
7907
7979
  });
@@ -7936,8 +8008,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7936
8008
  }).catch(function (error) {
7937
8009
  _loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
7938
8010
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
7939
- correlation_id: _this51.correlationId,
7940
- locus_id: _this51.locusUrl.split('/').pop(),
8011
+ correlation_id: _this52.correlationId,
8012
+ locus_id: _this52.locusUrl.split('/').pop(),
7941
8013
  reason: error.message,
7942
8014
  stack: error.stack
7943
8015
  });
@@ -8117,7 +8189,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8117
8189
  }, {
8118
8190
  key: "changeVideoLayout",
8119
8191
  value: function changeVideoLayout(layoutType) {
8120
- var _this52 = this;
8192
+ var _this53 = this;
8121
8193
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8122
8194
  var main = renderInfo.main,
8123
8195
  content = renderInfo.content;
@@ -8171,7 +8243,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8171
8243
  }
8172
8244
  this.lastVideoLayoutInfo = (0, _lodash.cloneDeep)(layoutInfo);
8173
8245
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
8174
- _triggerProxy.default.trigger(_this52, {
8246
+ _triggerProxy.default.trigger(_this53, {
8175
8247
  file: 'meeting/index',
8176
8248
  function: 'changeVideoLayout'
8177
8249
  }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
@@ -8287,7 +8359,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8287
8359
  }, {
8288
8360
  key: "endMeetingForAll",
8289
8361
  value: function endMeetingForAll() {
8290
- var _this53 = this;
8362
+ var _this54 = this;
8291
8363
  // @ts-ignore
8292
8364
  this.webex.internal.newMetrics.submitClientEvent({
8293
8365
  name: 'client.call.leave',
@@ -8305,25 +8377,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8305
8377
  locus_id: this.locusId
8306
8378
  });
8307
8379
  return _util2.default.endMeetingForAll(this).then(function (end) {
8308
- _this53.meetingFiniteStateMachine.end();
8309
- _this53.clearMeetingData();
8380
+ _this54.meetingFiniteStateMachine.end();
8381
+ _this54.clearMeetingData();
8310
8382
  // upload logs on leave irrespective of meeting delete
8311
- _triggerProxy.default.trigger(_this53, {
8383
+ _triggerProxy.default.trigger(_this54, {
8312
8384
  file: 'meeting/index',
8313
8385
  function: 'endMeetingForAll'
8314
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this53);
8386
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
8315
8387
  return end;
8316
8388
  }).catch(function (error) {
8317
- _this53.meetingFiniteStateMachine.fail(error);
8389
+ _this54.meetingFiniteStateMachine.fail(error);
8318
8390
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
8319
8391
  // upload logs on leave irrespective of meeting delete
8320
- _triggerProxy.default.trigger(_this53, {
8392
+ _triggerProxy.default.trigger(_this54, {
8321
8393
  file: 'meeting/index',
8322
8394
  function: 'endMeetingForAll'
8323
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this53);
8395
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
8324
8396
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
8325
- correlation_id: _this53.correlationId,
8326
- locus_id: _this53.locusUrl.split('/').pop(),
8397
+ correlation_id: _this54.correlationId,
8398
+ locus_id: _this54.locusUrl.split('/').pop(),
8327
8399
  reason: error.message,
8328
8400
  stack: error.stack,
8329
8401
  code: error.code
@@ -8412,39 +8484,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8412
8484
  }, {
8413
8485
  key: "enableMusicMode",
8414
8486
  value: (function () {
8415
- var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(shouldEnableMusicMode) {
8416
- return _regenerator.default.wrap(function _callee35$(_context35) {
8417
- while (1) switch (_context35.prev = _context35.next) {
8487
+ var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(shouldEnableMusicMode) {
8488
+ return _regenerator.default.wrap(function _callee36$(_context36) {
8489
+ while (1) switch (_context36.prev = _context36.next) {
8418
8490
  case 0:
8419
8491
  this.checkMediaConnection();
8420
8492
  if (this.isMultistream) {
8421
- _context35.next = 3;
8493
+ _context36.next = 3;
8422
8494
  break;
8423
8495
  }
8424
8496
  throw new Error('enableMusicMode() only supported with multistream');
8425
8497
  case 3:
8426
8498
  if (!shouldEnableMusicMode) {
8427
- _context35.next = 8;
8499
+ _context36.next = 8;
8428
8500
  break;
8429
8501
  }
8430
- _context35.next = 6;
8502
+ _context36.next = 6;
8431
8503
  return this.sendSlotManager.setCodecParameters(_internalMediaCore.MediaType.AudioMain, {
8432
8504
  maxaveragebitrate: '64000',
8433
8505
  maxplaybackrate: '48000'
8434
8506
  });
8435
8507
  case 6:
8436
- _context35.next = 10;
8508
+ _context36.next = 10;
8437
8509
  break;
8438
8510
  case 8:
8439
- _context35.next = 10;
8511
+ _context36.next = 10;
8440
8512
  return this.sendSlotManager.deleteCodecParameters(_internalMediaCore.MediaType.AudioMain, ['maxaveragebitrate', 'maxplaybackrate']);
8441
8513
  case 10:
8442
8514
  case "end":
8443
- return _context35.stop();
8515
+ return _context36.stop();
8444
8516
  }
8445
- }, _callee35, this);
8517
+ }, _callee36, this);
8446
8518
  }));
8447
- function enableMusicMode(_x36) {
8519
+ function enableMusicMode(_x37) {
8448
8520
  return _enableMusicMode.apply(this, arguments);
8449
8521
  }
8450
8522
  return enableMusicMode;
@@ -8465,7 +8537,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8465
8537
  _this$mediaProperties41,
8466
8538
  _this$mediaProperties42,
8467
8539
  _this$mediaProperties43,
8468
- _this54 = this;
8540
+ _this55 = this;
8469
8541
  var LOG_HEADER = 'Meeting:index#updateTranscodedMediaConnection -->';
8470
8542
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " starting"));
8471
8543
  if (!this.canUpdateMedia()) {
@@ -8490,8 +8562,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8490
8562
  }).catch(function (error) {
8491
8563
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error: "), error);
8492
8564
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
8493
- correlation_id: _this54.correlationId,
8494
- locus_id: _this54.locusUrl.split('/').pop(),
8565
+ correlation_id: _this55.correlationId,
8566
+ locus_id: _this55.locusUrl.split('/').pop(),
8495
8567
  reason: error.message,
8496
8568
  stack: error.stack
8497
8569
  });
@@ -8535,25 +8607,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8535
8607
  }, {
8536
8608
  key: "publishStream",
8537
8609
  value: (function () {
8538
- var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(mediaType, stream) {
8539
- return _regenerator.default.wrap(function _callee36$(_context36) {
8540
- while (1) switch (_context36.prev = _context36.next) {
8610
+ var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(mediaType, stream) {
8611
+ return _regenerator.default.wrap(function _callee37$(_context37) {
8612
+ while (1) switch (_context37.prev = _context37.next) {
8541
8613
  case 0:
8542
8614
  if (stream) {
8543
- _context36.next = 2;
8615
+ _context37.next = 2;
8544
8616
  break;
8545
8617
  }
8546
- return _context36.abrupt("return");
8618
+ return _context37.abrupt("return");
8547
8619
  case 2:
8548
8620
  if (!this.mediaProperties.webrtcMediaConnection) {
8549
- _context36.next = 7;
8621
+ _context37.next = 7;
8550
8622
  break;
8551
8623
  }
8552
8624
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
8553
- _context36.next = 6;
8625
+ _context37.next = 6;
8554
8626
  break;
8555
8627
  }
8556
- _context36.next = 6;
8628
+ _context37.next = 6;
8557
8629
  return this.sendSlotManager.publishStream(mediaType, stream);
8558
8630
  case 6:
8559
8631
  this.emitPublishStateChangeEvent({
@@ -8564,11 +8636,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8564
8636
  });
8565
8637
  case 7:
8566
8638
  case "end":
8567
- return _context36.stop();
8639
+ return _context37.stop();
8568
8640
  }
8569
- }, _callee36, this);
8641
+ }, _callee37, this);
8570
8642
  }));
8571
- function publishStream(_x37, _x38) {
8643
+ function publishStream(_x38, _x39) {
8572
8644
  return _publishStream.apply(this, arguments);
8573
8645
  }
8574
8646
  return publishStream;
@@ -8584,21 +8656,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8584
8656
  }, {
8585
8657
  key: "unpublishStream",
8586
8658
  value: (function () {
8587
- var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(mediaType, stream) {
8588
- return _regenerator.default.wrap(function _callee37$(_context37) {
8589
- while (1) switch (_context37.prev = _context37.next) {
8659
+ var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(mediaType, stream) {
8660
+ return _regenerator.default.wrap(function _callee38$(_context38) {
8661
+ while (1) switch (_context38.prev = _context38.next) {
8590
8662
  case 0:
8591
8663
  if (stream) {
8592
- _context37.next = 2;
8664
+ _context38.next = 2;
8593
8665
  break;
8594
8666
  }
8595
- return _context37.abrupt("return");
8667
+ return _context38.abrupt("return");
8596
8668
  case 2:
8597
8669
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
8598
- _context37.next = 5;
8670
+ _context38.next = 5;
8599
8671
  break;
8600
8672
  }
8601
- _context37.next = 5;
8673
+ _context38.next = 5;
8602
8674
  return this.sendSlotManager.unpublishStream(mediaType);
8603
8675
  case 5:
8604
8676
  this.emitPublishStateChangeEvent({
@@ -8609,11 +8681,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8609
8681
  });
8610
8682
  case 6:
8611
8683
  case "end":
8612
- return _context37.stop();
8684
+ return _context38.stop();
8613
8685
  }
8614
- }, _callee37, this);
8686
+ }, _callee38, this);
8615
8687
  }));
8616
- function unpublishStream(_x39, _x40) {
8688
+ function unpublishStream(_x40, _x41) {
8617
8689
  return _unpublishStream.apply(this, arguments);
8618
8690
  }
8619
8691
  return unpublishStream;
@@ -8628,19 +8700,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8628
8700
  }, {
8629
8701
  key: "publishStreams",
8630
8702
  value: (function () {
8631
- var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(streams) {
8703
+ var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(streams) {
8632
8704
  var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4, _streams$screenShare5, _streams$screenShare6;
8633
8705
  var streamChecks, _i, _streamChecks, _streamChecks$_i, stream, name, floorRequestNeeded, _streams$screenShare7;
8634
- return _regenerator.default.wrap(function _callee38$(_context38) {
8635
- while (1) switch (_context38.prev = _context38.next) {
8706
+ return _regenerator.default.wrap(function _callee39$(_context39) {
8707
+ while (1) switch (_context39.prev = _context39.next) {
8636
8708
  case 0:
8637
8709
  _loggerProxy.default.logger.info("Meeting:index#publishStreams --> called with: ".concat((0, _stringify.default)(streams)));
8638
8710
  this.checkMediaConnection();
8639
8711
  if (!(!streams.microphone && !streams.camera && !((_streams$screenShare = streams.screenShare) !== null && _streams$screenShare !== void 0 && _streams$screenShare.audio) && !((_streams$screenShare2 = streams.screenShare) !== null && _streams$screenShare2 !== void 0 && _streams$screenShare2.video))) {
8640
- _context38.next = 4;
8712
+ _context39.next = 4;
8641
8713
  break;
8642
8714
  }
8643
- return _context38.abrupt("return");
8715
+ return _context39.abrupt("return");
8644
8716
  case 4:
8645
8717
  streamChecks = [{
8646
8718
  stream: streams === null || streams === void 0 ? void 0 : streams.microphone,
@@ -8658,62 +8730,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8658
8730
  _i = 0, _streamChecks = streamChecks;
8659
8731
  case 6:
8660
8732
  if (!(_i < _streamChecks.length)) {
8661
- _context38.next = 13;
8733
+ _context39.next = 13;
8662
8734
  break;
8663
8735
  }
8664
8736
  _streamChecks$_i = _streamChecks[_i], stream = _streamChecks$_i.stream, name = _streamChecks$_i.name;
8665
8737
  if (!((stream === null || stream === void 0 ? void 0 : stream.readyState) === 'ended')) {
8666
- _context38.next = 10;
8738
+ _context39.next = 10;
8667
8739
  break;
8668
8740
  }
8669
8741
  throw new Error("Attempted to publish ".concat(name, " stream with ended readyState, correlationId=").concat(this.correlationId));
8670
8742
  case 10:
8671
8743
  _i++;
8672
- _context38.next = 6;
8744
+ _context39.next = 6;
8673
8745
  break;
8674
8746
  case 13:
8675
8747
  floorRequestNeeded = false; // Screenshare Audio is supported only in multi stream. So we check for screenshare audio presence only if it's a multi stream meeting
8676
8748
  if (!(this.isMultistream && (_streams$screenShare5 = streams.screenShare) !== null && _streams$screenShare5 !== void 0 && _streams$screenShare5.audio)) {
8677
- _context38.next = 18;
8749
+ _context39.next = 18;
8678
8750
  break;
8679
8751
  }
8680
- _context38.next = 17;
8752
+ _context39.next = 17;
8681
8753
  return this.setLocalShareAudioStream(streams.screenShare.audio);
8682
8754
  case 17:
8683
8755
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
8684
8756
  case 18:
8685
8757
  if (!((_streams$screenShare6 = streams.screenShare) !== null && _streams$screenShare6 !== void 0 && _streams$screenShare6.video)) {
8686
- _context38.next = 22;
8758
+ _context39.next = 22;
8687
8759
  break;
8688
8760
  }
8689
- _context38.next = 21;
8761
+ _context39.next = 21;
8690
8762
  return this.setLocalShareVideoStream((_streams$screenShare7 = streams.screenShare) === null || _streams$screenShare7 === void 0 ? void 0 : _streams$screenShare7.video);
8691
8763
  case 21:
8692
8764
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
8693
8765
  case 22:
8694
8766
  if (!streams.microphone) {
8695
- _context38.next = 25;
8767
+ _context39.next = 25;
8696
8768
  break;
8697
8769
  }
8698
- _context38.next = 25;
8770
+ _context39.next = 25;
8699
8771
  return this.setLocalAudioStream(streams.microphone);
8700
8772
  case 25:
8701
8773
  if (!streams.camera) {
8702
- _context38.next = 28;
8774
+ _context39.next = 28;
8703
8775
  break;
8704
8776
  }
8705
- _context38.next = 28;
8777
+ _context39.next = 28;
8706
8778
  return this.setLocalVideoStream(streams.camera);
8707
8779
  case 28:
8708
8780
  if (this.isMultistream) {
8709
- _context38.next = 31;
8781
+ _context39.next = 31;
8710
8782
  break;
8711
8783
  }
8712
- _context38.next = 31;
8784
+ _context39.next = 31;
8713
8785
  return this.updateTranscodedMediaConnection();
8714
8786
  case 31:
8715
8787
  if (!floorRequestNeeded) {
8716
- _context38.next = 37;
8788
+ _context39.next = 37;
8717
8789
  break;
8718
8790
  }
8719
8791
  this.localShareInstanceId = _uuid.default.v4();
@@ -8737,15 +8809,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8737
8809
  // we're sending the http request to Locus to request the screen share floor
8738
8810
  // only after the SDP update, because that's how it's always been done for transcoded meetings
8739
8811
  // and also if sharing from the start, we need confluence to have been created
8740
- _context38.next = 37;
8812
+ _context39.next = 37;
8741
8813
  return this.enqueueScreenShareFloorRequest();
8742
8814
  case 37:
8743
8815
  case "end":
8744
- return _context38.stop();
8816
+ return _context39.stop();
8745
8817
  }
8746
- }, _callee38, this);
8818
+ }, _callee39, this);
8747
8819
  }));
8748
- function publishStreams(_x41) {
8820
+ function publishStreams(_x42) {
8749
8821
  return _publishStreams.apply(this, arguments);
8750
8822
  }
8751
8823
  return publishStreams;
@@ -8760,10 +8832,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8760
8832
  }, {
8761
8833
  key: "unpublishStreams",
8762
8834
  value: (function () {
8763
- var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(streams) {
8835
+ var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40(streams) {
8764
8836
  var promises, _iterator, _step, stream;
8765
- return _regenerator.default.wrap(function _callee39$(_context39) {
8766
- while (1) switch (_context39.prev = _context39.next) {
8837
+ return _regenerator.default.wrap(function _callee40$(_context40) {
8838
+ while (1) switch (_context40.prev = _context40.next) {
8767
8839
  case 0:
8768
8840
  _loggerProxy.default.logger.info("Meeting:index#unpublishStreams --> called with: ".concat((0, _stringify.default)(streams)));
8769
8841
  this.checkMediaConnection();
@@ -8795,7 +8867,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8795
8867
  if (!this.isMultistream) {
8796
8868
  promises.push(this.updateTranscodedMediaConnection());
8797
8869
  }
8798
- _context39.next = 8;
8870
+ _context40.next = 8;
8799
8871
  return _promise.default.all(promises);
8800
8872
  case 8:
8801
8873
  // we're allowing for the SDK to support just audio share as well
@@ -8816,11 +8888,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8816
8888
  }
8817
8889
  case 9:
8818
8890
  case "end":
8819
- return _context39.stop();
8891
+ return _context40.stop();
8820
8892
  }
8821
- }, _callee39, this);
8893
+ }, _callee40, this);
8822
8894
  }));
8823
- function unpublishStreams(_x42) {
8895
+ function unpublishStreams(_x43) {
8824
8896
  return _unpublishStreams.apply(this, arguments);
8825
8897
  }
8826
8898
  return unpublishStreams;