@webex/plugin-meetings 3.0.0-beta.17 → 3.0.0-beta.19

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 (152) hide show
  1. package/dist/breakouts/breakout.js +116 -0
  2. package/dist/breakouts/breakout.js.map +1 -0
  3. package/dist/breakouts/collection.js +23 -0
  4. package/dist/breakouts/collection.js.map +1 -0
  5. package/dist/breakouts/index.js +226 -0
  6. package/dist/breakouts/index.js.map +1 -0
  7. package/dist/config.js +4 -1
  8. package/dist/config.js.map +1 -1
  9. package/dist/constants.js +38 -5
  10. package/dist/constants.js.map +1 -1
  11. package/dist/locus-info/controlsUtils.js +2 -1
  12. package/dist/locus-info/controlsUtils.js.map +1 -1
  13. package/dist/locus-info/index.js +48 -0
  14. package/dist/locus-info/index.js.map +1 -1
  15. package/dist/locus-info/parser.js +1 -0
  16. package/dist/locus-info/parser.js.map +1 -1
  17. package/dist/locus-info/selfUtils.js +19 -11
  18. package/dist/locus-info/selfUtils.js.map +1 -1
  19. package/dist/media/index.js +3 -3
  20. package/dist/media/index.js.map +1 -1
  21. package/dist/media/properties.js +4 -4
  22. package/dist/media/properties.js.map +1 -1
  23. package/dist/meeting/index.js +719 -490
  24. package/dist/meeting/index.js.map +1 -1
  25. package/dist/meeting/request.js +25 -44
  26. package/dist/meeting/request.js.map +1 -1
  27. package/dist/meeting/request.type.js.map +1 -1
  28. package/dist/meeting/util.js +4 -57
  29. package/dist/meeting/util.js.map +1 -1
  30. package/dist/meeting-info/meeting-info-v2.js +2 -0
  31. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  32. package/dist/meetings/index.js +28 -18
  33. package/dist/meetings/index.js.map +1 -1
  34. package/dist/meetings/request.js +14 -12
  35. package/dist/meetings/request.js.map +1 -1
  36. package/dist/member/index.js +9 -0
  37. package/dist/member/index.js.map +1 -1
  38. package/dist/member/util.js +14 -1
  39. package/dist/member/util.js.map +1 -1
  40. package/dist/members/index.js +8 -6
  41. package/dist/members/index.js.map +1 -1
  42. package/dist/members/request.js +3 -1
  43. package/dist/members/request.js.map +1 -1
  44. package/dist/multistream/mediaRequestManager.js +46 -6
  45. package/dist/multistream/mediaRequestManager.js.map +1 -1
  46. package/dist/multistream/multistreamMedia.js +4 -0
  47. package/dist/multistream/multistreamMedia.js.map +1 -1
  48. package/dist/multistream/receiveSlot.js +3 -3
  49. package/dist/multistream/receiveSlot.js.map +1 -1
  50. package/dist/multistream/receiveSlotManager.js +8 -6
  51. package/dist/multistream/receiveSlotManager.js.map +1 -1
  52. package/dist/multistream/remoteMedia.js.map +1 -1
  53. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  54. package/dist/multistream/remoteMediaManager.js +168 -63
  55. package/dist/multistream/remoteMediaManager.js.map +1 -1
  56. package/dist/reachability/index.js +63 -51
  57. package/dist/reachability/index.js.map +1 -1
  58. package/dist/reactions/constants.js +13 -0
  59. package/dist/reactions/constants.js.map +1 -0
  60. package/dist/reactions/reactions.type.js.map +1 -1
  61. package/dist/reconnection-manager/index.js +25 -12
  62. package/dist/reconnection-manager/index.js.map +1 -1
  63. package/dist/recording-controller/enums.js +17 -0
  64. package/dist/recording-controller/enums.js.map +1 -0
  65. package/dist/recording-controller/index.js +343 -0
  66. package/dist/recording-controller/index.js.map +1 -0
  67. package/dist/recording-controller/util.js +63 -0
  68. package/dist/recording-controller/util.js.map +1 -0
  69. package/dist/roap/request.js +88 -68
  70. package/dist/roap/request.js.map +1 -1
  71. package/dist/roap/turnDiscovery.js +72 -47
  72. package/dist/roap/turnDiscovery.js.map +1 -1
  73. package/dist/statsAnalyzer/index.js +3 -3
  74. package/dist/statsAnalyzer/index.js.map +1 -1
  75. package/dist/statsAnalyzer/mqaUtil.js +18 -6
  76. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  77. package/package.json +24 -19
  78. package/src/breakouts/README.md +190 -0
  79. package/src/breakouts/breakout.ts +110 -0
  80. package/src/breakouts/collection.ts +19 -0
  81. package/src/breakouts/index.ts +225 -0
  82. package/src/config.ts +4 -1
  83. package/src/constants.ts +35 -1
  84. package/src/locus-info/controlsUtils.ts +2 -0
  85. package/src/locus-info/index.ts +59 -1
  86. package/src/locus-info/parser.ts +1 -0
  87. package/src/locus-info/selfUtils.ts +8 -0
  88. package/src/media/index.ts +1 -2
  89. package/src/media/properties.ts +6 -9
  90. package/src/meeting/index.ts +398 -129
  91. package/src/meeting/request.ts +9 -31
  92. package/src/meeting/request.type.ts +2 -0
  93. package/src/meeting/util.ts +3 -60
  94. package/src/meeting-info/meeting-info-v2.ts +2 -0
  95. package/src/meetings/index.ts +10 -5
  96. package/src/meetings/request.ts +1 -1
  97. package/src/member/index.ts +9 -0
  98. package/src/member/util.ts +14 -1
  99. package/src/members/index.ts +1 -0
  100. package/src/members/request.ts +1 -0
  101. package/src/multistream/mediaRequestManager.ts +79 -15
  102. package/src/multistream/multistreamMedia.ts +4 -0
  103. package/src/multistream/receiveSlot.ts +17 -12
  104. package/src/multistream/receiveSlotManager.ts +22 -21
  105. package/src/multistream/remoteMedia.ts +1 -1
  106. package/src/multistream/remoteMediaGroup.ts +2 -2
  107. package/src/multistream/remoteMediaManager.ts +150 -37
  108. package/src/reachability/index.ts +16 -13
  109. package/src/reactions/constants.ts +4 -0
  110. package/src/reactions/reactions.type.ts +25 -0
  111. package/src/reconnection-manager/index.ts +18 -9
  112. package/src/recording-controller/enums.ts +8 -0
  113. package/src/recording-controller/index.ts +315 -0
  114. package/src/recording-controller/util.ts +58 -0
  115. package/src/roap/request.ts +78 -73
  116. package/src/roap/turnDiscovery.ts +8 -6
  117. package/src/statsAnalyzer/index.ts +4 -4
  118. package/src/statsAnalyzer/mqaUtil.ts +6 -0
  119. package/test/unit/spec/breakouts/breakout.ts +119 -0
  120. package/test/unit/spec/breakouts/collection.ts +15 -0
  121. package/test/unit/spec/breakouts/index.ts +293 -0
  122. package/test/unit/spec/locus-info/controlsUtils.js +20 -0
  123. package/test/unit/spec/locus-info/index.js +103 -0
  124. package/test/unit/spec/locus-info/selfConstant.js +25 -0
  125. package/test/unit/spec/locus-info/selfUtils.js +84 -0
  126. package/test/unit/spec/media/index.ts +1 -1
  127. package/test/unit/spec/media/properties.ts +9 -9
  128. package/test/unit/spec/meeting/effectsState.js +5 -1
  129. package/test/unit/spec/meeting/index.js +419 -50
  130. package/test/unit/spec/meeting/request.js +17 -0
  131. package/test/unit/spec/meeting/utils.js +20 -129
  132. package/test/unit/spec/meetings/index.js +1 -0
  133. package/test/unit/spec/member/util.js +26 -1
  134. package/test/unit/spec/multistream/mediaRequestManager.ts +312 -50
  135. package/test/unit/spec/multistream/receiveSlot.ts +6 -6
  136. package/test/unit/spec/multistream/receiveSlotManager.ts +13 -13
  137. package/test/unit/spec/multistream/remoteMedia.ts +2 -2
  138. package/test/unit/spec/multistream/remoteMediaGroup.ts +5 -5
  139. package/test/unit/spec/multistream/remoteMediaManager.ts +354 -65
  140. package/test/unit/spec/reachability/index.ts +58 -24
  141. package/test/unit/spec/reconnection-manager/index.js +42 -13
  142. package/test/unit/spec/recording-controller/index.js +231 -0
  143. package/test/unit/spec/recording-controller/util.js +102 -0
  144. package/test/unit/spec/roap/index.ts +2 -1
  145. package/test/unit/spec/roap/request.ts +114 -0
  146. package/test/unit/spec/roap/turnDiscovery.ts +45 -29
  147. package/test/unit/spec/stats-analyzer/index.js +2 -2
  148. package/test/utils/webex-test-users.js +1 -0
  149. package/tsconfig.json +6 -0
  150. package/dist/media/internal-media-core-wrapper.js +0 -18
  151. package/dist/media/internal-media-core-wrapper.js.map +0 -1
  152. package/src/media/internal-media-core-wrapper.ts +0 -9
@@ -54,8 +54,10 @@ var _reconnectionManager = _interopRequireDefault(require("../reconnection-manag
54
54
  var _request = _interopRequireDefault(require("./request"));
55
55
  var _index2 = _interopRequireDefault(require("../members/index"));
56
56
  var _util = _interopRequireDefault(require("./util"));
57
- var _util2 = _interopRequireDefault(require("../media/util"));
57
+ var _util2 = _interopRequireDefault(require("../recording-controller/util"));
58
+ var _util3 = _interopRequireDefault(require("../media/util"));
58
59
  var _transcription = _interopRequireDefault(require("../transcription"));
60
+ var _reactions = require("../reactions/reactions");
59
61
  var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
60
62
  var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
61
63
  var _reconnection = _interopRequireDefault(require("../common/errors/reconnection"));
@@ -70,8 +72,10 @@ var _receiveSlotManager = require("../multistream/receiveSlotManager");
70
72
  var _mediaRequestManager = require("../multistream/mediaRequestManager");
71
73
  var _remoteMediaManager = require("../multistream/remoteMediaManager");
72
74
  var _multistreamMedia = require("../multistream/multistreamMedia");
73
- var _reactions = require("../reactions/reactions");
75
+ var _breakouts = _interopRequireDefault(require("../breakouts"));
74
76
  var _inMeetingActions = _interopRequireDefault(require("./in-meeting-actions"));
77
+ var _constants3 = require("../reactions/constants");
78
+ var _recordingController = _interopRequireDefault(require("../recording-controller"));
75
79
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
76
80
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
77
81
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -98,7 +102,8 @@ var MEDIA_UPDATE_TYPE = {
98
102
  ALL: 'ALL',
99
103
  AUDIO: 'AUDIO',
100
104
  VIDEO: 'VIDEO',
101
- SHARE: 'SHARE'
105
+ SHARE: 'SHARE',
106
+ LAMBDA: 'LAMBDA'
102
107
  };
103
108
 
104
109
  /**
@@ -399,6 +404,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
399
404
  * @memberof Meeting
400
405
  */
401
406
  function Meeting(attrs, _options) {
407
+ var _this$locusInfo, _this$locusInfo$links, _this$locusInfo$links2, _this$locusInfo$links3, _this$locusInfo2, _this$locusInfo2$full, _this$locusInfo3;
402
408
  var _this;
403
409
  (0, _classCallCheck2.default)(this, Meeting);
404
410
  _this = _super.call(this, {}, _options);
@@ -411,6 +417,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
411
417
  */
412
418
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "attrs", void 0);
413
419
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "audio", void 0);
420
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "breakouts", void 0);
414
421
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "conversationUrl", void 0);
415
422
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "correlationId", void 0);
416
423
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "destination", void 0);
@@ -467,6 +474,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
467
474
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "queuedMediaUpdates", void 0);
468
475
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "recording", void 0);
469
476
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "remoteMediaManager", void 0);
477
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "recordingController", void 0);
470
478
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "requiredCaptcha", void 0);
471
479
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "receiveSlotManager", void 0);
472
480
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "shareStatus", void 0);
@@ -492,6 +500,31 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
492
500
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "selfId", void 0);
493
501
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", void 0);
494
502
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "namespace", _constants.MEETINGS);
503
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "processRelayEvent", function (e) {
504
+ switch (e.data.relayType) {
505
+ case _constants3.REACTION_RELAY_TYPES.REACTION:
506
+ if (
507
+ // @ts-ignore - config coming from registerPlugin
508
+ (_this.config.receiveReactions || options.receiveReactions) && _this.isReactionsSupported()) {
509
+ var _this$members$members = _this.members.membersCollection.get(e.data.sender.participantId),
510
+ name = _this$members$members.name;
511
+ var processedReaction = {
512
+ reaction: e.data.reaction,
513
+ sender: {
514
+ id: e.data.sender.participantId,
515
+ name: name
516
+ }
517
+ };
518
+ _triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
519
+ file: 'meeting/index',
520
+ function: 'join'
521
+ }, _constants.EVENT_TRIGGERS.MEETING_RECEIVE_REACTIONS, processedReaction);
522
+ }
523
+ break;
524
+ default:
525
+ break;
526
+ }
527
+ });
495
528
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getMediaStreams", function (mediaDirection) {
496
529
  var audioVideo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.VIDEO_RESOLUTIONS[_this.mediaProperties.localQualityLevel];
497
530
  var sharePreferences = arguments.length > 2 ? arguments[2] : undefined;
@@ -599,7 +632,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
599
632
  };
600
633
  _metrics.default.sendBehavioralMetric(metricName, data, metadata);
601
634
  };
602
- if (error instanceof _internalMediaCore.MediaConnection.Errors.SdpOfferCreationError) {
635
+ if (error instanceof _internalMediaCore.Errors.SdpOfferCreationError) {
603
636
  sendBehavioralMetric(_constants2.default.PEERCONNECTION_FAILURE, error, _this.id);
604
637
  _metrics.default.postEvent({
605
638
  event: _config.eventType.LOCAL_SDP_GENERATED,
@@ -609,7 +642,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
609
642
  errors: [_metrics.default.generateErrorPayload(2001, true, _config.error.name.MEDIA_ENGINE, undefined)]
610
643
  }
611
644
  });
612
- } else if (error instanceof _internalMediaCore.MediaConnection.Errors.SdpOfferHandlingError || error instanceof _internalMediaCore.MediaConnection.Errors.SdpAnswerHandlingError) {
645
+ } else if (error instanceof _internalMediaCore.Errors.SdpOfferHandlingError || error instanceof _internalMediaCore.Errors.SdpAnswerHandlingError) {
613
646
  sendBehavioralMetric(_constants2.default.PEERCONNECTION_FAILURE, error, _this.id);
614
647
  _metrics.default.postEvent({
615
648
  event: _config.eventType.REMOTE_SDP_RECEIVED,
@@ -619,8 +652,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
619
652
  errors: [_metrics.default.generateErrorPayload(2001, true, _config.error.name.MEDIA_ENGINE, undefined)]
620
653
  }
621
654
  });
622
- } else if (error instanceof _internalMediaCore.MediaConnection.Errors.SdpError) {
623
- // this covers also the case of MC.Errors.IceGatheringError which extends MC.Errors.SdpError
655
+ } else if (error instanceof _internalMediaCore.Errors.SdpError) {
656
+ // this covers also the case of Errors.IceGatheringError which extends Errors.SdpError
624
657
  sendBehavioralMetric(_constants2.default.INVALID_ICE_CANDIDATE, error, _this.id);
625
658
  _metrics.default.postEvent({
626
659
  event: _config.eventType.LOCAL_SDP_GENERATED,
@@ -633,16 +666,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
633
666
  }
634
667
  });
635
668
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setupMediaConnectionListeners", function () {
636
- _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.MediaConnection.Event.ROAP_STARTED, function () {
669
+ _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.ROAP_STARTED, function () {
637
670
  _this.isRoapInProgress = true;
638
671
  });
639
- _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.MediaConnection.Event.ROAP_DONE, function () {
672
+ _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.ROAP_DONE, function () {
640
673
  _this.mediaNegotiatedEvent();
641
674
  _this.isRoapInProgress = false;
642
675
  _this.processNextQueuedMediaUpdate();
643
676
  });
644
- _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.MediaConnection.Event.ROAP_FAILURE, _this.handleRoapFailure);
645
- _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.MediaConnection.Event.ROAP_MESSAGE_TO_SEND, function (event) {
677
+ _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.ROAP_FAILURE, _this.handleRoapFailure);
678
+ _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.ROAP_MESSAGE_TO_SEND, function (event) {
646
679
  var LOG_HEADER = 'Meeting:index#setupMediaConnectionListeners.ROAP_MESSAGE_TO_SEND -->';
647
680
  switch (event.roapMessage.messageType) {
648
681
  case 'OK':
@@ -707,7 +740,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
707
740
  });
708
741
  break;
709
742
  case 'ERROR':
