@webex/plugin-meetings 3.9.0-webinar5k.1 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/constants.js +24 -0
  4. package/dist/constants.js.map +1 -1
  5. package/dist/controls-options-manager/index.js +22 -5
  6. package/dist/controls-options-manager/index.js.map +1 -1
  7. package/dist/index.js +2 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/interceptors/index.js +7 -0
  10. package/dist/interceptors/index.js.map +1 -1
  11. package/dist/interceptors/locusRouteToken.js +116 -0
  12. package/dist/interceptors/locusRouteToken.js.map +1 -0
  13. package/dist/interpretation/index.js +1 -1
  14. package/dist/interpretation/siLanguage.js +1 -1
  15. package/dist/locus-info/controlsUtils.js +11 -2
  16. package/dist/locus-info/controlsUtils.js.map +1 -1
  17. package/dist/locus-info/index.js +76 -322
  18. package/dist/locus-info/index.js.map +1 -1
  19. package/dist/locus-info/parser.js +4 -1
  20. package/dist/locus-info/parser.js.map +1 -1
  21. package/dist/media/properties.js +53 -5
  22. package/dist/media/properties.js.map +1 -1
  23. package/dist/meeting/in-meeting-actions.js +14 -0
  24. package/dist/meeting/in-meeting-actions.js.map +1 -1
  25. package/dist/meeting/index.js +467 -277
  26. package/dist/meeting/index.js.map +1 -1
  27. package/dist/meeting/request.js +177 -14
  28. package/dist/meeting/request.js.map +1 -1
  29. package/dist/meeting/type.js +7 -0
  30. package/dist/meeting/type.js.map +1 -0
  31. package/dist/meeting/util.js +100 -3
  32. package/dist/meeting/util.js.map +1 -1
  33. package/dist/meeting-info/meeting-info-v2.js +29 -21
  34. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  35. package/dist/meetings/index.js +20 -16
  36. package/dist/meetings/index.js.map +1 -1
  37. package/dist/member/index.js +9 -0
  38. package/dist/member/index.js.map +1 -1
  39. package/dist/member/util.js +10 -0
  40. package/dist/member/util.js.map +1 -1
  41. package/dist/members/index.js +10 -7
  42. package/dist/members/index.js.map +1 -1
  43. package/dist/members/util.js +7 -2
  44. package/dist/members/util.js.map +1 -1
  45. package/dist/metrics/constants.js +2 -1
  46. package/dist/metrics/constants.js.map +1 -1
  47. package/dist/multistream/mediaRequestManager.js +1 -1
  48. package/dist/multistream/mediaRequestManager.js.map +1 -1
  49. package/dist/multistream/remoteMedia.js +34 -5
  50. package/dist/multistream/remoteMedia.js.map +1 -1
  51. package/dist/multistream/remoteMediaGroup.js +42 -2
  52. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  53. package/dist/reachability/index.js +3 -3
  54. package/dist/reachability/index.js.map +1 -1
  55. package/dist/types/constants.d.ts +23 -0
  56. package/dist/types/controls-options-manager/index.d.ts +9 -1
  57. package/dist/types/interceptors/index.d.ts +2 -1
  58. package/dist/types/interceptors/locusRouteToken.d.ts +38 -0
  59. package/dist/types/locus-info/index.d.ts +9 -54
  60. package/dist/types/media/properties.d.ts +21 -0
  61. package/dist/types/meeting/in-meeting-actions.d.ts +14 -0
  62. package/dist/types/meeting/index.d.ts +64 -29
  63. package/dist/types/meeting/request.d.ts +42 -0
  64. package/dist/types/meeting/type.d.ts +9 -0
  65. package/dist/types/meeting/util.d.ts +13 -0
  66. package/dist/types/meeting-info/meeting-info-v2.d.ts +6 -3
  67. package/dist/types/meetings/index.d.ts +3 -1
  68. package/dist/types/member/index.d.ts +1 -0
  69. package/dist/types/member/util.d.ts +5 -0
  70. package/dist/types/members/index.d.ts +12 -11
  71. package/dist/types/members/util.d.ts +8 -4
  72. package/dist/types/metrics/constants.d.ts +1 -0
  73. package/dist/types/multistream/remoteMedia.d.ts +20 -1
  74. package/dist/types/multistream/remoteMediaGroup.d.ts +11 -0
  75. package/dist/webinar/index.js +1 -1
  76. package/package.json +25 -27
  77. package/src/constants.ts +26 -2
  78. package/src/controls-options-manager/index.ts +26 -5
  79. package/src/index.ts +2 -1
  80. package/src/interceptors/index.ts +2 -1
  81. package/src/interceptors/locusRouteToken.ts +80 -0
  82. package/src/locus-info/controlsUtils.ts +18 -0
  83. package/src/locus-info/index.ts +69 -357
  84. package/src/locus-info/parser.ts +5 -1
  85. package/src/media/properties.ts +43 -0
  86. package/src/meeting/in-meeting-actions.ts +29 -0
  87. package/src/meeting/index.ts +296 -87
  88. package/src/meeting/request.ts +141 -0
  89. package/src/meeting/type.ts +9 -0
  90. package/src/meeting/util.ts +107 -3
  91. package/src/meeting-info/meeting-info-v2.ts +24 -5
  92. package/src/meetings/index.ts +15 -22
  93. package/src/member/index.ts +10 -0
  94. package/src/member/util.ts +14 -0
  95. package/src/members/index.ts +20 -10
  96. package/src/members/util.ts +20 -3
  97. package/src/metrics/constants.ts +1 -0
  98. package/src/multistream/mediaRequestManager.ts +7 -7
  99. package/src/multistream/remoteMedia.ts +34 -4
  100. package/src/multistream/remoteMediaGroup.ts +37 -2
  101. package/src/reachability/index.ts +3 -3
  102. package/test/unit/spec/common/browser-detection.js +0 -24
  103. package/test/unit/spec/controls-options-manager/index.js +47 -0
  104. package/test/unit/spec/fixture/locus.js +1 -0
  105. package/test/unit/spec/interceptors/locusRouteToken.ts +87 -0
  106. package/test/unit/spec/locus-info/index.js +80 -361
  107. package/test/unit/spec/locus-info/parser.js +3 -2
  108. package/test/unit/spec/media/properties.ts +137 -0
  109. package/test/unit/spec/meeting/in-meeting-actions.ts +14 -0
  110. package/test/unit/spec/meeting/index.js +637 -53
  111. package/test/unit/spec/meeting/muteState.js +32 -6
  112. package/test/unit/spec/meeting/request.js +21 -0
  113. package/test/unit/spec/meeting/utils.js +171 -18
  114. package/test/unit/spec/meeting-info/meetinginfov2.js +8 -3
  115. package/test/unit/spec/meetings/index.js +12 -5
  116. package/test/unit/spec/member/util.js +24 -0
  117. package/test/unit/spec/members/collection.js +120 -0
  118. package/test/unit/spec/members/index.js +107 -2
  119. package/test/unit/spec/members/request.js +55 -0
  120. package/test/unit/spec/members/utils.js +116 -14
  121. package/test/unit/spec/multistream/mediaRequestManager.ts +19 -6
  122. package/test/unit/spec/multistream/remoteMedia.ts +66 -2
  123. package/test/unit/spec/reachability/index.ts +158 -3
  124. package/test/unit/spec/roap/turnDiscovery.ts +3 -3
  125. package/dist/hashTree/constants.js +0 -23
  126. package/dist/hashTree/constants.js.map +0 -1
  127. package/dist/hashTree/hashTree.js +0 -516
  128. package/dist/hashTree/hashTree.js.map +0 -1
  129. package/dist/hashTree/hashTreeParser.js +0 -521
  130. package/dist/hashTree/hashTreeParser.js.map +0 -1
  131. package/dist/types/hashTree/constants.d.ts +0 -8
  132. package/dist/types/hashTree/hashTree.d.ts +0 -128
  133. package/dist/types/hashTree/hashTreeParser.d.ts +0 -152
  134. package/src/hashTree/constants.ts +0 -12
  135. package/src/hashTree/hashTree.ts +0 -460
  136. package/src/hashTree/hashTreeParser.ts +0 -556
  137. package/test/unit/spec/hashTree/hashTree.ts +0 -394
  138. package/test/unit/spec/hashTree/hashTreeParser.ts +0 -156
@@ -382,10 +382,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
382
382
  /**
383
383
  * @param {Object} attrs
384
384
  * @param {Object} options
385
+ * @param {Function} callback - if provided, it will be called with the newly created meeting object as soon as the meeting.id is set
385
386
  * @constructor
386
387
  * @memberof Meeting
387
388
  */
388
- function Meeting(attrs, _options) {
389
+ function Meeting(attrs, _options, callback) {
389
390
  var _attrs$callStateForMe, _attrs$callStateForMe2, _this$locusInfo, _this$locusInfo$links, _this$locusInfo$links2, _this$locusInfo$links3, _this$locusInfo2, _this$locusInfo2$full, _this$locusInfo3, _this$locusInfo4;
390
391
  var _this;
391
392
  (0, _classCallCheck2.default)(this, Meeting);
@@ -475,6 +476,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
475
476
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "shareStatus", void 0);
476
477
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "screenShareFloorState", void 0);
477
478
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "statsAnalyzer", void 0);
479
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "statsMonitor", void 0);
478
480
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "transcription", void 0);
479
481
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "updateMediaConnections", void 0);
480
482
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "userDisplayHints", void 0);
@@ -563,18 +565,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
563
565
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "uploadLogsTimer", void 0);
564
566
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "logUploadIntervalIndex", void 0);
565
567
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "mediaServerIp", void 0);
566
- /** Handles Locus LLM events
567
- *
568
- * @param {LocusLLMEvent} event - The Locus LLM event to process
569
- * @returns {void}
570
- */
571
- (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "processLocusLLMEvent", function (event) {
572
- if (event.data.eventType === 'locus.state_message') {
573
- _this.locusInfo.parse((0, _assertThisInitialized2.default)(_this), event.data);
574
- } else {
575
- _loggerProxy.default.logger.warn("Meeting:index#processLocusLLMEvent --> Unknown event type: ".concat(event.data.eventType));
576
- }
577
- });
578
568
  /**
579
569
  * Callback called when a relay event is received from meeting LLM Connection
580
570
  * @param {RelayEvent} e Event object coming from LLM Connection
@@ -959,6 +949,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
959
949
  // @ts-ignore
960
950
  _this.webex.internal.newMetrics.submitClientEvent({
961
951
  name: 'client.ice.start',
952
+ payload: {
953
+ // @ts-ignore
954
+ labels: _util2.default.getCaEventLabelsForIpVersion(_this.webex)
955
+ },
962
956
  options: {
963
957
  meetingId: _this.id
964
958
  }
@@ -1083,10 +1077,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1083
1077
  }
1084
1078
  }
1085
1079
 
1086
- // Count members that are in the meeting.
1080
+ // Count members that are in the meeting or in the lobby.
1087
1081
  var members = _this.getMembers().membersCollection.members;
1088
1082
  event.data.intervalMetadata.meetingUserCount = (0, _values.default)(members).filter(function (member) {
1089
- return member.isInMeeting;
1083
+ return member.isInMeeting || member.isInLobby;
1090
1084
  }).length;
1091
1085
 
1092
1086
  // @ts-ignore
@@ -1434,8 +1428,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1434
1428
 
1435
1429
  // @ts-ignore - fix types
1436
1430
  _this.webex.internal.llm.off('event:relay.event', _this.processRelayEvent);
1437
- // @ts-ignore - Fix type
1438
- _this.webex.internal.llm.off('event:locus.state_message', _this.processLocusLLMEvent);
1439
1431
  });
1440
1432
  /**
1441
1433
  * starts keepAlives being sent
@@ -1503,6 +1495,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1503
1495
  * @memberof Meeting
1504
1496
  */
1505
1497
  _this.id = _uuid.default.v4();
1498
+ if (callback) {
1499
+ callback((0, _assertThisInitialized2.default)(_this));
1500
+ }
1501
+
1506
1502
  /**
1507
1503
  * Call state used for metrics
1508
1504
  * @instance
@@ -1975,6 +1971,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1975
1971
  * @memberof Meeting
1976
1972
  */
1977
1973
  _this.networkQualityMonitor = null;
1974
+ /**
1975
+ * @instance
1976
+ * @type {StatsMonitor}
1977
+ * @private
1978
+ * @memberof Meeting
1979
+ */
1980
+ _this.statsMonitor = null;
1978
1981
  /**
1979
1982
  * Indicates network status of the webrtc media connection
1980
1983
  * @instance
@@ -2391,6 +2394,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2391
2394
  this.callStateForMetrics.correlationId = correlationId;
2392
2395
  }
2393
2396
 
2397
+ /**
2398
+ * Getter - Returns callStateForMetrics.pstnCorrelationId
2399
+ * @returns {string | undefined}
2400
+ */
2401
+ }, {
2402
+ key: "pstnCorrelationId",
2403
+ get: function get() {
2404
+ return this.callStateForMetrics.pstnCorrelationId;
2405
+ }
2406
+
2407
+ /**
2408
+ * Setter - sets callStateForMetrics.pstnCorrelationId
2409
+ * @param {string | undefined} correlationId
2410
+ */,
2411
+ set: function set(correlationId) {
2412
+ this.callStateForMetrics.pstnCorrelationId = correlationId;
2413
+ }
2414
+
2394
2415
  /**
2395
2416
  * Getter - Returns callStateForMetrics.userNameInput
2396
2417
  * @returns {string}
@@ -2592,11 +2613,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2592
2613
  key: "fetchMeetingInfoInternal",
2593
2614
  value: (function () {
2594
2615
  var _fetchMeetingInfoInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(_ref8) {
2595
- var destination, destinationType, _ref8$password, password, _ref8$captchaCode, captchaCode, _ref8$extraParams, extraParams, _ref8$sendCAevents, sendCAevents, _ref8$registrationId, registrationId, captchaInfo, info, _err$body, _err$body2;
2616
+ var destination, destinationType, _ref8$password, password, _ref8$captchaCode, captchaCode, _ref8$extraParams, extraParams, _ref8$sendCAevents, sendCAevents, _ref8$registrationId, registrationId, _ref8$classificationI, classificationId, captchaInfo, info, _err$body, _err$body2;
2596
2617
  return _regenerator.default.wrap(function _callee5$(_context5) {
2597
2618
  while (1) switch (_context5.prev = _context5.next) {
2598
2619
  case 0:
2599
- destination = _ref8.destination, destinationType = _ref8.destinationType, _ref8$password = _ref8.password, password = _ref8$password === void 0 ? null : _ref8$password, _ref8$captchaCode = _ref8.captchaCode, captchaCode = _ref8$captchaCode === void 0 ? null : _ref8$captchaCode, _ref8$extraParams = _ref8.extraParams, extraParams = _ref8$extraParams === void 0 ? {} : _ref8$extraParams, _ref8$sendCAevents = _ref8.sendCAevents, sendCAevents = _ref8$sendCAevents === void 0 ? false : _ref8$sendCAevents, _ref8$registrationId = _ref8.registrationId, registrationId = _ref8$registrationId === void 0 ? null : _ref8$registrationId;
2620
+ destination = _ref8.destination, destinationType = _ref8.destinationType, _ref8$password = _ref8.password, password = _ref8$password === void 0 ? null : _ref8$password, _ref8$captchaCode = _ref8.captchaCode, captchaCode = _ref8$captchaCode === void 0 ? null : _ref8$captchaCode, _ref8$extraParams = _ref8.extraParams, extraParams = _ref8$extraParams === void 0 ? {} : _ref8$extraParams, _ref8$sendCAevents = _ref8.sendCAevents, sendCAevents = _ref8$sendCAevents === void 0 ? false : _ref8$sendCAevents, _ref8$registrationId = _ref8.registrationId, registrationId = _ref8$registrationId === void 0 ? null : _ref8$registrationId, _ref8$classificationI = _ref8.classificationId, classificationId = _ref8$classificationI === void 0 ? null : _ref8$classificationI;
2600
2621
  _context5.prev = 1;
2601
2622
  captchaInfo = captchaCode ? {
2602
2623
  code: captchaCode,
@@ -2608,7 +2629,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2608
2629
  this.config.installedOrgID, this.locusId, extraParams, {
2609
2630
  meetingId: this.id,
2610
2631
  sendCAevents: sendCAevents
2611
- }, registrationId);
2632
+ }, registrationId, null, classificationId);
2612
2633
  case 5:
2613
2634
  info = _context5.sent;
2614
2635
  this.parseMeetingInfo(info === null || info === void 0 ? void 0 : info.body, this.destination, info === null || info === void 0 ? void 0 : info.errors);
@@ -3568,26 +3589,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3568
3589
  state: state
3569
3590
  });
3570
3591
  });
3571
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ANNOTATION_CHANGED, function (_ref28) {
3592
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_AUTO_END_MEETING_WARNING_CHANGED, function (_ref28) {
3572
3593
  var state = _ref28.state;
3573
3594
  _triggerProxy.default.trigger(_this14, {
3574
3595
  file: 'meeting/index',
3575
3596
  function: 'setupLocusControlsListener'
3576
- }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_ANNOTATION_UPDATED, {
3597
+ }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_AUTO_END_MEETING_WARNING_UPDATED, {
3577
3598
  state: state
3578
3599
  });
3579
3600
  });
3580
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_REMOTE_DESKTOP_CONTROL_CHANGED, function (_ref29) {
3601
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ANNOTATION_CHANGED, function (_ref29) {
3581
3602
  var state = _ref29.state;
3582
3603
  _triggerProxy.default.trigger(_this14, {
3583
3604
  file: 'meeting/index',
3584
3605
  function: 'setupLocusControlsListener'
3585
- }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_REMOTE_DESKTOP_CONTROL_UPDATED, {
3606
+ }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_ANNOTATION_UPDATED, {
3586
3607
  state: state
3587
3608
  });
3588
3609
  });
3589
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_POLLING_QA_CHANGED, function (_ref30) {
3610
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_REMOTE_DESKTOP_CONTROL_CHANGED, function (_ref30) {
3590
3611
  var state = _ref30.state;
3612
+ _triggerProxy.default.trigger(_this14, {
3613
+ file: 'meeting/index',
3614
+ function: 'setupLocusControlsListener'
3615
+ }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_REMOTE_DESKTOP_CONTROL_UPDATED, {
3616
+ state: state
3617
+ });
3618
+ });
3619
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_POLLING_QA_CHANGED, function (_ref31) {
3620
+ var state = _ref31.state;
3591
3621
  _triggerProxy.default.trigger(_this14, {
3592
3622
  file: 'meeting/index',
3593
3623
  function: 'setupLocusControlsListener'
@@ -3634,7 +3664,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3634
3664
  var _this15 = this;
3635
3665
  // Will get triggered on local and remote share
3636
3666
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, /*#__PURE__*/function () {
3637
- var _ref31 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
3667
+ var _ref32 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
3638
3668
  var _payload$previous, _payload$previous2;
3639
3669
  var _payload$current, contentShare, whiteboardShare, previousContentShare, previousWhiteboardShare, newShareStatus, _this15$locusInfo, _this15$locusInfo$inf, _this15$webinar, oldShareStatus, sendStartedSharingRemote, _this15$mediaProperti;
3640
3670
  return _regenerator.default.wrap(function _callee8$(_context8) {
@@ -3669,9 +3699,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3669
3699
  // There is no concept of local/remote share for whiteboard
3670
3700
  // It does not matter who requested to share the whiteboard, everyone gets the same view
3671
3701
  else if (whiteboardShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
3672
- // WHITEBOARD - sharing whiteboard
3673
- // Webinar attendee should receive whiteboard as remote share
3674
- newShareStatus = (_this15$locusInfo = _this15.locusInfo) !== null && _this15$locusInfo !== void 0 && (_this15$locusInfo$inf = _this15$locusInfo.info) !== null && _this15$locusInfo$inf !== void 0 && _this15$locusInfo$inf.isWebinar && (_this15$webinar = _this15.webinar) !== null && _this15$webinar !== void 0 && _this15$webinar.selfIsAttendee ? _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE : _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE;
3702
+ if ((_this15$locusInfo = _this15.locusInfo) !== null && _this15$locusInfo !== void 0 && (_this15$locusInfo$inf = _this15$locusInfo.info) !== null && _this15$locusInfo$inf !== void 0 && _this15$locusInfo$inf.isWebinar && (_this15$webinar = _this15.webinar) !== null && _this15$webinar !== void 0 && _this15$webinar.selfIsAttendee) {
3703
+ // WHITEBOARD - sharing whiteboard
3704
+ // Webinar attendee should receive whiteboard as remote share
3705
+ newShareStatus = _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE;
3706
+ } else if (_this15.guest) {
3707
+ // If user is a guest to a meeting, they should receive whiteboard as remote share
3708
+ newShareStatus = _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE;
3709
+ } else {
3710
+ newShareStatus = _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE;
3711
+ }
3675
3712
  }
3676
3713
  // or if content share is either released or null and whiteboard share is either released or null, no one is sharing
3677
3714
  else if ((previousContentShare && contentShare.disposition === _constants.FLOOR_ACTION.RELEASED || contentShare.disposition === null) && (previousWhiteboardShare && whiteboardShare.disposition === _constants.FLOOR_ACTION.RELEASED || whiteboardShare.disposition === null)) {
@@ -3679,7 +3716,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3679
3716
  }
3680
3717
  _loggerProxy.default.logger.info("Meeting:index#setUpLocusInfoMediaInactiveListener --> this.shareStatus=".concat(_this15.shareStatus, " newShareStatus=").concat(newShareStatus));
3681
3718
  if (!(newShareStatus !== _this15.shareStatus)) {
3682
- _context8.next = 46;
3719
+ _context8.next = 48;
3683
3720
  break;
3684
3721
  }
3685
3722
  oldShareStatus = _this15.shareStatus; // update our state before we send out any notifications
@@ -3687,14 +3724,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3687
3724
 
3688
3725
  // send out "stop" notifications for the old state
3689
3726
  _context8.t0 = oldShareStatus;
3690
- _context8.next = _context8.t0 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 15 : _context8.t0 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 17 : _context8.t0 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 19 : _context8.t0 === _constants.SHARE_STATUS.NO_SHARE ? 21 : 22;
3727
+ _context8.next = _context8.t0 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 15 : _context8.t0 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 17 : _context8.t0 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 19 : _context8.t0 === _constants.SHARE_STATUS.NO_SHARE ? 23 : 24;
3691
3728
  break;
3692
3729
  case 15:
3693
3730
  _triggerProxy.default.trigger(_this15, {
3694
3731
  file: 'meetings/index',
3695
3732
  function: 'remoteShare'
3696
3733
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_REMOTE);
3697
- return _context8.abrupt("break", 23);
3734
+ return _context8.abrupt("break", 25);
3698
3735
  case 17:
3699
3736
  _triggerProxy.default.trigger(_this15, {
3700
3737
  file: 'meeting/index',
@@ -3702,51 +3739,76 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3702
3739
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL, {
3703
3740
  reason: _constants.SHARE_STOPPED_REASON.SELF_STOPPED
3704
3741
  });
3705
- return _context8.abrupt("break", 23);
3742
+ return _context8.abrupt("break", 25);
3706
3743
  case 19:
3707
3744
  _triggerProxy.default.trigger(_this15, {
3708
3745
  file: 'meeting/index',
3709
3746
  function: 'stopWhiteboardShare'
3710
3747
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_WHITEBOARD);
3711
- return _context8.abrupt("break", 23);
3712
- case 21:
3713
- return _context8.abrupt("break", 23);
3714
- case 22:
3715
- return _context8.abrupt("break", 23);
3748
+ // @ts-ignore
3749
+ _this15.webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp({
3750
+ key: 'internal.client.share.stopped'
3751
+ });
3752
+ // @ts-ignore
3753
+ _this15.webex.internal.newMetrics.submitClientEvent({
3754
+ name: 'client.share.stopped',
3755
+ payload: {
3756
+ mediaType: 'whiteboard',
3757
+ shareDuration:
3758
+ // @ts-ignore
3759
+ _this15.webex.internal.newMetrics.callDiagnosticLatencies.getShareDuration()
3760
+ },
3761
+ options: {
3762
+ meetingId: _this15.id
3763
+ }
3764
+ });
3765
+ return _context8.abrupt("break", 25);
3716
3766
  case 23:
3767
+ return _context8.abrupt("break", 25);
3768
+ case 24:
3769
+ return _context8.abrupt("break", 25);
3770
+ case 25:
3717
3771
  _context8.t1 = newShareStatus;
3718
- _context8.next = _context8.t1 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 26 : _context8.t1 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 35 : _context8.t1 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 38 : _context8.t1 === _constants.SHARE_STATUS.NO_SHARE ? 41 : 42;
3772
+ _context8.next = _context8.t1 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 28 : _context8.t1 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 37 : _context8.t1 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 40 : _context8.t1 === _constants.SHARE_STATUS.NO_SHARE ? 43 : 44;
3719
3773
  break;
3720
- case 26:
3774
+ case 28:
3721
3775
  sendStartedSharingRemote = function sendStartedSharingRemote() {
3776
+ var _this15$locusInfo2, _this15$locusInfo2$in, _this15$webinar2;
3722
3777
  _this15.remoteShareInstanceId = contentShare.shareInstanceId;
3723
3778
  _this15.shareCAEventSentStatus.receiveStart = false;
3724
3779
  _this15.shareCAEventSentStatus.receiveStop = false;
3780
+ var finalBeneficiaryId = contentShare.beneficiaryId;
3781
+ // In case of attendee in webinar, the whiteboard is shared by other participants
3782
+ if ((_this15$locusInfo2 = _this15.locusInfo) !== null && _this15$locusInfo2 !== void 0 && (_this15$locusInfo2$in = _this15$locusInfo2.info) !== null && _this15$locusInfo2$in !== void 0 && _this15$locusInfo2$in.isWebinar && (_this15$webinar2 = _this15.webinar) !== null && _this15$webinar2 !== void 0 && _this15$webinar2.selfIsAttendee) {
3783
+ if (!finalBeneficiaryId && whiteboardShare.beneficiaryId) {
3784
+ finalBeneficiaryId = whiteboardShare.beneficiaryId;
3785
+ }
3786
+ }
3725
3787
  _triggerProxy.default.trigger(_this15, {
3726
3788
  file: 'meetings/index',
3727
3789
  function: 'remoteShare'
3728
3790
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE, {
3729
- memberId: contentShare.beneficiaryId,
3791
+ memberId: finalBeneficiaryId,
3730
3792
  url: contentShare.url,
3731
3793
  shareInstanceId: _this15.remoteShareInstanceId,
3732
3794
  annotationInfo: contentShare.annotation,
3733
3795
  resourceType: contentShare.resourceType
3734
3796
  });
3735
3797
  };
3736
- _context8.prev = 27;
3798
+ _context8.prev = 29;
3737
3799
  if (!((_this15$mediaProperti = _this15.mediaProperties.mediaDirection) !== null && _this15$mediaProperti !== void 0 && _this15$mediaProperti.sendShare && oldShareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE)) {
3738
- _context8.next = 31;
3800
+ _context8.next = 33;
3739
3801
  break;
3740
3802
  }
3741
- _context8.next = 31;
3803
+ _context8.next = 33;
3742
3804
  return _this15.unpublishStreams([_this15.mediaProperties.shareVideoStream, _this15.mediaProperties.shareAudioStream]);
3743
- case 31:
3744
- _context8.prev = 31;
3805
+ case 33:
3806
+ _context8.prev = 33;
3745
3807
  sendStartedSharingRemote();
3746
- return _context8.finish(31);
3747
- case 34:
3748
- return _context8.abrupt("break", 43);
3749
- case 35:
3808
+ return _context8.finish(33);
3809
+ case 36:
3810
+ return _context8.abrupt("break", 45);
3811
+ case 37:
3750
3812
  _triggerProxy.default.trigger(_this15, {
3751
3813
  file: 'meeting/index',
3752
3814
  function: 'share'
@@ -3762,8 +3824,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3762
3824
  meetingId: _this15.id
3763
3825
  }
3764
3826
  });
3765
- return _context8.abrupt("break", 43);
3766
- case 38:
3827
+ return _context8.abrupt("break", 45);
3828
+ case 40:
3767
3829
  _triggerProxy.default.trigger(_this15, {
3768
3830
  file: 'meeting/index',
3769
3831
  function: 'startWhiteboardShare'
@@ -3781,16 +3843,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3781
3843
  meetingId: _this15.id
3782
3844
  }
3783
3845
  });
3784
- return _context8.abrupt("break", 43);
3785
- case 41:
3786
- return _context8.abrupt("break", 43);
3787
- case 42:
3788
- return _context8.abrupt("break", 43);
3846
+ return _context8.abrupt("break", 45);
3789
3847
  case 43:
3848
+ return _context8.abrupt("break", 45);
3849
+ case 44:
3850
+ return _context8.abrupt("break", 45);
3851
+ case 45:
3790
3852
  _this15.members.locusMediaSharesUpdate(payload);
3791
- _context8.next = 47;
3853
+ _context8.next = 49;
3792
3854
  break;
3793
- case 46:
3855
+ case 48:
3794
3856
  if (newShareStatus === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE) {
3795
3857
  // if we got here, then some remote participant has stolen
3796
3858
  // the presentation from another remote participant
@@ -3830,14 +3892,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3830
3892
  });
3831
3893
  _this15.members.locusMediaSharesUpdate(payload);
3832
3894
  }
3833
- case 47:
3895
+ case 49:
3834
3896
  case "end":
3835
3897
  return _context8.stop();
3836
3898
  }
3837
- }, _callee8, null, [[27,, 31, 34]]);
3899
+ }, _callee8, null, [[29,, 33, 36]]);
3838
3900
  }));