710
- if (event.roapMessage.errorType === _internalMediaCore.MediaConnection.ErrorType.CONFLICT || event.roapMessage.errorType === _internalMediaCore.MediaConnection.ErrorType.DOUBLECONFLICT) {
743
+ if (event.roapMessage.errorType === _internalMediaCore.ErrorType.CONFLICT || event.roapMessage.errorType === _internalMediaCore.ErrorType.DOUBLECONFLICT) {
711
744
  _metrics.default.sendBehavioralMetric(_constants2.default.ROAP_GLARE_CONDITION, {
712
745
  correlation_id: _this.correlationId,
713
746
  locus_id: _this.locusUrl.split('/').pop(),
@@ -732,22 +765,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
732
765
  });
733
766
 
734
767
  // eslint-disable-next-line no-param-reassign
735
- _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.MediaConnection.Event.REMOTE_TRACK_ADDED, function (event) {
768
+ _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.REMOTE_TRACK_ADDED, function (event) {
736
769
  _loggerProxy.default.logger.log("Meeting:index#setupMediaConnectionListeners --> REMOTE_TRACK_ADDED event received for webrtcMediaConnection: ".concat((0, _stringify.default)(event)));
737
770
  var mediaTrack = event.track;
738
771
 
739
772
  // eslint-disable-next-line @typescript-eslint/no-shadow
740
773
  var eventType;
741
774
  switch (event.type) {
742
- case _internalMediaCore.MediaConnection.RemoteTrackType.AUDIO:
775
+ case _internalMediaCore.RemoteTrackType.AUDIO:
743
776
  eventType = _constants.EVENT_TYPES.REMOTE_AUDIO;
744
777
  _this.mediaProperties.setRemoteAudioTrack(event.track);
745
778
  break;
746
- case _internalMediaCore.MediaConnection.RemoteTrackType.VIDEO:
779
+ case _internalMediaCore.RemoteTrackType.VIDEO:
747
780
  eventType = _constants.EVENT_TYPES.REMOTE_VIDEO;
748
781
  _this.mediaProperties.setRemoteVideoTrack(event.track);
749
782
  break;
750
- case _internalMediaCore.MediaConnection.RemoteTrackType.SCREENSHARE_VIDEO:
783
+ case _internalMediaCore.RemoteTrackType.SCREENSHARE_VIDEO:
751
784
  if (event.track) {
752
785
  eventType = _constants.EVENT_TYPES.REMOTE_SHARE;
753
786
  _this.mediaProperties.setRemoteShare(event.track);
@@ -768,11 +801,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
768
801
  function: 'setupRemoteTrackListener:Event.REMOTE_TRACK_ADDED'
769
802
  }, _constants.EVENT_TRIGGERS.MEDIA_READY, {
770
803
  type: eventType,
771
- stream: _util2.default.createMediaStream([mediaTrack])
804
+ stream: _util3.default.createMediaStream([mediaTrack])
772
805
  });
773
806
  }
774
807
  });
775
- _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.MediaConnection.Event.CONNECTION_STATE_CHANGED, function (event) {
808
+ _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.CONNECTION_STATE_CHANGED, function (event) {
776
809
  var connectionFailed = function connectionFailed() {
777
810
  // we know the media connection failed and browser will not attempt to recover it any more
778
811
  // so reset the timer as it's not needed anymore, we want to reconnect immediately
@@ -799,13 +832,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
799
832
  };
800
833
  _loggerProxy.default.logger.info("Meeting:index#setupMediaConnectionListeners --> connection state changed to ".concat(event.state));
801
834
  switch (event.state) {
802
- case _internalMediaCore.MediaConnection.ConnectionState.Connecting:
835
+ case _internalMediaCore.ConnectionState.Connecting:
803
836
  _metrics.default.postEvent({
804
837
  event: _config.eventType.ICE_START,
805
838
  meeting: (0, _assertThisInitialized2.default)(_this)
806
839
  });
807
840
  break;
808
- case _internalMediaCore.MediaConnection.ConnectionState.Connected:
841
+ case _internalMediaCore.ConnectionState.Connected:
809
842
  _metrics.default.postEvent({
810
843
  event: _config.eventType.ICE_END,
811
844
  meeting: (0, _assertThisInitialized2.default)(_this)
@@ -817,27 +850,29 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
817
850
  _this.setNetworkStatus(_constants.NETWORK_STATUS.CONNECTED);
818
851
  _this.reconnectionManager.iceReconnected();
819
852
  break;
820
- case _internalMediaCore.MediaConnection.ConnectionState.Disconnected:
853
+ case _internalMediaCore.ConnectionState.Disconnected:
821
854
  _this.setNetworkStatus(_constants.NETWORK_STATUS.DISCONNECTED);
822
855
  _this.reconnectionManager.waitForIceReconnect().catch(function () {
823
856
  _loggerProxy.default.logger.info('Meeting:index#setupMediaConnectionListeners --> state DISCONNECTED, automatic reconnection timed out.');
824
857
  connectionFailed();
825
858
  });
826
859
  break;
827
- case _internalMediaCore.MediaConnection.ConnectionState.Failed:
860
+ case _internalMediaCore.ConnectionState.Failed:
828
861
  connectionFailed();
829
862
  break;
830
863
  default:
831
864
  break;
832
865
  }
833
866
  });
834
- _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.MediaConnection.Event.ACTIVE_SPEAKERS_CHANGED, function (msg) {
867
+ _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.ACTIVE_SPEAKERS_CHANGED, function (msg) {
835
868
  _triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
836
869
  file: 'meeting/index',
837
870
  function: 'setupMediaConnectionListeners'
838
871
  }, _constants.EVENT_TRIGGERS.ACTIVE_SPEAKER_CHANGED, {
839
872
  seqNum: msg.seqNum,
840
- memberIds: msg.csis.map(function (csi) {
873
+ memberIds: msg.csis
874
+ // @ts-ignore
875
+ .map(function (csi) {
841
876
  var _this$members$findMem;
842
877
  return (_this$members$findMem = _this.members.findMemberByCsi(csi)) === null || _this$members$findMem === void 0 ? void 0 : _this$members$findMem.id;
843
878
  }).filter(function (item) {
@@ -845,7 +880,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
845
880
  })
846
881
  });
847
882
  });
848
- _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.MediaConnection.Event.VIDEO_SOURCES_COUNT_CHANGED, function (numTotalSources, numLiveSources) {
883
+ _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.VIDEO_SOURCES_COUNT_CHANGED, function (numTotalSources, numLiveSources) {
849
884
  _triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
850
885
  file: 'meeting/index',
851
886
  function: 'setupMediaConnectionListeners'
@@ -854,7 +889,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
854
889
  numLiveSources: numLiveSources
855
890
  });
856
891
  });
857
- _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.MediaConnection.Event.AUDIO_SOURCES_COUNT_CHANGED, function (numTotalSources, numLiveSources) {
892
+ _this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.AUDIO_SOURCES_COUNT_CHANGED, function (numTotalSources, numLiveSources) {
858
893
  _triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
859
894
  file: 'meeting/index',
860
895
  function: 'setupMediaConnectionListeners'
@@ -870,7 +905,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
870
905
  // TODO: might have to send the same event to the developer
871
906
  // Add ip address info if geo hint is present
872
907
  // @ts-ignore fix type
873
- options.data.intervalMetadata.peerReflexiveIP = ((_this$webex$meetings$ = _this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$ === void 0 ? void 0 : _this$webex$meetings$.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
908
+ options.data.intervalMetadata.peerReflexiveIP =
909
+ // @ts-ignore
910
+ ((_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;
874
911
  _metrics.default.postEvent({
875
912
  event: _config.eventType.MEDIA_QUALITY,
876
913
  meeting: (0, _assertThisInitialized2.default)(_this),
@@ -941,20 +978,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
941
978
  pendingPromiseResolve = _this$queuedMediaUpda.pendingPromiseResolve,
942
979
  pendingPromiseReject = _this$queuedMediaUpda.pendingPromiseReject,
943
980
  mediaUpdateType = _this$queuedMediaUpda.mediaUpdateType,
944
- options = _this$queuedMediaUpda.options;
981
+ _options2 = _this$queuedMediaUpda.options;
945
982
  _loggerProxy.default.logger.log("Meeting:index#processNextQueuedMediaUpdate --> performing delayed media update type=".concat(mediaUpdateType));
946
983
  switch (mediaUpdateType) {
947
984
  case MEDIA_UPDATE_TYPE.ALL:
948
- _this.updateMedia(options).then(pendingPromiseResolve, pendingPromiseReject);
985
+ _this.updateMedia(_options2).then(pendingPromiseResolve, pendingPromiseReject);
949
986
  break;
950
987
  case MEDIA_UPDATE_TYPE.AUDIO:
951
- _this.updateAudio(options).then(pendingPromiseResolve, pendingPromiseReject);
988
+ _this.updateAudio(_options2).then(pendingPromiseResolve, pendingPromiseReject);
952
989
  break;
953
990
  case MEDIA_UPDATE_TYPE.VIDEO:
954
- _this.updateVideo(options).then(pendingPromiseResolve, pendingPromiseReject);
991
+ _this.updateVideo(_options2).then(pendingPromiseResolve, pendingPromiseReject);
955
992
  break;
956
993
  case MEDIA_UPDATE_TYPE.SHARE:
957
- _this.updateShare(options).then(pendingPromiseResolve, pendingPromiseReject);
994
+ _this.updateShare(_options2).then(pendingPromiseResolve, pendingPromiseReject);
995
+ break;
996
+ case MEDIA_UPDATE_TYPE.LAMBDA:
997
+ _options2.lambda().then(pendingPromiseResolve, pendingPromiseReject);
958
998
  break;
959
999
  default:
960
1000
  _loggerProxy.default.logger.error("Peer-connection-manager:index#processNextQueuedMediaUpdate --> unsupported media update type ".concat(mediaUpdateType, " found in the queue"));
@@ -1081,28 +1121,58 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1081
1121
  */
1082
1122
  // TODO: needs to be defined as a class
1083
1123
  _this.meetingInfo = {};
1124
+ /**
1125
+ * @instance
1126
+ * @type {Breakouts}
1127
+ * @public
1128
+ * @memberof Meeting
1129
+ */
1130
+ // @ts-ignore
1131
+ _this.breakouts = new _breakouts.default({}, {
1132
+ parent: _this.webex
1133
+ });
1084
1134
  /**
1085
1135
  * helper class for managing receive slots (for multistream media connections)
1086
1136
  */
1087
1137
  _this.receiveSlotManager = new _receiveSlotManager.ReceiveSlotManager((0, _assertThisInitialized2.default)(_this));
1088
1138
  /**
1089
- * Helper class for managing media requests for main video (for multistream media connections)
1090
- * All media requests sent out for main video for this meeting have to go through it.
1139
+ * Object containing helper classes for managing media requests for audio/video/screenshare (for multistream media connections)
1140
+ * All multistream media requests sent out for this meeting have to go through them.
1091
1141
  */
1092
1142
  _this.mediaRequestManagers = {
1093
- audio: new _mediaRequestManager.MediaRequestManager(function (mediaRequests) {
1143
+ // @ts-ignore - config coming from registerPlugin
1144
+ audio: new _mediaRequestManager.MediaRequestManager(_this.config.degradationPreferences, function (mediaRequests) {
1094
1145
  if (!_this.mediaProperties.webrtcMediaConnection) {
1095
1146
  _loggerProxy.default.logger.warn('Meeting:index#mediaRequestManager --> trying to send audio media request before media connection was created');
1096
1147
  return;
1097
1148
  }
1098
- _this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaConnection.MediaType.AudioMain, mediaRequests);
1149
+ _this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaType.AudioMain, mediaRequests);
1099
1150
  }),
1100
- video: new _mediaRequestManager.MediaRequestManager(function (mediaRequests) {
1151
+ // @ts-ignore - config coming from registerPlugin
1152
+ video: new _mediaRequestManager.MediaRequestManager(_this.config.degradationPreferences, function (mediaRequests) {
1101
1153
  if (!_this.mediaProperties.webrtcMediaConnection) {
1102
1154
  _loggerProxy.default.logger.warn('Meeting:index#mediaRequestManager --> trying to send video media request before media connection was created');
1103
1155
  return;
1104
1156
  }
1105
- _this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaConnection.MediaType.VideoMain, mediaRequests);
1157
+ _this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaType.VideoMain, mediaRequests);
1158
+ }),
1159
+ screenShareAudio: new _mediaRequestManager.MediaRequestManager(
1160
+ // @ts-ignore - config coming from registerPlugin
1161
+ _this.config.degradationPreferences, function (mediaRequests) {
1162
+ if (!_this.mediaProperties.webrtcMediaConnection) {
1163
+ _loggerProxy.default.logger.warn('Meeting:index#mediaRequestManager --> trying to send screenshare audio media request before media connection was created');
1164
+ return;
1165
+ }
1166
+ _this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaType.AudioSlides, mediaRequests);
1167
+ }),
1168
+ screenShareVideo: new _mediaRequestManager.MediaRequestManager(
1169
+ // @ts-ignore - config coming from registerPlugin
1170
+ _this.config.degradationPreferences, function (mediaRequests) {
1171
+ if (!_this.mediaProperties.webrtcMediaConnection) {
1172
+ _loggerProxy.default.logger.warn('Meeting:index#mediaRequestManager --> trying to send screenshare video media request before media connection was created');
1173
+ return;
1174
+ }
1175
+ _this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaType.VideoSlides, mediaRequests);
1106
1176
  })
1107
1177
  };
1108
1178
  /**
@@ -1115,8 +1185,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1115
1185
  locusUrl: attrs.locus && attrs.locus.url,
1116
1186
  receiveSlotManager: _this.receiveSlotManager,
1117
1187
  mediaRequestManagers: _this.mediaRequestManagers
1118
- // @ts-ignore - Fix type
1119
- }, {
1188
+ },
1189
+ // @ts-ignore - Fix type
1190
+ {
1120
1191
  parent: _this.webex
1121
1192
  });
1122
1193
  /**
@@ -1421,6 +1492,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1421
1492
  */
1422
1493
  // @ts-ignore - Fix type
1423
1494
  _this.locusInfo = new _locusInfo.default(_this.updateMeetingObject.bind((0, _assertThisInitialized2.default)(_this)), _this.webex, _this.id);
1495
+
1424
1496
  // We had to add listeners first before setting up the locus instance
1425
1497
  /**
1426
1498
  * @instance
@@ -1523,6 +1595,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1523
1595
  * @memberof Meeting
1524
1596
  */
1525
1597
  _this.keepAliveTimerId = null;
1598
+
1599
+ /**
1600
+ * The class that helps to control recording functions: start, stop, pause, resume, etc
1601
+ * @instance
1602
+ * @type {RecordingController}
1603
+ * @public
1604
+ * @memberof Meeting
1605
+ */
1606
+ _this.recordingController = new _recordingController.default(_this.meetingRequest, {
1607
+ serviceUrl: (_this$locusInfo = _this.locusInfo) === null || _this$locusInfo === void 0 ? void 0 : (_this$locusInfo$links = _this$locusInfo.links) === null || _this$locusInfo$links === void 0 ? void 0 : (_this$locusInfo$links2 = _this$locusInfo$links.services) === null || _this$locusInfo$links2 === void 0 ? void 0 : (_this$locusInfo$links3 = _this$locusInfo$links2.record) === null || _this$locusInfo$links3 === void 0 ? void 0 : _this$locusInfo$links3.url,
1608
+ sessionId: (_this$locusInfo2 = _this.locusInfo) === null || _this$locusInfo2 === void 0 ? void 0 : (_this$locusInfo2$full = _this$locusInfo2.fullState) === null || _this$locusInfo2$full === void 0 ? void 0 : _this$locusInfo2$full.sessionId,
1609
+ locusUrl: (_this$locusInfo3 = _this.locusInfo) === null || _this$locusInfo3 === void 0 ? void 0 : _this$locusInfo3.url,
1610
+ displayHints: []
1611
+ });
1526
1612
  _this.setUpLocusInfoListeners();
1527
1613
  _this.locusInfo.init(attrs.locus ? attrs.locus : {});
1528
1614
  _this.hasJoinedOnce = false;
@@ -1600,8 +1686,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1600
1686
  _context.next = 33;
1601
1687
  break;
1602
1688
  }
1603
- // @ts-ignore
1604
- _loggerProxy.default.logger.info("Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - password required (code=").concat(_context.t0 === null || _context.t0 === void 0 ? void 0 : (_err$body = _context.t0.body) === null || _err$body === void 0 ? void 0 : _err$body.code, ")."));
1689
+ _loggerProxy.default.logger.info( // @ts-ignore
1690
+ "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - password required (code=").concat(_context.t0 === null || _context.t0 === void 0 ? void 0 : (_err$body = _context.t0.body) === null || _err$body === void 0 ? void 0 : _err$body.code, ")."));
1605
1691
 
1606
1692
  // when wbxappapi requires password it still populates partial meeting info in the response
1607
1693
  if (_context.t0.meetingInfo) {
@@ -1623,8 +1709,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1623
1709
  _context.next = 41;
1624
1710
  break;
1625
1711
  }
1626
- // @ts-ignore
1627
- _loggerProxy.default.logger.info("Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - captcha required (code=").concat(_context.t0 === null || _context.t0 === void 0 ? void 0 : (_err$body2 = _context.t0.body) === null || _err$body2 === void 0 ? void 0 : _err$body2.code, ")."));
1712
+ _loggerProxy.default.logger.info( // @ts-ignore
1713
+ "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - captcha required (code=").concat(_context.t0 === null || _context.t0 === void 0 ? void 0 : (_err$body2 = _context.t0.body) === null || _err$body2 === void 0 ? void 0 : _err$body2.code, ")."));
1628
1714
  this.meetingInfoFailureReason = this.requiredCaptcha ? _constants.MEETING_INFO_FAILURE_REASON.WRONG_CAPTCHA : _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
1629
1715
  if (_context.t0.isPasswordRequired) {
1630
1716
  this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
@@ -1699,7 +1785,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1699
1785
  // we have to pass the wbxappapi hostname as the siteFullName parameter
1700
1786
  var _URL = new URL(this.requiredCaptcha.refreshURL),
1701
1787
  hostname = _URL.hostname;
1702
- return this.meetingRequest.refreshCaptcha({
1788
+ return this.meetingRequest
1789
+ // @ts-ignore
1790
+ .refreshCaptcha({
1703
1791
  captchaRefreshUrl: "".concat(this.requiredCaptcha.refreshURL, "&siteFullName=").concat(hostname),
1704
1792
  captchaId: this.requiredCaptcha.captchaId
1705
1793
  }).then(function (response) {
@@ -1724,6 +1812,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1724
1812
  // meeting update listeners
1725
1813
  this.setUpLocusInfoSelfListener();
1726
1814
  this.setUpLocusInfoMeetingListener();
1815
+ this.setUpLocusServicesListener();
1727
1816
  // members update listeners
1728
1817
  this.setUpLocusFullStateListener();
1729
1818
  this.setUpLocusUrlListener();
@@ -1736,6 +1825,37 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1736
1825
  this.setUpLocusInfoMeetingInfoListener();
1737
1826
  this.setUpLocusInfoAssignHostListener();
1738
1827
  this.setUpLocusInfoMediaInactiveListener();
1828
+ this.setUpBreakoutsListener();
1829
+ }
1830
+
1831
+ /**
1832
+ * Set up the listeners for breakouts
1833
+ * @returns {undefined}
1834
+ * @private
1835
+ * @memberof Meeting
1836
+ */
1837
+ }, {
1838
+ key: "setUpBreakoutsListener",
1839
+ value: function setUpBreakoutsListener() {
1840
+ var _this4 = this;
1841
+ this.breakouts.on(_constants.BREAKOUTS.EVENTS.BREAKOUTS_CLOSING, function () {
1842
+ _triggerProxy.default.trigger(_this4, {
1843
+ file: 'meeting/index',
1844
+ function: 'setUpBreakoutsListener'
1845
+ }, _constants.EVENT_TRIGGERS.MEETING_BREAKOUTS_CLOSING);
1846
+ });
1847
+ this.breakouts.on(_constants.BREAKOUTS.EVENTS.MESSAGE, function (messageEvent) {
1848
+ _triggerProxy.default.trigger(_this4, {
1849
+ file: 'meeting/index',
1850
+ function: 'setUpBreakoutsListener'
1851
+ }, _constants.EVENT_TRIGGERS.MEETING_BREAKOUTS_MESSAGE, messageEvent);
1852
+ });
1853
+ this.breakouts.on(_constants.BREAKOUTS.EVENTS.MEMBERS_UPDATE, function () {
1854
+ _triggerProxy.default.trigger(_this4, {
1855
+ file: 'meeting/index',
1856
+ function: 'setUpBreakoutsListener'
1857
+ }, _constants.EVENT_TRIGGERS.MEETING_BREAKOUTS_UPDATE);
1858
+ });
1739
1859
  }
1740
1860
 
1741
1861
  /**
@@ -1747,30 +1867,30 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1747
1867
  }, {
1748
1868
  key: "setUpLocusInfoMediaInactiveListener",
1749
1869
  value: function setUpLocusInfoMediaInactiveListener() {
1750
- var _this4 = this;
1870
+ var _this5 = this;
1751
1871
  // User gets kicked off the meeting due to inactivity or user did a refresh
1752
1872
  this.locusInfo.on(_constants.EVENTS.DISCONNECT_DUE_TO_INACTIVITY, function (res) {
1753
1873
  // https:// jira-eng-gpk2.cisco.com/jira/browse/SPARK-240520
1754
1874
  // TODO: send custom parameter explaining why the inactivity happened
1755
1875
  // refresh , no media or network got dsconnected or something else
1756
1876
  _metrics.default.sendBehavioralMetric(_constants2.default.DISCONNECT_DUE_TO_INACTIVITY, {
1757
- correlation_id: _this4.correlationId,
1758
- locus_id: _this4.locusId
1877
+ correlation_id: _this5.correlationId,
1878
+ locus_id: _this5.locusId
1759
1879
  });
1760
1880
 
1761
1881
  // Upload logs on media inactivity
1762
1882
  // Normally media should not be inactive
1763
- _triggerProxy.default.trigger(_this4, {
1883
+ _triggerProxy.default.trigger(_this5, {
1764
1884
  file: 'meeting/index',
1765
1885
  function: 'setUpLocusInfoMediaInactiveListener'
1766
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this4);
1886
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this5);
1767
1887
  _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMediaInactiveListener --> Meeting disconnected due to inactivity: ".concat(res.reason));
1768
1888
 
1769
1889
  // @ts-ignore - config coming from registerPlugin
1770
- if (_this4.config.reconnection.autoRejoin) {
1771
- _this4.reconnect();
1890
+ if (_this5.config.reconnection.autoRejoin) {
1891
+ _this5.reconnect();
1772
1892
  } else {
1773
- _triggerProxy.default.trigger(_this4, {
1893
+ _triggerProxy.default.trigger(_this5, {
1774
1894
  file: 'meeting/index',
1775
1895
  function: 'setUpLocusInfoMediaInactiveListener'
1776
1896
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_LEFT, res.reason);
@@ -1787,16 +1907,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1787
1907
  }, {
1788
1908
  key: "setUpLocusInfoAssignHostListener",
1789
1909
  value: function setUpLocusInfoAssignHostListener() {
1790
- var _this5 = this;
1910
+ var _this6 = this;
1791
1911
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_CAN_ASSIGN_HOST, function (payload) {
1792
- var changed = _this5.inMeetingActions.set({
1912
+ var changed = _this6.inMeetingActions.set({
1793
1913
  canAssignHost: payload.canAssignHost
1794
1914
  });
1795
1915
  if (changed) {
1796
- _triggerProxy.default.trigger(_this5, {
1916
+ _triggerProxy.default.trigger(_this6, {
1797
1917
  file: 'meeting/index',
1798
1918
  function: 'setUpLocusInfoAssignHostListener'
1799
- }, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, _this5.inMeetingActions.get());
1919
+ }, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, _this6.inMeetingActions.get());
1800
1920
  }
1801
1921
  });
1802
1922
  }
@@ -1810,9 +1930,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1810
1930
  }, {
1811
1931
  key: "setUpLocusFullStateListener",
1812
1932
  value: function setUpLocusFullStateListener() {
1813
- var _this6 = this;
1933
+ var _this7 = this;
1814
1934
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.FULL_STATE_MEETING_STATE_CHANGE, function (payload) {
1815
- _triggerProxy.default.trigger(_this6, {
1935
+ _triggerProxy.default.trigger(_this7, {
1816
1936
  file: 'meeting/index',
1817
1937
  function: 'setUpLocusFullStateListener'
1818
1938
  }, _constants.EVENT_TRIGGERS.MEETING_STATE_CHANGE, {
@@ -1820,7 +1940,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1820
1940
  });
1821
1941
  });
1822
1942
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.FULL_STATE_TYPE_UPDATE, function (payload) {
1823
- _this6.members.locusFullStateTypeUpdate(payload);
1943
+ _this7.members.locusFullStateTypeUpdate(payload);
1824
1944
  });
1825
1945
  }
1826
1946
 
@@ -2009,15 +2129,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2009
2129
  }, {
2010
2130
  key: "setUpLocusSelfListener",
2011
2131
  value: function setUpLocusSelfListener() {
2012
- var _this7 = this;
2132
+ var _this8 = this;
2013
2133
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_SELF, function (payload) {
2014
- _this7.members.locusSelfUpdate(payload);
2015
- _this7.pstnUpdate(payload);
2134
+ _this8.members.locusSelfUpdate(payload);
2135
+ _this8.pstnUpdate(payload);
2016
2136
 
2017
2137
  // If user moved to a JOINED state and there is a pending floor grant trigger it
2018
- if (_this7.floorGrantPending && payload.newSelf.state === _constants.MEETING_STATE.STATES.JOINED) {
2019
- _this7.requestScreenShareFloor().then(function () {
2020
- _this7.floorGrantPending = false;
2138
+ if (_this8.floorGrantPending && payload.newSelf.state === _constants.MEETING_STATE.STATES.JOINED) {
2139
+ _this8.requestScreenShareFloor().then(function () {
2140
+ _this8.floorGrantPending = false;
2021
2141
  });
2022
2142
  }
2023
2143
  });
@@ -2033,14 +2153,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2033
2153
  }, {
2034
2154
  key: "pstnUpdate",
2035
2155
  value: function pstnUpdate(payload) {
2036
- var _this8 = this;
2156
+ var _this9 = this;
2037
2157
  if (this.locusInfo.self) {
2038
2158
  var _payload$newSelf, _payload$newSelf2;
2039
2159
  var dialInPstnDevice = (_payload$newSelf = payload.newSelf) === null || _payload$newSelf === void 0 ? void 0 : _payload$newSelf.pstnDevices.find(function (device) {
2040
- return device.url === _this8.dialInUrl;
2160
+ return device.url === _this9.dialInUrl;
2041
2161
  });
2042
2162
  var dialOutPstnDevice = (_payload$newSelf2 = payload.newSelf) === null || _payload$newSelf2 === void 0 ? void 0 : _payload$newSelf2.pstnDevices.find(function (device) {
2043
- return device.url === _this8.dialOutUrl;
2163
+ return device.url === _this9.dialOutUrl;
2044
2164
  });
2045
2165
  var changed = false;
2046
2166
  if (dialInPstnDevice) {
@@ -2088,9 +2208,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2088
2208
  }, {
2089
2209
  key: "setUpLocusHostListener",
2090
2210
  value: function setUpLocusHostListener() {
2091
- var _this9 = this;
2211
+ var _this10 = this;
2092
2212
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_HOST, function (payload) {
2093
- _this9.members.locusHostUpdate(payload);
2213
+ _this10.members.locusHostUpdate(payload);
2094
2214
  });
2095
2215
  }
2096
2216
 
@@ -2105,9 +2225,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2105
2225
  }, {
2106
2226
  key: "setUpLocusParticipantsListener",
2107
2227
  value: function setUpLocusParticipantsListener() {
2108
- var _this10 = this;
2228
+ var _this11 = this;
2109
2229
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_PARTICIPANTS, function (payload) {
2110
- _this10.members.locusParticipantsUpdate(payload);
2230
+ _this11.members.locusParticipantsUpdate(payload);
2111
2231
  });
2112
2232
  }
2113
2233
 
@@ -2132,7 +2252,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2132
2252
  }, {
2133
2253
  key: "setupLocusControlsListener",
2134
2254
  value: function setupLocusControlsListener() {
2135
- var _this11 = this;
2255
+ var _this12 = this;
2136
2256
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED, function (_ref5) {
2137
2257
  var state = _ref5.state,
2138
2258
  modifiedBy = _ref5.modifiedBy,
@@ -2157,19 +2277,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2157
2277
  }
2158
2278
 
2159
2279
  // `RESUMED` state should be converted to `RECORDING` after triggering the event
2160
- _this11.recording = {
2280
+ _this12.recording = {
2161
2281
  state: state === _constants.RECORDING_STATE.RESUMED ? _constants.RECORDING_STATE.RECORDING : state,
2162
2282
  modifiedBy: modifiedBy,
2163
2283
  lastModified: lastModified
2164
2284
  };
2165
- _triggerProxy.default.trigger(_this11, {
2285
+ _triggerProxy.default.trigger(_this12, {
2166
2286
  file: 'meeting/index',
2167
2287
  function: 'setupLocusControlsListener'
2168
- }, event, _this11.recording);
2288
+ }, event, _this12.recording);
2169
2289
  });
2170
2290
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_CONTAINER_UPDATED, function (_ref6) {
2171
2291
  var meetingContainerUrl = _ref6.meetingContainerUrl;
2172
- _triggerProxy.default.trigger(_this11, {
2292
+ _triggerProxy.default.trigger(_this12, {
2173
2293
  file: 'meeting/index',
2174
2294
  function: 'setupLocusControlsListener'
2175
2295
  }, _constants.EVENT_TRIGGERS.MEETING_MEETING_CONTAINER_UPDATE, {
@@ -2180,10 +2300,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2180
2300
  var caption = _ref7.caption,
2181
2301
  transcribing = _ref7.transcribing;
2182
2302
  // @ts-ignore - config coming from registerPlugin
2183
- if (transcribing && _this11.transcription && _this11.config.receiveTranscription) {
2184
- _this11.receiveTranscription();
2185
- } else if (!transcribing && _this11.transcription) {
2186
- _triggerProxy.default.trigger(_this11, {
2303
+ if (transcribing && _this12.transcription && _this12.config.receiveTranscription) {
2304
+ _this12.receiveTranscription();
2305
+ } else if (!transcribing && _this12.transcription) {
2306
+ _triggerProxy.default.trigger(_this12, {
2187
2307
  file: 'meeting/index',
2188
2308
  function: 'setupLocusControlsListener'
2189
2309
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_RECEIVING_TRANSCRIPTION, {
@@ -2192,9 +2312,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2192
2312
  });
2193
2313
  }
2194
2314
  });
2195
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED, function (_ref8) {
2196
- var entryExitTone = _ref8.entryExitTone;
2197
- _triggerProxy.default.trigger(_this11, {
2315
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED, function (_ref8) {
2316
+ var breakout = _ref8.breakout;
2317
+ _this12.breakouts.updateBreakout(breakout);
2318
+ _triggerProxy.default.trigger(_this12, {
2319
+ file: 'meeting/index',
2320
+ function: 'setupLocusControlsListener'
2321
+ }, _constants.EVENT_TRIGGERS.MEETING_BREAKOUTS_UPDATE);
2322
+ });
2323
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED, function (_ref9) {
2324
+ var entryExitTone = _ref9.entryExitTone;
2325
+ _triggerProxy.default.trigger(_this12, {
2198
2326
  file: 'meeting/index',
2199
2327
  function: 'setupLocusControlsListener'
2200
2328
  }, _constants.EVENT_TRIGGERS.MEETING_ENTRY_EXIT_TONE_UPDATE, {
@@ -2214,7 +2342,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2214
2342
  }, {
2215
2343
  key: "setUpLocusMediaSharesListener",
2216
2344
  value: function setUpLocusMediaSharesListener() {
2217
- var _this12 = this;
2345
+ var _this13 = this;
2218
2346
  // Will get triggered on local and remote share
2219
2347
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, function (payload) {
2220
2348
  var _payload$previous, _payload$previous2;
@@ -2228,18 +2356,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2228
2356
  // (this happens when we steal presentation from remote)
2229
2357
  return;
2230
2358
  }
2231
- var newShareStatus = _this12.shareStatus;
2359
+ var newShareStatus = _this13.shareStatus;
2232
2360
 
2233
2361
  // REMOTE - check if remote started sharing
2234
- if (_this12.selfId !== contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
2362
+ if (_this13.selfId !== contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
2235
2363
  // CONTENT - sharing content remote
2236
2364
  newShareStatus = _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE;
2237
2365
  }
2238
2366
  // LOCAL - check if we started sharing content
2239
- else if (_this12.selfId === contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
2240
- var _this12$mediaProperti;
2241
- if (((_this12$mediaProperti = _this12.mediaProperties.shareTrack) === null || _this12$mediaProperti === void 0 ? void 0 : _this12$mediaProperti.readyState) === 'ended') {
2242
- _this12.stopShare({
2367
+ else if (_this13.selfId === contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
2368
+ var _this13$mediaProperti;
2369
+ if (((_this13$mediaProperti = _this13.mediaProperties.shareTrack) === null || _this13$mediaProperti === void 0 ? void 0 : _this13$mediaProperti.readyState) === 'ended') {
2370
+ _this13.stopShare({
2243
2371
  skipSignalingCheck: true
2244
2372
  }).catch(function (error) {
2245
2373
  _loggerProxy.default.logger.log('Meeting:index#setUpLocusMediaSharesListener --> Error stopping share: ', error);
@@ -2260,22 +2388,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2260
2388
  else if ((previousContentShare && contentShare.disposition === _constants.FLOOR_ACTION.RELEASED || contentShare.disposition === null) && (previousWhiteboardShare && whiteboardShare.disposition === _constants.FLOOR_ACTION.RELEASED || whiteboardShare.disposition === null)) {
2261
2389
  newShareStatus = _constants.SHARE_STATUS.NO_SHARE;
2262
2390
  }
2263
- if (newShareStatus !== _this12.shareStatus) {
2264
- var oldShareStatus = _this12.shareStatus;
2391
+ if (newShareStatus !== _this13.shareStatus) {
2392
+ var oldShareStatus = _this13.shareStatus;
2265
2393
 
2266
2394
  // update our state before we send out any notifications
2267
- _this12.shareStatus = newShareStatus;
2395
+ _this13.shareStatus = newShareStatus;
2268
2396
 
2269
2397
  // send out "stop" notifications for the old state
2270
2398
  switch (oldShareStatus) {
2271
2399
  case _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE:
2272
- _triggerProxy.default.trigger(_this12, {
2400
+ _triggerProxy.default.trigger(_this13, {
2273
2401
  file: 'meetings/index',
2274
2402
  function: 'remoteShare'
2275
2403
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_REMOTE);
2276
2404
  break;
2277
2405
  case _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE:
2278
- _triggerProxy.default.trigger(_this12, {
2406
+ _triggerProxy.default.trigger(_this13, {
2279
2407
  file: 'meeting/index',
2280
2408
  function: 'localShare'
2281
2409
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL, {
@@ -2283,7 +2411,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2283
2411
  });
2284
2412
  break;
2285
2413
  case _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE:
2286
- _triggerProxy.default.trigger(_this12, {
2414
+ _triggerProxy.default.trigger(_this13, {
2287
2415
  file: 'meeting/index',
2288
2416
  function: 'stopWhiteboardShare'
2289
2417
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_WHITEBOARD);
@@ -2299,9 +2427,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2299
2427
  switch (newShareStatus) {
2300
2428
  case _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE:
2301
2429
  {
2302
- var _this12$mediaProperti2;
2430
+ var _this13$mediaProperti2;
2303
2431
  var sendStartedSharingRemote = function sendStartedSharingRemote() {
2304
- _triggerProxy.default.trigger(_this12, {
2432
+ _triggerProxy.default.trigger(_this13, {
2305
2433
  file: 'meetings/index',
2306
2434
  function: 'remoteShare'
2307
2435
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE, {
@@ -2310,12 +2438,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2310
2438
  };
2311
2439
 
2312
2440
  // if a remote participant is stealing the presentation from us
2313
- if (!((_this12$mediaProperti2 = _this12.mediaProperties.mediaDirection) !== null && _this12$mediaProperti2 !== void 0 && _this12$mediaProperti2.sendShare) || oldShareStatus === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE) {
2441
+ if (!((_this13$mediaProperti2 = _this13.mediaProperties.mediaDirection) !== null && _this13$mediaProperti2 !== void 0 && _this13$mediaProperti2.sendShare) || oldShareStatus === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE) {
2314
2442
  sendStartedSharingRemote();
2315
2443
  } else {
2316
- _this12.updateShare({
2444
+ _this13.updateShare({
2317
2445
  sendShare: false,
2318
- receiveShare: _this12.mediaProperties.mediaDirection.receiveShare
2446
+ receiveShare: _this13.mediaProperties.mediaDirection.receiveShare
2319
2447
  }).finally(function () {
2320
2448
  sendStartedSharingRemote();
2321
2449
  });
@@ -2323,17 +2451,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2323
2451
  break;
2324
2452
  }
2325
2453
  case _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE:
2326
- _triggerProxy.default.trigger(_this12, {
2454
+ _triggerProxy.default.trigger(_this13, {
2327
2455
  file: 'meeting/index',
2328
2456
  function: 'share'
2329
2457
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_LOCAL);
2330
2458
  _metrics.default.postEvent({
2331
2459
  event: _config.eventType.LOCAL_SHARE_FLOOR_GRANTED,
2332
- meeting: _this12
2460
+ meeting: _this13
2333
2461
  });
2334
2462
  break;
2335
2463
  case _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE:
2336
- _triggerProxy.default.trigger(_this12, {
2464
+ _triggerProxy.default.trigger(_this13, {
2337
2465
  file: 'meeting/index',
2338
2466
  function: 'startWhiteboardShare'
2339
2467
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_WHITEBOARD, {
@@ -2342,7 +2470,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2342
2470
  });
2343
2471
  _metrics.default.postEvent({
2344
2472
  event: _config.eventType.WHITEBOARD_SHARE_FLOOR_GRANTED,
2345
- meeting: _this12
2473
+ meeting: _this13
2346
2474
  });
2347
2475
  break;
2348
2476
  case _constants.SHARE_STATUS.NO_SHARE:
@@ -2351,21 +2479,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2351
2479
  default:
2352
2480
  break;
2353
2481
  }
2354
- _this12.members.locusMediaSharesUpdate(payload);
2482
+ _this13.members.locusMediaSharesUpdate(payload);
2355
2483
  } else if (newShareStatus === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE) {
2356
2484
  // if we got here, then some remote participant has stolen
2357
2485
  // the presentation from another remote participant
2358
- _triggerProxy.default.trigger(_this12, {
2486
+ _triggerProxy.default.trigger(_this13, {
2359
2487
  file: 'meetings/index',
2360
2488
  function: 'remoteShare'
2361
2489
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE, {
2362
2490
  memberId: contentShare.beneficiaryId
2363
2491
  });
2364
- _this12.members.locusMediaSharesUpdate(payload);
2492
+ _this13.members.locusMediaSharesUpdate(payload);
2365
2493
  } else if (newShareStatus === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE) {
2366
2494
  // if we got here, then some remote participant has stolen
2367
2495
  // the presentation from another remote participant
2368
- _triggerProxy.default.trigger(_this12, {
2496
+ _triggerProxy.default.trigger(_this13, {
2369
2497
  file: 'meeting/index',
2370
2498
  function: 'startWhiteboardShare'
2371
2499
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_WHITEBOARD, {
@@ -2374,9 +2502,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2374
2502
  });
2375
2503
  _metrics.default.postEvent({
2376
2504
  event: _config.eventType.WHITEBOARD_SHARE_FLOOR_GRANTED,
2377
- meeting: _this12
2505
+ meeting: _this13
2378
2506
  });
2379
- _this12.members.locusMediaSharesUpdate(payload);
2507
+ _this13.members.locusMediaSharesUpdate(payload);
2380
2508
  }
2381
2509
  });
2382
2510
  }
@@ -2391,12 +2519,34 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2391
2519
  }, {
2392
2520
  key: "setUpLocusUrlListener",
2393
2521
  value: function setUpLocusUrlListener() {
2394
- var _this13 = this;
2522
+ var _this14 = this;
2395
2523
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_URL, function (payload) {
2396
- var _this13$locusUrl;
2397
- _this13.members.locusUrlUpdate(payload);
2398
- _this13.locusUrl = payload;
2399
- _this13.locusId = (_this13$locusUrl = _this13.locusUrl) === null || _this13$locusUrl === void 0 ? void 0 : _this13$locusUrl.split('/').pop();
2524
+ var _this14$locusUrl;
2525
+ _this14.members.locusUrlUpdate(payload);
2526
+ _this14.breakouts.locusUrlUpdate(payload);
2527
+ _this14.locusUrl = payload;
2528
+ _this14.locusId = (_this14$locusUrl = _this14.locusUrl) === null || _this14$locusUrl === void 0 ? void 0 : _this14$locusUrl.split('/').pop();
2529
+ _this14.recordingController.setLocusUrl(_this14.locusUrl);
2530
+ });
2531
+ }
2532
+
2533
+ /**
2534
+ * Set up the locus info service link listener
2535
+ * update the locusInfo for recording controller
2536
+ * does not currently re-emit the event as it's internal only
2537
+ * payload is unused
2538
+ * @returns {undefined}
2539
+ * @private
2540
+ * @memberof Meeting
2541
+ */
2542
+ }, {
2543
+ key: "setUpLocusServicesListener",
2544
+ value: function setUpLocusServicesListener() {
2545
+ var _this15 = this;
2546
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LINKS_SERVICES, function (payload) {
2547
+ var _payload$services, _payload$services$rec, _this15$locusInfo, _this15$locusInfo$ful;
2548
+ _this15.recordingController.setServiceUrl(payload === null || payload === void 0 ? void 0 : (_payload$services = payload.services) === null || _payload$services === void 0 ? void 0 : (_payload$services$rec = _payload$services.record) === null || _payload$services$rec === void 0 ? void 0 : _payload$services$rec.url);
2549
+ _this15.recordingController.setSessionId((_this15$locusInfo = _this15.locusInfo) === null || _this15$locusInfo === void 0 ? void 0 : (_this15$locusInfo$ful = _this15$locusInfo.fullState) === null || _this15$locusInfo$ful === void 0 ? void 0 : _this15$locusInfo$ful.sessionId);
2400
2550
  });
2401
2551
  }
2402
2552
 
@@ -2409,10 +2559,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2409
2559
  }, {
2410
2560
  key: "setUpLocusInfoMeetingInfoListener",
2411
2561
  value: function setUpLocusInfoMeetingInfoListener() {
2412
- var _this14 = this;
2562
+ var _this16 = this;
2413
2563
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_LOCKED, function (payload) {
2414
2564
  if (payload) {
2415
- _triggerProxy.default.trigger(_this14, {
2565
+ _triggerProxy.default.trigger(_this16, {
2416
2566
  file: 'meeting/index',
2417
2567
  function: 'setUpLocusInfoMeetingInfoListener'
2418
2568
  }, _constants.EVENT_TRIGGERS.MEETING_LOCKED, {
@@ -2422,7 +2572,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2422
2572
  });
2423
2573
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_UNLOCKED, function (payload) {
2424
2574
  if (payload) {
2425
- _triggerProxy.default.trigger(_this14, {
2575
+ _triggerProxy.default.trigger(_this16, {
2426
2576
  file: 'meeting/index',
2427
2577
  function: 'setUpLocusInfoMeetingInfoListener'
2428
2578
  }, _constants.EVENT_TRIGGERS.MEETING_UNLOCKED, {
@@ -2432,15 +2582,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2432
2582
  });
2433
2583
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (payload) {
2434
2584
  if (payload && payload.info) {
2435
- var changed = _this14.inMeetingActions.set({
2585
+ var changed = _this16.inMeetingActions.set({
2436
2586
  canInviteNewParticipants: _util.default.canInviteNewParticipants(payload.info.userDisplayHints),
2437
2587
  canAdmitParticipant: _util.default.canAdmitParticipant(payload.info.userDisplayHints),
2438
2588
  canLock: _util.default.canUserLock(payload.info.userDisplayHints),
2439
2589
  canUnlock: _util.default.canUserUnlock(payload.info.userDisplayHints),
2440
- canStartRecording: _util.default.canUserRecord(payload.info.userDisplayHints),
2441
- canStopRecording: _util.default.canUserStop(payload.info.userDisplayHints),
2442
- canPauseRecording: _util.default.canUserPause(payload.info.userDisplayHints),
2443
- canResumeRecording: _util.default.canUserResume(payload.info.userDisplayHints),
2590
+ canStartRecording: _util2.default.canUserStart(payload.info.userDisplayHints),
2591
+ canStopRecording: _util2.default.canUserStop(payload.info.userDisplayHints),
2592
+ canPauseRecording: _util2.default.canUserPause(payload.info.userDisplayHints),
2593
+ canResumeRecording: _util2.default.canUserResume(payload.info.userDisplayHints),
2444
2594
  canRaiseHand: _util.default.canUserRaiseHand(payload.info.userDisplayHints),
2445
2595
  canLowerAllHands: _util.default.canUserLowerAllHands(payload.info.userDisplayHints),
2446
2596
  canLowerSomeoneElsesHand: _util.default.canUserLowerSomeoneElsesHand(payload.info.userDisplayHints),
@@ -2454,16 +2604,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2454
2604
  isRealTimeTranslationEnabled: _util.default.isRealTimeTranslationEnabled(payload.info.userDisplayHints),
2455
2605
  canSelectSpokenLanguages: _util.default.canSelectSpokenLanguages(payload.info.userDisplayHints),
2456
2606
  waitingForOthersToJoin: _util.default.waitingForOthersToJoin(payload.info.userDisplayHints),
2457
- canEnableReactions: _util.default.canEnableReactions(_this14.inMeetingActions.canEnableReactions, payload.info.userDisplayHints),
2458
- canSendReactions: _util.default.canSendReactions(_this14.inMeetingActions.canSendReactions, payload.info.userDisplayHints)
2607
+ canEnableReactions: _util.default.canEnableReactions(_this16.inMeetingActions.canEnableReactions, payload.info.userDisplayHints),
2608
+ canSendReactions: _util.default.canSendReactions(_this16.inMeetingActions.canSendReactions, payload.info.userDisplayHints)
2459
2609
  });
2610
+ _this16.recordingController.setDisplayHints(payload.info.userDisplayHints);
2460
2611
  if (changed) {
2461
- _triggerProxy.default.trigger(_this14, {
2612
+ _triggerProxy.default.trigger(_this16, {
2462
2613
  file: 'meeting/index',
2463
2614
  function: 'setUpLocusInfoMeetingInfoListener'
2464
- }, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, _this14.inMeetingActions.get());
2615
+ }, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, _this16.inMeetingActions.get());
2465
2616
  }
2466
- _this14.handleDataChannelUrlChange(payload.info.datachannelUrl);
2617
+ _this16.handleDataChannelUrlChange(payload.info.datachannelUrl);
2467
2618
  }
2468
2619
  });
2469
2620
  }
@@ -2476,12 +2627,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2476
2627
  }, {
2477
2628
  key: "handleDataChannelUrlChange",
2478
2629
  value: function handleDataChannelUrlChange(datachannelUrl) {
2479
- var _this15 = this;
2630
+ var _this17 = this;
2631
+ // @ts-ignore - config coming from registerPlugin
2480
2632
  if (datachannelUrl && this.config.enableAutomaticLLM) {
2481
2633
  // Defer this as updateLLMConnection relies upon this.locusInfo.url which is only set
2482
2634
  // after the MEETING_INFO_UPDATED callback finishes
2483
2635
  (0, _defer2.default)(function () {
2484
- _this15.updateLLMConnection();
2636
+ _this17.updateLLMConnection();
2485
2637
  });
2486
2638
  }
2487
2639
  }
@@ -2495,10 +2647,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2495
2647
  }, {
2496
2648
  key: "setUpLocusEmbeddedAppsListener",
2497
2649
  value: function setUpLocusEmbeddedAppsListener() {
2498
- var _this16 = this;
2650
+ var _this18 = this;
2499
2651
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.EMBEDDED_APPS_UPDATED, function (embeddedApps) {
2500
2652
  if (embeddedApps) {
2501
- _triggerProxy.default.trigger(_this16, {
2653
+ _triggerProxy.default.trigger(_this18, {
2502
2654
  file: 'meeting/index',
2503
2655
  function: 'setUpLocusEmbeddedAppsListener'
2504
2656
  }, _constants.EVENT_TRIGGERS.MEETING_EMBEDDED_APPS_UPDATE, embeddedApps);
@@ -2515,11 +2667,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2515
2667
  }, {
2516
2668
  key: "setUpLocusInfoSelfListener",
2517
2669
  value: function setUpLocusInfoSelfListener() {
2518
- var _this17 = this;
2670
+ var _this19 = this;
2519
2671
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED, function (payload) {
2520
- if (_this17.audio) {
2521
- _this17.audio.handleServerLocalUnmuteRequired(_this17);
2522
- _triggerProxy.default.trigger(_this17, {
2672
+ if (_this19.audio) {
2673
+ _this19.audio.handleServerLocalUnmuteRequired(_this19);
2674
+ _triggerProxy.default.trigger(_this19, {
2523
2675
  file: 'meeting/index',
2524
2676
  function: 'setUpLocusInfoSelfListener'
2525
2677
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS, {
@@ -2529,15 +2681,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2529
2681
  });
2530
2682
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED, function (payload) {
2531
2683
  if (payload) {
2532
- var _this17$audio;
2533
- if (_this17.audio) {
2534
- _this17.audio.handleServerRemoteMuteUpdate(payload.muted, payload.unmuteAllowed);
2684
+ var _this19$audio;
2685
+ if (_this19.audio) {
2686
+ _this19.audio.handleServerRemoteMuteUpdate(payload.muted, payload.unmuteAllowed);
2535
2687
  }
2536
2688
  // with "mute on entry" server will send us remote mute even if we don't have media configured,
2537
2689
  // so if being muted by others, always send the notification,
2538
2690
  // but if being unmuted, only send it if we are also locally unmuted
2539
- if (payload.muted || !((_this17$audio = _this17.audio) !== null && _this17$audio !== void 0 && _this17$audio.isMuted())) {
2540
- _triggerProxy.default.trigger(_this17, {
2691
+ if (payload.muted || !((_this19$audio = _this19.audio) !== null && _this19$audio !== void 0 && _this19$audio.isMuted())) {
2692
+ _triggerProxy.default.trigger(_this19, {
2541
2693
  file: 'meeting/index',
2542
2694
  function: 'setUpLocusInfoSelfListener'
2543
2695
  }, payload.muted ? _constants.EVENT_TRIGGERS.MEETING_SELF_MUTED_BY_OTHERS : _constants.EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS, {
@@ -2547,7 +2699,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2547
2699
  }
2548
2700
  });
2549
2701
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED, function (payload) {
2550
- _triggerProxy.default.trigger(_this17, {
2702
+ _triggerProxy.default.trigger(_this19, {
2551
2703
  file: 'meeting/index',
2552
2704
  function: 'setUpLocusInfoSelfListener'
2553
2705
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_REQUESTED_TO_UNMUTE, {
@@ -2556,8 +2708,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2556
2708
  });
2557
2709
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_UNADMITTED_GUEST, function (payload) {
2558
2710
  if (payload) {
2559
- _this17.startKeepAlive();
2560
- _triggerProxy.default.trigger(_this17, {
2711
+ _this19.startKeepAlive();
2712
+ _triggerProxy.default.trigger(_this19, {
2561
2713
  file: 'meeting/index',
2562
2714
  function: 'setUpLocusInfoSelfListener'
2563
2715
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_LOBBY_WAITING, {
@@ -2565,14 +2717,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2565
2717
  });
2566
2718
  _metrics.default.postEvent({
2567
2719
  event: _config.eventType.LOBBY_ENTERED,
2568
- meeting: _this17
2720
+ meeting: _this19
2569
2721
  });
2570
2722
  }
2571
2723
  });
2572
2724
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, function (payload) {
2573
- _this17.stopKeepAlive();
2725
+ _this19.stopKeepAlive();
2574
2726
  if (payload) {
2575
- _triggerProxy.default.trigger(_this17, {
2727
+ _triggerProxy.default.trigger(_this19, {
2576
2728
  file: 'meeting/index',
2577
2729
  function: 'setUpLocusInfoSelfListener'
2578
2730
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_GUEST_ADMITTED, {
@@ -2580,7 +2732,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2580
2732
  });
2581
2733
  _metrics.default.postEvent({
2582
2734
  event: _config.eventType.LOBBY_EXITED,
2583
- meeting: _this17
2735
+ meeting: _this19
2584
2736
  });
2585
2737
  }
2586
2738
  });
@@ -2588,42 +2740,49 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2588
2740
  // @ts-ignore - check if MEDIA_INACTIVITY exists
2589
2741
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, function () {
2590
2742
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_MEDIA_INACTIVE, {
2591
- correlation_id: _this17.correlationId,
2592
- locus_id: _this17.locusId
2743
+ correlation_id: _this19.correlationId,
2744
+ locus_id: _this19.locusId
2593
2745
  });
2594
- _this17.reconnect();
2746
+ _this19.reconnect();
2595
2747
  });
2596
2748
 
2597
2749
  // There is two stats for mute one is the actual media being sent or received
2598
2750
  // The second on is if the audio is muted, we need to tell the statsAnalyzer when
2599
2751
  // the audio is muted or the user is not willing to send media
2600
2752
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_STATUS_CHANGE, function (status) {
2601
- if (_this17.statsAnalyzer) {
2602
- var _this17$mediaProperti, _this17$audio2, _this17$mediaProperti2, _this17$video, _this17$mediaProperti3, _this17$mediaProperti4, _this17$mediaProperti5, _this17$mediaProperti6;
2603
- _this17.statsAnalyzer.updateMediaStatus({
2753
+ if (_this19.statsAnalyzer) {
2754
+ var _this19$mediaProperti, _this19$audio2, _this19$mediaProperti2, _this19$video, _this19$mediaProperti3, _this19$mediaProperti4, _this19$mediaProperti5, _this19$mediaProperti6;
2755
+ _this19.statsAnalyzer.updateMediaStatus({
2604
2756
  actual: status,
2605
2757
  expected: {
2606
2758
  // We need to check what should be the actual direction of media
2607
- sendAudio: ((_this17$mediaProperti = _this17.mediaProperties.mediaDirection) === null || _this17$mediaProperti === void 0 ? void 0 : _this17$mediaProperti.sendAudio) && !((_this17$audio2 = _this17.audio) !== null && _this17$audio2 !== void 0 && _this17$audio2.isMuted()),
2608
- sendVideo: ((_this17$mediaProperti2 = _this17.mediaProperties.mediaDirection) === null || _this17$mediaProperti2 === void 0 ? void 0 : _this17$mediaProperti2.sendVideo) && !((_this17$video = _this17.video) !== null && _this17$video !== void 0 && _this17$video.isMuted()),
2609
- sendShare: (_this17$mediaProperti3 = _this17.mediaProperties.mediaDirection) === null || _this17$mediaProperti3 === void 0 ? void 0 : _this17$mediaProperti3.sendShare,
2610
- receiveAudio: (_this17$mediaProperti4 = _this17.mediaProperties.mediaDirection) === null || _this17$mediaProperti4 === void 0 ? void 0 : _this17$mediaProperti4.receiveAudio,
2611
- receiveVideo: (_this17$mediaProperti5 = _this17.mediaProperties.mediaDirection) === null || _this17$mediaProperti5 === void 0 ? void 0 : _this17$mediaProperti5.receiveVideo,
2612
- receiveShare: (_this17$mediaProperti6 = _this17.mediaProperties.mediaDirection) === null || _this17$mediaProperti6 === void 0 ? void 0 : _this17$mediaProperti6.receiveShare
2759
+ sendAudio: ((_this19$mediaProperti = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti === void 0 ? void 0 : _this19$mediaProperti.sendAudio) && !((_this19$audio2 = _this19.audio) !== null && _this19$audio2 !== void 0 && _this19$audio2.isMuted()),
2760
+ sendVideo: ((_this19$mediaProperti2 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti2 === void 0 ? void 0 : _this19$mediaProperti2.sendVideo) && !((_this19$video = _this19.video) !== null && _this19$video !== void 0 && _this19$video.isMuted()),
2761
+ sendShare: (_this19$mediaProperti3 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti3 === void 0 ? void 0 : _this19$mediaProperti3.sendShare,
2762
+ receiveAudio: (_this19$mediaProperti4 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti4 === void 0 ? void 0 : _this19$mediaProperti4.receiveAudio,
2763
+ receiveVideo: (_this19$mediaProperti5 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti5 === void 0 ? void 0 : _this19$mediaProperti5.receiveVideo,
2764
+ receiveShare: (_this19$mediaProperti6 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti6 === void 0 ? void 0 : _this19$mediaProperti6.receiveShare
2613
2765
  }
2614
2766
  });
2615
2767
  }
2616
2768
  });
2617
2769
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_CANNOT_VIEW_PARTICIPANT_LIST_CHANGE, function (payload) {
2618
- _triggerProxy.default.trigger(_this17, {
2770
+ _triggerProxy.default.trigger(_this19, {
2619
2771
  file: 'meeting/index',
2620
2772
  function: 'setUpLocusInfoSelfListener'
2621
2773
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_CANNOT_VIEW_PARTICIPANT_LIST, {
2622
2774
  payload: payload
2623
2775
  });
2624
2776
  });
2777
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_MEETING_BREAKOUTS_CHANGED, function (payload) {
2778
+ _this19.breakouts.updateBreakoutSessions(payload);
2779
+ _triggerProxy.default.trigger(_this19, {
2780
+ file: 'meeting/index',
2781
+ function: 'setUpLocusInfoSelfListener'
2782
+ }, _constants.EVENT_TRIGGERS.MEETING_BREAKOUTS_UPDATE);
2783
+ });
2625
2784
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_IS_SHARING_BLOCKED_CHANGE, function (payload) {
2626
- _triggerProxy.default.trigger(_this17, {
2785
+ _triggerProxy.default.trigger(_this19, {
2627
2786
  file: 'meeting/index',
2628
2787
  function: 'setUpLocusInfoSelfListener'
2629
2788
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_IS_SHARING_BLOCKED, {
@@ -2641,17 +2800,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2641
2800
  }, {
2642
2801
  key: "setUpLocusInfoMeetingListener",
2643
2802
  value: function setUpLocusInfoMeetingListener() {
2644
- var _this18 = this;
2803
+ var _this20 = this;
2645
2804
  this.locusInfo.on(_constants.EVENTS.REMOTE_RESPONSE, function (payload) {
2646
- _this18.meetingFiniteStateMachine.remote(payload);
2805
+ _this20.meetingFiniteStateMachine.remote(payload);
2647
2806
  if (payload.remoteDeclined) {
2648
- _this18.leave({
2807
+ _this20.leave({
2649
2808
  reason: payload.reason
2650
2809
  }).then(function () {
2651
2810
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Attempting to leave meeting.');
2652
2811
  }).catch(function (error) {
2653
2812
  // @ts-ignore
2654
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Issue with leave for meeting, meeting still in collection: ".concat(_this18.meeting, ", error: ").concat(error));
2813
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(error));
2655
2814
  });
2656
2815
  }
2657
2816
  });
@@ -2659,10 +2818,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2659
2818
  // if self state is NOT left
2660
2819
 
2661
2820
  // TODO: Handle sharing and wireless sharing when meeting end
2662
- if (_this18.wirelessShare) {
2663
- if (_this18.mediaProperties.shareTrack) {
2664
- _this18.mediaProperties.shareTrack.onended = null;
2665
- _this18.mediaProperties.shareTrack.stop();
2821
+ if (_this20.wirelessShare) {
2822
+ if (_this20.mediaProperties.shareTrack) {
2823
+ _this20.mediaProperties.shareTrack.onended = null;
2824
+ _this20.mediaProperties.shareTrack.stop();
2666
2825
  }
2667
2826
  }
2668
2827
  // when multiple WEB deviceType join with same user
@@ -2676,23 +2835,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2676
2835
  if (payload.shouldLeave) {
2677
2836
  // TODO: We should do cleaning of meeting object if the shouldLeave: false because there might be meeting object which we are not cleaning
2678
2837
 
2679
- _this18.leave({
2838
+ _this20.leave({
2680
2839
  reason: payload.reason
2681
2840
  }).then(function () {
2682
2841
  _loggerProxy.default.logger.warn('Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. The meeting has been left, but has not been destroyed, you should see a later event for leave.');
2683
2842
  }).catch(function (error) {
2684
2843
  // @ts-ignore
2685
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this18.meeting, ", error: ").concat(error));
2844
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(error));
2686
2845
  });
2687
2846
  } else {
2688
2847
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> MEETING_REMOVED_REASON', payload.reason);
2689
- _util.default.cleanUp(_this18);
2690
- _triggerProxy.default.trigger(_this18, {
2848
+ _util.default.cleanUp(_this20);
2849
+ _triggerProxy.default.trigger(_this20, {
2691
2850
  file: 'meeting/index',
2692
2851
  function: 'setUpLocusInfoMeetingListener'
2693
2852
  }, _constants.EVENTS.DESTROY_MEETING, {
2694
2853
  reason: payload.reason,
2695
- meetingId: _this18.id
2854
+ meetingId: _this20.id
2696
2855
  });
2697
2856
  }
2698
2857
  });
@@ -2709,13 +2868,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2709
2868
  }, {
2710
2869
  key: "updateMeetingObject",
2711
2870
  value: function updateMeetingObject(object) {
2712
- var _this19 = this;
2871
+ var _this21 = this;
2713
2872
  // Validate if these are valid meeting object property
2714
2873
  // TODO: add a check to make sure the value passed in the constructor
2715
2874
  // is not changed by any delta event
2716
2875
  if (object && (0, _keys.default)(object).length) {
2717
2876
  (0, _keys.default)(object).forEach(function (key) {
2718
- _this19[key] = object[key];
2877
+ _this21[key] = object[key];
2719
2878
  });
2720
2879
  }
2721
2880
  }
@@ -2923,7 +3082,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2923
3082
  this.conversationUrl = ((_locusMeetingObject = locusMeetingObject) === null || _locusMeetingObject === void 0 ? void 0 : _locusMeetingObject.conversationUrl) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.conversationUrl) || this.conversationUrl;
2924
3083
  this.locusUrl = ((_locusMeetingObject2 = locusMeetingObject) === null || _locusMeetingObject2 === void 0 ? void 0 : _locusMeetingObject2.url) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.locusUrl) || this.locusUrl;
2925
3084
  // @ts-ignore - config coming from registerPlugin
2926
- this.setSipUri(this.config.experimental.enableUnifiedMeetings ? ((_locusMeetingObject3 = locusMeetingObject) === null || _locusMeetingObject3 === void 0 ? void 0 : _locusMeetingObject3.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipUrl) : ((_locusMeetingObject4 = locusMeetingObject) === null || _locusMeetingObject4 === void 0 ? void 0 : _locusMeetingObject4.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipMeetingUri) || this.sipUri);
3085
+ this.setSipUri(
3086
+ // @ts-ignore
3087
+ this.config.experimental.enableUnifiedMeetings ? ((_locusMeetingObject3 = locusMeetingObject) === null || _locusMeetingObject3 === void 0 ? void 0 : _locusMeetingObject3.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipUrl) : ((_locusMeetingObject4 = locusMeetingObject) === null || _locusMeetingObject4 === void 0 ? void 0 : _locusMeetingObject4.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipMeetingUri) || this.sipUri);
2927
3088
  // @ts-ignore - config coming from registerPlugin
2928
3089
  if (this.config.experimental.enableUnifiedMeetings) {
2929
3090
  var _locusMeetingObject5;
@@ -3076,7 +3237,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3076
3237
  }, {
3077
3238
  key: "closeRemoteTracks",
3078
3239
  value: function closeRemoteTracks() {
3079
- var _this20 = this;
3240
+ var _this22 = this;
3080
3241
  var _this$mediaProperties = this.mediaProperties,
3081
3242
  remoteAudioTrack = _this$mediaProperties.remoteAudioTrack,
3082
3243
  remoteVideoTrack = _this$mediaProperties.remoteVideoTrack,
@@ -3090,7 +3251,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3090
3251
  */
3091
3252
  // eslint-disable-next-line @typescript-eslint/no-shadow
3092
3253
  var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
3093
- _triggerProxy.default.trigger(_this20, {
3254
+ _triggerProxy.default.trigger(_this22, {
3094
3255
  file: 'meeting/index',
3095
3256
  function: 'closeRemoteTracks'
3096
3257
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -3134,7 +3295,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3134
3295
  function: 'setLocalTracks'
3135
3296
  }, _constants.EVENT_TRIGGERS.MEDIA_READY, {
3136
3297
  type: _constants.EVENT_TYPES.LOCAL,
3137
- stream: _util2.default.createMediaStream([this.mediaProperties.audioTrack, this.mediaProperties.videoTrack])
3298
+ stream: _util3.default.createMediaStream([this.mediaProperties.audioTrack, this.mediaProperties.videoTrack])
3138
3299
  });
3139
3300
  }
3140
3301
 
@@ -3238,7 +3399,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3238
3399
  }, {
3239
3400
  key: "setLocalShareTrack",
3240
3401
  value: function setLocalShareTrack(localShare) {
3241
- var _this21 = this;
3402
+ var _this23 = this;
3242
3403
  var settings = null;
3243
3404
  if (localShare) {
3244
3405
  this.mediaProperties.setLocalShareTrack(_util.default.getTrack(localShare).videoTrack);
@@ -3256,7 +3417,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3256
3417
  _loggerProxy.default.logger.log('Meeting:index#setLocalShareTrack --> Screen settings.', (0, _stringify.default)(this.mediaProperties.mediaSettings.screen));
3257
3418
  }
3258
3419
  contentTracks.onended = function () {
3259
- return _this21.handleShareTrackEnded(localShare);
3420
+ return _this23.handleShareTrackEnded(localShare);
3260
3421
  };
3261
3422
  _triggerProxy.default.trigger(this, {
3262
3423
  file: 'meeting/index',
@@ -3278,7 +3439,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3278
3439
  }, {
3279
3440
  key: "closeLocalStream",
3280
3441
  value: function closeLocalStream() {
3281
- var _this22 = this;
3442
+ var _this24 = this;
3282
3443
  var _this$mediaProperties2 = this.mediaProperties,
3283
3444
  audioTrack = _this$mediaProperties2.audioTrack,
3284
3445
  videoTrack = _this$mediaProperties2.videoTrack;
@@ -3290,7 +3451,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3290
3451
 
3291
3452
  // triggers event for audio and video stop , sometime either audio or video one of them exists
3292
3453
  if (audioStopped || videoStopped) {
3293
- _triggerProxy.default.trigger(_this22, {
3454
+ _triggerProxy.default.trigger(_this24, {
3294
3455
  file: 'meeting/index',
3295
3456
  function: 'closeLocalStream'
3296
3457
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -3312,11 +3473,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3312
3473
  }, {
3313
3474
  key: "closeLocalShare",
3314
3475
  value: function closeLocalShare() {
3315
- var _this23 = this;
3476
+ var _this25 = this;
3316
3477
  var track = this.mediaProperties.shareTrack;
3317
3478
  return _media.default.stopTracks(track).then(function () {
3318
3479
  if (track && track.readyState === _constants.ENDED) {
3319
- _triggerProxy.default.trigger(_this23, {
3480
+ _triggerProxy.default.trigger(_this25, {
3320
3481
  file: 'meeting/index',
3321
3482
  function: 'closeLocalShare'
3322
3483
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -3362,7 +3523,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3362
3523
  }, {
3363
3524
  key: "setMercuryListener",
3364
3525
  value: function setMercuryListener() {
3365
- var _this24 = this;
3526
+ var _this26 = this;
3366
3527
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
3367
3528
  // if the meeting has active peer connections, it should try to reconnect.
3368
3529
  // @ts-ignore
@@ -3370,16 +3531,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3370
3531
  _loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online');
3371
3532
 
3372
3533
  // Only send restore event when it was disconnected before and for connected later
3373
- if (!_this24.hasWebsocketConnected) {
3534
+ if (!_this26.hasWebsocketConnected) {
3374
3535
  _metrics.default.postEvent({
3375
3536
  event: _config.eventType.MERCURY_CONNECTION_RESTORED,
3376
- meeting: _this24
3537
+ meeting: _this26
3377
3538
  });
3378
3539
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
3379
- correlation_id: _this24.correlationId
3540
+ correlation_id: _this26.correlationId
3380
3541
  });
3381
3542
  }
3382
- _this24.hasWebsocketConnected = true;
3543
+ _this26.hasWebsocketConnected = true;
3383
3544
  });
3384
3545
 
3385
3546
  // @ts-ignore
@@ -3387,10 +3548,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3387
3548
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
3388
3549
  _metrics.default.postEvent({
3389
3550
  event: _config.eventType.MERCURY_CONNECTION_LOST,
3390
- meeting: _this24
3551
+ meeting: _this26
3391
3552
  });
3392
3553
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
3393
- correlation_id: _this24.correlationId
3554
+ correlation_id: _this26.correlationId
3394
3555
  });
3395
3556
  });
3396
3557
  }
@@ -3460,7 +3621,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3460
3621
  }, {
3461
3622
  key: "muteAudio",
3462
3623
  value: function muteAudio() {
3463
- var _this25 = this;
3624
+ var _this27 = this;
3464
3625
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3465
3626
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3466
3627
  }
@@ -3477,10 +3638,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3477
3638
 
3478
3639
  // First, stop sending the local audio media
3479
3640
  return logRequest(this.audio.handleClientRequest(this, true).then(function () {
3480
- _util.default.handleAudioLogging(_this25.mediaProperties.audioTrack);
3641
+ _util.default.handleAudioLogging(_this27.mediaProperties.audioTrack);
3481
3642
  _metrics.default.postEvent({
3482
3643
  event: _config.eventType.MUTED,
3483
- meeting: _this25,
3644
+ meeting: _this27,
3484
3645
  data: {
3485
3646
  trigger: _config.trigger.USER_INTERACTION,
3486
3647
  mediaType: _config.mediaType.AUDIO
@@ -3488,8 +3649,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3488
3649
  });
3489
3650
  }).catch(function (error) {
3490
3651
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
3491
- correlation_id: _this25.correlationId,
3492
- locus_id: _this25.locusUrl.split('/').pop(),
3652
+ correlation_id: _this27.correlationId,
3653
+ locus_id: _this27.locusUrl.split('/').pop(),
3493
3654
  reason: error.message,
3494
3655
  stack: error.stack
3495
3656
  });
@@ -3510,7 +3671,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3510
3671
  }, {
3511
3672
  key: "unmuteAudio",
3512
3673
  value: function unmuteAudio() {
3513
- var _this26 = this;
3674
+ var _this28 = this;
3514
3675
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3515
3676
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3516
3677
  }
@@ -3527,10 +3688,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3527
3688
 
3528
3689
  // First, send the control to unmute the participant on the server
3529
3690
  return logRequest(this.audio.handleClientRequest(this, false).then(function () {
3530
- _util.default.handleAudioLogging(_this26.mediaProperties.audioTrack);
3691
+ _util.default.handleAudioLogging(_this28.mediaProperties.audioTrack);
3531
3692
  _metrics.default.postEvent({
3532
3693
  event: _config.eventType.UNMUTED,
3533
- meeting: _this26,
3694
+ meeting: _this28,
3534
3695
  data: {
3535
3696
  trigger: _config.trigger.USER_INTERACTION,
3536
3697
  mediaType: _config.mediaType.AUDIO
@@ -3538,8 +3699,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3538
3699
  });
3539
3700
  }).catch(function (error) {
3540
3701
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_AUDIO_FAILURE, {
3541
- correlation_id: _this26.correlationId,
3542
- locus_id: _this26.locusUrl.split('/').pop(),
3702
+ correlation_id: _this28.correlationId,
3703
+ locus_id: _this28.locusUrl.split('/').pop(),
3543
3704
  reason: error.message,
3544
3705
  stack: error.stack
3545
3706
  });
@@ -3560,7 +3721,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3560
3721
  }, {
3561
3722
  key: "muteVideo",
3562
3723
  value: function muteVideo() {
3563
- var _this27 = this;
3724
+ var _this29 = this;
3564
3725
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3565
3726
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3566
3727
  }
@@ -3575,10 +3736,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3575
3736
  }
3576
3737
  var LOG_HEADER = 'Meeting:index#muteVideo -->';
3577
3738
  return logRequest(this.video.handleClientRequest(this, true).then(function () {
3578
- _util.default.handleVideoLogging(_this27.mediaProperties.videoTrack);
3739
+ _util.default.handleVideoLogging(_this29.mediaProperties.videoTrack);
3579
3740
  _metrics.default.postEvent({
3580
3741
  event: _config.eventType.MUTED,
3581
- meeting: _this27,
3742
+ meeting: _this29,
3582
3743
  data: {
3583
3744
  trigger: _config.trigger.USER_INTERACTION,
3584
3745
  mediaType: _config.mediaType.VIDEO
@@ -3586,8 +3747,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3586
3747
  });
3587
3748
  }).catch(function (error) {
3588
3749
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_VIDEO_FAILURE, {
3589
- correlation_id: _this27.correlationId,
3590
- locus_id: _this27.locusUrl.split('/').pop(),
3750
+ correlation_id: _this29.correlationId,
3751
+ locus_id: _this29.locusUrl.split('/').pop(),
3591
3752
  reason: error.message,
3592
3753
  stack: error.stack
3593
3754
  });
@@ -3608,7 +3769,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3608
3769
  }, {
3609
3770
  key: "unmuteVideo",
3610
3771
  value: function unmuteVideo() {
3611
- var _this28 = this;
3772
+ var _this30 = this;
3612
3773
  if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3613
3774
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3614
3775
  }
@@ -3623,10 +3784,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3623
3784
  }
3624
3785
  var LOG_HEADER = 'Meeting:index#unmuteVideo -->';
3625
3786
  return logRequest(this.video.handleClientRequest(this, false).then(function () {
3626
- _util.default.handleVideoLogging(_this28.mediaProperties.videoTrack);
3787
+ _util.default.handleVideoLogging(_this30.mediaProperties.videoTrack);
3627
3788
  _metrics.default.postEvent({
3628
3789
  event: _config.eventType.UNMUTED,
3629
- meeting: _this28,
3790
+ meeting: _this30,
3630
3791
  data: {
3631
3792
  trigger: _config.trigger.USER_INTERACTION,
3632
3793
  mediaType: _config.mediaType.VIDEO
@@ -3634,8 +3795,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3634
3795
  });
3635
3796
  }).catch(function (error) {
3636
3797
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_VIDEO_FAILURE, {
3637
- correlation_id: _this28.correlationId,
3638
- locus_id: _this28.locusUrl.split('/').pop(),
3798
+ correlation_id: _this30.correlationId,
3799
+ locus_id: _this30.locusUrl.split('/').pop(),
3639
3800
  reason: error.message,
3640
3801
  stack: error.stack
3641
3802
  });
@@ -3675,18 +3836,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3675
3836
  }, {
3676
3837
  key: "joinWithMedia",
3677
3838
  value: function joinWithMedia() {
3678
- var _this29 = this;
3839
+ var _this31 = this;
3679
3840
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3680
3841
  // TODO: add validations for parameters
3681
3842
  var mediaSettings = options.mediaSettings,
3682
3843
  joinOptions = options.joinOptions,
3683
3844
  audioVideoOptions = options.audioVideoOptions;
3684
3845
  return this.join(joinOptions).then(function (joinResponse) {
3685
- return _this29.getMediaStreams(mediaSettings, audioVideoOptions).then(function (_ref9) {
3686
- var _ref10 = (0, _slicedToArray2.default)(_ref9, 2),
3687
- localStream = _ref10[0],
3688
- localShare = _ref10[1];
3689
- return _this29.addMedia({
3846
+ return _this31.getMediaStreams(mediaSettings, audioVideoOptions).then(function (_ref10) {
3847
+ var _ref11 = (0, _slicedToArray2.default)(_ref10, 2),
3848
+ localStream = _ref11[0],
3849
+ localShare = _ref11[1];
3850
+ return _this31.addMedia({
3690
3851
  mediaSettings: mediaSettings,
3691
3852
  localShare: localShare,
3692
3853
  localStream: localStream
@@ -3701,8 +3862,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3701
3862
  }).catch(function (error) {
3702
3863
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', error);
3703
3864
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
3704
- correlation_id: _this29.correlationId,
3705
- locus_id: _this29.locusUrl.split('/').pop(),
3865
+ correlation_id: _this31.correlationId,
3866
+ locus_id: _this31.locusUrl.split('/').pop(),
3706
3867
  reason: error.message,
3707
3868
  stack: error.stack
3708
3869
  }, {
@@ -3723,7 +3884,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3723
3884
  }, {
3724
3885
  key: "reconnect",
3725
3886
  value: function reconnect(options) {
3726
- var _this30 = this;
3887
+ var _this32 = this;
3727
3888
  _loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
3728
3889
  if (!this.reconnectionManager || !this.reconnectionManager.reconnect) {
3729
3890
  return _promise.default.reject(new _parameter.default('Cannot reconnect, ReconnectionManager must first be defined.'));
@@ -3751,13 +3912,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3751
3912
  function: 'reconnect'
3752
3913
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING);
3753
3914
  return this.reconnectionManager.reconnect(options).then(function () {
3754
- _triggerProxy.default.trigger(_this30, {
3915
+ _triggerProxy.default.trigger(_this32, {
3755
3916
  file: 'meeting/index',
3756
3917
  function: 'reconnect'
3757
3918
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_SUCCESS);
3758
3919
  _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
3759
3920
  }).catch(function (error) {
3760
- _triggerProxy.default.trigger(_this30, {
3921
+ _triggerProxy.default.trigger(_this32, {
3761
3922
  file: 'meeting/index',
3762
3923
  function: 'reconnect'
3763
3924
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_FAILURE, {
@@ -3765,18 +3926,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3765
3926
  });
3766
3927
  _loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
3767
3928
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_RECONNECT_FAILURE, {
3768
- correlation_id: _this30.correlationId,
3769
- locus_id: _this30.locusUrl.split('/').pop(),
3929
+ correlation_id: _this32.correlationId,
3930
+ locus_id: _this32.locusUrl.split('/').pop(),
3770
3931
  reason: error.message,
3771
3932
  stack: error.stack
3772
3933
  });
3773
- _this30.uploadLogs({
3934
+ _this32.uploadLogs({
3774
3935
  file: 'meeting/index',
3775
3936
  function: 'reconnect'
3776
3937
  });
3777
3938
  return _promise.default.reject(new _reconnection.default('Reconnection failure event', error));
3778
3939
  }).finally(function () {
3779
- _this30.reconnectionManager.reset();
3940
+ _this32.reconnectionManager.reset();
3780
3941
  });
3781
3942
  }
3782
3943
 
@@ -3796,6 +3957,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3796
3957
  return false;
3797
3958
  }
3798
3959
 
3960
+ /**
3961
+ * Check if the meeting supports the Reactions
3962
+ * @returns {boolean}
3963
+ */
3964
+ }, {
3965
+ key: "isReactionsSupported",
3966
+ value: function isReactionsSupported() {
3967
+ var _this$locusInfo4, _this$locusInfo4$cont;
3968
+ if ((_this$locusInfo4 = this.locusInfo) !== null && _this$locusInfo4 !== void 0 && (_this$locusInfo4$cont = _this$locusInfo4.controls) !== null && _this$locusInfo4$cont !== void 0 && _this$locusInfo4$cont.reactions.enabled) {
3969
+ return true;
3970
+ }
3971
+ _loggerProxy.default.logger.error('Meeting:index#isReactionsSupported --> Reactions is not supported');
3972
+ return false;
3973
+ }
3974
+
3799
3975
  /**
3800
3976
  * Monitor the Low-Latency Mercury (LLM) web socket connection on `onError` and `onClose` states
3801
3977
  * @private
@@ -3804,16 +3980,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3804
3980
  }, {
3805
3981
  key: "monitorTranscriptionSocketConnection",
3806
3982
  value: function monitorTranscriptionSocketConnection() {
3807
- var _this31 = this;
3983
+ var _this33 = this;
3808
3984
  this.transcription.onCloseSocket(function (event) {
3809
3985
  _loggerProxy.default.logger.info("Meeting:index#onCloseSocket -->\n unable to continue receiving transcription;\n low-latency mercury web socket connection is closed now.\n ".concat(event));
3810
- _this31.triggerStopReceivingTranscriptionEvent();
3986
+ _this33.triggerStopReceivingTranscriptionEvent();
3811
3987
  });
3812
3988
  this.transcription.onErrorSocket(function (event) {
3813
3989
  _loggerProxy.default.logger.error("Meeting:index#onErrorSocket -->\n unable to continue receiving transcription;\n low-latency mercury web socket connection error had occured.\n ".concat(event));
3814
- _this31.triggerStopReceivingTranscriptionEvent();
3990
+ _this33.triggerStopReceivingTranscriptionEvent();
3815
3991
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
3816
- correlation_id: _this31.correlationId,
3992
+ correlation_id: _this33.correlationId,
3817
3993
  reason: 'unexpected error: transcription LLM web socket connection error had occured.',
3818
3994
  event: event
3819
3995
  });
@@ -3829,7 +4005,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3829
4005
  key: "receiveTranscription",
3830
4006
  value: function () {
3831
4007
  var _receiveTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
3832
- var _this32 = this;
4008
+ var _this34 = this;
3833
4009
  var datachannelUrl, _yield$this$request, webSocketUrl;
3834
4010
  return _regenerator.default.wrap(function _callee2$(_context2) {
3835
4011
  while (1) switch (_context2.prev = _context2.next) {
@@ -3856,7 +4032,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3856
4032
 
3857
4033
  // retrieve and pass the payload
3858
4034
  this.transcription.subscribe(function (payload) {
3859
- _triggerProxy.default.trigger(_this32, {
4035
+ _triggerProxy.default.trigger(_this34, {
3860
4036
  file: 'meeting/index',
3861
4037
  function: 'join'
3862
4038
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION, payload);
@@ -3887,13 +4063,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3887
4063
  return receiveTranscription;
3888
4064
  }()
3889
4065
  /**
3890
- * stop recieving Transcription by closing
3891
- * the web socket connection properly
4066
+ * Callback called when a relay event is received from meeting LLM Connection
4067
+ * @param {RelayEvent} e Event object coming from LLM Connection
4068
+ * @private
3892
4069
  * @returns {void}
3893
4070
  */
3894
4071
  }, {
3895
4072
  key: "stopReceivingTranscription",
3896
- value: function stopReceivingTranscription() {
4073
+ value:
4074
+ /**
4075
+ * stop recieving Transcription by closing
4076
+ * the web socket connection properly
4077
+ * @returns {void}
4078
+ */
4079
+ function stopReceivingTranscription() {
3897
4080
  if (this.transcription) {
3898
4081
  this.transcription.closeSocket();
3899
4082
  }
@@ -3930,7 +4113,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3930
4113
  }, {
3931
4114
  key: "join",
3932
4115
  value: function join() {
3933
- var _this33 = this;
4116
+ var _this35 = this;
3934
4117
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3935
4118
  // @ts-ignore - fix type
3936
4119
  if (!this.webex.meetings.registered) {
@@ -4018,40 +4201,44 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4018
4201
  }
4019
4202
  this.isMultistream = !!options.enableMultistream;
4020
4203
  return _util.default.joinMeetingOptions(this, options).then(function (join) {
4021
- _this33.meetingFiniteStateMachine.join();
4204
+ _this35.meetingFiniteStateMachine.join();
4022
4205
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
4023
4206
  return join;
4024
4207
  }).then(function (join) {
4025
4208
  joinSuccess(join);
4026
- _this33.deferJoin = undefined;
4209
+ _this35.deferJoin = undefined;
4027
4210
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
4028
- correlation_id: _this33.correlationId
4211
+ correlation_id: _this35.correlationId
4029
4212
  });
4030
4213
  return join;
4031
4214
  }).then( /*#__PURE__*/function () {
4032
- var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(join) {
4215
+ var _ref12 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(join) {
4033
4216
  return _regenerator.default.wrap(function _callee3$(_context3) {
4034
4217
  while (1) switch (_context3.prev = _context3.next) {
4035
4218
  case 0:
4036
- if (!_this33.config.enableAutomaticLLM) {
4037
- _context3.next = 3;
4219
+ if (!_this35.config.enableAutomaticLLM) {
4220
+ _context3.next = 5;
4038
4221
  break;
4039
4222
  }
4040
4223
  _context3.next = 3;
4041
- return _this33.updateLLMConnection();
4224
+ return _this35.updateLLMConnection();
4042
4225
  case 3:
4226
+ // @ts-ignore - Fix type
4227
+ _this35.webex.internal.llm.on('event:relay.event', _this35.processRelayEvent);
4228
+ _loggerProxy.default.logger.info('Meeting:index#join --> enabled to receive relay events!');
4229
+ case 5:
4043
4230
  return _context3.abrupt("return", join);
4044
- case 4:
4231
+ case 6:
4045
4232
  case "end":
4046
4233
  return _context3.stop();
4047
4234
  }
4048
4235
  }, _callee3);
4049
4236
  }));
4050
4237
  return function (_x2) {
4051
- return _ref11.apply(this, arguments);
4238
+ return _ref12.apply(this, arguments);
4052
4239
  };
4053
4240
  }()).then( /*#__PURE__*/function () {
4054
- var _ref12 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(join) {
4241
+ var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(join) {
4055
4242
  return _regenerator.default.wrap(function _callee4$(_context4) {
4056
4243
  while (1) switch (_context4.prev = _context4.next) {
4057
4244
  case 0:
@@ -4059,16 +4246,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4059
4246
  _context4.next = 8;
4060
4247
  break;
4061
4248
  }
4062
- if (!(_this33.config.receiveTranscription || options.receiveTranscription)) {
4249
+ if (!(_this35.config.receiveTranscription || options.receiveTranscription)) {
4063
4250
  _context4.next = 6;
4064
4251
  break;
4065
4252
  }
4066
- if (!_this33.isTranscriptionSupported()) {
4253
+ if (!_this35.isTranscriptionSupported()) {
4067
4254
  _context4.next = 6;
4068
4255
  break;
4069
4256
  }
4070
4257
  _context4.next = 5;
4071
- return _this33.receiveTranscription();
4258
+ return _this35.receiveTranscription();
4072
4259
  case 5:
4073
4260
  _loggerProxy.default.logger.info('Meeting:index#join --> enabled to recieve transcription!');
4074
4261
  case 6:
@@ -4085,16 +4272,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4085
4272
  }, _callee4);
4086
4273
  }));
4087
4274
  return function (_x3) {
4088
- return _ref12.apply(this, arguments);
4275
+ return _ref13.apply(this, arguments);
4089
4276
  };
4090
4277
  }()).catch(function (error) {
4091
4278
  var _error$error;
4092
- _this33.meetingFiniteStateMachine.fail(error);
4279
+ _this35.meetingFiniteStateMachine.fail(error);
4093
4280
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
4094
4281
  _metrics.default.postEvent({
4095
4282
  event: _config.eventType.LOCUS_JOIN_RESPONSE,
4096
- meeting: _this33,
4097
- meetingId: _this33.id,
4283
+ meeting: _this35,
4284
+ meetingId: _this35.id,
4098
4285
  data: {
4099
4286
  errors: [_metrics.default.parseLocusError(error.error, true)]
4100
4287
  }
@@ -4102,18 +4289,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4102
4289
 
4103
4290
  // TODO: change this to error codes and pre defined dictionary
4104
4291
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
4105
- correlation_id: _this33.correlationId,
4292
+ correlation_id: _this35.correlationId,
4106
4293
  reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
4107
4294
  stack: error.stack
4108
4295
  });
4109
4296
 
4110
4297
  // Upload logs on join Failure
4111
- _triggerProxy.default.trigger(_this33, {
4298
+ _triggerProxy.default.trigger(_this35, {
4112
4299
  file: 'meeting/index',
4113
4300
  function: 'join'
4114
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this33);
4301
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this35);
4115
4302
  joinFailed(error);
4116
- _this33.deferJoin = undefined;
4303
+ _this35.deferJoin = undefined;
4117
4304
  return _promise.default.reject(error);
4118
4305
  });
4119
4306
  }
@@ -4128,14 +4315,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4128
4315
  key: "updateLLMConnection",
4129
4316
  value: function () {
4130
4317
  var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
4131
- var _this$locusInfo, url, _this$locusInfo$info, _this$locusInfo$info2, datachannelUrl, isJoined;
4318
+ var _this$locusInfo5, url, _this$locusInfo5$info, _this$locusInfo5$info2, datachannelUrl, isJoined;
4132
4319
  return _regenerator.default.wrap(function _callee5$(_context5) {
4133
4320
  while (1) switch (_context5.prev = _context5.next) {
4134
4321
  case 0:
4135
- _this$locusInfo = this.locusInfo, url = _this$locusInfo.url, _this$locusInfo$info = _this$locusInfo.info, _this$locusInfo$info2 = _this$locusInfo$info === void 0 ? {} : _this$locusInfo$info, datachannelUrl = _this$locusInfo$info2.datachannelUrl;
4136
- isJoined = this.joinedWith && this.joinedWith.state === 'JOINED';
4322
+ // @ts-ignore - Fix type
4323
+ _this$locusInfo5 = this.locusInfo, url = _this$locusInfo5.url, _this$locusInfo5$info = _this$locusInfo5.info, _this$locusInfo5$info2 = _this$locusInfo5$info === void 0 ? {} : _this$locusInfo5$info, datachannelUrl = _this$locusInfo5$info2.datachannelUrl;
4324
+ isJoined = this.joinedWith && this.joinedWith.state === 'JOINED'; // @ts-ignore - Fix type
4137
4325
  if (!this.webex.internal.llm.isConnected()) {
4138
- _context5.next = 7;
4326
+ _context5.next = 8;
4139
4327
  break;
4140
4328
  }
4141
4329
  if (!(url === this.webex.internal.llm.getLocusUrl() && isJoined)) {
@@ -4147,14 +4335,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4147
4335
  _context5.next = 7;
4148
4336
  return this.webex.internal.llm.disconnectLLM();
4149
4337
  case 7:
4338
+ // @ts-ignore - Fix type
4339
+ this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
4340
+ case 8:
4150
4341
  if (isJoined) {
4151
- _context5.next = 9;
4342
+ _context5.next = 10;
4152
4343
  break;
4153
4344
  }
4154
4345
  return _context5.abrupt("return", undefined);
4155
- case 9:
4156
- return _context5.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl));
4157
4346
  case 10:
4347
+ return _context5.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl));
4348
+ case 11:
4158
4349
  case "end":
4159
4350
  return _context5.stop();
4160
4351
  }
@@ -4203,26 +4394,28 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4203
4394
  }, {
4204
4395
  key: "dialInPstn",
4205
4396
  value: function dialInPstn() {
4206
- var _this34 = this;
4397
+ var _this36 = this;
4207
4398
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
4208
4399
 
4209
4400
  var correlationId = this.correlationId,
4210
4401
  locusUrl = this.locusUrl;
4211
4402
  if (!this.dialInUrl) this.dialInUrl = "dialin:///".concat(_uuid.default.v4());
4212
- return this.meetingRequest.dialIn({
4403
+ return this.meetingRequest
4404
+ // @ts-ignore
4405
+ .dialIn({
4213
4406
  correlationId: correlationId,
4214
4407
  dialInUrl: this.dialInUrl,
4215
4408
  locusUrl: locusUrl,
4216
4409
  clientUrl: this.deviceUrl
4217
4410
  }).then(function (res) {
4218
- _this34.locusInfo.onFullLocus(res.body.locus);
4411
+ _this36.locusInfo.onFullLocus(res.body.locus);
4219
4412
  }).catch(function (error) {
4220
4413
  var _error$error2;
4221
4414
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
4222
- correlation_id: _this34.correlationId,
4223
- dial_in_url: _this34.dialInUrl,
4415
+ correlation_id: _this36.correlationId,
4416
+ dial_in_url: _this36.dialInUrl,
4224
4417
  locus_id: locusUrl.split('/').pop(),
4225
- client_url: _this34.deviceUrl,
4418
+ client_url: _this36.deviceUrl,
4226
4419
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
4227
4420
  stack: error.stack
4228
4421
  });
@@ -4240,27 +4433,29 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4240
4433
  }, {
4241
4434
  key: "dialOutPstn",
4242
4435
  value: function dialOutPstn(phoneNumber) {
4243
- var _this35 = this;
4436
+ var _this37 = this;
4244
4437
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
4245
4438
 
4246
4439
  var correlationId = this.correlationId,
4247
4440
  locusUrl = this.locusUrl;
4248
4441
  if (!this.dialOutUrl) this.dialOutUrl = "dialout:///".concat(_uuid.default.v4());
4249
- return this.meetingRequest.dialOut({
4442
+ return this.meetingRequest
4443
+ // @ts-ignore
4444
+ .dialOut({
4250
4445
  correlationId: correlationId,
4251
4446
  dialOutUrl: this.dialOutUrl,
4252
4447
  phoneNumber: phoneNumber,
4253
4448
  locusUrl: locusUrl,
4254
4449
  clientUrl: this.deviceUrl
4255
4450
  }).then(function (res) {
4256
- _this35.locusInfo.onFullLocus(res.body.locus);
4451
+ _this37.locusInfo.onFullLocus(res.body.locus);
4257
4452
  }).catch(function (error) {
4258
4453
  var _error$error3;
4259
4454
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
4260
- correlation_id: _this35.correlationId,
4261
- dial_out_url: _this35.dialOutUrl,
4455
+ correlation_id: _this37.correlationId,
4456
+ dial_out_url: _this37.dialOutUrl,
4262
4457
  locus_id: locusUrl.split('/').pop(),
4263
- client_url: _this35.deviceUrl,
4458
+ client_url: _this37.deviceUrl,
4264
4459
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
4265
4460
  stack: error.stack
4266
4461
  });
@@ -4291,7 +4486,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4291
4486
  }, {
4292
4487
  key: "moveTo",
4293
4488
  value: function moveTo(resourceId) {
4294
- var _this36 = this;
4489
+ var _this38 = this;
4295
4490
  if (!resourceId) {
4296
4491
  throw new _parameter.default('Cannot move call without a resourceId.');
4297
4492
  }
@@ -4327,12 +4522,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4327
4522
  while (1) switch (_context6.prev = _context6.next) {
4328
4523
  case 0:
4329
4524
  _context6.prev = 0;
4330
- if (!_this36.isSharing) {
4525
+ if (!_this38.isSharing) {
4331
4526
  _context6.next = 4;
4332
4527
  break;
4333
4528
  }
4334
4529
  _context6.next = 4;
4335
- return _this36.releaseScreenShareFloor();
4530
+ return _this38.releaseScreenShareFloor();
4336
4531
  case 4:
4337
4532
  mediaSettings = {
4338
4533
  mediaDirection: {
@@ -4344,22 +4539,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4344
4539
  receiveShare: true
4345
4540
  }
4346
4541
  }; // clean up the local tracks
4347
- _this36.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
4542
+ _this38.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
4348
4543
 
4349
4544
  // close the existing local tracks
4350
4545
  _context6.next = 8;
4351
- return _this36.closeLocalStream();
4546
+ return _this38.closeLocalStream();
4352
4547
  case 8:
4353
4548
  _context6.next = 10;
4354
- return _this36.closeLocalShare();
4549
+ return _this38.closeLocalShare();
4355
4550
  case 10:
4356
- _this36.mediaProperties.unsetMediaTracks();
4551
+ _this38.mediaProperties.unsetMediaTracks();
4357
4552
 
4358
4553
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the DX answers the meeting
4359
4554
  // once the DX answers we establish connection back the media server with only receiveShare enabled
4360
4555
  // @ts-ignore - reconnectMedia does not accept any argument
4361
4556
  _context6.next = 13;
4362
- return _this36.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
4557
+ return _this38.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
4363
4558
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
4364
4559
  });
4365
4560
  case 13:
@@ -4370,8 +4565,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4370
4565
  _context6.t0 = _context6["catch"](0);
4371
4566
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context6.t0);
4372
4567
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
4373
- correlation_id: _this36.correlationId,
4374
- locus_id: _this36.locusUrl.split('/').pop(),
4568
+ correlation_id: _this38.correlationId,
4569
+ locus_id: _this38.locusUrl.split('/').pop(),
4375
4570
  reason: _context6.t0.message,
4376
4571
  stack: _context6.t0.stack
4377
4572
  });
@@ -4386,12 +4581,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4386
4581
  resourceId: resourceId,
4387
4582
  moveToResource: true
4388
4583
  }).then(function () {
4389
- _this36.meetingFiniteStateMachine.join();
4584
+ _this38.meetingFiniteStateMachine.join();
4390
4585
  }).catch(function (error) {
4391
- _this36.meetingFiniteStateMachine.fail(error);
4586
+ _this38.meetingFiniteStateMachine.fail(error);
4392
4587
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
4393
- correlation_id: _this36.correlationId,
4394
- locus_id: _this36.locusUrl.split('/').pop(),
4588
+ correlation_id: _this38.correlationId,
4589
+ locus_id: _this38.locusUrl.split('/').pop(),
4395
4590
  reason: error.message,
4396
4591
  stack: error.stack
4397
4592
  });
@@ -4410,7 +4605,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4410
4605
  }, {
4411
4606
  key: "moveFrom",
4412
4607
  value: function moveFrom(resourceId) {
4413
- var _this37 = this;
4608
+ var _this39 = this;
4414
4609
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
4415
4610
  if (!resourceId) {
4416
4611
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -4421,19 +4616,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4421
4616
  meeting: this
4422
4617
  });
4423
4618
  return _util.default.joinMeetingOptions(this).then(function () {
4424
- return _util.default.leaveMeeting(_this37, {
4619
+ return _util.default.leaveMeeting(_this39, {
4425
4620
  resourceId: resourceId,
4426
4621
  correlationId: oldCorrelationId,
4427
4622
  moveMeeting: true
4428
4623
  }).then(function () {
4429
- _this37.resourceId = '';
4624
+ _this39.resourceId = '';
4430
4625
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
4431
4626
  });
4432
4627
  }).catch(function (error) {
4433
- _this37.meetingFiniteStateMachine.fail(error);
4628
+ _this39.meetingFiniteStateMachine.fail(error);
4434
4629
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
4435
- correlation_id: _this37.correlationId,
4436
- locus_id: _this37.locusUrl.split('/').pop(),
4630
+ correlation_id: _this39.correlationId,
4631
+ locus_id: _this39.locusUrl.split('/').pop(),
4437
4632
  reason: error.message,
4438
4633
  stack: error.stack
4439
4634
  });
@@ -4489,9 +4684,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4489
4684
  }, {
4490
4685
  key: "forwardEvent",
4491
4686
  value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
4492
- var _this38 = this;
4687
+ var _this40 = this;
4493
4688
  eventEmitter.on(eventTypeToForward, function (data) {
4494
- return _triggerProxy.default.trigger(_this38, {
4689
+ return _triggerProxy.default.trigger(_this40, {
4495
4690
  file: 'meetings',
4496
4691
  function: 'addMedia'
4497
4692
  }, meetingEventType, data);
@@ -4513,7 +4708,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4513
4708
  }, {
4514
4709
  key: "addMedia",
4515
4710
  value: function addMedia() {
4516
- var _this39 = this;
4711
+ var _this41 = this;
4517
4712
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4518
4713
  var LOG_HEADER = 'Meeting:index#addMedia -->';
4519
4714
  var turnDiscoverySkippedReason;
@@ -4557,41 +4752,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4557
4752
  }
4558
4753
  });
4559
4754
  return _util.default.validateOptions(options).then(function () {
4560
- return _this39.roap.doTurnDiscovery(_this39, false);
4755
+ return _this41.roap.doTurnDiscovery(_this41, false);
4561
4756
  }).then(function (turnDiscoveryObject) {
4562
4757
  turnDiscoverySkippedReason = turnDiscoveryObject.turnDiscoverySkippedReason;
4563
4758
  turnServerUsed = !turnDiscoverySkippedReason;
4564
4759
  var turnServerInfo = turnDiscoveryObject.turnServerInfo;
4565
- _this39.preMedia(localStream, localShare, mediaSettings);
4566
- var mc = _this39.createMediaConnection(turnServerInfo);
4567
- if (_this39.isMultistream) {
4568
- _this39.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(_this39.receiveSlotManager, _this39.mediaRequestManagers, remoteMediaManagerConfig);
4569
- _this39.forwardEvent(_this39.remoteMediaManager, _remoteMediaManager.Event.AudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_AUDIO_CREATED);
4570
- _this39.forwardEvent(_this39.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
4571
- _this39.forwardEvent(_this39.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
4572
- return _this39.remoteMediaManager.start().then(function () {
4760
+ _this41.preMedia(localStream, localShare, mediaSettings);
4761
+ var mc = _this41.createMediaConnection(turnServerInfo);
4762
+ if (_this41.isMultistream) {
4763
+ _this41.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(_this41.receiveSlotManager, _this41.mediaRequestManagers, remoteMediaManagerConfig);
4764
+ _this41.forwardEvent(_this41.remoteMediaManager, _remoteMediaManager.Event.AudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_AUDIO_CREATED);
4765
+ _this41.forwardEvent(_this41.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
4766
+ _this41.forwardEvent(_this41.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
4767
+ return _this41.remoteMediaManager.start().then(function () {
4573
4768
  return mc.initiateOffer();
4574
4769
  });
4575
4770
  }
4576
4771
  return mc.initiateOffer();
4577
4772
  }).then(function () {
4578
- _this39.setMercuryListener();
4773
+ _this41.setMercuryListener();
4579
4774
  }).then(function () {
4580
- return _this39.getDevices().then(function (devices) {
4775
+ return _this41.getDevices().then(function (devices) {
4581
4776
  _util.default.handleDeviceLogging(devices);
4582
4777
  });
4583
4778
  }).then(function () {
4584
- _this39.handleMediaLogging(_this39.mediaProperties);
4779
+ _this41.handleMediaLogging(_this41.mediaProperties);
4585
4780
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created"));
4586
4781
 
4587
4782
  // @ts-ignore - config coming from registerPlugin
4588
- if (_this39.config.stats.enableStatsAnalyzer) {
4783
+ if (_this41.config.stats.enableStatsAnalyzer) {
4589
4784
  // @ts-ignore - config coming from registerPlugin
4590
- _this39.networkQualityMonitor = new _networkQualityMonitor.default(_this39.config.stats);
4785
+ _this41.networkQualityMonitor = new _networkQualityMonitor.default(_this41.config.stats);
4591
4786
  // @ts-ignore - config coming from registerPlugin
4592
- _this39.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(_this39.config.stats, _this39.networkQualityMonitor);
4593
- _this39.setupStatsAnalyzerEventHandlers();
4594
- _this39.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this39.sendNetworkQualityEvent.bind(_this39));
4787
+ _this41.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(_this41.config.stats, _this41.networkQualityMonitor);
4788
+ _this41.setupStatsAnalyzerEventHandlers();
4789
+ _this41.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this41.sendNetworkQualityEvent.bind(_this41));
4595
4790
  }
4596
4791
  }).catch(function (error) {
4597
4792
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
@@ -4602,12 +4797,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4602
4797
 
4603
4798
  // eslint-disable-next-line func-names
4604
4799
  // eslint-disable-next-line prefer-arrow-callback
4605
- if (_this39.type === _constants._CALL_) {
4800
+ if (_this41.type === _constants._CALL_) {
4606
4801
  resolve();
4607
4802
  }
4608
4803
  var joiningTimer = setInterval(function () {
4609
4804
  timerCount += 1;
4610
- if (_this39.meetingState === _constants.FULL_STATE.ACTIVE) {
4805
+ if (_this41.meetingState === _constants.FULL_STATE.ACTIVE) {
4611
4806
  clearInterval(joiningTimer);
4612
4807
  resolve();
4613
4808
  }
@@ -4618,41 +4813,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4618
4813
  }, 1000);
4619
4814
  });
4620
4815
  }).then(function () {
4621
- return _this39.mediaProperties.waitForMediaConnectionConnected().catch(function () {
4816
+ return _this41.mediaProperties.waitForMediaConnectionConnected().catch(function () {
4622
4817
  throw (0, _webexErrors.createMeetingsError)(30202, 'Meeting connection failed');
4623
4818
  });
4624
4819
  }).then(function () {
4625
4820
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
4626
4821
  if (mediaSettings && mediaSettings.sendShare && localShare) {
4627
- if (_this39.state === _constants.MEETING_STATE.STATES.JOINED) {
4628
- return _this39.requestScreenShareFloor();
4822
+ if (_this41.state === _constants.MEETING_STATE.STATES.JOINED) {
4823
+ return _this41.requestScreenShareFloor();
4629
4824
  }
4630
4825
 
4631
4826
  // When the self state changes to JOINED then request the floor
4632
- _this39.floorGrantPending = true;
4827
+ _this41.floorGrantPending = true;
4633
4828
  }
4634
4829
  return {};
4635
4830
  }).then(function () {
4636
- return _this39.mediaProperties.getCurrentConnectionType();
4831
+ return _this41.mediaProperties.getCurrentConnectionType();
4637
4832
  }).then(function (connectionType) {
4638
4833
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, {
4639
- correlation_id: _this39.correlationId,
4640
- locus_id: _this39.locusUrl.split('/').pop(),
4834
+ correlation_id: _this41.correlationId,
4835
+ locus_id: _this41.locusUrl.split('/').pop(),
4641
4836
  connectionType: connectionType
4642
4837
  });
4643
4838
  }).catch(function (error) {
4644
4839
  // Clean up stats analyzer, peer connection, and turn off listeners
4645
- var stopStatsAnalyzer = _this39.statsAnalyzer ? _this39.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
4840
+ var stopStatsAnalyzer = _this41.statsAnalyzer ? _this41.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
4646
4841
  return stopStatsAnalyzer.then(function () {
4647
- _this39.statsAnalyzer = null;
4648
- if (_this39.mediaProperties.webrtcMediaConnection) {
4649
- _this39.closePeerConnections();
4650
- _this39.unsetPeerConnections();
4842
+ _this41.statsAnalyzer = null;
4843
+ if (_this41.mediaProperties.webrtcMediaConnection) {
4844
+ _this41.closePeerConnections();
4845
+ _this41.unsetPeerConnections();
4651
4846
  }
4652
4847
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
4653
4848
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
4654
- correlation_id: _this39.correlationId,
4655
- locus_id: _this39.locusUrl.split('/').pop(),
4849
+ correlation_id: _this41.correlationId,
4850
+ locus_id: _this41.locusUrl.split('/').pop(),
4656
4851
  reason: error.message,
4657
4852
  stack: error.stack,
4658
4853
  code: error.code,
@@ -4661,12 +4856,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4661
4856
  });
4662
4857
 
4663
4858
  // Upload logs on error while adding media
4664
- _triggerProxy.default.trigger(_this39, {
4859
+ _triggerProxy.default.trigger(_this41, {
4665
4860
  file: 'meeting/index',
4666
4861
  function: 'addMedia'
4667
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this39);
4668
- if (error instanceof _internalMediaCore.MediaConnection.Errors.SdpError) {
4669
- _this39.leave({
4862
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this41);
4863
+ if (error instanceof _internalMediaCore.Errors.SdpError) {
4864
+ _this41.leave({
4670
4865
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
4671
4866
  });
4672
4867
  }
@@ -4699,7 +4894,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4699
4894
  }, {
4700
4895
  key: "enqueueMediaUpdate",
4701
4896
  value: function enqueueMediaUpdate(mediaUpdateType, options) {
4702
- var _this40 = this;
4897
+ var _this42 = this;
4898
+ if (mediaUpdateType === MEDIA_UPDATE_TYPE.LAMBDA && typeof (options === null || options === void 0 ? void 0 : options.lambda) !== 'function') {
4899
+ return _promise.default.reject(new Error('lambda must be specified when enqueuing MEDIA_UPDATE_TYPE.LAMBDA'));
4900
+ }
4901
+ var canUpdateMediaNow = this.canUpdateMedia();
4703
4902
  return new _promise.default(function (resolve, reject) {
4704
4903
  var queueItem = {
4705
4904
  pendingPromiseResolve: resolve,
@@ -4708,7 +4907,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4708
4907
  options: options
4709
4908
  };
4710
4909
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
4711
- _this40.queuedMediaUpdates.push(queueItem);
4910
+ _this42.queuedMediaUpdates.push(queueItem);
4911
+ if (canUpdateMediaNow) {
4912
+ _this42.processNextQueuedMediaUpdate();
4913
+ }
4712
4914
  });
4713
4915
  }
4714
4916
 
@@ -4733,7 +4935,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4733
4935
  * @memberof Meeting
4734
4936
  */
4735
4937
  function updateMedia() {
4736
- var _this41 = this;
4938
+ var _this43 = this;
4737
4939
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4738
4940
  var LOG_HEADER = 'Meeting:index#updateMedia -->';
4739
4941
  if (!this.canUpdateMedia()) {
@@ -4747,27 +4949,27 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4747
4949
  return _promise.default.reject(new Error('media connection not established, call addMedia() first'));
4748
4950
  }
4749
4951
  return _util.default.validateOptions(options).then(function () {
4750
- return _this41.preMedia(localStream, localShare, mediaSettings);
4952
+ return _this43.preMedia(localStream, localShare, mediaSettings);
4751
4953
  }).then(function () {
4752
- return _this41.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
4954
+ return _this43.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
4753
4955
  send: {
4754
- audio: _this41.mediaProperties.mediaDirection.sendAudio ? _this41.mediaProperties.audioTrack : null,
4755
- video: _this41.mediaProperties.mediaDirection.sendVideo ? _this41.mediaProperties.videoTrack : null,
4756
- screenShareVideo: _this41.mediaProperties.mediaDirection.sendShare ? _this41.mediaProperties.shareTrack : null
4956
+ audio: _this43.mediaProperties.mediaDirection.sendAudio ? _this43.mediaProperties.audioTrack : null,
4957
+ video: _this43.mediaProperties.mediaDirection.sendVideo ? _this43.mediaProperties.videoTrack : null,
4958
+ screenShareVideo: _this43.mediaProperties.mediaDirection.sendShare ? _this43.mediaProperties.shareTrack : null
4757
4959
  },
4758
4960
  receive: {
4759
- audio: _this41.mediaProperties.mediaDirection.receiveAudio,
4760
- video: _this41.mediaProperties.mediaDirection.receiveVideo,
4761
- screenShareVideo: _this41.mediaProperties.mediaDirection.receiveShare,
4762
- remoteQualityLevel: _this41.mediaProperties.remoteQualityLevel
4961
+ audio: _this43.mediaProperties.mediaDirection.receiveAudio,
4962
+ video: _this43.mediaProperties.mediaDirection.receiveVideo,
4963
+ screenShareVideo: _this43.mediaProperties.mediaDirection.receiveShare,
4964
+ remoteQualityLevel: _this43.mediaProperties.remoteQualityLevel
4763
4965
  }
4764
4966
  }).then(function () {
4765
4967
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " webrtcMediaConnection.updateSendReceiveOptions done"));
4766
4968
  }).catch(function (error) {
4767
4969
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error updatedMedia, "), error);
4768
4970
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
4769
- correlation_id: _this41.correlationId,
4770
- locus_id: _this41.locusUrl.split('/').pop(),
4971
+ correlation_id: _this43.correlationId,
4972
+ locus_id: _this43.locusUrl.split('/').pop(),
4771
4973
  reason: error.message,
4772
4974
  stack: error.stack
4773
4975
  });
@@ -4778,15 +4980,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4778
4980
  // if not, ensure it's called after (now it's called after roap message is sent out, but we're not
4779
4981
  // waiting for sendRoapMediaRequest() to be resolved)
4780
4982
  .then(function () {
4781
- return _this41.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4782
- }).then(function (startShare) {
4783
- // This is a special case if we do an /floor grant followed by /media
4784
- // we actually get a OFFER from the server and a GLAR condition happens
4785
- if (startShare) {
4786
- // We are assuming that the clients are connected when doing an update
4787
- return _this41.requestScreenShareFloor();
4788
- }
4789
- return _promise.default.resolve();
4983
+ return _this43.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.LAMBDA, {
4984
+ lambda: function lambda() {
4985
+ return _promise.default.resolve().then(function () {
4986
+ return _this43.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4987
+ }).then(function (startShare) {
4988
+ // This is a special case if we do an /floor grant followed by /media
4989
+ // we actually get a OFFER from the server and a GLAR condition happens
4990
+ if (startShare) {
4991
+ // We are assuming that the clients are connected when doing an update
4992
+ return _this43.requestScreenShareFloor();
4993
+ }
4994
+ return _promise.default.resolve();
4995
+ });
4996
+ }
4997
+ });
4790
4998
  });
4791
4999
  });
4792
5000
  }
@@ -4808,7 +5016,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4808
5016
  key: "updateAudio",
4809
5017
  value: function () {
4810
5018
  var _updateAudio = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(options) {
4811
- var _this42 = this;
5019
+ var _this44 = this;
4812
5020
  var sendAudio, receiveAudio, stream, track, bnrEnabled;
4813
5021
  return _regenerator.default.wrap(function _callee7$(_context7) {
4814
5022
  while (1) switch (_context7.prev = _context7.next) {
@@ -4853,25 +5061,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4853
5061
  sendAudio: sendAudio,
4854
5062
  localStream: stream
4855
5063
  }).then(function () {
4856
- return _this42.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
5064
+ return _this44.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
4857
5065
  send: {
4858
5066
  audio: track
4859
5067
  },
4860
5068
  receive: {
4861
5069
  audio: options.receiveAudio,
4862
- video: _this42.mediaProperties.mediaDirection.receiveVideo,
4863
- screenShareVideo: _this42.mediaProperties.mediaDirection.receiveShare,
4864
- remoteQualityLevel: _this42.mediaProperties.remoteQualityLevel
5070
+ video: _this44.mediaProperties.mediaDirection.receiveVideo,
5071
+ screenShareVideo: _this44.mediaProperties.mediaDirection.receiveShare,
5072
+ remoteQualityLevel: _this44.mediaProperties.remoteQualityLevel
4865
5073
  }
4866
5074
  });
4867
5075
  }).then(function () {
4868
- _this42.setLocalAudioTrack(track);
5076
+ _this44.setLocalAudioTrack(track);
4869
5077
  // todo: maybe this.mediaProperties.mediaDirection could be removed? it's duplicating stuff from webrtcMediaConnection
4870
- _this42.mediaProperties.mediaDirection.sendAudio = sendAudio;
4871
- _this42.mediaProperties.mediaDirection.receiveAudio = receiveAudio;
5078
+ _this44.mediaProperties.mediaDirection.sendAudio = sendAudio;
5079
+ _this44.mediaProperties.mediaDirection.receiveAudio = receiveAudio;
4872
5080
 
4873
5081
  // audio state could be undefined if you have not sent audio before
4874
- _this42.audio = _this42.audio || (0, _muteState.default)(_constants.AUDIO, _this42, _this42.mediaProperties.mediaDirection);
5082
+ _this44.audio = _this44.audio || (0, _muteState.default)(_constants.AUDIO, _this44, _this44.mediaProperties.mediaDirection);
4875
5083
  }));
4876
5084
  case 17:
4877
5085
  case "end":
@@ -4900,7 +5108,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4900
5108
  }, {
4901
5109
  key: "updateVideo",
4902
5110
  value: function updateVideo(options) {
4903
- var _this43 = this;
5111
+ var _this45 = this;
4904
5112
  if (!this.canUpdateMedia()) {
4905
5113
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.VIDEO, options);
4906
5114
  }
@@ -4918,24 +5126,24 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4918
5126
  sendVideo: sendVideo,
4919
5127
  localStream: stream
4920
5128
  }).then(function () {
4921
- return _this43.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
5129
+ return _this45.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
4922
5130
  send: {
4923
5131
  video: track
4924
5132
  },
4925
5133
  receive: {
4926
- audio: _this43.mediaProperties.mediaDirection.receiveAudio,
5134
+ audio: _this45.mediaProperties.mediaDirection.receiveAudio,
4927
5135
  video: options.receiveVideo,
4928
- screenShareVideo: _this43.mediaProperties.mediaDirection.receiveShare,
4929
- remoteQualityLevel: _this43.mediaProperties.remoteQualityLevel
5136
+ screenShareVideo: _this45.mediaProperties.mediaDirection.receiveShare,
5137
+ remoteQualityLevel: _this45.mediaProperties.remoteQualityLevel
4930
5138
  }
4931
5139
  });
4932
5140
  }).then(function () {
4933
- _this43.setLocalVideoTrack(track);
4934
- _this43.mediaProperties.mediaDirection.sendVideo = sendVideo;
4935
- _this43.mediaProperties.mediaDirection.receiveVideo = receiveVideo;
5141
+ _this45.setLocalVideoTrack(track);
5142
+ _this45.mediaProperties.mediaDirection.sendVideo = sendVideo;
5143
+ _this45.mediaProperties.mediaDirection.receiveVideo = receiveVideo;
4936
5144
 
4937
5145
  // video state could be undefined if you have not sent video before
4938
- _this43.video = _this43.video || (0, _muteState.default)(_constants.VIDEO, _this43, _this43.mediaProperties.mediaDirection);
5146
+ _this45.video = _this45.video || (0, _muteState.default)(_constants.VIDEO, _this45, _this45.mediaProperties.mediaDirection);
4939
5147
  });
4940
5148
  }
4941
5149
 
@@ -4978,7 +5186,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4978
5186
  }, {
4979
5187
  key: "updateShare",
4980
5188
  value: function updateShare(options) {
4981
- var _this44 = this;
5189
+ var _this46 = this;
4982
5190
  if (!options.skipSignalingCheck && !this.canUpdateMedia()) {
4983
5191
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE, options);
4984
5192
  }
@@ -4998,29 +5206,50 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4998
5206
  sendShare: sendShare,
4999
5207
  localShare: stream
5000
5208
  }).then(function () {
5001
- return _this44.checkForStopShare(sendShare, previousSendShareStatus);
5209
+ return _this46.checkForStopShare(sendShare, previousSendShareStatus);
5002
5210
  }).then(function (startShare) {
5003
- return _this44.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
5211
+ return _this46.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
5004
5212
  send: {
5005
5213
  screenShareVideo: track
5006
5214
  },
5007
5215
  receive: {
5008
- audio: _this44.mediaProperties.mediaDirection.receiveAudio,
5009
- video: _this44.mediaProperties.mediaDirection.receiveVideo,
5216
+ audio: _this46.mediaProperties.mediaDirection.receiveAudio,
5217
+ video: _this46.mediaProperties.mediaDirection.receiveVideo,
5010
5218
  screenShareVideo: options.receiveShare,
5011
- remoteQualityLevel: _this44.mediaProperties.remoteQualityLevel
5219
+ remoteQualityLevel: _this46.mediaProperties.remoteQualityLevel
5012
5220
  }
5013
5221
  }).then(function () {
5014
- if (startShare) {
5015
- return _this44.requestScreenShareFloor();
5016
- }
5017
- return _promise.default.resolve();
5222
+ return _this46.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.LAMBDA, {
5223
+ lambda: function () {
5224
+ var _lambda = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
5225
+ return _regenerator.default.wrap(function _callee8$(_context8) {
5226
+ while (1) switch (_context8.prev = _context8.next) {
5227
+ case 0:
5228
+ if (!startShare) {
5229
+ _context8.next = 2;
5230
+ break;
5231
+ }
5232
+ return _context8.abrupt("return", _this46.requestScreenShareFloor());
5233
+ case 2:
5234
+ return _context8.abrupt("return", undefined);
5235
+ case 3:
5236
+ case "end":
5237
+ return _context8.stop();
5238
+ }
5239
+ }, _callee8);
5240
+ }));
5241
+ function lambda() {
5242
+ return _lambda.apply(this, arguments);
5243
+ }
5244
+ return lambda;
5245
+ }()
5246
+ });
5018
5247
  });
5019
5248
  }).then(function () {
5020
- _this44.mediaProperties.mediaDirection.sendShare = sendShare;
5021
- _this44.mediaProperties.mediaDirection.receiveShare = receiveShare;
5249
+ _this46.mediaProperties.mediaDirection.sendShare = sendShare;
5250
+ _this46.mediaProperties.mediaDirection.receiveShare = receiveShare;
5022
5251
  }).catch(function (error) {
5023
- _this44.unsetLocalShareTrack();
5252
+ _this46.unsetLocalShareTrack();
5024
5253
  throw error;
5025
5254
  });
5026
5255
  }
@@ -5060,7 +5289,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5060
5289
  }, {
5061
5290
  key: "acknowledge",
5062
5291
  value: function acknowledge(type) {
5063
- var _this45 = this;
5292
+ var _this47 = this;
5064
5293
  if (!type) {
5065
5294
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
5066
5295
  }
@@ -5072,10 +5301,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5072
5301
  }).then(function (response) {
5073
5302
  return _promise.default.resolve(response);
5074
5303
  }).then(function (response) {
5075
- _this45.meetingFiniteStateMachine.ring(type);
5304
+ _this47.meetingFiniteStateMachine.ring(type);
5076
5305
  _metrics.default.postEvent({
5077
5306
  event: _config.eventType.ALERT_DISPLAYED,
5078
- meeting: _this45
5307
+ meeting: _this47
5079
5308
  });
5080
5309
  return _promise.default.resolve({
5081
5310
  response: response
@@ -5099,12 +5328,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5099
5328
  }, {
5100
5329
  key: "decline",
5101
5330
  value: function decline(reason) {
5102
- var _this46 = this;
5331
+ var _this48 = this;
5103
5332
  return _util.default.declineMeeting(this, reason).then(function (decline) {
5104
- _this46.meetingFiniteStateMachine.decline();
5333
+ _this48.meetingFiniteStateMachine.decline();
5105
5334
  return _promise.default.resolve(decline);
5106
5335
  }).catch(function (error) {
5107
- _this46.meetingFiniteStateMachine.fail(error);
5336
+ _this48.meetingFiniteStateMachine.fail(error);
5108
5337
  return _promise.default.reject(error);
5109
5338
  });
5110
5339
  }
@@ -5120,7 +5349,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5120
5349
  }, {
5121
5350
  key: "leave",
5122
5351
  value: function leave() {
5123
- var _this47 = this;
5352
+ var _this49 = this;
5124
5353
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5125
5354
  _metrics.default.postEvent({
5126
5355
  event: _config.eventType.LEAVE,
@@ -5133,39 +5362,39 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5133
5362
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
5134
5363
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
5135
5364
  return _util.default.leaveMeeting(this, options).then(function (leave) {
5136
- _this47.meetingFiniteStateMachine.leave();
5137
- _this47.clearMeetingData();
5365
+ _this49.meetingFiniteStateMachine.leave();
5366
+ _this49.clearMeetingData();
5138
5367
 
5139
5368
  // upload logs on leave irrespective of meeting delete
5140
- _triggerProxy.default.trigger(_this47, {
5369
+ _triggerProxy.default.trigger(_this49, {
5141
5370
  file: 'meeting/index',
5142
5371
  function: 'leave'
5143
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
5372
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this49);
5144
5373
 
5145
5374
  // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
5146
- if (_this47.wirelessShare || _this47.guest) {
5375
+ if (_this49.wirelessShare || _this49.guest) {
5147
5376
  // If screen sharing clean the meeting object
5148
- _triggerProxy.default.trigger(_this47, {
5377
+ _triggerProxy.default.trigger(_this49, {
5149
5378
  file: 'meeting/index',
5150
5379
  function: 'leave'
5151
5380
  }, _constants.EVENTS.DESTROY_MEETING, {
5152
5381
  reason: options.reason,
5153
- meetingId: _this47.id
5382
+ meetingId: _this49.id
5154
5383
  });
5155
5384
  }
5156
5385
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
5157
5386
  return leave;
5158
5387
  }).catch(function (error) {
5159
- _this47.meetingFiniteStateMachine.fail(error);
5388
+ _this49.meetingFiniteStateMachine.fail(error);
5160
5389
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
5161
5390
  // upload logs on leave irrespective of meeting delete
5162
- _triggerProxy.default.trigger(_this47, {
5391
+ _triggerProxy.default.trigger(_this49, {
5163
5392
  file: 'meeting/index',
5164
5393
  function: 'leave'
5165
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
5394
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this49);
5166
5395
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
5167
- correlation_id: _this47.correlationId,
5168
- locus_id: _this47.locusUrl.split('/').pop(),
5396
+ correlation_id: _this49.correlationId,
5397
+ locus_id: _this49.locusUrl.split('/').pop(),
5169
5398
  reason: error.message,
5170
5399
  stack: error.stack,
5171
5400
  code: error.code
@@ -5185,7 +5414,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5185
5414
  }, {
5186
5415
  key: "startWhiteboardShare",
5187
5416
  value: function startWhiteboardShare(channelUrl, resourceToken) {
5188
- var _this48 = this;
5417
+ var _this50 = this;
5189
5418
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
5190
5419
  return element.name === 'whiteboard';
5191
5420
  });
@@ -5208,13 +5437,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5208
5437
  body.resourceToken = resourceToken;
5209
5438
  }
5210
5439
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
5211
- _this48.isSharing = false;
5440
+ _this50.isSharing = false;
5212
5441
  return _promise.default.resolve();
5213
5442
  }).catch(function (error) {
5214
5443
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
5215
5444
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
5216
- correlation_id: _this48.correlationId,
5217
- locus_id: _this48.locusUrl.split('/').pop(),
5445
+ correlation_id: _this50.correlationId,
5446
+ locus_id: _this50.locusUrl.split('/').pop(),
5218
5447
  reason: error.message,
5219
5448
  stack: error.stack,
5220
5449
  board: {
@@ -5237,7 +5466,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5237
5466
  }, {
5238
5467
  key: "stopWhiteboardShare",
5239
5468
  value: function stopWhiteboardShare(channelUrl) {
5240
- var _this49 = this;
5469
+ var _this51 = this;
5241
5470
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
5242
5471
  return element.name === 'whiteboard';
5243
5472
  });
@@ -5256,8 +5485,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5256
5485
  _metrics.default.sendBehavioralMetric(
5257
5486
  // @ts-ignore - check if STOP_WHITEBOARD_SHARE_FAILURE exists
5258
5487
  _constants2.default.STOP_WHITEBOARD_SHARE_FAILURE, {
5259
- correlation_id: _this49.correlationId,
5260
- locus_id: _this49.locusUrl.split('/').pop(),
5488
+ correlation_id: _this51.correlationId,
5489
+ locus_id: _this51.locusUrl.split('/').pop(),
5261
5490
  reason: error.message,
5262
5491
  stack: error.stack,
5263
5492
  board: {
@@ -5279,7 +5508,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5279
5508
  }, {
5280
5509
  key: "requestScreenShareFloor",
5281
5510
  value: function requestScreenShareFloor() {
5282
- var _this50 = this;
5511
+ var _this52 = this;
5283
5512
  var content = this.locusInfo.mediaShares.find(function (element) {
5284
5513
  return element.name === _constants.CONTENT;
5285
5514
  });
@@ -5295,13 +5524,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5295
5524
  uri: content.url,
5296
5525
  resourceUrl: this.resourceUrl
5297
5526
  }).then(function () {
5298
- _this50.isSharing = true;
5527
+ _this52.isSharing = true;
5299
5528
  return _promise.default.resolve();
5300
5529
  }).catch(function (error) {
5301
5530
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
5302
5531
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
5303
- correlation_id: _this50.correlationId,
5304
- locus_id: _this50.locusUrl.split('/').pop(),
5532
+ correlation_id: _this52.correlationId,
5533
+ locus_id: _this52.locusUrl.split('/').pop(),
5305
5534
  reason: error.message,
5306
5535
  stack: error.stack
5307
5536
  });
@@ -5338,7 +5567,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5338
5567
  }, {
5339
5568
  key: "releaseScreenShareFloor",
5340
5569
  value: function releaseScreenShareFloor() {
5341
- var _this51 = this;
5570
+ var _this53 = this;
5342
5571
  var content = this.locusInfo.mediaShares.find(function (element) {
5343
5572
  return element.name === _constants.CONTENT;
5344
5573
  });
@@ -5362,14 +5591,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5362
5591
  }).catch(function (error) {
5363
5592
  _loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
5364
5593
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
5365
- correlation_id: _this51.correlationId,
5366
- locus_id: _this51.locusUrl.split('/').pop(),
5594
+ correlation_id: _this53.correlationId,
5595
+ locus_id: _this53.locusUrl.split('/').pop(),
5367
5596
  reason: error.message,
5368
5597
  stack: error.stack
5369
5598
  });
5370
5599
  return _promise.default.reject(error);
5371
5600
  }).finally(function () {
5372
- _this51.isSharing = false;
5601
+ _this53.isSharing = false;
5373
5602
  });
5374
5603
  }
5375
5604
  return _promise.default.reject(new _parameter.default('Cannot stop share without content'));
@@ -5384,7 +5613,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5384
5613
  }, {
5385
5614
  key: "startRecording",
5386
5615
  value: function startRecording() {
5387
- return _util.default.startRecording(this.meetingRequest, this.locusUrl, this.locusInfo);
5616
+ return this.recordingController.startRecording();
5388
5617
  }
5389
5618
 
5390
5619
  /**
@@ -5396,7 +5625,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5396
5625
  }, {
5397
5626
  key: "stopRecording",
5398
5627
  value: function stopRecording() {
5399
- return _util.default.stopRecording(this.meetingRequest, this.locusUrl, this.locusInfo);
5628
+ return this.recordingController.stopRecording();
5400
5629
  }
5401
5630
 
5402
5631
  /**
@@ -5408,7 +5637,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5408
5637
  }, {
5409
5638
  key: "pauseRecording",
5410
5639
  value: function pauseRecording() {
5411
- return _util.default.pauseRecording(this.meetingRequest, this.locusUrl, this.locusInfo);
5640
+ return this.recordingController.pauseRecording();
5412
5641
  }
5413
5642
 
5414
5643
  /**
@@ -5420,7 +5649,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5420
5649
  }, {
5421
5650
  key: "resumeRecording",
5422
5651
  value: function resumeRecording() {
5423
- return _util.default.resumeRecording(this.meetingRequest, this.locusUrl, this.locusInfo);
5652
+ return this.recordingController.resumeRecording();
5424
5653
  }
5425
5654
 
5426
5655
  /**
@@ -5501,7 +5730,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5501
5730
  }, {
5502
5731
  key: "changeVideoLayout",
5503
5732
  value: function changeVideoLayout(layoutType) {
5504
- var _this52 = this;
5733
+ var _this54 = this;
5505
5734
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5506
5735
  var main = renderInfo.main,
5507
5736
  content = renderInfo.content;
@@ -5555,7 +5784,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5555
5784
  }
5556
5785
  this.lastVideoLayoutInfo = (0, _cloneDeep2.default)(layoutInfo);
5557
5786
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
5558
- _triggerProxy.default.trigger(_this52, {
5787
+ _triggerProxy.default.trigger(_this54, {
5559
5788
  file: 'meeting/index',
5560
5789
  function: 'changeVideoLayout'
5561
5790
  }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
@@ -5570,7 +5799,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5570
5799
  content: layoutInfo.content
5571
5800
  }).then(function (response) {
5572
5801
  if (response && response.body && response.body.locus) {
5573
- _this52.locusInfo.onFullLocus(response.body.locus);
5802
+ _this54.locusInfo.onFullLocus(response.body.locus);
5574
5803
  }
5575
5804
  }).catch(function (error) {
5576
5805
  _loggerProxy.default.logger.error('Meeting:index#changeVideoLayout --> Error ', error);
@@ -5586,7 +5815,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5586
5815
  }, {
5587
5816
  key: "setLocalVideoQuality",
5588
5817
  value: function setLocalVideoQuality(level) {
5589
- var _this53 = this;
5818
+ var _this55 = this;
5590
5819
  _loggerProxy.default.logger.log("Meeting:index#setLocalVideoQuality --> Setting quality to ".concat(level));
5591
5820
  if (!_constants.VIDEO_RESOLUTIONS[level]) {
5592
5821
  return this.rejectWithErrorLog("Meeting:index#setLocalVideoQuality --> ".concat(level, " not defined"));
@@ -5615,28 +5844,28 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5615
5844
  // open bug link: https://bugs.chromium.org/p/chromium/issues/detail?id=943469
5616
5845
  if (isBrowser('chrome') && this.mediaProperties.videoTrack) _media.default.stopTracks(this.mediaProperties.videoTrack);
5617
5846
  return this.getMediaStreams(mediaDirection, _constants.VIDEO_RESOLUTIONS[level]).then( /*#__PURE__*/function () {
5618
- var _ref15 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(_ref14) {
5619
- var _ref16, localStream;
5620
- return _regenerator.default.wrap(function _callee8$(_context8) {
5621
- while (1) switch (_context8.prev = _context8.next) {
5847
+ var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(_ref15) {
5848
+ var _ref17, localStream;
5849
+ return _regenerator.default.wrap(function _callee9$(_context9) {
5850
+ while (1) switch (_context9.prev = _context9.next) {
5622
5851
  case 0:
5623
- _ref16 = (0, _slicedToArray2.default)(_ref14, 1), localStream = _ref16[0];
5624
- _context8.next = 3;
5625
- return _this53.updateVideo({
5852
+ _ref17 = (0, _slicedToArray2.default)(_ref15, 1), localStream = _ref17[0];
5853
+ _context9.next = 3;
5854
+ return _this55.updateVideo({
5626
5855
  sendVideo: true,
5627
5856
  receiveVideo: true,
5628
5857
  stream: localStream
5629
5858
  });
5630
5859
  case 3:
5631
- return _context8.abrupt("return", localStream);
5860
+ return _context9.abrupt("return", localStream);
5632
5861
  case 4:
5633
5862
  case "end":
5634
- return _context8.stop();
5863
+ return _context9.stop();
5635
5864
  }
5636
- }, _callee8);
5865
+ }, _callee9);
5637
5866
  }));
5638
5867
  return function (_x5) {
5639
- return _ref15.apply(this, arguments);
5868
+ return _ref16.apply(this, arguments);
5640
5869
  };
5641
5870
  }());
5642
5871
  }
@@ -5679,7 +5908,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5679
5908
  }, {
5680
5909
  key: "setMeetingQuality",
5681
5910
  value: function setMeetingQuality(level) {
5682
- var _this54 = this;
5911
+ var _this56 = this;
5683
5912
  _loggerProxy.default.logger.log("Meeting:index#setMeetingQuality --> Setting quality to ".concat(level));
5684
5913
  if (!_constants.QUALITY_LEVELS[level]) {
5685
5914
  return this.rejectWithErrorLog("Meeting:index#setMeetingQuality --> ".concat(level, " not defined"));
@@ -5701,15 +5930,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5701
5930
  receiveVideo = _this$mediaProperties4.receiveVideo,
5702
5931
  sendVideo = _this$mediaProperties4.sendVideo;
5703
5932
  return (sendVideo ? this.setLocalVideoQuality(level) : _promise.default.resolve()).then(function () {
5704
- return receiveAudio || receiveVideo ? _this54.setRemoteQualityLevel(level) : _promise.default.resolve();
5933
+ return receiveAudio || receiveVideo ? _this56.setRemoteQualityLevel(level) : _promise.default.resolve();
5705
5934
  }).catch(function (error) {
5706
5935
  // From troubleshooting it seems that the stream itself doesn't change the max-fs if the peer connection isn't stable
5707
- _this54.mediaProperties.setLocalQualityLevel(previousLevel.local);
5708
- _this54.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5936
+ _this56.mediaProperties.setLocalQualityLevel(previousLevel.local);
5937
+ _this56.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5709
5938
  _loggerProxy.default.logger.error("Meeting:index#setMeetingQuality --> ".concat(error.message));
5710
5939
  _metrics.default.sendBehavioralMetric(_constants2.default.SET_MEETING_QUALITY_FAILURE, {
5711
- correlation_id: _this54.correlationId,
5712
- locus_id: _this54.locusUrl.split('/').pop(),
5940
+ correlation_id: _this56.correlationId,
5941
+ locus_id: _this56.locusUrl.split('/').pop(),
5713
5942
  reason: error.message,
5714
5943
  stack: error.stack
5715
5944
  }, {
@@ -5735,7 +5964,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5735
5964
  }, {
5736
5965
  key: "shareScreen",
5737
5966
  value: function shareScreen() {
5738
- var _this55 = this;
5967
+ var _this57 = this;
5739
5968
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5740
5969
  _loggerProxy.default.logger.log('Meeting:index#shareScreen --> Getting local share');
5741
5970
  var shareConstraints = _objectSpread({
@@ -5745,9 +5974,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5745
5974
 
5746
5975
  // @ts-ignore - config coming from registerPlugin
5747
5976
  return _media.default.getDisplayMedia(shareConstraints, this.config).then(function (shareStream) {
5748
- return _this55.updateShare({
5977
+ return _this57.updateShare({
5749
5978
  sendShare: true,
5750
- receiveShare: _this55.mediaProperties.mediaDirection.receiveShare,
5979
+ receiveShare: _this57.mediaProperties.mediaDirection.receiveShare,
5751
5980
  stream: shareStream
5752
5981
  });
5753
5982
  }).catch(function (error) {
@@ -5760,8 +5989,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5760
5989
  // TODO: The getDisplayMedia errors need to be moved inside `media.getDisplayMedia`
5761
5990
  var metricName = _constants2.default.GET_DISPLAY_MEDIA_FAILURE;
5762
5991
  var data = {
5763
- correlation_id: _this55.correlationId,
5764
- locus_id: _this55.locusUrl.split('/').pop(),
5992
+ correlation_id: _this57.correlationId,
5993
+ locus_id: _this57.locusUrl.split('/').pop(),
5765
5994
  reason: error.message,
5766
5995
  stack: error.stack
5767
5996
  };
@@ -5837,9 +6066,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5837
6066
  */
5838
6067
  }, {
5839
6068
  key: "handleMediaLogging",
5840
- value: function handleMediaLogging(_ref17) {
5841
- var audioTrack = _ref17.audioTrack,
5842
- videoTrack = _ref17.videoTrack;
6069
+ value: function handleMediaLogging(_ref18) {
6070
+ var audioTrack = _ref18.audioTrack,
6071
+ videoTrack = _ref18.videoTrack;
5843
6072
  _util.default.handleVideoLogging(videoTrack);
5844
6073
  _util.default.handleAudioLogging(audioTrack);
5845
6074
  }
@@ -6046,7 +6275,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6046
6275
  }, {
6047
6276
  key: "endMeetingForAll",
6048
6277
  value: function endMeetingForAll() {
6049
- var _this56 = this;
6278
+ var _this58 = this;
6050
6279
  _metrics.default.postEvent({
6051
6280
  event: _config.eventType.LEAVE,
6052
6281
  meeting: this,
@@ -6061,25 +6290,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6061
6290
  locus_id: this.locusId
6062
6291
  });
6063
6292
  return _util.default.endMeetingForAll(this).then(function (end) {
6064
- _this56.meetingFiniteStateMachine.end();
6065
- _this56.clearMeetingData();
6293
+ _this58.meetingFiniteStateMachine.end();
6294
+ _this58.clearMeetingData();
6066
6295
  // upload logs on leave irrespective of meeting delete
6067
- _triggerProxy.default.trigger(_this56, {
6296
+ _triggerProxy.default.trigger(_this58, {
6068
6297
  file: 'meeting/index',
6069
6298
  function: 'endMeetingForAll'
6070
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
6299
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this58);
6071
6300
  return end;
6072
6301
  }).catch(function (error) {
6073
- _this56.meetingFiniteStateMachine.fail(error);
6302
+ _this58.meetingFiniteStateMachine.fail(error);
6074
6303
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
6075
6304
  // upload logs on leave irrespective of meeting delete
6076
- _triggerProxy.default.trigger(_this56, {
6305
+ _triggerProxy.default.trigger(_this58, {
6077
6306
  file: 'meeting/index',
6078
6307
  function: 'endMeetingForAll'
6079
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
6308
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this58);
6080
6309
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
6081
- correlation_id: _this56.correlationId,
6082
- locus_id: _this56.locusUrl.split('/').pop(),
6310
+ correlation_id: _this58.correlationId,
6311
+ locus_id: _this58.locusUrl.split('/').pop(),
6083
6312
  reason: error.message,
6084
6313
  stack: error.stack,
6085
6314
  code: error.code
@@ -6117,29 +6346,29 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6117
6346
  }, {
6118
6347
  key: "internal_enableBNR",
6119
6348
  value: function () {
6120
- var _internal_enableBNR = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(audioTrack) {
6349
+ var _internal_enableBNR = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(audioTrack) {
6121
6350
  var bnrAudioTrack;
6122
- return _regenerator.default.wrap(function _callee9$(_context9) {
6123
- while (1) switch (_context9.prev = _context9.next) {
6351
+ return _regenerator.default.wrap(function _callee10$(_context10) {
6352
+ while (1) switch (_context10.prev = _context10.next) {
6124
6353
  case 0:
6125
- _context9.prev = 0;
6354
+ _context10.prev = 0;
6126
6355
  _loggerProxy.default.logger.info('Meeting:index#internal_enableBNR. Internal enable BNR called');
6127
- _context9.next = 4;
6356
+ _context10.next = 4;
6128
6357
  return _internalMediaCore.Media.Effects.BNR.enableBNR(audioTrack);
6129
6358
  case 4:
6130
- bnrAudioTrack = _context9.sent;
6359
+ bnrAudioTrack = _context10.sent;
6131
6360
  _loggerProxy.default.logger.info('Meeting:index#internal_enableBNR. BNR enabled track obtained from WebRTC & returned as stream');
6132
- return _context9.abrupt("return", bnrAudioTrack);
6361
+ return _context10.abrupt("return", bnrAudioTrack);
6133
6362
  case 9:
6134
- _context9.prev = 9;
6135
- _context9.t0 = _context9["catch"](0);
6136
- _loggerProxy.default.logger.error('Meeting:index#internal_enableBNR.', _context9.t0);
6137
- throw _context9.t0;
6363
+ _context10.prev = 9;
6364
+ _context10.t0 = _context10["catch"](0);
6365
+ _loggerProxy.default.logger.error('Meeting:index#internal_enableBNR.', _context10.t0);
6366
+ throw _context10.t0;
6138
6367
  case 13:
6139
6368
  case "end":
6140
- return _context9.stop();
6369
+ return _context10.stop();
6141
6370
  }
6142
- }, _callee9, null, [[0, 9]]);
6371
+ }, _callee10, null, [[0, 9]]);
6143
6372
  }));
6144
6373
  function internal_enableBNR(_x6) {
6145
6374
  return _internal_enableBNR.apply(this, arguments);
@@ -6223,8 +6452,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6223
6452
  * @memberof Meeting
6224
6453
  */
6225
6454
  function sendReaction(reactionType, skinToneType) {
6226
- var _this$locusInfo2, _this$locusInfo2$cont, _this$locusInfo2$cont2;
6227
- var reactionChannelUrl = (_this$locusInfo2 = this.locusInfo) === null || _this$locusInfo2 === void 0 ? void 0 : (_this$locusInfo2$cont = _this$locusInfo2.controls) === null || _this$locusInfo2$cont === void 0 ? void 0 : (_this$locusInfo2$cont2 = _this$locusInfo2$cont.reactions) === null || _this$locusInfo2$cont2 === void 0 ? void 0 : _this$locusInfo2$cont2.reactionChannelUrl;
6455
+ var _this$locusInfo6, _this$locusInfo6$cont, _this$locusInfo6$cont2;
6456
+ var reactionChannelUrl = (_this$locusInfo6 = this.locusInfo) === null || _this$locusInfo6 === void 0 ? void 0 : (_this$locusInfo6$cont = _this$locusInfo6.controls) === null || _this$locusInfo6$cont === void 0 ? void 0 : (_this$locusInfo6$cont2 = _this$locusInfo6$cont.reactions) === null || _this$locusInfo6$cont2 === void 0 ? void 0 : _this$locusInfo6$cont2.reactionChannelUrl;
6228
6457
  var participantId = this.members.selfId;
6229
6458
  var reactionData = _reactions.Reactions[reactionType];
6230
6459
  if (!reactionData) {
@@ -6255,8 +6484,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6255
6484
  }, {
6256
6485
  key: "toggleReactions",
6257
6486
  value: function toggleReactions(enable) {
6258
- var _this$locusInfo3, _this$locusInfo3$cont, _this$locusInfo3$cont2;
6259
- var isEnabled = (_this$locusInfo3 = this.locusInfo) === null || _this$locusInfo3 === void 0 ? void 0 : (_this$locusInfo3$cont = _this$locusInfo3.controls) === null || _this$locusInfo3$cont === void 0 ? void 0 : (_this$locusInfo3$cont2 = _this$locusInfo3$cont.reactions) === null || _this$locusInfo3$cont2 === void 0 ? void 0 : _this$locusInfo3$cont2.enabled;
6487
+ var _this$locusInfo7, _this$locusInfo7$cont, _this$locusInfo7$cont2;
6488
+ var isEnabled = (_this$locusInfo7 = this.locusInfo) === null || _this$locusInfo7 === void 0 ? void 0 : (_this$locusInfo7$cont = _this$locusInfo7.controls) === null || _this$locusInfo7$cont === void 0 ? void 0 : (_this$locusInfo7$cont2 = _this$locusInfo7$cont.reactions) === null || _this$locusInfo7$cont2 === void 0 ? void 0 : _this$locusInfo7$cont2.enabled;
6260
6489
  if (isEnabled && enable || !isEnabled && !enable) {
6261
6490
  return _promise.default.resolve("Reactions are already ".concat(isEnabled ? 'enabled' : 'disabled', "."));
6262
6491
  }