3839
3901
  return function (_x8) {
3840
- return _ref31.apply(this, arguments);
3902
+ return _ref32.apply(this, arguments);
3841
3903
  };
3842
3904
  }());
3843
3905
  }
@@ -3855,20 +3917,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3855
3917
  var _this16 = this;
3856
3918
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_URL, function (payload) {
3857
3919
  var _this16$locusUrl;
3858
- _this16.members.locusUrlUpdate(payload);
3859
- _this16.breakouts.locusUrlUpdate(payload);
3860
- _this16.simultaneousInterpretation.locusUrlUpdate(payload);
3861
- _this16.annotation.locusUrlUpdate(payload);
3862
- _this16.locusUrl = payload;
3920
+ var url = payload.url,
3921
+ isMainLocus = payload.isMainLocus;
3922
+ _this16.members.locusUrlUpdate(url);
3923
+ _this16.breakouts.locusUrlUpdate(url);
3924
+ _this16.simultaneousInterpretation.locusUrlUpdate(url);
3925
+ _this16.annotation.locusUrlUpdate(url);
3926
+ _this16.locusUrl = url;
3863
3927
  _this16.locusId = (_this16$locusUrl = _this16.locusUrl) === null || _this16$locusUrl === void 0 ? void 0 : _this16$locusUrl.split('/').pop();
3864
3928
  _this16.recordingController.setLocusUrl(_this16.locusUrl);
3865
- _this16.controlsOptionsManager.setLocusUrl(_this16.locusUrl);
3866
- _this16.webinar.locusUrlUpdate(payload);
3929
+ _this16.controlsOptionsManager.setLocusUrl(_this16.locusUrl, !!isMainLocus);
3930
+ _this16.webinar.locusUrlUpdate(url);
3867
3931
  _triggerProxy.default.trigger(_this16, {
3868
3932
  file: 'meeting/index',
3869
3933
  function: 'setUpLocusSelfListener'
3870
3934
  }, _constants.EVENT_TRIGGERS.MEETING_LOCUS_URL_UPDATE, {
3871
- locusUrl: payload
3935
+ locusUrl: url
3872
3936
  });
3873
3937
  });
3874
3938
  }
@@ -3951,8 +4015,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3951
4015
  });
3952
4016
  }
3953
4017
  });
3954
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (_ref32) {
3955
- var isInitializing = _ref32.isInitializing;
4018
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (_ref33) {
4019
+ var isInitializing = _ref33.isInitializing;
3956
4020
  _this19.updateMeetingActions();
3957
4021
  _this19.recordingController.setDisplayHints(_this19.userDisplayHints);
3958
4022
  _this19.recordingController.setUserPolicy(_this19.selfUserPolicies);
@@ -4090,7 +4154,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4090
4154
  _this21.updateLLMConnection();
4091
4155
  });
4092
4156
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, /*#__PURE__*/function () {
4093
- var _ref33 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(payload) {
4157
+ var _ref34 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(payload) {
4094
4158
  var _this21$rtcMetrics;
4095
4159
  return _regenerator.default.wrap(function _callee9$(_context9) {
4096
4160
  while (1) switch (_context9.prev = _context9.next) {
@@ -4124,7 +4188,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4124
4188
  }, _callee9);
4125
4189
  }));
4126
4190
  return function (_x9) {
4127
- return _ref33.apply(this, arguments);
4191
+ return _ref34.apply(this, arguments);
4128
4192
  };
4129
4193
  }());
4130
4194
 
@@ -4243,7 +4307,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4243
4307
  }
4244
4308
  });
4245
4309
  this.locusInfo.on(_constants.EVENTS.DESTROY_MEETING, /*#__PURE__*/function () {
4246
- var _ref34 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(payload) {
4310
+ var _ref35 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(payload) {
4247
4311
  return _regenerator.default.wrap(function _callee10$(_context10) {
4248
4312
  while (1) switch (_context10.prev = _context10.next) {
4249
4313
  case 0:
@@ -4303,7 +4367,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4303
4367
  }, _callee10, null, [[8, 14]]);
4304
4368
  }));
4305
4369
  return function (_x10) {
4306
- return _ref34.apply(this, arguments);
4370
+ return _ref35.apply(this, arguments);
4307
4371
  };
4308
4372
  }());
4309
4373
  }
@@ -4332,11 +4396,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4332
4396
 
4333
4397
  /**
4334
4398
  * Invite a guest to the call that isn't normally part of this call
4335
- * @param {Object} invitee
4399
+ * @param {Invitee} invitee
4336
4400
  * @param {String} invitee.emailAddress
4337
4401
  * @param {String} invitee.email
4338
4402
  * @param {String} invitee.phoneNumber
4339
4403
  * @param {Boolean} [alertIfActive]
4404
+ * @param {Boolean} [invitee.skipEmailValidation]
4405
+ * @param {Boolean} [invitee.isInternalNumber]
4340
4406
  * @returns {Promise} see #members.addMember
4341
4407
  * @public
4342
4408
  * @memberof Meeting
@@ -4350,7 +4416,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4350
4416
 
4351
4417
  /**
4352
4418
  * Cancel an outgoing phone call invitation made during a meeting
4353
- * @param {Object} invitee
4419
+ * @param {Invitee} invitee
4354
4420
  * @param {String} invitee.phoneNumber
4355
4421
  * @returns {Promise} see #members.cancelPhoneInvite
4356
4422
  * @public
@@ -4364,7 +4430,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4364
4430
 
4365
4431
  /**
4366
4432
  * Cancel an SIP/phone call invitation made during a meeting
4367
- * @param {Object} invitee
4433
+ * @param {Invitee} invitee
4368
4434
  * @param {String} invitee.memberId
4369
4435
  * @param {Boolean} [invitee.isInternalNumber] - When cancel phone invitation, if the number is internal
4370
4436
  * @returns {Promise} see #members.cancelInviteByMemberId
@@ -4649,6 +4715,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4649
4715
  canPauseRecording: _util4.default.canUserPause(this.userDisplayHints, this.selfUserPolicies),
4650
4716
  canResumeRecording: _util4.default.canUserResume(this.userDisplayHints, this.selfUserPolicies),
4651
4717
  isPremiseRecordingEnabled: _util4.default.isPremiseRecordingEnabled(this.userDisplayHints, this.selfUserPolicies),
4718
+ showAutoEndMeetingWarning: _util2.default.showAutoEndMeetingWarning(this.userDisplayHints),
4652
4719
  canRaiseHand: _util2.default.canUserRaiseHand(this.userDisplayHints),
4653
4720
  canLowerAllHands: _util2.default.canUserLowerAllHands(this.userDisplayHints),
4654
4721
  canLowerSomeoneElsesHand: _util2.default.canUserLowerSomeoneElsesHand(this.userDisplayHints),
@@ -4659,8 +4726,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4659
4726
  isClosedCaptionActive: _util2.default.isClosedCaptionActive(this.userDisplayHints),
4660
4727
  canStartManualCaption: _util2.default.canStartManualCaption(this.userDisplayHints),
4661
4728
  canStopManualCaption: _util2.default.canStopManualCaption(this.userDisplayHints),
4729
+ isLocalRecordingStarted: _util2.default.isLocalRecordingStarted(this.userDisplayHints),
4730
+ isLocalRecordingStopped: _util2.default.isLocalRecordingStopped(this.userDisplayHints),
4731
+ isLocalRecordingPaused: _util2.default.isLocalRecordingPaused(this.userDisplayHints),
4732
+ isLocalStreamingStarted: _util2.default.isLocalStreamingStarted(this.userDisplayHints),
4733
+ isLocalStreamingStopped: _util2.default.isLocalStreamingStopped(this.userDisplayHints),
4662
4734
  isManualCaptionActive: _util2.default.isManualCaptionActive(this.userDisplayHints),
4663
4735
  isSaveTranscriptsEnabled: _util2.default.isSaveTranscriptsEnabled(this.userDisplayHints),
4736
+ isSpokenLanguageAutoDetectionEnabled: _util2.default.isSpokenLanguageAutoDetectionEnabled(this.userDisplayHints),
4664
4737
  isWebexAssistantActive: _util2.default.isWebexAssistantActive(this.userDisplayHints),
4665
4738
  canViewCaptionPanel: _util2.default.canViewCaptionPanel(this.userDisplayHints),
4666
4739
  isRealTimeTranslationEnabled: _util2.default.isRealTimeTranslationEnabled(this.userDisplayHints),
@@ -4953,7 +5026,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4953
5026
  this.selfId = locus.selfId;
4954
5027
  this.mediaId = locus.mediaId;
4955
5028
  this.hostId = mtgLocus.host ? mtgLocus.host.id : this.hostId;
4956
- this.locusInfo.initialSetup(mtgLocus, locus.dataSets);
5029
+ this.locusInfo.initialSetup(mtgLocus);
4957
5030
  }
4958
5031
 
4959
5032
  /**
@@ -6333,24 +6406,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6333
6406
  _this36.deferJoin = undefined;
6334
6407
  return join;
6335
6408
  }).catch(function (error) {
6336
- var _this36$meetingInfo, _error$error;
6409
+ var _error$error;
6337
6410
  _this36.meetingFiniteStateMachine.fail(error);
6338
6411
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
6339
6412
 
6340
- // @ts-ignore
6341
- _this36.webex.internal.newMetrics.submitClientEvent({
6342
- name: 'client.locus.join.response',
6343
- payload: {
6344
- identifiers: {
6345
- meetingLookupUrl: (_this36$meetingInfo = _this36.meetingInfo) === null || _this36$meetingInfo === void 0 ? void 0 : _this36$meetingInfo.meetingLookupUrl
6346
- }
6347
- },
6348
- options: {
6349
- meetingId: _this36.id,
6350
- rawError: error
6351
- }
6352
- });
6353
-
6354
6413
  // TODO: change this to error codes and pre defined dictionary
6355
6414
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
6356
6415
  correlation_id: _this36.correlationId,
@@ -6416,7 +6475,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6416
6475
  isJoined = this.isJoined(); // webinar panelist should use new data channel in practice session
6417
6476
  dataChannelUrl = this.webinar.isJoinPracticeSessionDataChannel() && practiceSessionDatachannelUrl ? practiceSessionDatachannelUrl : datachannelUrl; // @ts-ignore - Fix type
6418
6477
  if (!this.webex.internal.llm.isConnected()) {
6419
- _context20.next = 10;
6478
+ _context20.next = 9;
6420
6479
  break;
6421
6480
  }
6422
6481
  if (!(
@@ -6437,28 +6496,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6437
6496
  case 8:
6438
6497
  // @ts-ignore - Fix type
6439
6498
  this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
6440
- // @ts-ignore - Fix type
6441
- this.webex.internal.llm.off('event:locus.state_message', this.processLocusLLMEvent);
6442
- case 10:
6499
+ case 9:
6443
6500
  if (isJoined) {
6444
- _context20.next = 12;
6501
+ _context20.next = 11;
6445
6502
  break;
6446
6503
  }
6447
6504
  return _context20.abrupt("return", undefined);
6448
- case 12:
6505
+ case 11:
6449
6506
  return _context20.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl).then(function (registerAndConnectResult) {
6450
6507
  // @ts-ignore - Fix type
6451
6508
  _this37.webex.internal.llm.off('event:relay.event', _this37.processRelayEvent);
6452
6509
  // @ts-ignore - Fix type
6453
6510
  _this37.webex.internal.llm.on('event:relay.event', _this37.processRelayEvent);
6454
- // @ts-ignore - Fix type
6455
- _this37.webex.internal.llm.off('event:locus.state_message', _this37.processLocusLLMEvent);
6456
- // @ts-ignore - Fix type
6457
- _this37.webex.internal.llm.on('event:locus.state_message', _this37.processLocusLLMEvent);
6458
6511
  _loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
6459
6512
  return _promise.default.resolve(registerAndConnectResult);
6460
6513
  }));
6461
- case 13:
6514
+ case 12:
6462
6515
  case "end":
6463
6516
  return _context20.stop();
6464
6517
  }
@@ -6510,14 +6563,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6510
6563
  value: function dialInPstn() {
6511
6564
  var _this38 = this;
6512
6565
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
6513
-
6514
- var correlationId = this.correlationId,
6566
+ this.pstnCorrelationId = _uuid.default.v4();
6567
+ var pstnCorrelationId = this.pstnCorrelationId,
6515
6568
  locusUrl = this.locusUrl;
6516
6569
  if (!this.dialInUrl) this.dialInUrl = "dialin:///".concat(_uuid.default.v4());
6517
6570
  return this.meetingRequest
6518
6571
  // @ts-ignore
6519
6572
  .dialIn({
6520
- correlationId: correlationId,
6573
+ correlationId: pstnCorrelationId,
6521
6574
  dialInUrl: this.dialInUrl,
6522
6575
  locusUrl: locusUrl,
6523
6576
  clientUrl: this.deviceUrl
@@ -6526,11 +6579,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6526
6579
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
6527
6580
  correlation_id: _this38.correlationId,
6528
6581
  dial_in_url: _this38.dialInUrl,
6582
+ dial_in_correlation_id: pstnCorrelationId,
6529
6583
  locus_id: locusUrl.split('/').pop(),
6530
6584
  client_url: _this38.deviceUrl,
6531
6585
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
6532
6586
  stack: error.stack
6533
6587
  });
6588
+ if (_this38.pstnCorrelationId === pstnCorrelationId) {
6589
+ _this38.pstnCorrelationId = undefined;
6590
+ }
6534
6591
  return _promise.default.reject(error);
6535
6592
  });
6536
6593
  }
@@ -6547,14 +6604,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6547
6604
  value: function dialOutPstn(phoneNumber) {
6548
6605
  var _this39 = this;
6549
6606
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
6550
-
6551
- var correlationId = this.correlationId,
6552
- locusUrl = this.locusUrl;
6607
+ this.pstnCorrelationId = _uuid.default.v4();
6608
+ var locusUrl = this.locusUrl,
6609
+ pstnCorrelationId = this.pstnCorrelationId;
6553
6610
  if (!this.dialOutUrl) this.dialOutUrl = "dialout:///".concat(_uuid.default.v4());
6554
6611
  return this.meetingRequest
6555
6612
  // @ts-ignore
6556
6613
  .dialOut({
6557
- correlationId: correlationId,
6614
+ correlationId: pstnCorrelationId,
6558
6615
  dialOutUrl: this.dialOutUrl,
6559
6616
  phoneNumber: phoneNumber,
6560
6617
  locusUrl: locusUrl,
@@ -6564,11 +6621,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6564
6621
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
6565
6622
  correlation_id: _this39.correlationId,
6566
6623
  dial_out_url: _this39.dialOutUrl,
6624
+ dial_out_correlation_id: pstnCorrelationId,
6567
6625
  locus_id: locusUrl.split('/').pop(),
6568
6626
  client_url: _this39.deviceUrl,
6569
6627
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
6570
6628
  stack: error.stack
6571
6629
  });
6630
+ if (_this39.pstnCorrelationId === pstnCorrelationId) {
6631
+ _this39.pstnCorrelationId = undefined;
6632
+ }
6572
6633
  return _promise.default.reject(error);
6573
6634
  });
6574
6635
  }
@@ -6583,7 +6644,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6583
6644
  }, {
6584
6645
  key: "disconnectPhoneAudio",
6585
6646
  value: function disconnectPhoneAudio() {
6586
- return _promise.default.all([this.isPhoneProvisioned(this.dialInDeviceStatus) ? _util2.default.disconnectPhoneAudio(this, this.dialInUrl) : _promise.default.resolve(), this.isPhoneProvisioned(this.dialOutDeviceStatus) ? _util2.default.disconnectPhoneAudio(this, this.dialOutUrl) : _promise.default.resolve()]);
6647
+ var _this40 = this;
6648
+ var correlationToClear = this.pstnCorrelationId;
6649
+ return _promise.default.all([this.isPhoneProvisioned(this.dialInDeviceStatus) ? _util2.default.disconnectPhoneAudio(this, this.dialInUrl) : _promise.default.resolve(), this.isPhoneProvisioned(this.dialOutDeviceStatus) ? _util2.default.disconnectPhoneAudio(this, this.dialOutUrl) : _promise.default.resolve()]).then(function () {
6650
+ if (_this40.pstnCorrelationId === correlationToClear) {
6651
+ _this40.pstnCorrelationId = undefined;
6652
+ }
6653
+ });
6587
6654
  }
6588
6655
 
6589
6656
  /**
@@ -6596,7 +6663,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6596
6663
  }, {
6597
6664
  key: "moveTo",
6598
6665
  value: function moveTo(resourceId) {
6599
- var _this40 = this;
6666
+ var _this41 = this;
6600
6667
  if (!resourceId) {
6601
6668
  throw new _parameter.default('Cannot move call without a resourceId.');
6602
6669
  }
@@ -6640,12 +6707,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6640
6707
  while (1) switch (_context21.prev = _context21.next) {
6641
6708
  case 0:
6642
6709
  _context21.prev = 0;
6643
- if (!(_this40.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6710
+ if (!(_this41.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6644
6711
  _context21.next = 4;
6645
6712
  break;
6646
6713
  }
6647
6714
  _context21.next = 4;
6648
- return _this40.releaseScreenShareFloor();
6715
+ return _this41.releaseScreenShareFloor();
6649
6716
  case 4:
6650
6717
  mediaSettings = {
6651
6718
  mediaDirection: {
@@ -6657,37 +6724,37 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6657
6724
  receiveShare: true
6658
6725
  }
6659
6726
  };
6660
- _this40.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6661
- _this40.mediaProperties.unsetRemoteMedia();
6727
+ _this41.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6728
+ _this41.mediaProperties.unsetRemoteMedia();
6662
6729
 
6663
6730
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the device answers the meeting
6664
6731
  // once the device answers we close the old connection and create new media server connection with only share enabled
6665
- if (!_this40.statsAnalyzer) {
6732
+ if (!_this41.statsAnalyzer) {
6666
6733
  _context21.next = 10;
6667
6734
  break;
6668
6735
  }
6669
6736
  _context21.next = 10;
6670
- return _this40.statsAnalyzer.stopAnalyzer();
6737
+ return _this41.statsAnalyzer.stopAnalyzer();
6671
6738
  case 10:
6672
6739
  _context21.next = 12;
6673
- return _this40.closeRemoteStreams();
6740
+ return _this41.closeRemoteStreams();
6674
6741
  case 12:
6675
6742
  _context21.next = 14;
6676
- return _this40.closePeerConnections();
6743
+ return _this41.closePeerConnections();
6677
6744
  case 14:
6678
- _this40.cleanupLocalStreams();
6679
- _this40.unsetRemoteStreams();
6680
- _this40.unsetPeerConnections();
6681
- _this40.reconnectionManager.cleanUp();
6745
+ _this41.cleanupLocalStreams();
6746
+ _this41.unsetRemoteStreams();
6747
+ _this41.unsetPeerConnections();
6748
+ _this41.reconnectionManager.cleanUp();
6682
6749
  _context21.next = 20;
6683
- return _this40.addMedia({
6750
+ return _this41.addMedia({
6684
6751
  audioEnabled: false,
6685
6752
  videoEnabled: false,
6686
6753
  shareVideoEnabled: true
6687
6754
  });
6688
6755
  case 20:
6689
6756
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
6690
- _this40.isMoveToInProgress = false;
6757
+ _this41.isMoveToInProgress = false;
6691
6758
  _context21.next = 29;
6692
6759
  break;
6693
6760
  case 24:
@@ -6695,12 +6762,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6695
6762
  _context21.t0 = _context21["catch"](0);
6696
6763
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context21.t0);
6697
6764
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6698
- correlation_id: _this40.correlationId,
6699
- locus_id: _this40.locusUrl.split('/').pop(),
6765
+ correlation_id: _this41.correlationId,
6766
+ locus_id: _this41.locusUrl.split('/').pop(),
6700
6767
  reason: _context21.t0.message,
6701
6768
  stack: _context21.t0.stack
6702
6769
  });
6703
- _this40.isMoveToInProgress = false;
6770
+ _this41.isMoveToInProgress = false;
6704
6771
  case 29:
6705
6772
  case "end":
6706
6773
  return _context21.stop();
@@ -6716,17 +6783,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6716
6783
  resourceId: resourceId,
6717
6784
  moveToResource: true
6718
6785
  }).then(function () {
6719
- _this40.meetingFiniteStateMachine.join();
6786
+ _this41.meetingFiniteStateMachine.join();
6720
6787
  }).catch(function (error) {
6721
- _this40.meetingFiniteStateMachine.fail(error);
6788
+ _this41.meetingFiniteStateMachine.fail(error);
6722
6789
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6723
- correlation_id: _this40.correlationId,
6724
- locus_id: _this40.locusUrl.split('/').pop(),
6790
+ correlation_id: _this41.correlationId,
6791
+ locus_id: _this41.locusUrl.split('/').pop(),
6725
6792
  reason: error.message,
6726
6793
  stack: error.stack
6727
6794
  });
6728
6795
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', error);
6729
- _this40.isMoveToInProgress = false;
6796
+ _this41.isMoveToInProgress = false;
6730
6797
  return _promise.default.reject(error);
6731
6798
  });
6732
6799
  }
@@ -6741,7 +6808,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6741
6808
  }, {
6742
6809
  key: "moveFrom",
6743
6810
  value: function moveFrom(resourceId) {
6744
- var _this41 = this;
6811
+ var _this42 = this;
6745
6812
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
6746
6813
  if (!resourceId) {
6747
6814
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -6756,19 +6823,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6756
6823
  }
6757
6824
  });
6758
6825
  return _util2.default.joinMeetingOptions(this).then(function () {
6759
- return _util2.default.leaveMeeting(_this41, {
6826
+ return _util2.default.leaveMeeting(_this42, {
6760
6827
  resourceId: resourceId,
6761
6828
  correlationId: oldCorrelationId,
6762
6829
  moveMeeting: true
6763
6830
  }).then(function () {
6764
- _this41.resourceId = '';
6831
+ _this42.resourceId = '';
6765
6832
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
6766
6833
  });
6767
6834
  }).catch(function (error) {
6768
- _this41.meetingFiniteStateMachine.fail(error);
6835
+ _this42.meetingFiniteStateMachine.fail(error);
6769
6836
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
6770
- correlation_id: _this41.correlationId,
6771
- locus_id: _this41.locusUrl.split('/').pop(),
6837
+ correlation_id: _this42.correlationId,
6838
+ locus_id: _this42.locusUrl.split('/').pop(),
6772
6839
  reason: error.message,
6773
6840
  stack: error.stack
6774
6841
  });
@@ -6891,9 +6958,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6891
6958
  }, {
6892
6959
  key: "forwardEvent",
6893
6960
  value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
6894
- var _this42 = this;
6961
+ var _this43 = this;
6895
6962
  eventEmitter.on(eventTypeToForward, function (data) {
6896
- return _triggerProxy.default.trigger(_this42, {
6963
+ return _triggerProxy.default.trigger(_this43, {
6897
6964
  file: 'meetings',
6898
6965
  function: 'addMedia'
6899
6966
  }, meetingEventType, data);
@@ -7047,14 +7114,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7047
7114
  }, {
7048
7115
  key: "createStatsAnalyzer",
7049
7116
  value: function createStatsAnalyzer() {
7117
+ var _this44 = this;
7050
7118
  // @ts-ignore - config coming from registerPlugin
7051
7119
  if (this.config.stats.enableStatsAnalyzer) {
7052
7120
  // @ts-ignore - config coming from registerPlugin
7053
7121
  this.networkQualityMonitor = new _internalMediaCore.NetworkQualityMonitor(this.config.stats);
7122
+ this.statsMonitor = new _internalMediaCore.StatsMonitor();
7054
7123
  this.statsAnalyzer = new _internalMediaCore.StatsAnalyzer({
7055
7124
  // @ts-ignore - config coming from registerPlugin
7056
7125
  config: this.config.stats,
7057
7126
  networkQualityMonitor: this.networkQualityMonitor,
7127
+ statsMonitor: this.statsMonitor,
7058
7128
  isMultistream: this.isMultistream
7059
7129
  });
7060
7130
  this.shareCAEventSentStatus = {
@@ -7065,6 +7135,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7065
7135
  };
7066
7136
  this.setupStatsAnalyzerEventHandlers();
7067
7137
  this.networkQualityMonitor.on(_internalMediaCore.NetworkQualityEventNames.NETWORK_QUALITY, this.sendNetworkQualityEvent.bind(this));
7138
+ this.statsMonitor.on(_internalMediaCore.StatsMonitorEventNames.INBOUND_AUDIO_ISSUE, function (data) {
7139
+ // Before forwarding any inbound audio issues to the app, make sure that we have at least one other
7140
+ // participant in the meeting with unmuted audio.
7141
+ // We don't check this.mediaProperties.mediaDirection here, because that's already handled in statsAnalyzer,
7142
+ // so we won't get this event if we are not setup to receive any audio
7143
+ var atLeastOneUnmutedOtherMember = (0, _values.default)(_this44.members.membersCollection.getAll()).find(function (member) {
7144
+ return !member.isSelf && !member.isPairedWithSelf && !member.isAudioMuted;
7145
+ });
7146
+ if (atLeastOneUnmutedOtherMember) {
7147
+ _this44.mediaProperties.sendMediaIssueMetric('inbound_audio', data.issueSubType, _this44.correlationId);
7148
+ _triggerProxy.default.trigger(_this44, {
7149
+ file: 'meeting/index',
7150
+ function: 'createStatsAnalyzer'
7151
+ }, _constants.EVENT_TRIGGERS.MEDIA_INBOUND_AUDIO_ISSUE_DETECTED, data);
7152
+ }
7153
+ });
7068
7154
  }
7069
7155
  }
7070
7156
 
@@ -7079,7 +7165,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7079
7165
  key: "waitForRemoteSDPAnswer",
7080
7166
  value: (function () {
7081
7167
  var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
7082
- var _this43 = this;
7168
+ var _this45 = this;
7083
7169
  var LOG_HEADER, deferSDPAnswer;
7084
7170
  return _regenerator.default.wrap(function _callee25$(_context25) {
7085
7171
  while (1) switch (_context25.prev = _context25.next) {
@@ -7098,18 +7184,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7098
7184
  var error = new Error('Timed out waiting for REMOTE SDP ANSWER');
7099
7185
 
7100
7186
  // @ts-ignore
7101
- _this43.webex.internal.newMetrics.submitClientEvent({
7187
+ _this45.webex.internal.newMetrics.submitClientEvent({
7102
7188
  name: 'client.media-engine.remote-sdp-received',
7103
7189
  payload: {
7104
7190
  canProceed: false,
7105
7191
  errors: [
7106
7192
  // @ts-ignore
7107
- _this43.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
7193
+ _this45.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
7108
7194
  clientErrorCode: _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MISSING_ROAP_ANSWER_CLIENT_CODE
7109
7195
  })]
7110
7196
  },
7111
7197
  options: {
7112
- meetingId: _this43.id,
7198
+ meetingId: _this45.id,
7113
7199
  rawError: error
7114
7200
  }
7115
7201
  });
@@ -7418,6 +7504,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7418
7504
  key: "cleanUpOnAddMediaFailure",
7419
7505
  value: (function () {
7420
7506
  var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31() {
7507
+ var _this$networkQualityM, _this$statsMonitor;
7421
7508
  return _regenerator.default.wrap(function _callee31$(_context31) {
7422
7509
  while (1) switch (_context31.prev = _context31.next) {
7423
7510
  case 0:
@@ -7429,19 +7516,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7429
7516
  return this.statsAnalyzer.stopAnalyzer();
7430
7517
  case 3:
7431
7518
  this.statsAnalyzer = null;
7519
+ (_this$networkQualityM = this.networkQualityMonitor) === null || _this$networkQualityM === void 0 ? void 0 : _this$networkQualityM.removeAllListeners();
7520
+ this.networkQualityMonitor = null;
7521
+ (_this$statsMonitor = this.statsMonitor) === null || _this$statsMonitor === void 0 ? void 0 : _this$statsMonitor.removeAllListeners();
7522
+ this.statsMonitor = null;
7432
7523
 
7433
7524
  // when media fails, we want to upload a webrtc dump to see whats going on
7434
7525
  // this function is async, but returns once the stats have been gathered
7435
- _context31.next = 6;
7526
+ _context31.next = 10;
7436
7527
  return this.forceSendStatsReport({
7437
7528
  callFrom: 'addMedia'
7438
7529
  });
7439
- case 6:
7530
+ case 10:
7440
7531
  if (this.mediaProperties.webrtcMediaConnection) {
7441
7532
  this.closePeerConnections();
7442
7533
  this.unsetPeerConnections();
7443
7534
  }
7444
- case 7:
7535
+ case 11:
7445
7536
  case "end":
7446
7537
  return _context31.stop();
7447
7538
  }
@@ -7464,7 +7555,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7464
7555
  key: "downgradeFromMultistreamToTranscoded",
7465
7556
  value: (function () {
7466
7557
  var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
7467
- var _this$locusMediaReque2;
7558
+ var _this$networkQualityM2, _this$statsMonitor2, _this$locusMediaReque2;
7468
7559
  return _regenerator.default.wrap(function _callee32$(_context32) {
7469
7560
  while (1) switch (_context32.prev = _context32.next) {
7470
7561
  case 0:
@@ -7476,6 +7567,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7476
7567
  return this.statsAnalyzer.stopAnalyzer();
7477
7568
  case 3:
7478
7569
  this.statsAnalyzer = null;
7570
+ (_this$networkQualityM2 = this.networkQualityMonitor) === null || _this$networkQualityM2 === void 0 ? void 0 : _this$networkQualityM2.removeAllListeners();
7571
+ this.networkQualityMonitor = null;
7572
+ (_this$statsMonitor2 = this.statsMonitor) === null || _this$statsMonitor2 === void 0 ? void 0 : _this$statsMonitor2.removeAllListeners();
7573
+ this.statsMonitor = null;
7479
7574
  this.isMultistream = false;
7480
7575
  if (this.mediaProperties.webrtcMediaConnection) {
7481
7576
  // close peer connection, but don't reset mute state information, because we will want to use it on the retry
@@ -7484,7 +7579,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7484
7579
  }
7485
7580
  (_this$locusMediaReque2 = this.locusMediaRequest) === null || _this$locusMediaReque2 === void 0 ? void 0 : _this$locusMediaReque2.downgradeFromMultistreamToTranscoded();
7486
7581
  this.createStatsAnalyzer();
7487
- case 8:
7582
+ case 12:
7488
7583
  case "end":
7489
7584
  return _context32.stop();
7490
7585
  }
@@ -7616,10 +7711,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7616
7711
  }, {
7617
7712
  key: "addMedia",
7618
7713
  value: function addMedia() {
7619
- var _this44 = this;
7714
+ var _this46 = this;
7620
7715
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7621
7716
  return this.addMediaInternal(function () {
7622
- return _this44.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7717
+ return _this46.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7623
7718
  }, undefined, false, options);
7624
7719
  }
7625
7720
 
@@ -7662,6 +7757,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7662
7757
  receiveVideo,
7663
7758
  sendAudio,
7664
7759
  receiveAudio,
7760
+ ipver,
7665
7761
  _this$remoteMediaMana,
7666
7762
  _yield$this$mediaProp,
7667
7763
  connectionType,
@@ -7726,14 +7822,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7726
7822
  receiveAudio = audioEnabled && (rawReceiveAudio !== null && rawReceiveAudio !== void 0 ? rawReceiveAudio : true);
7727
7823
  this.allowMediaInLobby = options === null || options === void 0 ? void 0 : options.allowMediaInLobby;
7728
7824
 
7825
+ // @ts-ignore
7826
+ ipver = _util2.default.getIpVersion(this.webex); // used just for metrics
7729
7827
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
7730
7828
  // @ts-ignore - isUserUnadmitted coming from SelfUtil
7731
7829
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
7732
- _context35.next = 19;
7830
+ _context35.next = 20;
7733
7831
  break;
7734
7832
  }
7735
7833
  throw new _webexErrors.UserInLobbyError();
7736
- case 19:
7834
+ case 20:
7737
7835
  // @ts-ignore
7738
7836
  this.webex.internal.newMetrics.submitClientEvent({
7739
7837
  name: 'client.media.capabilities',
@@ -7773,63 +7871,64 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7773
7871
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
7774
7872
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
7775
7873
  this.brbState = (0, _brbState.createBrbState)(this, false);
7776
- _context35.prev = 24;
7777
- _context35.next = 27;
7874
+ _context35.prev = 25;
7875
+ _context35.next = 28;
7778
7876
  return this.setUpLocalStreamReferences(localStreams);
7779
- case 27:
7877
+ case 28:
7780
7878
  this.setMercuryListener();
7781
7879
  this.createStatsAnalyzer();
7782
- _context35.prev = 29;
7783
- _context35.next = 32;
7880
+ _context35.prev = 30;
7881
+ _context35.next = 33;
7784
7882
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
7785
- case 32:
7786
- _context35.next = 45;
7883
+ case 33:
7884
+ _context35.next = 46;
7787
7885
  break;
7788
- case 34:
7789
- _context35.prev = 34;
7790
- _context35.t0 = _context35["catch"](29);
7886
+ case 35:
7887
+ _context35.prev = 35;
7888
+ _context35.t0 = _context35["catch"](30);
7791
7889
  if (!(_context35.t0 instanceof _multistreamNotSupportedError.default)) {
7792
- _context35.next = 44;
7890
+ _context35.next = 45;
7793
7891
  break;
7794
7892
  }
7795
7893
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
7796
- _context35.next = 40;
7894
+ _context35.next = 41;
7797
7895
  return this.downgradeFromMultistreamToTranscoded();
7798
- case 40:
7799
- _context35.next = 42;
7896
+ case 41:
7897
+ _context35.next = 43;
7800
7898
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
7801
- case 42:
7802
- _context35.next = 45;
7899
+ case 43:
7900
+ _context35.next = 46;
7803
7901
  break;
7804
- case 44:
7805
- throw _context35.t0;
7806
7902
  case 45:
7903
+ throw _context35.t0;
7904
+ case 46:
7807
7905
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connected, finalizing..."));
7808
7906
  if (!this.mediaProperties.hasLocalShareStream()) {
7809
- _context35.next = 49;
7907
+ _context35.next = 50;
7810
7908
  break;
7811
7909
  }
7812
- _context35.next = 49;
7910
+ _context35.next = 50;
7813
7911
  return this.enqueueScreenShareFloorRequest();
7814
- case 49:
7815
- _context35.next = 51;
7912
+ case 50:
7913
+ _context35.next = 52;
7816
7914
  return this.mediaProperties.getCurrentConnectionInfo();
7817
- case 51:
7915
+ case 52:
7818
7916
  _yield$this$mediaProp = _context35.sent;
7819
7917
  connectionType = _yield$this$mediaProp.connectionType;
7820
7918
  ipVersion = _yield$this$mediaProp.ipVersion;
7821
7919
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
7822
7920
  numTransports = _yield$this$mediaProp.numTransports;
7823
7921
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7824
- _context35.next = 59;
7922
+ _context35.next = 60;
7825
7923
  return this.getMediaReachabilityMetricFields();
7826
- case 59:
7924
+ case 60:
7827
7925
  reachabilityMetrics = _context35.sent;
7828
7926
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
7829
7927
  correlation_id: this.correlationId,
7830
7928
  locus_id: this.locusUrl.split('/').pop(),
7831
7929
  connectionType: connectionType,
7832
7930
  ipVersion: ipVersion,
7931
+ ipver: ipver,
7833
7932
  selectedCandidatePairChanges: selectedCandidatePairChanges,
7834
7933
  numTransports: numTransports,
7835
7934
  isMultistream: this.isMultistream,
@@ -7853,21 +7952,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7853
7952
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
7854
7953
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
7855
7954
  this.startPeriodicLogUpload();
7856
- _context35.next = 85;
7955
+ _context35.next = 86;
7857
7956
  break;
7858
- case 67:
7859
- _context35.prev = 67;
7860
- _context35.t1 = _context35["catch"](24);
7957
+ case 68:
7958
+ _context35.prev = 68;
7959
+ _context35.t1 = _context35["catch"](25);
7861
7960
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context35.t1);
7862
7961
 
7863
7962
  // @ts-ignore
7864
- _context35.next = 72;
7963
+ _context35.next = 73;
7865
7964
  return this.getMediaReachabilityMetricFields();
7866
- case 72:
7965
+ case 73:
7867
7966
  _reachabilityMetrics = _context35.sent;
7868
- _context35.next = 75;
7967
+ _context35.next = 76;
7869
7968
  return this.mediaProperties.getCurrentConnectionInfo();
7870
- case 75:
7969
+ case 76:
7871
7970
  _yield$this$mediaProp2 = _context35.sent;
7872
7971
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
7873
7972
  _numTransports = _yield$this$mediaProp2.numTransports;
@@ -7889,11 +7988,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7889
7988
  connectionState: ((_this$mediaProperties22 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties22 === void 0 ? void 0 : (_this$mediaProperties23 = _this$mediaProperties22.multistreamConnection) === null || _this$mediaProperties23 === void 0 ? void 0 : (_this$mediaProperties24 = _this$mediaProperties23.pc) === null || _this$mediaProperties24 === void 0 ? void 0 : (_this$mediaProperties25 = _this$mediaProperties24.pc) === null || _this$mediaProperties25 === void 0 ? void 0 : _this$mediaProperties25.connectionState) || ((_this$mediaProperties26 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties26 === void 0 ? void 0 : (_this$mediaProperties27 = _this$mediaProperties26.mediaConnection) === null || _this$mediaProperties27 === void 0 ? void 0 : (_this$mediaProperties28 = _this$mediaProperties27.pc) === null || _this$mediaProperties28 === void 0 ? void 0 : _this$mediaProperties28.connectionState) || 'unknown',
7890
7989
  iceConnectionState: ((_this$mediaProperties29 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties29 === void 0 ? void 0 : (_this$mediaProperties30 = _this$mediaProperties29.multistreamConnection) === null || _this$mediaProperties30 === void 0 ? void 0 : (_this$mediaProperties31 = _this$mediaProperties30.pc) === null || _this$mediaProperties31 === void 0 ? void 0 : (_this$mediaProperties32 = _this$mediaProperties31.pc) === null || _this$mediaProperties32 === void 0 ? void 0 : _this$mediaProperties32.iceConnectionState) || ((_this$mediaProperties33 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties33 === void 0 ? void 0 : (_this$mediaProperties34 = _this$mediaProperties33.mediaConnection) === null || _this$mediaProperties34 === void 0 ? void 0 : (_this$mediaProperties35 = _this$mediaProperties34.pc) === null || _this$mediaProperties35 === void 0 ? void 0 : _this$mediaProperties35.iceConnectionState) || 'unknown'
7891
7990
  }, _reachabilityMetrics), _iceCandidateErrors), {}, {
7892
- iceCandidatesCount: this.iceCandidatesCount
7991
+ iceCandidatesCount: this.iceCandidatesCount,
7992
+ ipver: ipver
7893
7993
  }));
7894
- _context35.next = 82;
7994
+ _context35.next = 83;
7895
7995
  return this.cleanUpOnAddMediaFailure();
7896
- case 82:
7996
+ case 83:
7897
7997
  // Upload logs on error while adding media
7898
7998
  _triggerProxy.default.trigger(this, {
7899
7999
  file: 'meeting/index',
@@ -7905,15 +8005,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7905
8005
  });
7906
8006
  }
7907
8007
  throw _context35.t1;
7908
- case 85:
7909
- _context35.prev = 85;
8008
+ case 86:
8009
+ _context35.prev = 86;
7910
8010
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
7911
- return _context35.finish(85);
7912
- case 88:
8011
+ return _context35.finish(86);
8012
+ case 89:
7913
8013
  case "end":
7914
8014
  return _context35.stop();
7915
8015
  }
7916
- }, _callee35, this, [[24, 67, 85, 88], [29, 34]]);
8016
+ }, _callee35, this, [[25, 68, 86, 89], [30, 35]]);
7917
8017
  }));
7918
8018
  function addMediaInternal(_x33, _x34, _x35) {
7919
8019
  return _addMediaInternal.apply(this, arguments);
@@ -7945,7 +8045,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7945
8045
  * @memberof Meeting
7946
8046
  */
7947
8047
  function enqueueMediaUpdate(mediaUpdateType) {
7948
- var _this45 = this;
8048
+ var _this47 = this;
7949
8049
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7950
8050
  var canUpdateMediaNow = this.canUpdateMedia();
7951
8051
  return new _promise.default(function (resolve, reject) {
@@ -7956,9 +8056,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7956
8056
  options: options
7957
8057
  };
7958
8058
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
7959
- _this45.queuedMediaUpdates.push(queueItem);
8059
+ _this47.queuedMediaUpdates.push(queueItem);
7960
8060
  if (canUpdateMediaNow) {
7961
- _this45.processNextQueuedMediaUpdate();
8061
+ _this47.processNextQueuedMediaUpdate();
7962
8062
  }
7963
8063
  });
7964
8064
  }
@@ -8063,7 +8163,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8063
8163
  }, {
8064
8164
  key: "acknowledge",
8065
8165
  value: function acknowledge(type) {
8066
- var _this46 = this;
8166
+ var _this48 = this;
8067
8167
  if (!type) {
8068
8168
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
8069
8169
  }
@@ -8075,12 +8175,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8075
8175
  }).then(function (response) {
8076
8176
  return _promise.default.resolve(response);
8077
8177
  }).then(function (response) {
8078
- _this46.meetingFiniteStateMachine.ring(type);
8178
+ _this48.meetingFiniteStateMachine.ring(type);
8079
8179
  // @ts-ignore
8080
- _this46.webex.internal.newMetrics.submitClientEvent({
8180
+ _this48.webex.internal.newMetrics.submitClientEvent({
8081
8181
  name: 'client.alert.displayed',
8082
8182
  options: {
8083
- meetingId: _this46.id
8183
+ meetingId: _this48.id
8084
8184
  }
8085
8185
  });
8086
8186
  return _promise.default.resolve({
@@ -8105,12 +8205,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8105
8205
  }, {
8106
8206
  key: "decline",
8107
8207
  value: function decline(reason) {
8108
- var _this47 = this;
8208
+ var _this49 = this;
8109
8209
  return _util2.default.declineMeeting(this, reason).then(function (decline) {
8110
- _this47.meetingFiniteStateMachine.decline();
8210
+ _this49.meetingFiniteStateMachine.decline();
8111
8211
  return _promise.default.resolve(decline);
8112
8212
  }).catch(function (error) {
8113
- _this47.meetingFiniteStateMachine.fail(error);
8213
+ _this49.meetingFiniteStateMachine.fail(error);
8114
8214
  return _promise.default.reject(error);
8115
8215
  });
8116
8216
  }
@@ -8161,7 +8261,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8161
8261
  }, {
8162
8262
  key: "leave",
8163
8263
  value: function leave() {
8164
- var _this48 = this;
8264
+ var _this50 = this;
8165
8265
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8166
8266
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
8167
8267
 
@@ -8173,7 +8273,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8173
8273
  var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8174
8274
  return (
8175
8275
  // @ts-ignore
8176
- _this48.webex.internal.newMetrics.submitClientEvent({
8276
+ _this50.webex.internal.newMetrics.submitClientEvent({
8177
8277
  name: 'client.call.leave',
8178
8278
  payload: _objectSpread({
8179
8279
  trigger: 'user-interaction',
@@ -8181,7 +8281,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8181
8281
  leaveReason: options.clientEventLeaveReason
8182
8282
  }, payload),
8183
8283
  options: {
8184
- meetingId: _this48.id
8284
+ meetingId: _this50.id
8185
8285
  }
8186
8286
  })
8187
8287
  );
@@ -8190,24 +8290,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8190
8290
  return _util2.default.leaveMeeting(this, options).then(function (leave) {
8191
8291
  // CA team recommends submitting this *after* locus /leave
8192
8292
  submitLeaveMetric();
8193
- _this48.meetingFiniteStateMachine.leave();
8194
- _this48.clearMeetingData();
8293
+ _this50.meetingFiniteStateMachine.leave();
8294
+ _this50.clearMeetingData();
8195
8295
 
8196
8296
  // upload logs on leave irrespective of meeting delete
8197
- _triggerProxy.default.trigger(_this48, {
8297
+ _triggerProxy.default.trigger(_this50, {
8198
8298
  file: 'meeting/index',
8199
8299
  function: 'leave'
8200
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this48);
8300
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this50);
8201
8301
 
8202
8302
  // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
8203
- if (_this48.wirelessShare || _this48.guest) {
8303
+ if (_this50.wirelessShare || _this50.guest) {
8204
8304
  // If screen sharing clean the meeting object
8205
- _triggerProxy.default.trigger(_this48, {
8305
+ _triggerProxy.default.trigger(_this50, {
8206
8306
  file: 'meeting/index',
8207
8307
  function: 'leave'
8208
8308
  }, _constants.EVENTS.DESTROY_MEETING, {
8209
8309
  reason: options.reason,
8210
- meetingId: _this48.id
8310
+ meetingId: _this50.id
8211
8311
  });
8212
8312
  }
8213
8313
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
@@ -8224,16 +8324,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8224
8324
  shownToUser: false
8225
8325
  }]
8226
8326
  });
8227
- _this48.meetingFiniteStateMachine.fail(error);
8327
+ _this50.meetingFiniteStateMachine.fail(error);
8228
8328
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
8229
8329
  // upload logs on leave irrespective of meeting delete
8230
- _triggerProxy.default.trigger(_this48, {
8330
+ _triggerProxy.default.trigger(_this50, {
8231
8331
  file: 'meeting/index',
8232
8332
  function: 'leave'
8233
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this48);
8333
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this50);
8234
8334
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
8235
- correlation_id: _this48.correlationId,
8236
- locus_id: _this48.locusUrl.split('/').pop(),
8335
+ correlation_id: _this50.correlationId,
8336
+ locus_id: _this50.locusUrl.split('/').pop(),
8237
8337
  reason: error.message,
8238
8338
  stack: error.stack,
8239
8339
  code: error.code
@@ -8253,7 +8353,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8253
8353
  }, {
8254
8354
  key: "startWhiteboardShare",
8255
8355
  value: function startWhiteboardShare(channelUrl, resourceToken) {
8256
- var _this49 = this;
8356
+ var _this51 = this;
8257
8357
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
8258
8358
  return element.name === 'whiteboard';
8259
8359
  });
@@ -8261,6 +8361,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8261
8361
  return _promise.default.reject(new _parameter.default('Cannot share without channelUrl.'));
8262
8362
  }
8263
8363
  if (whiteboard) {
8364
+ // @ts-ignore
8365
+ this.webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp({
8366
+ key: 'internal.client.share.initiated'
8367
+ });
8264
8368
  // @ts-ignore
8265
8369
  this.webex.internal.newMetrics.submitClientEvent({
8266
8370
  name: 'client.share.initiated',
@@ -8282,13 +8386,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8282
8386
  body.resourceToken = resourceToken;
8283
8387
  }
8284
8388
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
8285
- _this49.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8389
+ _this51.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8286
8390
  return _promise.default.resolve();
8287
8391
  }).catch(function (error) {
8288
8392
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
8289
8393
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
8290
- correlation_id: _this49.correlationId,
8291
- locus_id: _this49.locusUrl.split('/').pop(),
8394
+ correlation_id: _this51.correlationId,
8395
+ locus_id: _this51.locusUrl.split('/').pop(),
8292
8396
  reason: error.message,
8293
8397
  stack: error.stack,
8294
8398
  board: {
@@ -8311,16 +8415,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8311
8415
  }, {
8312
8416
  key: "stopWhiteboardShare",
8313
8417
  value: function stopWhiteboardShare(channelUrl) {
8314
- var _this50 = this;
8418
+ var _this52 = this;
8315
8419
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
8316
8420
  return element.name === 'whiteboard';
8317
8421
  });
8318
8422
  if (whiteboard) {
8423
+ // @ts-ignore
8424
+ this.webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp({
8425
+ key: 'internal.client.share.stopped'
8426
+ });
8319
8427
  // @ts-ignore
8320
8428
  this.webex.internal.newMetrics.submitClientEvent({
8321
8429
  name: 'client.share.stopped',
8322
8430
  payload: {
8323
- mediaType: 'whiteboard'
8431
+ mediaType: 'whiteboard',
8432
+ // @ts-ignore
8433
+ shareDuration: this.webex.internal.newMetrics.callDiagnosticLatencies.getShareDuration()
8324
8434
  },
8325
8435
  options: {
8326
8436
  meetingId: this.id
@@ -8334,8 +8444,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8334
8444
  }).catch(function (error) {
8335
8445
  _loggerProxy.default.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
8336
8446
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_STOP_WHITEBOARD_SHARE_FAILURE, {
8337
- correlation_id: _this50.correlationId,
8338
- locus_id: _this50.locusUrl.split('/').pop(),
8447
+ correlation_id: _this52.correlationId,
8448
+ locus_id: _this52.locusUrl.split('/').pop(),
8339
8449
  reason: error.message,
8340
8450
  stack: error.stack,
8341
8451
  board: {
@@ -8357,7 +8467,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8357
8467
  }, {
8358
8468
  key: "requestScreenShareFloor",
8359
8469
  value: function requestScreenShareFloor() {
8360
- var _this51 = this;
8470
+ var _this53 = this;
8361
8471
  if (!this.mediaProperties.hasLocalShareStream() || !this.mediaProperties.mediaDirection.sendShare) {
8362
8472
  _loggerProxy.default.logger.log("Meeting:index#requestScreenShareFloor --> NOT requesting floor, because we don't have the share stream anymore (shareStream=".concat(this.mediaProperties.shareVideoStream ? 'yes' : 'no', ", sendShare=").concat(this.mediaProperties.mediaDirection.sendShare, ")"));
8363
8473
  this.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
@@ -8388,34 +8498,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8388
8498
  resourceUrl: this.resourceUrl,
8389
8499
  shareInstanceId: this.localShareInstanceId
8390
8500
  }).then(function () {
8391
- _this51.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
8501
+ _this53.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
8392
8502
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_SUCCESS, {
8393
- correlation_id: _this51.correlationId,
8394
- locus_id: _this51.locusUrl.split('/').pop()
8503
+ correlation_id: _this53.correlationId,
8504
+ locus_id: _this53.locusUrl.split('/').pop()
8395
8505
  });
8396
8506
  return _promise.default.resolve();
8397
8507
  }).catch(function (error) {
8398
8508
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
8399
8509
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
8400
- correlation_id: _this51.correlationId,
8401
- locus_id: _this51.locusUrl.split('/').pop(),
8510
+ correlation_id: _this53.correlationId,
8511
+ locus_id: _this53.locusUrl.split('/').pop(),
8402
8512
  reason: error.message,
8403
8513
  stack: error.stack
8404
8514
  });
8405
8515
 
8406
8516
  // @ts-ignore
8407
- _this51.webex.internal.newMetrics.submitClientEvent({
8517
+ _this53.webex.internal.newMetrics.submitClientEvent({
8408
8518
  name: 'client.share.floor-granted.local',
8409
8519
  payload: {
8410
8520
  mediaType: 'share',
8411
8521
  errors: _util2.default.getChangeMeetingFloorErrorPayload(error.message),
8412
- shareInstanceId: _this51.localShareInstanceId
8522
+ shareInstanceId: _this53.localShareInstanceId
8413
8523
  },
8414
8524
  options: {
8415
- meetingId: _this51.id
8525
+ meetingId: _this53.id
8416
8526
  }
8417
8527
  });
8418
- _this51.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8528
+ _this53.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8419
8529
  return _promise.default.reject(error);
8420
8530
  });
8421
8531
  }
@@ -8438,10 +8548,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8438
8548
  }, {
8439
8549
  key: "requestScreenShareFloorIfPending",
8440
8550
  value: function requestScreenShareFloorIfPending() {
8441
- var _this52 = this;
8551
+ var _this54 = this;
8442
8552
  if (this.floorGrantPending && this.state === _constants.MEETING_STATE.STATES.JOINED) {
8443
8553
  this.requestScreenShareFloor().then(function () {
8444
- _this52.floorGrantPending = false;
8554
+ _this54.floorGrantPending = false;
8445
8555
  });
8446
8556
  }
8447
8557
  }
@@ -8455,7 +8565,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8455
8565
  }, {
8456
8566
  key: "releaseScreenShareFloor",
8457
8567
  value: function releaseScreenShareFloor() {
8458
- var _this53 = this;
8568
+ var _this55 = this;
8459
8569
  var content = this.locusInfo.mediaShares.find(function (element) {
8460
8570
  return element.name === _constants.CONTENT;
8461
8571
  });
@@ -8466,11 +8576,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8466
8576
  if (content) {
8467
8577
  var _content$floor;
8468
8578
  // @ts-ignore
8579
+ this.webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp({
8580
+ key: 'internal.client.share.stopped'
8581
+ });
8582
+ // @ts-ignore
8469
8583
  this.webex.internal.newMetrics.submitClientEvent({
8470
8584
  name: 'client.share.stopped',
8471
8585
  payload: {
8472
8586
  mediaType: 'share',
8473
- shareInstanceId: this.localShareInstanceId
8587
+ shareInstanceId: this.localShareInstanceId,
8588
+ // @ts-ignore
8589
+ shareDuration: this.webex.internal.newMetrics.callDiagnosticLatencies.getShareDuration()
8474
8590
  },
8475
8591
  options: {
8476
8592
  meetingId: this.id
@@ -8490,8 +8606,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8490
8606
  }).catch(function (error) {
8491
8607
  _loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
8492
8608
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
8493
- correlation_id: _this53.correlationId,
8494
- locus_id: _this53.locusUrl.split('/').pop(),
8609
+ correlation_id: _this55.correlationId,
8610
+ locus_id: _this55.locusUrl.split('/').pop(),
8495
8611
  reason: error.message,
8496
8612
  stack: error.stack
8497
8613
  });
@@ -8671,7 +8787,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8671
8787
  }, {
8672
8788
  key: "changeVideoLayout",
8673
8789
  value: function changeVideoLayout(layoutType) {
8674
- var _this54 = this;
8790
+ var _this56 = this;
8675
8791
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8676
8792
  var main = renderInfo.main,
8677
8793
  content = renderInfo.content;
@@ -8725,7 +8841,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8725
8841
  }
8726
8842
  this.lastVideoLayoutInfo = (0, _lodash.cloneDeep)(layoutInfo);
8727
8843
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
8728
- _triggerProxy.default.trigger(_this54, {
8844
+ _triggerProxy.default.trigger(_this56, {
8729
8845
  file: 'meeting/index',
8730
8846
  function: 'changeVideoLayout'
8731
8847
  }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
@@ -8841,7 +8957,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8841
8957
  }, {
8842
8958
  key: "endMeetingForAll",
8843
8959
  value: function endMeetingForAll() {
8844
- var _this55 = this;
8960
+ var _this57 = this;
8845
8961
  // @ts-ignore
8846
8962
  this.webex.internal.newMetrics.submitClientEvent({
8847
8963
  name: 'client.call.leave',
@@ -8859,25 +8975,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8859
8975
  locus_id: this.locusId
8860
8976
  });
8861
8977
  return _util2.default.endMeetingForAll(this).then(function (end) {
8862
- _this55.meetingFiniteStateMachine.end();
8863
- _this55.clearMeetingData();
8978
+ _this57.meetingFiniteStateMachine.end();
8979
+ _this57.clearMeetingData();
8864
8980
  // upload logs on leave irrespective of meeting delete
8865
- _triggerProxy.default.trigger(_this55, {
8981
+ _triggerProxy.default.trigger(_this57, {
8866
8982
  file: 'meeting/index',
8867
8983
  function: 'endMeetingForAll'
8868
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this55);
8984
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this57);
8869
8985
  return end;
8870
8986
  }).catch(function (error) {
8871
- _this55.meetingFiniteStateMachine.fail(error);
8987
+ _this57.meetingFiniteStateMachine.fail(error);
8872
8988
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
8873
8989
  // upload logs on leave irrespective of meeting delete
8874
- _triggerProxy.default.trigger(_this55, {
8990
+ _triggerProxy.default.trigger(_this57, {
8875
8991
  file: 'meeting/index',
8876
8992
  function: 'endMeetingForAll'
8877
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this55);
8993
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this57);
8878
8994
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
8879
- correlation_id: _this55.correlationId,
8880
- locus_id: _this55.locusUrl.split('/').pop(),
8995
+ correlation_id: _this57.correlationId,
8996
+ locus_id: _this57.locusUrl.split('/').pop(),
8881
8997
  reason: error.message,
8882
8998
  stack: error.stack,
8883
8999
  code: error.code
@@ -8919,6 +9035,36 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8919
9035
  return _promise.default.reject(new Error('Error sending reaction, service url not found.'));
8920
9036
  }
8921
9037
 
9038
+ /**
9039
+ * Extend the current meeting duration.
9040
+ *
9041
+ * @param {number} extensionMinutes - how many minutes to extend
9042
+ * @returns {Promise}
9043
+ * @public
9044
+ * @memberof Meeting
9045
+ */
9046
+ }, {
9047
+ key: "extendMeeting",
9048
+ value: function extendMeeting(_ref38) {
9049
+ var meetingPolicyUrl = _ref38.meetingPolicyUrl,
9050
+ meetingInstanceId = _ref38.meetingInstanceId,
9051
+ participantId = _ref38.participantId,
9052
+ _ref38$extensionMinut = _ref38.extensionMinutes,
9053
+ extensionMinutes = _ref38$extensionMinut === void 0 ? 30 : _ref38$extensionMinut;
9054
+ if (!meetingInstanceId || !participantId) {
9055
+ return _promise.default.reject(new Error('Missing meetingInstanceId or participantId'));
9056
+ }
9057
+ if (!meetingPolicyUrl) {
9058
+ return _promise.default.reject(new Error('Missing meetingPolicyUrl'));
9059
+ }
9060
+ return this.meetingRequest.extendMeeting({
9061
+ meetingInstanceId: meetingInstanceId,
9062
+ participantId: participantId,
9063
+ extensionMinutes: extensionMinutes,
9064
+ meetingPolicyUrl: meetingPolicyUrl
9065
+ });
9066
+ }
9067
+
8922
9068
  /**
8923
9069
  * Method to enable or disable reactions inside the meeting.
8924
9070
  *
@@ -9038,7 +9184,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9038
9184
  _this$mediaProperties43,
9039
9185
  _this$mediaProperties44,
9040
9186
  _this$mediaProperties45,
9041
- _this56 = this;
9187
+ _this58 = this;
9042
9188
  var LOG_HEADER = 'Meeting:index#updateTranscodedMediaConnection -->';
9043
9189
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " starting"));
9044
9190
  if (!this.canUpdateMedia()) {
@@ -9063,8 +9209,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9063
9209
  }).catch(function (error) {
9064
9210
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error: "), error);
9065
9211
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
9066
- correlation_id: _this56.correlationId,
9067
- locus_id: _this56.locusUrl.split('/').pop(),
9212
+ correlation_id: _this58.correlationId,
9213
+ locus_id: _this58.locusUrl.split('/').pop(),
9068
9214
  reason: error.message,
9069
9215
  stack: error.stack
9070
9216
  });
@@ -9286,13 +9432,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9286
9432
  return this.updateTranscodedMediaConnection();
9287
9433
  case 31:
9288
9434
  if (!floorRequestNeeded) {
9289
- _context40.next = 39;
9435
+ _context40.next = 40;
9290
9436
  break;
9291
9437
  }
9292
9438
  this.localShareInstanceId = _uuid.default.v4();
9293
9439
  this.shareCAEventSentStatus.transmitStart = false;
9294
9440
  this.shareCAEventSentStatus.transmitStop = false;
9295
9441
 
9442
+ // @ts-ignore
9443
+ this.webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp({
9444
+ key: 'internal.client.share.initiated'
9445
+ });
9446
+
9296
9447
  // @ts-ignore
9297
9448
  this.webex.internal.newMetrics.submitClientEvent({
9298
9449
  name: 'client.share.initiated',
@@ -9312,9 +9463,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9312
9463
  // we're sending the http request to Locus to request the screen share floor
9313
9464
  // only after the SDP update, because that's how it's always been done for transcoded meetings
9314
9465
  // and also if sharing from the start, we need confluence to have been created
9315
- _context40.next = 39;
9466
+ _context40.next = 40;
9316
9467
  return this.enqueueScreenShareFloorRequest();
9317
- case 39:
9468
+ case 40:
9318
9469
  case "end":
9319
9470
  return _context40.stop();
9320
9471
  }
@@ -9513,17 +9664,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9513
9664
  }, {
9514
9665
  key: "setStage",
9515
9666
  value: function setStage() {
9516
- var _ref37 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
9517
- _ref37$activeSpeakerP = _ref37.activeSpeakerProportion,
9518
- activeSpeakerProportion = _ref37$activeSpeakerP === void 0 ? 0.5 : _ref37$activeSpeakerP,
9519
- customBackground = _ref37.customBackground,
9520
- customLogo = _ref37.customLogo,
9521
- customNameLabel = _ref37.customNameLabel,
9522
- importantParticipants = _ref37.importantParticipants,
9523
- _ref37$lockAttendeeVi = _ref37.lockAttendeeViewOnStage,
9524
- lockAttendeeViewOnStage = _ref37$lockAttendeeVi === void 0 ? false : _ref37$lockAttendeeVi,
9525
- _ref37$showActiveSpea = _ref37.showActiveSpeaker,
9526
- showActiveSpeaker = _ref37$showActiveSpea === void 0 ? false : _ref37$showActiveSpea;
9667
+ var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
9668
+ _ref39$activeSpeakerP = _ref39.activeSpeakerProportion,
9669
+ activeSpeakerProportion = _ref39$activeSpeakerP === void 0 ? 0.5 : _ref39$activeSpeakerP,
9670
+ customBackground = _ref39.customBackground,
9671
+ customLogo = _ref39.customLogo,
9672
+ customNameLabel = _ref39.customNameLabel,
9673
+ importantParticipants = _ref39.importantParticipants,
9674
+ _ref39$lockAttendeeVi = _ref39.lockAttendeeViewOnStage,
9675
+ lockAttendeeViewOnStage = _ref39$lockAttendeeVi === void 0 ? false : _ref39$lockAttendeeVi,
9676
+ _ref39$showActiveSpea = _ref39.showActiveSpeaker,
9677
+ showActiveSpeaker = _ref39$showActiveSpea === void 0 ? false : _ref39$showActiveSpea;
9527
9678
  var videoLayout = {
9528
9679
  overrideDefault: true,
9529
9680
  lockAttendeeViewOnStageOnly: lockAttendeeViewOnStage,
@@ -9580,6 +9731,45 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9580
9731
  };
9581
9732
  return this.meetingRequest.synchronizeStage(this.locusUrl, videoLayout);
9582
9733
  }
9734
+
9735
+ /**
9736
+ * Notifies the host with the given meeting UUID and display names.
9737
+ *
9738
+ * @param {string} meetingUuid - The UUID of the meeting.
9739
+ * @param {string[]} displayName - An array of display names to notify the host with.
9740
+ * @returns {Promise<any>} The result of the notifyHost request.
9741
+ */
9742
+ }, {
9743
+ key: "notifyHost",
9744
+ value: function notifyHost(meetingUuid, displayName) {
9745
+ return this.meetingRequest.notifyHost(this.meetingInfo.siteFullUrl, this.locusId, meetingUuid, displayName);
9746
+ }
9747
+
9748
+ /**
9749
+ * Call out a SIP participant to a meeting
9750
+ * @param {string} address - The SIP address or phone number
9751
+ * @param {string} displayName - The display name for the participant
9752
+ * @param {string} [correlationId] - Optional correlation ID
9753
+ * @returns {Promise} Promise that resolves when the call-out is initiated
9754
+ */
9755
+ }, {
9756
+ key: "sipCallOut",
9757
+ value: function sipCallOut(address, displayName) {
9758
+ return this.meetingRequest.sipCallOut(this.meetingInfo.meetingId, this.meetingInfo.meetingId, address, displayName);
9759
+ }
9760
+
9761
+ /**
9762
+ * Cancel an ongoing SIP call-out
9763
+ * @param {string} participantId - The participant ID to cancel
9764
+ * @returns {Promise} Promise that resolves when the call-out is cancelled
9765
+ * @public
9766
+ * @memberof Meetings
9767
+ */
9768
+ }, {
9769
+ key: "cancelSipCallOut",
9770
+ value: function cancelSipCallOut(participantId) {
9771
+ return this.meetingRequest.cancelSipCallOut(participantId);
9772
+ }
9583
9773
  }]);
9584
9774
  return Meeting;
9585
9775
  }(_webexCore.StatelessWebexPlugin);