@webex/plugin-meetings 3.0.0-beta.162 → 3.0.0-beta.164

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 (64) hide show
  1. package/dist/breakouts/breakout.js +7 -3
  2. package/dist/breakouts/breakout.js.map +1 -1
  3. package/dist/breakouts/events.js +31 -29
  4. package/dist/breakouts/events.js.map +1 -1
  5. package/dist/breakouts/index.js +4 -2
  6. package/dist/breakouts/index.js.map +1 -1
  7. package/dist/constants.js +2 -4
  8. package/dist/constants.js.map +1 -1
  9. package/dist/interpretation/index.js +1 -1
  10. package/dist/interpretation/siLanguage.js +1 -1
  11. package/dist/locus-info/index.js +33 -17
  12. package/dist/locus-info/index.js.map +1 -1
  13. package/dist/meeting/index.js +699 -682
  14. package/dist/meeting/index.js.map +1 -1
  15. package/dist/meeting/util.js +47 -25
  16. package/dist/meeting/util.js.map +1 -1
  17. package/dist/meeting-info/index.js +48 -7
  18. package/dist/meeting-info/index.js.map +1 -1
  19. package/dist/meeting-info/meeting-info-v2.js +24 -10
  20. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  21. package/dist/meetings/index.js +12 -9
  22. package/dist/meetings/index.js.map +1 -1
  23. package/dist/metrics/index.js +1 -487
  24. package/dist/metrics/index.js.map +1 -1
  25. package/dist/reconnection-manager/index.js +27 -17
  26. package/dist/reconnection-manager/index.js.map +1 -1
  27. package/dist/roap/request.js +20 -14
  28. package/dist/roap/request.js.map +1 -1
  29. package/dist/types/breakouts/events.d.ts +7 -1
  30. package/dist/types/constants.d.ts +0 -1
  31. package/dist/types/meeting/index.d.ts +31 -133
  32. package/dist/types/meeting-info/index.d.ts +6 -1
  33. package/dist/types/meetings/index.d.ts +1 -0
  34. package/dist/types/metrics/index.d.ts +4 -128
  35. package/package.json +19 -19
  36. package/src/breakouts/breakout.ts +10 -2
  37. package/src/breakouts/events.ts +51 -32
  38. package/src/breakouts/index.ts +9 -5
  39. package/src/constants.ts +0 -2
  40. package/src/locus-info/index.ts +35 -17
  41. package/src/meeting/index.ts +474 -536
  42. package/src/meeting/util.ts +42 -19
  43. package/src/meeting-info/index.ts +54 -8
  44. package/src/meeting-info/meeting-info-v2.ts +24 -9
  45. package/src/meetings/index.ts +11 -6
  46. package/src/metrics/index.ts +1 -506
  47. package/src/reconnection-manager/index.ts +27 -17
  48. package/src/roap/request.ts +21 -9
  49. package/test/unit/spec/breakouts/breakout.ts +4 -2
  50. package/test/unit/spec/breakouts/events.ts +24 -18
  51. package/test/unit/spec/locus-info/index.js +112 -0
  52. package/test/unit/spec/meeting/index.js +178 -145
  53. package/test/unit/spec/meeting/utils.js +93 -7
  54. package/test/unit/spec/meeting-info/index.js +181 -0
  55. package/test/unit/spec/meeting-info/meetinginfov2.js +68 -68
  56. package/test/unit/spec/meetings/index.js +35 -55
  57. package/test/unit/spec/metrics/index.js +1 -148
  58. package/test/unit/spec/reconnection-manager/index.js +51 -2
  59. package/test/unit/spec/roap/index.ts +8 -2
  60. package/test/unit/spec/roap/request.ts +43 -5
  61. package/dist/metrics/config.js +0 -335
  62. package/dist/metrics/config.js.map +0 -1
  63. package/dist/types/metrics/config.d.ts +0 -195
  64. package/src/metrics/config.ts +0 -534
@@ -32,11 +32,11 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/he
32
32
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
33
33
  var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
34
34
  var _defer2 = _interopRequireDefault(require("lodash/defer"));
35
- var _pick2 = _interopRequireDefault(require("lodash/pick"));
36
35
  var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
37
36
  var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
38
37
  var _uuid = _interopRequireDefault(require("uuid"));
39
38
  var _webexCore = require("@webex/webex-core");
39
+ var _internalPluginMetrics = require("@webex/internal-plugin-metrics");
40
40
  var _internalMediaCore = require("@webex/internal-media-core");
41
41
  var _mediaHelpers = require("@webex/media-helpers");
42
42
  var _webexErrors = require("../common/errors/webex-errors");
@@ -51,7 +51,6 @@ var _state = _interopRequireDefault(require("./state"));
51
51
  var _muteState = require("./muteState");
52
52
  var _locusInfo = _interopRequireDefault(require("../locus-info"));
53
53
  var _metrics = _interopRequireDefault(require("../metrics"));
54
- var _config = require("../metrics/config");
55
54
  var _reconnectionManager = _interopRequireDefault(require("../reconnection-manager"));
56
55
  var _request = _interopRequireDefault(require("./request"));
57
56
  var _index2 = _interopRequireDefault(require("../members/index"));
@@ -539,33 +538,48 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
539
538
  };
540
539
  if (error instanceof _internalMediaCore.Errors.SdpOfferCreationError) {
541
540
  sendBehavioralMetric(_constants2.default.PEERCONNECTION_FAILURE, error, _this.id);
542
- _metrics.default.postEvent({
543
- event: _config.eventType.LOCAL_SDP_GENERATED,
544
- meetingId: _this.id,
545
- data: {
546
- canProceed: false,
547
- errors: [_metrics.default.generateErrorPayload(2001, true, _config.error.name.MEDIA_ENGINE, undefined)]
541
+
542
+ // @ts-ignore
543
+ _this.webex.internal.newMetrics.submitClientEvent({
544
+ name: 'client.media-engine.local-sdp-generated',
545
+ payload: {
546
+ canProceed: false
547
+ },
548
+ options: {
549
+ meetingId: _this.id,
550
+ rawError: error,
551
+ showToUser: true
548
552
  }
549
553
  });
550
554
  } else if (error instanceof _internalMediaCore.Errors.SdpOfferHandlingError || error instanceof _internalMediaCore.Errors.SdpAnswerHandlingError) {
551
555
  sendBehavioralMetric(_constants2.default.PEERCONNECTION_FAILURE, error, _this.id);
552
- _metrics.default.postEvent({
553
- event: _config.eventType.REMOTE_SDP_RECEIVED,
554
- meetingId: _this.id,
555
- data: {
556
- canProceed: false,
557
- errors: [_metrics.default.generateErrorPayload(2001, true, _config.error.name.MEDIA_ENGINE, undefined)]
556
+
557
+ // @ts-ignore
558
+ _this.webex.internal.newMetrics.submitClientEvent({
559
+ name: 'client.media-engine.remote-sdp-received',
560
+ payload: {
561
+ canProceed: false
562
+ },
563
+ options: {
564
+ meetingId: _this.id,
565
+ rawError: error,
566
+ showToUser: true
558
567
  }
559
568
  });
560
569
  } else if (error instanceof _internalMediaCore.Errors.SdpError) {
561
570
  // this covers also the case of Errors.IceGatheringError which extends Errors.SdpError
562
571
  sendBehavioralMetric(_constants2.default.INVALID_ICE_CANDIDATE, error, _this.id);
563
- _metrics.default.postEvent({
564
- event: _config.eventType.LOCAL_SDP_GENERATED,
565
- meetingId: _this.id,
566
- data: {
567
- canProceed: false,
568
- errors: [_metrics.default.generateErrorPayload(2001, true, _config.error.name.MEDIA_ENGINE, undefined)]
572
+
573
+ // @ts-ignore
574
+ _this.webex.internal.newMetrics.submitClientEvent({
575
+ name: 'client.media-engine.local-sdp-generated',
576
+ payload: {
577
+ canProceed: false
578
+ },
579
+ options: {
580
+ meetingId: _this.id,
581
+ rawError: error,
582
+ showToUser: true
569
583
  }
570
584
  });
571
585
  }
@@ -584,9 +598,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
584
598
  var LOG_HEADER = "Meeting:index#setupMediaConnectionListeners.ROAP_MESSAGE_TO_SEND --> correlationId=".concat(_this.correlationId);
585
599
  switch (event.roapMessage.messageType) {
586
600
  case 'OK':
587
- _metrics.default.postEvent({
588
- event: _config.eventType.REMOTE_SDP_RECEIVED,
589
- meetingId: _this.id
601
+ // @ts-ignore
602
+ _this.webex.internal.newMetrics.submitClientEvent({
603
+ name: 'client.media-engine.remote-sdp-received',
604
+ options: {
605
+ meetingId: _this.id
606
+ }
590
607
  });
591
608
  logRequest(_this.roap.sendRoapOK({
592
609
  seq: event.roapMessage.seq,
@@ -597,9 +614,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
597
614
  });
598
615
  break;
599
616
  case 'OFFER':
600
- _metrics.default.postEvent({
601
- event: _config.eventType.LOCAL_SDP_GENERATED,
602
- meetingId: _this.id
617
+ // @ts-ignore
618
+ _this.webex.internal.newMetrics.submitClientEvent({
619
+ name: 'client.media-engine.local-sdp-generated',
620
+ options: {
621
+ meetingId: _this.id
622
+ }
603
623
  });
604
624
  logRequest(_this.roap.sendRoapMediaRequest({
605
625
  sdp: event.roapMessage.sdp,
@@ -613,9 +633,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
613
633
  });
614
634
  break;
615
635
  case 'ANSWER':
616
- _metrics.default.postEvent({
617
- event: _config.eventType.REMOTE_SDP_RECEIVED,
618
- meetingId: _this.id
636
+ // @ts-ignore
637
+ _this.webex.internal.newMetrics.submitClientEvent({
638
+ name: 'client.media-engine.remote-sdp-received',
639
+ options: {
640
+ meetingId: _this.id
641
+ }
619
642
  });
620
643
  logRequest(_this.roap.sendRoapAnswer({
621
644
  sdp: event.roapMessage.sdp,
@@ -706,12 +729,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
706
729
  _this.reconnect({
707
730
  networkDisconnect: true
708
731
  });
709
- _metrics.default.postEvent({
710
- event: _config.eventType.ICE_END,
711
- meeting: (0, _assertThisInitialized2.default)(_this),
712
- data: {
732
+ // @ts-ignore
733
+ _this.webex.internal.newMetrics.submitClientEvent({
734
+ name: 'client.ice.end',
735
+ payload: {
713
736
  canProceed: false,
714
- errors: [_metrics.default.generateErrorPayload(2004, false, _config.error.name.MEDIA_ENGINE, undefined)]
737
+ icePhase: 'IN_MEETING',
738
+ errors: [
739
+ // @ts-ignore
740
+ _this.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode(_internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.ICE_FAILURE_CLIENT_CODE)]
741
+ },
742
+ options: {
743
+ meetingId: _this.id
715
744
  }
716
745
  });
717
746
  _this.uploadLogs({
@@ -726,15 +755,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
726
755
  _loggerProxy.default.logger.info("Meeting:index#setupMediaConnectionListeners --> correlationId=".concat(_this.correlationId, " connection state changed to ").concat(event.state));
727
756
  switch (event.state) {
728
757
  case _internalMediaCore.ConnectionState.Connecting:
729
- _metrics.default.postEvent({
730
- event: _config.eventType.ICE_START,
731
- meeting: (0, _assertThisInitialized2.default)(_this)
758
+ // @ts-ignore
759
+ _this.webex.internal.newMetrics.submitClientEvent({
760
+ name: 'client.ice.start',
761
+ options: {
762
+ meetingId: _this.id
763
+ }
732
764
  });
733
765
  break;
734
766
  case _internalMediaCore.ConnectionState.Connected:
735
- _metrics.default.postEvent({
736
- event: _config.eventType.ICE_END,
737
- meeting: (0, _assertThisInitialized2.default)(_this)
767
+ // @ts-ignore
768
+ _this.webex.internal.newMetrics.submitClientEvent({
769
+ name: 'client.ice.end',
770
+ options: {
771
+ meetingId: _this.id
772
+ }
738
773
  });
739
774
  _metrics.default.sendBehavioralMetric(_constants2.default.CONNECTION_SUCCESS, {
740
775
  correlation_id: _this.correlationId,
@@ -807,12 +842,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
807
842
  options.data.intervalMetadata.peerReflexiveIP =
808
843
  // @ts-ignore
809
844
  ((_this$webex$meetings$ = _this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$ === void 0 ? void 0 : _this$webex$meetings$.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
810
- _metrics.default.postEvent({
811
- event: _config.eventType.MEDIA_QUALITY,
812
- meeting: (0, _assertThisInitialized2.default)(_this),
813
- data: {
814
- intervalData: options.data,
845
+ // @ts-ignore
846
+ _this.webex.internal.newMetrics.submitMQE({
847
+ name: 'client.mediaquality.event',
848
+ options: {
849
+ meetingId: _this.id,
815
850
  networkType: options.networkType
851
+ },
852
+ payload: {
853
+ intervals: [options.data]
816
854
  }
817
855
  });
818
856
  });
@@ -821,20 +859,26 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
821
859
  file: 'meeting/index',
822
860
  function: 'addMedia'
823
861
  }, _constants.EVENT_TRIGGERS.MEETING_MEDIA_LOCAL_STARTED, data);
824
- _metrics.default.postEvent({
825
- event: _config.eventType.SENDING_MEDIA_START,
826
- meeting: (0, _assertThisInitialized2.default)(_this),
827
- data: {
862
+ // @ts-ignore
863
+ _this.webex.internal.newMetrics.submitClientEvent({
864
+ name: 'client.media.tx.start',
865
+ payload: {
828
866
  mediaType: data.type
867
+ },
868
+ options: {
869
+ meetingId: _this.id
829
870
  }
830
871
  });
831
872
  });
832
873
  _this.statsAnalyzer.on(_statsAnalyzer.EVENTS.LOCAL_MEDIA_STOPPED, function (data) {
833
- _metrics.default.postEvent({
834
- event: _config.eventType.SENDING_MEDIA_STOP,
835
- meeting: (0, _assertThisInitialized2.default)(_this),
836
- data: {
874
+ // @ts-ignore
875
+ _this.webex.internal.newMetrics.submitClientEvent({
876
+ name: 'client.media.tx.stop',
877
+ payload: {
837
878
  mediaType: data.type
879
+ },
880
+ options: {
881
+ meetingId: _this.id
838
882
  }
839
883
  });
840
884
  });
@@ -843,20 +887,26 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
843
887
  file: 'meeting/index',
844
888
  function: 'addMedia'
845
889
  }, _constants.EVENT_TRIGGERS.MEETING_MEDIA_REMOTE_STARTED, data);
846
- _metrics.default.postEvent({
847
- event: _config.eventType.RECEIVING_MEDIA_START,
848
- meeting: (0, _assertThisInitialized2.default)(_this),
849
- data: {
890
+ // @ts-ignore
891
+ _this.webex.internal.newMetrics.submitClientEvent({
892
+ name: 'client.media.rx.start',
893
+ payload: {
850
894
  mediaType: data.type
895
+ },
896
+ options: {
897
+ meetingId: _this.id
851
898
  }
852
899
  });
853
900
  });
854
901
  _this.statsAnalyzer.on(_statsAnalyzer.EVENTS.REMOTE_MEDIA_STOPPED, function (data) {
855
- _metrics.default.postEvent({
856
- event: _config.eventType.RECEIVING_MEDIA_STOP,
857
- meeting: (0, _assertThisInitialized2.default)(_this),
858
- data: {
902
+ // @ts-ignore
903
+ _this.webex.internal.newMetrics.submitClientEvent({
904
+ name: 'client.media.rx.stop',
905
+ payload: {
859
906
  mediaType: data.type
907
+ },
908
+ options: {
909
+ meetingId: _this.id
860
910
  }
861
911
  });
862
912
  });
@@ -1632,12 +1682,26 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1632
1682
  }
1633
1683
 
1634
1684
  /**
1635
- * returns meeting is joined
1636
- * @private
1637
- * @memberof Meeting
1638
- * @returns {Boolean}
1685
+ * Temporary func to return webex object,
1686
+ * in order to access internal plugin metrics
1687
+ * in the utils file.
1688
+ * @internal
1689
+ * @returns {object} webex object
1639
1690
  */
1640
1691
  (0, _createClass2.default)(Meeting, [{
1692
+ key: "getWebexObject",
1693
+ value: function getWebexObject() {
1694
+ // @ts-ignore
1695
+ return this.webex;
1696
+ }
1697
+
1698
+ /**
1699
+ * returns meeting is joined
1700
+ * @private
1701
+ * @memberof Meeting
1702
+ * @returns {Boolean}
1703
+ */
1704
+ }, {
1641
1705
  key: "isJoined",
1642
1706
  value: function isJoined() {
1643
1707
  var _this$joinedWith3;
@@ -1844,7 +1908,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1844
1908
 
1845
1909
  /**
1846
1910
  * Posts metrics event for this meeting. Allows the app to send Call Analyzer events.
1847
- * @param {String} eventName - Call Analyzer event, see eventType in src/metrics/config.ts for possible values
1911
+ * @param {String} eventName - Call Analyzer event
1848
1912
  * @public
1849
1913
  * @memberof Meeting
1850
1914
  * @returns {Promise}
@@ -1852,9 +1916,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1852
1916
  }, {
1853
1917
  key: "postMetrics",
1854
1918
  value: function postMetrics(eventName) {
1855
- _metrics.default.postEvent({
1856
- event: eventName,
1857
- meeting: this
1919
+ // @ts-ignore
1920
+ this.webex.internal.newMetrics.submitClientEvent({
1921
+ name: eventName,
1922
+ options: {
1923
+ meetingId: this.id
1924
+ }
1858
1925
  });
1859
1926
  }
1860
1927
 
@@ -2047,171 +2114,6 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2047
2114
  });
2048
2115
  }
2049
2116
 
2050
- /**
2051
- * get the metrics payload pre
2052
- * @param {Object} options
2053
- * @param {String} options.event
2054
- * @param {String} options.trackingId
2055
- * @param {Object} options.locus
2056
- * @param {Array} options.mediaConnections
2057
- * @param {Object} options.errors
2058
- * @returns {Object}
2059
- * @memberof Meeting
2060
- */
2061
- }, {
2062
- key: "getAnalyzerMetricsPrePayload",
2063
- value: function getAnalyzerMetricsPrePayload(options) {
2064
- if (options) {
2065
- var _event = options.event,
2066
- trackingId = options.trackingId,
2067
- _mediaConnections = options.mediaConnections,
2068
- meetingLookupUrl = options.meetingLookupUrl;
2069
- if (!_event) {
2070
- _loggerProxy.default.logger.error('Meeting:index#getAnalyzerMetricsPrePayload --> Error [Call Analyzer Event', _event || '', "]: invalid identifers or event type! ".concat(this.correlationId));
2071
- return null;
2072
- }
2073
- var identifiers = {
2074
- correlationId: this.correlationId,
2075
- userId: this.userId,
2076
- deviceId: this.deviceUrl,
2077
- orgId: this.orgId,
2078
- // @ts-ignore fix type
2079
- locusUrl: this.webex.internal.services.get('locus')
2080
- };
2081
- if (this.locusUrl && this.locusInfo.fullState) {
2082
- identifiers.locusUrl = this.locusUrl;
2083
- identifiers.locusId = this.locusUrl && this.locusUrl.split('/').pop();
2084
- identifiers.locusStartTime = this.locusInfo.fullState && this.locusInfo.fullState.lastActive;
2085
- }
2086
-
2087
- // Check if mediaConnections has been passed in or else use this.mediaConnections
2088
- if (_mediaConnections) {
2089
- identifiers.mediaAgentAlias = _mediaConnections === null || _mediaConnections === void 0 ? void 0 : _mediaConnections[0].mediaAgentAlias;
2090
- identifiers.mediaAgentGroupId = _mediaConnections === null || _mediaConnections === void 0 ? void 0 : _mediaConnections[0].mediaAgentGroupId;
2091
- identifiers.mediaAgentCluster = _mediaConnections === null || _mediaConnections === void 0 ? void 0 : _mediaConnections[0].mediaAgentCluster;
2092
- } else if (this.mediaConnections) {
2093
- var _this$mediaConnection, _this$mediaConnection2, _this$mediaConnection3;
2094
- identifiers.mediaAgentAlias = (_this$mediaConnection = this.mediaConnections) === null || _this$mediaConnection === void 0 ? void 0 : _this$mediaConnection[0].mediaAgentAlias;
2095
- identifiers.mediaAgentGroupId = (_this$mediaConnection2 = this.mediaConnections) === null || _this$mediaConnection2 === void 0 ? void 0 : _this$mediaConnection2[0].mediaAgentGroupId;
2096
- identifiers.mediaAgentCluster = (_this$mediaConnection3 = this.mediaConnections) === null || _this$mediaConnection3 === void 0 ? void 0 : _this$mediaConnection3[0].mediaAgentCluster;
2097
- }
2098
- if (meetingLookupUrl) {
2099
- identifiers.meetingLookupUrl = meetingLookupUrl;
2100
- }
2101
- if (options.trackingId) {
2102
- identifiers.trackingId = trackingId;
2103
- }
2104
- var payload = {};
2105
- var joinRespRxStartAudio = this.getSetupDelayDuration('audio');
2106
- if (joinRespRxStartAudio) {
2107
- options.audioSetupDelay = {
2108
- joinRespRxStart: joinRespRxStartAudio
2109
- };
2110
- }
2111
- var joinRespRxStartVideo = this.getSetupDelayDuration('video');
2112
- if (joinRespRxStartAudio) {
2113
- options.videoSetupDelay = {
2114
- joinRespRxStart: joinRespRxStartVideo
2115
- };
2116
- }
2117
- var joinRespTxStartAudio = this.getSendingMediaDelayDuration('audio');
2118
- if (joinRespTxStartAudio) {
2119
- options.audioSetupDelay = _objectSpread(_objectSpread({}, options.audioSetupDelay), {}, {
2120
- joinRespTxStart: joinRespTxStartAudio
2121
- });
2122
- }
2123
- var joinRespTxStartVideo = this.getSendingMediaDelayDuration('video');
2124
- if (joinRespTxStartVideo) {
2125
- options.videoSetupDelay = _objectSpread(_objectSpread({}, options.videoSetupDelay), {}, {
2126
- joinRespTxStart: joinRespTxStartVideo
2127
- });
2128
- }
2129
- var localSDPGenRemoteSDPRecv = this.getLocalSDPGenRemoteSDPRecvDelay();
2130
- if (localSDPGenRemoteSDPRecv) {
2131
- options.joinTimes = _objectSpread(_objectSpread({}, options.joinTimes), {}, {
2132
- localSDPGenRemoteSDPRecv: localSDPGenRemoteSDPRecv
2133
- });
2134
- }
2135
- var callInitJoinReq = this.getCallInitJoinReq();
2136
- if (callInitJoinReq) {
2137
- options.joinTimes = _objectSpread(_objectSpread({}, options.joinTimes), {}, {
2138
- callInitJoinReq: callInitJoinReq
2139
- });
2140
- }
2141
- var joinReqResp = this.getJoinReqResp();
2142
- if (joinReqResp) {
2143
- options.joinTimes = _objectSpread(_objectSpread({}, options.joinTimes), {}, {
2144
- joinReqResp: joinReqResp
2145
- });
2146
- }
2147
- var totalJmt = this.getTotalJmt();
2148
- if (totalJmt) {
2149
- options.joinTimes = _objectSpread(_objectSpread({}, options.joinTimes), {}, {
2150
- totalJmt: totalJmt
2151
- });
2152
- }
2153
- var curUserType = this.getCurUserType();
2154
- if (curUserType) {
2155
- options.userType = curUserType;
2156
- }
2157
- var curLoginType = this.getCurLoginType();
2158
- if (curLoginType) {
2159
- options.loginType = curLoginType;
2160
- }
2161
- if (this.environment) {
2162
- options.environment = this.environment;
2163
- }
2164
- if (options.type === _constants.MQA_STATS.CA_TYPE) {
2165
- payload = _metrics.default.initMediaPayload(options.event, identifiers, options);
2166
- } else {
2167
- payload = _metrics.default.initPayload(options.event, identifiers, options);
2168
- }
2169
- return payload;
2170
- }
2171
- return null;
2172
- }
2173
-
2174
- /**
2175
- * Send the metrics to call-analyzer dashboard
2176
- * @param {Object} options
2177
- * @param {String} options.event
2178
- * @param {String} options.trackingId
2179
- * @param {Object} options.locus
2180
- * @param {Object} options.errors
2181
- * @returns {Promise}
2182
- * @private
2183
- * @memberof Meeting
2184
- */
2185
- }, {
2186
- key: "sendCallAnalyzerMetrics",
2187
- value: function sendCallAnalyzerMetrics(options) {
2188
- var payload = this.getAnalyzerMetricsPrePayload(_objectSpread(_objectSpread({}, (0, _pick2.default)(this.config.metrics, ['clientType', 'subClientType'])), options));
2189
-
2190
- // @ts-ignore - fix type
2191
- return this.webex.internal.metrics.submitCallDiagnosticEvents(payload);
2192
- }
2193
-
2194
- /**
2195
- * Send the metrics to Media Quality Analyzer dashboard
2196
- * @param {Object} options
2197
- * @param {String} options.event
2198
- * @param {String} options.trackingId
2199
- * @param {Object} options.locus
2200
- * @returns {Promise}
2201
- * @private
2202
- * @memberof Meeting
2203
- */
2204
- }, {
2205
- key: "sendMediaQualityAnalyzerMetrics",
2206
- value: function sendMediaQualityAnalyzerMetrics(options) {
2207
- var payload = this.getAnalyzerMetricsPrePayload(_objectSpread(_objectSpread({
2208
- type: _constants.MQA_STATS.CA_TYPE
2209
- }, (0, _pick2.default)(this.config.metrics, ['clientType', 'subClientType'])), options));
2210
-
2211
- // @ts-ignore
2212
- return this.webex.internal.metrics.submitCallDiagnosticEvents(payload);
2213
- }
2214
-
2215
2117
  /**
2216
2118
  * sets the network status on meeting object
2217
2119
  * @param {String} networkStatus
@@ -2667,9 +2569,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2667
2569
  file: 'meeting/index',
2668
2570
  function: 'share'
2669
2571
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_LOCAL);
2670
- _metrics.default.postEvent({
2671
- event: _config.eventType.LOCAL_SHARE_FLOOR_GRANTED,
2672
- meeting: _this14
2572
+ // @ts-ignore
2573
+ _this14.webex.internal.newMetrics.submitClientEvent({
2574
+ name: 'client.share.floor-granted.local',
2575
+ payload: {
2576
+ mediaType: 'share'
2577
+ },
2578
+ options: {
2579
+ meetingId: _this14.id
2580
+ }
2673
2581
  });
2674
2582
  return _context3.abrupt("break", 42);
2675
2583
  case 37:
@@ -2680,9 +2588,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2680
2588
  resourceUrl: whiteboardShare.resourceUrl,
2681
2589
  memberId: whiteboardShare.beneficiaryId
2682
2590
  });
2683
- _metrics.default.postEvent({
2684
- event: _config.eventType.WHITEBOARD_SHARE_FLOOR_GRANTED,
2685
- meeting: _this14
2591
+ // @ts-ignore
2592
+ _this14.webex.internal.newMetrics.submitClientEvent({
2593
+ name: 'client.share.floor-granted.local',
2594
+ payload: {
2595
+ mediaType: 'whiteboard'
2596
+ },
2597
+ options: {
2598
+ meetingId: _this14.id
2599
+ }
2686
2600
  });
2687
2601
  return _context3.abrupt("break", 42);
2688
2602
  case 40:
@@ -2716,9 +2630,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2716
2630
  resourceUrl: whiteboardShare.resourceUrl,
2717
2631
  memberId: whiteboardShare.beneficiaryId
2718
2632
  });
2719
- _metrics.default.postEvent({
2720
- event: _config.eventType.WHITEBOARD_SHARE_FLOOR_GRANTED,
2721
- meeting: _this14
2633
+ // @ts-ignore
2634
+ _this14.webex.internal.newMetrics.submitClientEvent({
2635
+ name: 'client.share.floor-granted.local',
2636
+ payload: {
2637
+ mediaType: 'whiteboard'
2638
+ },
2639
+ options: {
2640
+ meetingId: _this14.id
2641
+ }
2722
2642
  });
2723
2643
  _this14.members.locusMediaSharesUpdate(payload);
2724
2644
  }
@@ -3063,9 +2983,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3063
2983
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_LOBBY_WAITING, {
3064
2984
  payload: payload
3065
2985
  });
3066
- _metrics.default.postEvent({
3067
- event: _config.eventType.LOBBY_ENTERED,
3068
- meeting: _this20
2986
+
2987
+ // @ts-ignore
2988
+ _this20.webex.internal.newMetrics.submitClientEvent({
2989
+ name: 'client.lobby.entered',
2990
+ options: {
2991
+ meetingId: _this20.id
2992
+ }
3069
2993
  });
3070
2994
  }
3071
2995
  });
@@ -3078,9 +3002,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3078
3002
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_GUEST_ADMITTED, {
3079
3003
  payload: payload
3080
3004
  });
3081
- _metrics.default.postEvent({
3082
- event: _config.eventType.LOBBY_EXITED,
3083
- meeting: _this20
3005
+
3006
+ // @ts-ignore
3007
+ _this20.webex.internal.newMetrics.submitClientEvent({
3008
+ name: 'client.lobby.exited',
3009
+ options: {
3010
+ meetingId: _this20.id
3011
+ }
3084
3012
  });
3085
3013
  }
3086
3014
  });
@@ -3750,9 +3678,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3750
3678
 
3751
3679
  // Only send restore event when it was disconnected before and for connected later
3752
3680
  if (!_this24.hasWebsocketConnected) {
3753
- _metrics.default.postEvent({
3754
- event: _config.eventType.MERCURY_CONNECTION_RESTORED,
3755
- meeting: _this24
3681
+ // @ts-ignore
3682
+ _this24.webex.internal.newMetrics.submitClientEvent({
3683
+ name: 'client.mercury.connection.restored',
3684
+ options: {
3685
+ meetingId: _this24.id
3686
+ }
3756
3687
  });
3757
3688
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
3758
3689
  correlation_id: _this24.correlationId
@@ -3764,9 +3695,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3764
3695
  // @ts-ignore
3765
3696
  this.webex.internal.mercury.on(_constants.OFFLINE, function () {
3766
3697
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
3767
- _metrics.default.postEvent({
3768
- event: _config.eventType.MERCURY_CONNECTION_LOST,
3769
- meeting: _this24
3698
+ // @ts-ignore
3699
+ _this24.webex.internal.newMetrics.submitClientEvent({
3700
+ name: 'client.mercury.connection.lost',
3701
+ options: {
3702
+ meetingId: _this24.id
3703
+ }
3770
3704
  });
3771
3705
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
3772
3706
  correlation_id: _this24.correlationId
@@ -3833,6 +3767,202 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3833
3767
  this.correlationId = id;
3834
3768
  }
3835
3769
 
3770
+ /**
3771
+ * Mute the audio for a meeting
3772
+ * @returns {Promise} resolves the data from muting audio {mute, self} or rejects if there is no audio set
3773
+ * @public
3774
+ * @memberof Meeting
3775
+ */
3776
+ }, {
3777
+ key: "muteAudio",
3778
+ value: function muteAudio() {
3779
+ var _this25 = this;
3780
+ if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3781
+ return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3782
+ }
3783
+
3784
+ // @ts-ignore
3785
+ if (!this.mediaId) {
3786
+ // Happens when addMedia and mute are triggered in succession
3787
+ return _promise.default.reject(new _webexErrors.NoMediaEstablishedYetError());
3788
+ }
3789
+ if (!this.audio) {
3790
+ return _promise.default.reject(new _parameter.default('no audio control associated to the meeting'));
3791
+ }
3792
+
3793
+ // First, stop sending the local audio media
3794
+ return logRequest(this.audio.handleClientRequest(this, true).then(function () {
3795
+ _util.default.handleAudioLogging(_this25.mediaProperties.audioTrack);
3796
+ // @ts-ignore
3797
+ _this25.webex.internal.newMetrics.submitClientEvent({
3798
+ name: 'client.muted',
3799
+ payload: {
3800
+ trigger: 'user-interaction',
3801
+ mediaType: 'audio'
3802
+ },
3803
+ options: {
3804
+ meetingId: _this25.id
3805
+ }
3806
+ });
3807
+ }).catch(function (error) {
3808
+ _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
3809
+ correlation_id: _this25.correlationId,
3810
+ locus_id: _this25.locusUrl.split('/').pop(),
3811
+ reason: error.message,
3812
+ stack: error.stack
3813
+ });
3814
+ throw error;
3815
+ }), {
3816
+ logText: "Meeting:index#muteAudio --> correlationId=".concat(this.correlationId, " muting audio")
3817
+ });
3818
+ }
3819
+
3820
+ /**
3821
+ * Unmute meeting audio
3822
+ * @returns {Promise} resolves data from muting audio {mute, self} or rejects if there is no audio set
3823
+ * @public
3824
+ * @memberof Meeting
3825
+ */
3826
+ }, {
3827
+ key: "unmuteAudio",
3828
+ value: function unmuteAudio() {
3829
+ var _this26 = this;
3830
+ if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3831
+ return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3832
+ }
3833
+
3834
+ // @ts-ignore
3835
+ if (!this.mediaId) {
3836
+ // Happens when addMedia and mute are triggered in succession
3837
+ return _promise.default.reject(new _webexErrors.NoMediaEstablishedYetError());
3838
+ }
3839
+ if (!this.audio) {
3840
+ return _promise.default.reject(new _parameter.default('no audio control associated to the meeting'));
3841
+ }
3842
+
3843
+ // First, send the control to unmute the participant on the server
3844
+ return logRequest(this.audio.handleClientRequest(this, false).then(function () {
3845
+ _util.default.handleAudioLogging(_this26.mediaProperties.audioTrack);
3846
+ // @ts-ignore
3847
+ _this26.webex.internal.newMetrics.submitClientEvent({
3848
+ name: 'client.unmuted',
3849
+ payload: {
3850
+ trigger: 'user-interaction',
3851
+ mediaType: 'audio'
3852
+ },
3853
+ options: {
3854
+ meetingId: _this26.id
3855
+ }
3856
+ });
3857
+ }).catch(function (error) {
3858
+ _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_AUDIO_FAILURE, {
3859
+ correlation_id: _this26.correlationId,
3860
+ locus_id: _this26.locusUrl.split('/').pop(),
3861
+ reason: error.message,
3862
+ stack: error.stack
3863
+ });
3864
+ throw error;
3865
+ }), {
3866
+ logText: "Meeting:index#unmuteAudio --> correlationId=".concat(this.correlationId, " unmuting audio")
3867
+ });
3868
+ }
3869
+
3870
+ /**
3871
+ * Mute the video for a meeting
3872
+ * @returns {Promise} resolves data from muting video {mute, self} or rejects if there is no video set
3873
+ * @public
3874
+ * @memberof Meeting
3875
+ */
3876
+ }, {
3877
+ key: "muteVideo",
3878
+ value: function muteVideo() {
3879
+ var _this27 = this;
3880
+ if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3881
+ return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3882
+ }
3883
+
3884
+ // @ts-ignore
3885
+ if (!this.mediaId) {
3886
+ // Happens when addMedia and mute are triggered in succession
3887
+ return _promise.default.reject(new _webexErrors.NoMediaEstablishedYetError());
3888
+ }
3889
+ if (!this.video) {
3890
+ return _promise.default.reject(new _parameter.default('no video control associated to the meeting'));
3891
+ }
3892
+ return logRequest(this.video.handleClientRequest(this, true).then(function () {
3893
+ _util.default.handleVideoLogging(_this27.mediaProperties.videoTrack);
3894
+ // @ts-ignore
3895
+ _this27.webex.internal.newMetrics.submitClientEvent({
3896
+ name: 'client.muted',
3897
+ payload: {
3898
+ trigger: 'user-interaction',
3899
+ mediaType: 'video'
3900
+ },
3901
+ options: {
3902
+ meetingId: _this27.id
3903
+ }
3904
+ });
3905
+ }).catch(function (error) {
3906
+ _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_VIDEO_FAILURE, {
3907
+ correlation_id: _this27.correlationId,
3908
+ locus_id: _this27.locusUrl.split('/').pop(),
3909
+ reason: error.message,
3910
+ stack: error.stack
3911
+ });
3912
+ throw error;
3913
+ }), {
3914
+ logText: "Meeting:index#muteVideo --> correlationId=".concat(this.correlationId, " muting video")
3915
+ });
3916
+ }
3917
+
3918
+ /**
3919
+ * Unmute meeting video
3920
+ * @returns {Promise} resolves data from muting video {mute, self} or rejects if there is no video set
3921
+ * @public
3922
+ * @memberof Meeting
3923
+ */
3924
+ }, {
3925
+ key: "unmuteVideo",
3926
+ value: function unmuteVideo() {
3927
+ var _this28 = this;
3928
+ if (!_util.default.isUserInJoinedState(this.locusInfo)) {
3929
+ return _promise.default.reject(new _webexErrors.UserNotJoinedError());
3930
+ }
3931
+
3932
+ // @ts-ignore
3933
+ if (!this.mediaId) {
3934
+ // Happens when addMedia and mute are triggered in succession
3935
+ return _promise.default.reject(new _webexErrors.NoMediaEstablishedYetError());
3936
+ }
3937
+ if (!this.video) {
3938
+ return _promise.default.reject(new _parameter.default('no audio control associated to the meeting'));
3939
+ }
3940
+ return logRequest(this.video.handleClientRequest(this, false).then(function () {
3941
+ _util.default.handleVideoLogging(_this28.mediaProperties.videoTrack);
3942
+ // @ts-ignore
3943
+ _this28.webex.internal.newMetrics.submitClientEvent({
3944
+ name: 'client.unmuted',
3945
+ payload: {
3946
+ trigger: 'user-interaction',
3947
+ mediaType: 'video'
3948
+ },
3949
+ options: {
3950
+ meetingId: _this28.id
3951
+ }
3952
+ });
3953
+ }).catch(function (error) {
3954
+ _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_VIDEO_FAILURE, {
3955
+ correlation_id: _this28.correlationId,
3956
+ locus_id: _this28.locusUrl.split('/').pop(),
3957
+ reason: error.message,
3958
+ stack: error.stack
3959
+ });
3960
+ throw error;
3961
+ }), {
3962
+ logText: "Meeting:index#unmuteVideo --> correlationId=".concat(this.correlationId, " unmuting video")
3963
+ });
3964
+ }
3965
+
3836
3966
  /**
3837
3967
  * Shorthand function to join AND set up media
3838
3968
  * @param {Object} options - options to join with media
@@ -3852,12 +3982,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3852
3982
  }, {
3853
3983
  key: "joinWithMedia",
3854
3984
  value: function joinWithMedia() {
3855
- var _this25 = this;
3985
+ var _this29 = this;
3856
3986
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3857
3987
  var mediaOptions = options.mediaOptions,
3858
3988
  joinOptions = options.joinOptions;
3859
3989
  return this.join(joinOptions).then(function (joinResponse) {
3860
- return _this25.addMedia(mediaOptions).then(function (mediaResponse) {
3990
+ return _this29.addMedia(mediaOptions).then(function (mediaResponse) {
3861
3991
  return {
3862
3992
  join: joinResponse,
3863
3993
  media: mediaResponse
@@ -3866,8 +3996,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3866
3996
  }).catch(function (error) {
3867
3997
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', error);
3868
3998
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
3869
- correlation_id: _this25.correlationId,
3870
- locus_id: _this25.locusUrl.split('/').pop(),
3999
+ correlation_id: _this29.correlationId,
4000
+ locus_id: _this29.locusUrl.split('/').pop(),
3871
4001
  reason: error.message,
3872
4002
  stack: error.stack
3873
4003
  }, {
@@ -3888,7 +4018,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3888
4018
  }, {
3889
4019
  key: "reconnect",
3890
4020
  value: function reconnect(options) {
3891
- var _this26 = this;
4021
+ var _this30 = this;
3892
4022
  _loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
3893
4023
  if (!this.reconnectionManager || !this.reconnectionManager.reconnect) {
3894
4024
  return _promise.default.reject(new _parameter.default('Cannot reconnect, ReconnectionManager must first be defined.'));
@@ -3916,13 +4046,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3916
4046
  function: 'reconnect'
3917
4047
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING);
3918
4048
  return this.reconnectionManager.reconnect(options).then(function () {
3919
- _triggerProxy.default.trigger(_this26, {
4049
+ _triggerProxy.default.trigger(_this30, {
3920
4050
  file: 'meeting/index',
3921
4051
  function: 'reconnect'
3922
4052
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_SUCCESS);
3923
4053
  _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
3924
4054
  }).catch(function (error) {
3925
- _triggerProxy.default.trigger(_this26, {
4055
+ _triggerProxy.default.trigger(_this30, {
3926
4056
  file: 'meeting/index',
3927
4057
  function: 'reconnect'
3928
4058
  }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_FAILURE, {
@@ -3930,18 +4060,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3930
4060
  });
3931
4061
  _loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
3932
4062
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_RECONNECT_FAILURE, {
3933
- correlation_id: _this26.correlationId,
3934
- locus_id: _this26.locusUrl.split('/').pop(),
4063
+ correlation_id: _this30.correlationId,
4064
+ locus_id: _this30.locusUrl.split('/').pop(),
3935
4065
  reason: error.message,
3936
4066
  stack: error.stack
3937
4067
  });
3938
- _this26.uploadLogs({
4068
+ _this30.uploadLogs({
3939
4069
  file: 'meeting/index',
3940
4070
  function: 'reconnect'
3941
4071
  });
3942
4072
  return _promise.default.reject(new _reconnection.default('Reconnection failure event', error));
3943
4073
  }).finally(function () {
3944
- _this26.reconnectionManager.reset();
4074
+ _this30.reconnectionManager.reset();
3945
4075
  });
3946
4076
  }
3947
4077
 
@@ -3984,16 +4114,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3984
4114
  }, {
3985
4115
  key: "monitorTranscriptionSocketConnection",
3986
4116
  value: function monitorTranscriptionSocketConnection() {
3987
- var _this27 = this;
4117
+ var _this31 = this;
3988
4118
  this.transcription.onCloseSocket(function (event) {
3989
4119
  _loggerProxy.default.logger.info("Meeting:index#onCloseSocket -->\n unable to continue receiving transcription;\n low-latency mercury web socket connection is closed now.\n ".concat(event));
3990
- _this27.triggerStopReceivingTranscriptionEvent();
4120
+ _this31.triggerStopReceivingTranscriptionEvent();
3991
4121
  });
3992
4122
  this.transcription.onErrorSocket(function (event) {
3993
4123
  _loggerProxy.default.logger.error("Meeting:index#onErrorSocket -->\n unable to continue receiving transcription;\n low-latency mercury web socket connection error had occured.\n ".concat(event));
3994
- _this27.triggerStopReceivingTranscriptionEvent();
4124
+ _this31.triggerStopReceivingTranscriptionEvent();
3995
4125
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
3996
- correlation_id: _this27.correlationId,
4126
+ correlation_id: _this31.correlationId,
3997
4127
  reason: 'unexpected error: transcription LLM web socket connection error had occured.',
3998
4128
  event: event
3999
4129
  });
@@ -4009,7 +4139,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4009
4139
  key: "receiveTranscription",
4010
4140
  value: function () {
4011
4141
  var _receiveTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
4012
- var _this28 = this;
4142
+ var _this32 = this;
4013
4143
  var datachannelUrl, _yield$this$request, webSocketUrl;
4014
4144
  return _regenerator.default.wrap(function _callee8$(_context8) {
4015
4145
  while (1) switch (_context8.prev = _context8.next) {
@@ -4036,7 +4166,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4036
4166
 
4037
4167
  // retrieve and pass the payload
4038
4168
  this.transcription.subscribe(function (payload) {
4039
- _triggerProxy.default.trigger(_this28, {
4169
+ _triggerProxy.default.trigger(_this32, {
4040
4170
  file: 'meeting/index',
4041
4171
  function: 'join'
4042
4172
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION, payload);
@@ -4117,7 +4247,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4117
4247
  }, {
4118
4248
  key: "join",
4119
4249
  value: function join() {
4120
- var _this29 = this;
4250
+ var _this33 = this;
4121
4251
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4122
4252
  // @ts-ignore - fix type
4123
4253
  if (!this.webex.meetings.registered) {
@@ -4157,25 +4287,38 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4157
4287
  if (options.rejoin) {
4158
4288
  this.meetingFiniteStateMachine.reset();
4159
4289
  }
4160
- _metrics.default.postEvent({
4161
- event: _config.eventType.CALL_INITIATED,
4162
- meeting: this,
4163
- data: {
4164
- trigger: _config.trigger.USER_INTERACTION,
4290
+
4291
+ // @ts-ignore
4292
+ this.webex.internal.newMetrics.submitClientEvent({
4293
+ name: 'client.call.initiated',
4294
+ payload: {
4295
+ trigger: 'user-interaction',
4165
4296
  isRoapCallEnabled: true
4297
+ },
4298
+ options: {
4299
+ meetingId: this.id
4166
4300
  }
4167
4301
  });
4168
4302
  if (!(0, _isEmpty2.default)(this.meetingInfo)) {
4169
4303
  var _this$meetingInfo;
4170
- _metrics.default.postEvent({
4171
- event: _config.eventType.MEETING_INFO_REQUEST,
4172
- meeting: this
4304
+ // @ts-ignore
4305
+ this.webex.internal.newMetrics.submitClientEvent({
4306
+ name: 'client.meetinginfo.request',
4307
+ options: {
4308
+ meetingId: this.id
4309
+ }
4173
4310
  });
4174
- _metrics.default.postEvent({
4175
- event: _config.eventType.MEETING_INFO_RESPONSE,
4176
- meeting: this,
4177
- data: {
4178
- meetingLookupUrl: (_this$meetingInfo = this.meetingInfo) === null || _this$meetingInfo === void 0 ? void 0 : _this$meetingInfo.meetingLookupUrl
4311
+
4312
+ // @ts-ignore
4313
+ this.webex.internal.newMetrics.submitClientEvent({
4314
+ name: 'client.meetinginfo.response',
4315
+ payload: {
4316
+ identifiers: {
4317
+ meetingLookupUrl: (_this$meetingInfo = this.meetingInfo) === null || _this$meetingInfo === void 0 ? void 0 : _this$meetingInfo.meetingLookupUrl
4318
+ }
4319
+ },
4320
+ options: {
4321
+ meetingId: this.id
4179
4322
  }
4180
4323
  });
4181
4324
  }
@@ -4219,14 +4362,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4219
4362
  }
4220
4363
  this.isMultistream = !!options.enableMultistream;
4221
4364
  return _util.default.joinMeetingOptions(this, options).then(function (join) {
4222
- _this29.meetingFiniteStateMachine.join();
4365
+ _this33.meetingFiniteStateMachine.join();
4223
4366
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
4224
4367
  return join;
4225
4368
  }).then(function (join) {
4226
4369
  joinSuccess(join);
4227
- _this29.deferJoin = undefined;
4370
+ _this33.deferJoin = undefined;
4228
4371
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
4229
- correlation_id: _this29.correlationId
4372
+ correlation_id: _this33.correlationId
4230
4373
  });
4231
4374
  return join;
4232
4375
  }).then( /*#__PURE__*/function () {
@@ -4234,12 +4377,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4234
4377
  return _regenerator.default.wrap(function _callee9$(_context9) {
4235
4378
  while (1) switch (_context9.prev = _context9.next) {
4236
4379
  case 0:
4237
- if (!_this29.config.enableAutomaticLLM) {
4380
+ if (!_this33.config.enableAutomaticLLM) {
4238
4381
  _context9.next = 3;
4239
4382
  break;
4240
4383
  }
4241
4384
  _context9.next = 3;
4242
- return _this29.updateLLMConnection();
4385
+ return _this33.updateLLMConnection();
4243
4386
  case 3:
4244
4387
  return _context9.abrupt("return", join);
4245
4388
  case 4:
@@ -4260,16 +4403,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4260
4403
  _context10.next = 8;
4261
4404
  break;
4262
4405
  }
4263
- if (!(_this29.config.receiveTranscription || options.receiveTranscription)) {
4406
+ if (!(_this33.config.receiveTranscription || options.receiveTranscription)) {
4264
4407
  _context10.next = 6;
4265
4408
  break;
4266
4409
  }
4267
- if (!_this29.isTranscriptionSupported()) {
4410
+ if (!_this33.isTranscriptionSupported()) {
4268
4411
  _context10.next = 6;
4269
4412
  break;
4270
4413
  }
4271
4414
  _context10.next = 5;
4272
- return _this29.receiveTranscription();
4415
+ return _this33.receiveTranscription();
4273
4416
  case 5:
4274
4417
  _loggerProxy.default.logger.info('Meeting:index#join --> enabled to recieve transcription!');
4275
4418
  case 6:
@@ -4289,32 +4432,39 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4289
4432
  return _ref21.apply(this, arguments);
4290
4433
  };
4291
4434
  }()).catch(function (error) {
4292
- var _error$error;
4293
- _this29.meetingFiniteStateMachine.fail(error);
4435
+ var _this33$meetingInfo, _error$error;
4436
+ _this33.meetingFiniteStateMachine.fail(error);
4294
4437
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
4295
- _metrics.default.postEvent({
4296
- event: _config.eventType.LOCUS_JOIN_RESPONSE,
4297
- meeting: _this29,
4298
- meetingId: _this29.id,
4299
- data: {
4300
- errors: [_metrics.default.parseLocusError(error.error, true)]
4438
+
4439
+ // @ts-ignore
4440
+ _this33.webex.internal.newMetrics.submitClientEvent({
4441
+ name: 'client.locus.join.response',
4442
+ payload: {
4443
+ identifiers: {
4444
+ meetingLookupUrl: (_this33$meetingInfo = _this33.meetingInfo) === null || _this33$meetingInfo === void 0 ? void 0 : _this33$meetingInfo.meetingLookupUrl
4445
+ }
4446
+ },
4447
+ options: {
4448
+ meetingId: _this33.id,
4449
+ rawError: error,
4450
+ showToUser: true
4301
4451
  }
4302
4452
  });
4303
4453
 
4304
4454
  // TODO: change this to error codes and pre defined dictionary
4305
4455
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
4306
- correlation_id: _this29.correlationId,
4456
+ correlation_id: _this33.correlationId,
4307
4457
  reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
4308
4458
  stack: error.stack
4309
4459
  });
4310
4460
 
4311
4461
  // Upload logs on join Failure
4312
- _triggerProxy.default.trigger(_this29, {
4462
+ _triggerProxy.default.trigger(_this33, {
4313
4463
  file: 'meeting/index',
4314
4464
  function: 'join'
4315
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this29);
4465
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this33);
4316
4466
  joinFailed(error);
4317
- _this29.deferJoin = undefined;
4467
+ _this33.deferJoin = undefined;
4318
4468
  return _promise.default.reject(error);
4319
4469
  });
4320
4470
  }
@@ -4329,7 +4479,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4329
4479
  key: "updateLLMConnection",
4330
4480
  value: function () {
4331
4481
  var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
4332
- var _this30 = this;
4482
+ var _this34 = this;
4333
4483
  var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, isJoined;
4334
4484
  return _regenerator.default.wrap(function _callee11$(_context11) {
4335
4485
  while (1) switch (_context11.prev = _context11.next) {
@@ -4361,9 +4511,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4361
4511
  case 10:
4362
4512
  return _context11.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl).then(function (registerAndConnectResult) {
4363
4513
  // @ts-ignore - Fix type
4364
- _this30.webex.internal.llm.off('event:relay.event', _this30.processRelayEvent);
4514
+ _this34.webex.internal.llm.off('event:relay.event', _this34.processRelayEvent);
4365
4515
  // @ts-ignore - Fix type
4366
- _this30.webex.internal.llm.on('event:relay.event', _this30.processRelayEvent);
4516
+ _this34.webex.internal.llm.on('event:relay.event', _this34.processRelayEvent);
4367
4517
  _loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
4368
4518
  return _promise.default.resolve(registerAndConnectResult);
4369
4519
  }));
@@ -4416,7 +4566,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4416
4566
  }, {
4417
4567
  key: "dialInPstn",
4418
4568
  value: function dialInPstn() {
4419
- var _this31 = this;
4569
+ var _this35 = this;
4420
4570
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
4421
4571
 
4422
4572
  var correlationId = this.correlationId,
@@ -4432,10 +4582,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4432
4582
  }).catch(function (error) {
4433
4583
  var _error$error2;
4434
4584
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
4435
- correlation_id: _this31.correlationId,
4436
- dial_in_url: _this31.dialInUrl,
4585
+ correlation_id: _this35.correlationId,
4586
+ dial_in_url: _this35.dialInUrl,
4437
4587
  locus_id: locusUrl.split('/').pop(),
4438
- client_url: _this31.deviceUrl,
4588
+ client_url: _this35.deviceUrl,
4439
4589
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
4440
4590
  stack: error.stack
4441
4591
  });
@@ -4453,7 +4603,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4453
4603
  }, {
4454
4604
  key: "dialOutPstn",
4455
4605
  value: function dialOutPstn(phoneNumber) {
4456
- var _this32 = this;
4606
+ var _this36 = this;
4457
4607
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
4458
4608
 
4459
4609
  var correlationId = this.correlationId,
@@ -4470,10 +4620,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4470
4620
  }).catch(function (error) {
4471
4621
  var _error$error3;
4472
4622
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
4473
- correlation_id: _this32.correlationId,
4474
- dial_out_url: _this32.dialOutUrl,
4623
+ correlation_id: _this36.correlationId,
4624
+ dial_out_url: _this36.dialOutUrl,
4475
4625
  locus_id: locusUrl.split('/').pop(),
4476
- client_url: _this32.deviceUrl,
4626
+ client_url: _this36.deviceUrl,
4477
4627
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
4478
4628
  stack: error.stack
4479
4629
  });
@@ -4504,14 +4654,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4504
4654
  }, {
4505
4655
  key: "moveTo",
4506
4656
  value: function moveTo(resourceId) {
4507
- var _this33 = this;
4657
+ var _this37 = this;
4508
4658
  if (!resourceId) {
4509
4659
  throw new _parameter.default('Cannot move call without a resourceId.');
4510
4660
  }
4511
- _metrics.default.postEvent({
4512
- event: _config.eventType.MEDIA_CAPABILITIES,
4513
- meeting: this,
4514
- data: {
4661
+
4662
+ // @ts-ignore
4663
+ this.webex.internal.newMetrics.submitClientEvent({
4664
+ name: 'client.media.capabilities',
4665
+ payload: {
4515
4666
  mediaCapabilities: {
4516
4667
  rx: {
4517
4668
  audio: false,
@@ -4528,11 +4679,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4528
4679
  whiteboard: false
4529
4680
  }
4530
4681
  }
4682
+ },
4683
+ options: {
4684
+ meetingId: this.id
4531
4685
  }
4532
4686
  });
4533
- _metrics.default.postEvent({
4534
- event: _config.eventType.MOVE_MEDIA,
4535
- meeting: this
4687
+
4688
+ // @ts-ignore
4689
+ this.webex.internal.newMetrics.submitClientEvent({
4690
+ name: 'client.call.move-media',
4691
+ options: {
4692
+ meetingId: this.id
4693
+ }
4536
4694
  });
4537
4695
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
4538
4696
  var mediaSettings;
@@ -4540,12 +4698,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4540
4698
  while (1) switch (_context12.prev = _context12.next) {
4541
4699
  case 0:
4542
4700
  _context12.prev = 0;
4543
- if (!_this33.isSharing) {
4701
+ if (!_this37.isSharing) {
4544
4702
  _context12.next = 4;
4545
4703
  break;
4546
4704
  }
4547
4705
  _context12.next = 4;
4548
- return _this33.releaseScreenShareFloor();
4706
+ return _this37.releaseScreenShareFloor();
4549
4707
  case 4:
4550
4708
  mediaSettings = {
4551
4709
  mediaDirection: {
@@ -4557,15 +4715,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4557
4715
  receiveShare: true
4558
4716
  }
4559
4717
  };
4560
- _this33.cleanupLocalTracks();
4561
- _this33.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
4562
- _this33.mediaProperties.unsetRemoteMedia();
4718
+ _this37.cleanupLocalTracks();
4719
+ _this37.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
4720
+ _this37.mediaProperties.unsetRemoteMedia();
4563
4721
 
4564
4722
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the DX answers the meeting
4565
4723
  // once the DX answers we establish connection back the media server with only receiveShare enabled
4566
4724
  // @ts-ignore - reconnectMedia does not accept any argument
4567
4725
  _context12.next = 10;
4568
- return _this33.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
4726
+ return _this37.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
4569
4727
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
4570
4728
  });
4571
4729
  case 10:
@@ -4576,8 +4734,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4576
4734
  _context12.t0 = _context12["catch"](0);
4577
4735
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context12.t0);
4578
4736
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
4579
- correlation_id: _this33.correlationId,
4580
- locus_id: _this33.locusUrl.split('/').pop(),
4737
+ correlation_id: _this37.correlationId,
4738
+ locus_id: _this37.locusUrl.split('/').pop(),
4581
4739
  reason: _context12.t0.message,
4582
4740
  stack: _context12.t0.stack
4583
4741
  });
@@ -4592,12 +4750,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4592
4750
  resourceId: resourceId,
4593
4751
  moveToResource: true
4594
4752
  }).then(function () {
4595
- _this33.meetingFiniteStateMachine.join();
4753
+ _this37.meetingFiniteStateMachine.join();
4596
4754
  }).catch(function (error) {
4597
- _this33.meetingFiniteStateMachine.fail(error);
4755
+ _this37.meetingFiniteStateMachine.fail(error);
4598
4756
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
4599
- correlation_id: _this33.correlationId,
4600
- locus_id: _this33.locusUrl.split('/').pop(),
4757
+ correlation_id: _this37.correlationId,
4758
+ locus_id: _this37.locusUrl.split('/').pop(),
4601
4759
  reason: error.message,
4602
4760
  stack: error.stack
4603
4761
  });
@@ -4616,30 +4774,34 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4616
4774
  }, {
4617
4775
  key: "moveFrom",
4618
4776
  value: function moveFrom(resourceId) {
4619
- var _this34 = this;
4777
+ var _this38 = this;
4620
4778
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
4621
4779
  if (!resourceId) {
4622
4780
  throw new _parameter.default('Cannot move call without a resourceId.');
4623
4781
  }
4624
4782
  var oldCorrelationId = this.correlationId;
4625
- _metrics.default.postEvent({
4626
- event: _config.eventType.MOVE_MEDIA,
4627
- meeting: this
4783
+
4784
+ // @ts-ignore
4785
+ this.webex.internal.newMetrics.submitClientEvent({
4786
+ name: 'client.call.move-media',
4787
+ options: {
4788
+ meetingId: this.id
4789
+ }
4628
4790
  });
4629
4791
  return _util.default.joinMeetingOptions(this).then(function () {
4630
- return _util.default.leaveMeeting(_this34, {
4792
+ return _util.default.leaveMeeting(_this38, {
4631
4793
  resourceId: resourceId,
4632
4794
  correlationId: oldCorrelationId,
4633
4795
  moveMeeting: true
4634
4796
  }).then(function () {
4635
- _this34.resourceId = '';
4797
+ _this38.resourceId = '';
4636
4798
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
4637
4799
  });
4638
4800
  }).catch(function (error) {
4639
- _this34.meetingFiniteStateMachine.fail(error);
4801
+ _this38.meetingFiniteStateMachine.fail(error);
4640
4802
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
4641
- correlation_id: _this34.correlationId,
4642
- locus_id: _this34.locusUrl.split('/').pop(),
4803
+ correlation_id: _this38.correlationId,
4804
+ locus_id: _this38.locusUrl.split('/').pop(),
4643
4805
  reason: error.message,
4644
4806
  stack: error.stack
4645
4807
  });
@@ -4735,9 +4897,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4735
4897
  }, {
4736
4898
  key: "forwardEvent",
4737
4899
  value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
4738
- var _this35 = this;
4900
+ var _this39 = this;
4739
4901
  eventEmitter.on(eventTypeToForward, function (data) {
4740
- return _triggerProxy.default.trigger(_this35, {
4902
+ return _triggerProxy.default.trigger(_this39, {
4741
4903
  file: 'meetings',
4742
4904
  function: 'addMedia'
4743
4905
  }, meetingEventType, data);
@@ -4756,7 +4918,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4756
4918
  key: "addMedia",
4757
4919
  value: function addMedia() {
4758
4920
  var _localTracks$screenSh,
4759
- _this36 = this;
4921
+ _this40 = this;
4760
4922
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4761
4923
  var LOG_HEADER = 'Meeting:index#addMedia -->';
4762
4924
  var turnDiscoverySkippedReason;
@@ -4782,10 +4944,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4782
4944
  receiveShare = _options$receiveShare === void 0 ? true : _options$receiveShare,
4783
4945
  remoteMediaManagerConfig = options.remoteMediaManagerConfig,
4784
4946
  bundlePolicy = options.bundlePolicy;
4785
- _metrics.default.postEvent({
4786
- event: _config.eventType.MEDIA_CAPABILITIES,
4787
- meeting: this,
4788
- data: {
4947
+
4948
+ // @ts-ignore
4949
+ this.webex.internal.newMetrics.submitClientEvent({
4950
+ name: 'client.media.capabilities',
4951
+ payload: {
4789
4952
  mediaCapabilities: {
4790
4953
  rx: {
4791
4954
  audio: false,
@@ -4802,6 +4965,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4802
4965
  whiteboard: false
4803
4966
  }
4804
4967
  }
4968
+ },
4969
+ options: {
4970
+ meetingId: this.id
4805
4971
  }
4806
4972
  });
4807
4973
 
@@ -4844,7 +5010,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4844
5010
  promises.push(this.setLocalShareTrack(localTracks.screenShare.video));
4845
5011
  }
4846
5012
  return _promise.default.all(promises).then(function () {
4847
- return _this36.roap.doTurnDiscovery(_this36, false);
5013
+ return _this40.roap.doTurnDiscovery(_this40, false);
4848
5014
  }).then( /*#__PURE__*/function () {
4849
5015
  var _ref23 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(turnDiscoveryObject) {
4850
5016
  var turnServerInfo, mc;
@@ -4855,19 +5021,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4855
5021
  turnServerUsed = !turnDiscoverySkippedReason;
4856
5022
  turnServerInfo = turnDiscoveryObject.turnServerInfo;
4857
5023
  _context14.next = 5;
4858
- return _this36.createMediaConnection(turnServerInfo, bundlePolicy);
5024
+ return _this40.createMediaConnection(turnServerInfo, bundlePolicy);
4859
5025
  case 5:
4860
5026
  mc = _context14.sent;
4861
- if (!_this36.isMultistream) {
5027
+ if (!_this40.isMultistream) {
4862
5028
  _context14.next = 13;
4863
5029
  break;
4864
5030
  }
4865
- _this36.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(_this36.receiveSlotManager, _this36.mediaRequestManagers, remoteMediaManagerConfig);
4866
- _this36.forwardEvent(_this36.remoteMediaManager, _remoteMediaManager.Event.AudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_AUDIO_CREATED);
4867
- _this36.forwardEvent(_this36.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
4868
- _this36.forwardEvent(_this36.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
5031
+ _this40.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(_this40.receiveSlotManager, _this40.mediaRequestManagers, remoteMediaManagerConfig);
5032
+ _this40.forwardEvent(_this40.remoteMediaManager, _remoteMediaManager.Event.AudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_AUDIO_CREATED);
5033
+ _this40.forwardEvent(_this40.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
5034
+ _this40.forwardEvent(_this40.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
4869
5035
  _context14.next = 13;
4870
- return _this36.remoteMediaManager.start();
5036
+ return _this40.remoteMediaManager.start();
4871
5037
  case 13:
4872
5038
  _context14.next = 15;
4873
5039
  return mc.initiateOffer();
@@ -4881,27 +5047,27 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4881
5047
  return _ref23.apply(this, arguments);
4882
5048
  };
4883
5049
  }()).then(function () {
4884
- _this36.setMercuryListener();
5050
+ _this40.setMercuryListener();
4885
5051
  }).then(function () {
4886
5052
  return (0, _mediaHelpers.getDevices)().then(function (devices) {
4887
5053
  _util.default.handleDeviceLogging(devices);
4888
5054
  }).catch(function () {});
4889
5055
  } // getDevices may fail if we don't have browser permissions, that's ok, we still can have a media connection
4890
5056
  ).then(function () {
4891
- _this36.handleMediaLogging(_this36.mediaProperties);
5057
+ _this40.handleMediaLogging(_this40.mediaProperties);
4892
5058
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created"));
4893
5059
 
4894
5060
  // @ts-ignore - config coming from registerPlugin
4895
- if (_this36.config.stats.enableStatsAnalyzer) {
5061
+ if (_this40.config.stats.enableStatsAnalyzer) {
4896
5062
  // @ts-ignore - config coming from registerPlugin
4897
- _this36.networkQualityMonitor = new _networkQualityMonitor.default(_this36.config.stats);
4898
- _this36.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(
5063
+ _this40.networkQualityMonitor = new _networkQualityMonitor.default(_this40.config.stats);
5064
+ _this40.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(
4899
5065
  // @ts-ignore - config coming from registerPlugin
4900
- _this36.config.stats, function (ssrc) {
4901
- return _this36.receiveSlotManager.findReceiveSlotBySsrc(ssrc);
4902
- }, _this36.networkQualityMonitor);
4903
- _this36.setupStatsAnalyzerEventHandlers();
4904
- _this36.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this36.sendNetworkQualityEvent.bind(_this36));
5066
+ _this40.config.stats, function (ssrc) {
5067
+ return _this40.receiveSlotManager.findReceiveSlotBySsrc(ssrc);
5068
+ }, _this40.networkQualityMonitor);
5069
+ _this40.setupStatsAnalyzerEventHandlers();
5070
+ _this40.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this40.sendNetworkQualityEvent.bind(_this40));
4905
5071
  }
4906
5072
  }).catch(function (error) {
4907
5073
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
@@ -4912,12 +5078,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4912
5078
 
4913
5079
  // eslint-disable-next-line func-names
4914
5080
  // eslint-disable-next-line prefer-arrow-callback
4915
- if (_this36.type === _constants._CALL_ || _this36.meetingState === _constants.FULL_STATE.ACTIVE) {
5081
+ if (_this40.type === _constants._CALL_ || _this40.meetingState === _constants.FULL_STATE.ACTIVE) {
4916
5082
  resolve();
4917
5083
  }
4918
5084
  var joiningTimer = setInterval(function () {
4919
5085
  timerCount += 1;
4920
- if (_this36.meetingState === _constants.FULL_STATE.ACTIVE) {
5086
+ if (_this40.meetingState === _constants.FULL_STATE.ACTIVE) {
4921
5087
  clearInterval(joiningTimer);
4922
5088
  resolve();
4923
5089
  }
@@ -4928,56 +5094,77 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4928
5094
  }, 1000);
4929
5095
  });
4930
5096
  }).then(function () {
4931
- return _this36.mediaProperties.waitForMediaConnectionConnected().catch(function () {
4932
- throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(_this36.correlationId));
5097
+ return _this40.mediaProperties.waitForMediaConnectionConnected().catch(function () {
5098
+ // @ts-ignore
5099
+ _this40.webex.internal.newMetrics.submitClientEvent({
5100
+ name: 'client.ice.end',
5101
+ payload: {
5102
+ canProceed: false,
5103
+ icePhase: 'JOIN_MEETING_FINAL',
5104
+ errors: [
5105
+ // @ts-ignore
5106
+ _this40.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode(_internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.ICE_FAILURE_CLIENT_CODE)]
5107
+ },
5108
+ options: {
5109
+ meetingId: _this40.id
5110
+ }
5111
+ });
5112
+ throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(_this40.correlationId));
4933
5113
  });
4934
5114
  }).then(function () {
4935
5115
  var _localTracks$screenSh2;
4936
5116
  if (localTracks !== null && localTracks !== void 0 && (_localTracks$screenSh2 = localTracks.screenShare) !== null && _localTracks$screenSh2 !== void 0 && _localTracks$screenSh2.video) {
4937
- _this36.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE_FLOOR_REQUEST);
5117
+ _this40.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE_FLOOR_REQUEST);
4938
5118
  }
4939
5119
  }).then(function () {
4940
- return _this36.mediaProperties.getCurrentConnectionType();
5120
+ return _this40.mediaProperties.getCurrentConnectionType();
4941
5121
  }).then(function (connectionType) {
4942
5122
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, {
4943
- correlation_id: _this36.correlationId,
4944
- locus_id: _this36.locusUrl.split('/').pop(),
5123
+ correlation_id: _this40.correlationId,
5124
+ locus_id: _this40.locusUrl.split('/').pop(),
4945
5125
  connectionType: connectionType,
4946
- isMultistream: _this36.isMultistream
5126
+ isMultistream: _this40.isMultistream
5127
+ });
5128
+ // @ts-ignore
5129
+ _this40.webex.internal.newMetrics.submitClientEvent({
5130
+ name: 'client.media-engine.ready',
5131
+ options: {
5132
+ meetingId: _this40.id
5133
+ }
4947
5134
  });
4948
5135
  }).catch(function (error) {
4949
- var _this36$mediaProperti, _this36$mediaProperti2, _this36$mediaProperti3, _this36$mediaProperti4, _this36$mediaProperti5, _this36$mediaProperti6, _this36$mediaProperti7, _this36$mediaProperti8, _this36$mediaProperti9, _this36$mediaProperti10, _this36$mediaProperti11, _this36$mediaProperti12, _this36$mediaProperti13, _this36$mediaProperti14, _this36$mediaProperti15, _this36$mediaProperti16, _this36$mediaProperti17, _this36$mediaProperti18, _this36$mediaProperti19, _this36$mediaProperti20, _this36$mediaProperti21;
5136
+ var _this40$mediaProperti, _this40$mediaProperti2, _this40$mediaProperti3, _this40$mediaProperti4, _this40$mediaProperti5, _this40$mediaProperti6, _this40$mediaProperti7, _this40$mediaProperti8, _this40$mediaProperti9, _this40$mediaProperti10, _this40$mediaProperti11, _this40$mediaProperti12, _this40$mediaProperti13, _this40$mediaProperti14, _this40$mediaProperti15, _this40$mediaProperti16, _this40$mediaProperti17, _this40$mediaProperti18, _this40$mediaProperti19, _this40$mediaProperti20, _this40$mediaProperti21;
4950
5137
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
4951
- correlation_id: _this36.correlationId,
4952
- locus_id: _this36.locusUrl.split('/').pop(),
5138
+ correlation_id: _this40.correlationId,
5139
+ locus_id: _this40.locusUrl.split('/').pop(),
4953
5140
  reason: error.message,
4954
5141
  stack: error.stack,
4955
5142
  code: error.code,
4956
5143
  turnDiscoverySkippedReason: turnDiscoverySkippedReason,
4957
5144
  turnServerUsed: turnServerUsed,
4958
- isMultistream: _this36.isMultistream,
4959
- signalingState: ((_this36$mediaProperti = _this36.mediaProperties.webrtcMediaConnection) === null || _this36$mediaProperti === void 0 ? void 0 : (_this36$mediaProperti2 = _this36$mediaProperti.multistreamConnection) === null || _this36$mediaProperti2 === void 0 ? void 0 : (_this36$mediaProperti3 = _this36$mediaProperti2.pc) === null || _this36$mediaProperti3 === void 0 ? void 0 : (_this36$mediaProperti4 = _this36$mediaProperti3.pc) === null || _this36$mediaProperti4 === void 0 ? void 0 : _this36$mediaProperti4.signalingState) || ((_this36$mediaProperti5 = _this36.mediaProperties.webrtcMediaConnection) === null || _this36$mediaProperti5 === void 0 ? void 0 : (_this36$mediaProperti6 = _this36$mediaProperti5.mediaConnection) === null || _this36$mediaProperti6 === void 0 ? void 0 : (_this36$mediaProperti7 = _this36$mediaProperti6.pc) === null || _this36$mediaProperti7 === void 0 ? void 0 : _this36$mediaProperti7.signalingState) || 'unknown',
4960
- connectionState: ((_this36$mediaProperti8 = _this36.mediaProperties.webrtcMediaConnection) === null || _this36$mediaProperti8 === void 0 ? void 0 : (_this36$mediaProperti9 = _this36$mediaProperti8.multistreamConnection) === null || _this36$mediaProperti9 === void 0 ? void 0 : (_this36$mediaProperti10 = _this36$mediaProperti9.pc) === null || _this36$mediaProperti10 === void 0 ? void 0 : (_this36$mediaProperti11 = _this36$mediaProperti10.pc) === null || _this36$mediaProperti11 === void 0 ? void 0 : _this36$mediaProperti11.connectionState) || ((_this36$mediaProperti12 = _this36.mediaProperties.webrtcMediaConnection) === null || _this36$mediaProperti12 === void 0 ? void 0 : (_this36$mediaProperti13 = _this36$mediaProperti12.mediaConnection) === null || _this36$mediaProperti13 === void 0 ? void 0 : (_this36$mediaProperti14 = _this36$mediaProperti13.pc) === null || _this36$mediaProperti14 === void 0 ? void 0 : _this36$mediaProperti14.connectionState) || 'unknown',
4961
- iceConnectionState: ((_this36$mediaProperti15 = _this36.mediaProperties.webrtcMediaConnection) === null || _this36$mediaProperti15 === void 0 ? void 0 : (_this36$mediaProperti16 = _this36$mediaProperti15.multistreamConnection) === null || _this36$mediaProperti16 === void 0 ? void 0 : (_this36$mediaProperti17 = _this36$mediaProperti16.pc) === null || _this36$mediaProperti17 === void 0 ? void 0 : (_this36$mediaProperti18 = _this36$mediaProperti17.pc) === null || _this36$mediaProperti18 === void 0 ? void 0 : _this36$mediaProperti18.iceConnectionState) || ((_this36$mediaProperti19 = _this36.mediaProperties.webrtcMediaConnection) === null || _this36$mediaProperti19 === void 0 ? void 0 : (_this36$mediaProperti20 = _this36$mediaProperti19.mediaConnection) === null || _this36$mediaProperti20 === void 0 ? void 0 : (_this36$mediaProperti21 = _this36$mediaProperti20.pc) === null || _this36$mediaProperti21 === void 0 ? void 0 : _this36$mediaProperti21.iceConnectionState) || 'unknown'
5145
+ isMultistream: _this40.isMultistream,
5146
+ signalingState: ((_this40$mediaProperti = _this40.mediaProperties.webrtcMediaConnection) === null || _this40$mediaProperti === void 0 ? void 0 : (_this40$mediaProperti2 = _this40$mediaProperti.multistreamConnection) === null || _this40$mediaProperti2 === void 0 ? void 0 : (_this40$mediaProperti3 = _this40$mediaProperti2.pc) === null || _this40$mediaProperti3 === void 0 ? void 0 : (_this40$mediaProperti4 = _this40$mediaProperti3.pc) === null || _this40$mediaProperti4 === void 0 ? void 0 : _this40$mediaProperti4.signalingState) || ((_this40$mediaProperti5 = _this40.mediaProperties.webrtcMediaConnection) === null || _this40$mediaProperti5 === void 0 ? void 0 : (_this40$mediaProperti6 = _this40$mediaProperti5.mediaConnection) === null || _this40$mediaProperti6 === void 0 ? void 0 : (_this40$mediaProperti7 = _this40$mediaProperti6.pc) === null || _this40$mediaProperti7 === void 0 ? void 0 : _this40$mediaProperti7.signalingState) || 'unknown',
5147
+ connectionState: ((_this40$mediaProperti8 = _this40.mediaProperties.webrtcMediaConnection) === null || _this40$mediaProperti8 === void 0 ? void 0 : (_this40$mediaProperti9 = _this40$mediaProperti8.multistreamConnection) === null || _this40$mediaProperti9 === void 0 ? void 0 : (_this40$mediaProperti10 = _this40$mediaProperti9.pc) === null || _this40$mediaProperti10 === void 0 ? void 0 : (_this40$mediaProperti11 = _this40$mediaProperti10.pc) === null || _this40$mediaProperti11 === void 0 ? void 0 : _this40$mediaProperti11.connectionState) || ((_this40$mediaProperti12 = _this40.mediaProperties.webrtcMediaConnection) === null || _this40$mediaProperti12 === void 0 ? void 0 : (_this40$mediaProperti13 = _this40$mediaProperti12.mediaConnection) === null || _this40$mediaProperti13 === void 0 ? void 0 : (_this40$mediaProperti14 = _this40$mediaProperti13.pc) === null || _this40$mediaProperti14 === void 0 ? void 0 : _this40$mediaProperti14.connectionState) || 'unknown',
5148
+ iceConnectionState: ((_this40$mediaProperti15 = _this40.mediaProperties.webrtcMediaConnection) === null || _this40$mediaProperti15 === void 0 ? void 0 : (_this40$mediaProperti16 = _this40$mediaProperti15.multistreamConnection) === null || _this40$mediaProperti16 === void 0 ? void 0 : (_this40$mediaProperti17 = _this40$mediaProperti16.pc) === null || _this40$mediaProperti17 === void 0 ? void 0 : (_this40$mediaProperti18 = _this40$mediaProperti17.pc) === null || _this40$mediaProperti18 === void 0 ? void 0 : _this40$mediaProperti18.iceConnectionState) || ((_this40$mediaProperti19 = _this40.mediaProperties.webrtcMediaConnection) === null || _this40$mediaProperti19 === void 0 ? void 0 : (_this40$mediaProperti20 = _this40$mediaProperti19.mediaConnection) === null || _this40$mediaProperti20 === void 0 ? void 0 : (_this40$mediaProperti21 = _this40$mediaProperti20.pc) === null || _this40$mediaProperti21 === void 0 ? void 0 : _this40$mediaProperti21.iceConnectionState) || 'unknown'
4962
5149
  });
4963
5150
 
4964
5151
  // Clean up stats analyzer, peer connection, and turn off listeners
4965
- var stopStatsAnalyzer = _this36.statsAnalyzer ? _this36.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
5152
+ var stopStatsAnalyzer = _this40.statsAnalyzer ? _this40.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
4966
5153
  return stopStatsAnalyzer.then(function () {
4967
- _this36.statsAnalyzer = null;
4968
- if (_this36.mediaProperties.webrtcMediaConnection) {
4969
- _this36.closePeerConnections();
4970
- _this36.unsetPeerConnections();
5154
+ _this40.statsAnalyzer = null;
5155
+ if (_this40.mediaProperties.webrtcMediaConnection) {
5156
+ _this40.closePeerConnections();
5157
+ _this40.unsetPeerConnections();
4971
5158
  }
4972
5159
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
4973
5160
 
4974
5161
  // Upload logs on error while adding media
4975
- _triggerProxy.default.trigger(_this36, {
5162
+ _triggerProxy.default.trigger(_this40, {
4976
5163
  file: 'meeting/index',
4977
5164
  function: 'addMedia'
4978
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this36);
5165
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this40);
4979
5166
  if (error instanceof _internalMediaCore.Errors.SdpError) {
4980
- _this36.leave({
5167
+ _this40.leave({
4981
5168
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
4982
5169
  });
4983
5170
  }
@@ -5010,7 +5197,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5010
5197
  }, {
5011
5198
  key: "enqueueMediaUpdate",
5012
5199
  value: function enqueueMediaUpdate(mediaUpdateType) {
5013
- var _this37 = this;
5200
+ var _this41 = this;
5014
5201
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5015
5202
  var canUpdateMediaNow = this.canUpdateMedia();
5016
5203
  return new _promise.default(function (resolve, reject) {
@@ -5021,9 +5208,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5021
5208
  options: options
5022
5209
  };
5023
5210
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
5024
- _this37.queuedMediaUpdates.push(queueItem);
5211
+ _this41.queuedMediaUpdates.push(queueItem);
5025
5212
  if (canUpdateMediaNow) {
5026
- _this37.processNextQueuedMediaUpdate();
5213
+ _this41.processNextQueuedMediaUpdate();
5027
5214
  }
5028
5215
  });
5029
5216
  }
@@ -5135,7 +5322,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5135
5322
  }, {
5136
5323
  key: "acknowledge",
5137
5324
  value: function acknowledge(type) {
5138
- var _this38 = this;
5325
+ var _this42 = this;
5139
5326
  if (!type) {
5140
5327
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
5141
5328
  }
@@ -5147,10 +5334,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5147
5334
  }).then(function (response) {
5148
5335
  return _promise.default.resolve(response);
5149
5336
  }).then(function (response) {
5150
- _this38.meetingFiniteStateMachine.ring(type);
5151
- _metrics.default.postEvent({
5152
- event: _config.eventType.ALERT_DISPLAYED,
5153
- meeting: _this38
5337
+ _this42.meetingFiniteStateMachine.ring(type);
5338
+ // @ts-ignore
5339
+ _this42.webex.internal.newMetrics.submitClientEvent({
5340
+ name: 'client.alert.displayed',
5341
+ options: {
5342
+ meetingId: _this42.id
5343
+ }
5154
5344
  });
5155
5345
  return _promise.default.resolve({
5156
5346
  response: response
@@ -5174,12 +5364,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5174
5364
  }, {
5175
5365
  key: "decline",
5176
5366
  value: function decline(reason) {
5177
- var _this39 = this;
5367
+ var _this43 = this;
5178
5368
  return _util.default.declineMeeting(this, reason).then(function (decline) {
5179
- _this39.meetingFiniteStateMachine.decline();
5369
+ _this43.meetingFiniteStateMachine.decline();
5180
5370
  return _promise.default.resolve(decline);
5181
5371
  }).catch(function (error) {
5182
- _this39.meetingFiniteStateMachine.fail(error);
5372
+ _this43.meetingFiniteStateMachine.fail(error);
5183
5373
  return _promise.default.reject(error);
5184
5374
  });
5185
5375
  }
@@ -5195,53 +5385,61 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5195
5385
  }, {
5196
5386
  key: "leave",
5197
5387
  value: function leave() {
5198
- var _this40 = this;
5388
+ var _this44 = this;
5199
5389
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5200
5390
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
5201
- _metrics.default.postEvent({
5202
- event: _config.eventType.LEAVE,
5203
- meeting: this,
5204
- data: {
5205
- trigger: _config.trigger.USER_INTERACTION,
5391
+ /// @ts-ignore
5392
+ this.webex.internal.newMetrics.submitInternalEvent({
5393
+ name: 'internal.reset.join.latencies'
5394
+ });
5395
+
5396
+ // @ts-ignore
5397
+ this.webex.internal.newMetrics.submitClientEvent({
5398
+ name: 'client.call.leave',
5399
+ payload: {
5400
+ trigger: 'user-interaction',
5206
5401
  canProceed: false,
5207
- reason: leaveReason
5402
+ leaveReason: leaveReason
5403
+ },
5404
+ options: {
5405
+ meetingId: this.id
5208
5406
  }
5209
5407
  });
5210
5408
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
5211
5409
  return _util.default.leaveMeeting(this, options).then(function (leave) {
5212
- _this40.meetingFiniteStateMachine.leave();
5213
- _this40.clearMeetingData();
5410
+ _this44.meetingFiniteStateMachine.leave();
5411
+ _this44.clearMeetingData();
5214
5412
 
5215
5413
  // upload logs on leave irrespective of meeting delete
5216
- _triggerProxy.default.trigger(_this40, {
5414
+ _triggerProxy.default.trigger(_this44, {
5217
5415
  file: 'meeting/index',
5218
5416
  function: 'leave'
5219
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this40);
5417
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this44);
5220
5418
 
5221
5419
  // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
5222
- if (_this40.wirelessShare || _this40.guest) {
5420
+ if (_this44.wirelessShare || _this44.guest) {
5223
5421
  // If screen sharing clean the meeting object
5224
- _triggerProxy.default.trigger(_this40, {
5422
+ _triggerProxy.default.trigger(_this44, {
5225
5423
  file: 'meeting/index',
5226
5424
  function: 'leave'
5227
5425
  }, _constants.EVENTS.DESTROY_MEETING, {
5228
5426
  reason: options.reason,
5229
- meetingId: _this40.id
5427
+ meetingId: _this44.id
5230
5428
  });
5231
5429
  }
5232
5430
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
5233
5431
  return leave;
5234
5432
  }).catch(function (error) {
5235
- _this40.meetingFiniteStateMachine.fail(error);
5433
+ _this44.meetingFiniteStateMachine.fail(error);
5236
5434
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
5237
5435
  // upload logs on leave irrespective of meeting delete
5238
- _triggerProxy.default.trigger(_this40, {
5436
+ _triggerProxy.default.trigger(_this44, {
5239
5437
  file: 'meeting/index',
5240
5438
  function: 'leave'
5241
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this40);
5439
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this44);
5242
5440
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
5243
- correlation_id: _this40.correlationId,
5244
- locus_id: _this40.locusUrl.split('/').pop(),
5441
+ correlation_id: _this44.correlationId,
5442
+ locus_id: _this44.locusUrl.split('/').pop(),
5245
5443
  reason: error.message,
5246
5444
  stack: error.stack,
5247
5445
  code: error.code
@@ -5261,7 +5459,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5261
5459
  }, {
5262
5460
  key: "startWhiteboardShare",
5263
5461
  value: function startWhiteboardShare(channelUrl, resourceToken) {
5264
- var _this41 = this;
5462
+ var _this45 = this;
5265
5463
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
5266
5464
  return element.name === 'whiteboard';
5267
5465
  });
@@ -5269,9 +5467,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5269
5467
  return _promise.default.reject(new _parameter.default('Cannot share without channelUrl.'));
5270
5468
  }
5271
5469
  if (whiteboard) {
5272
- _metrics.default.postEvent({
5273
- event: _config.eventType.WHITEBOARD_SHARE_INITIATED,
5274
- meeting: this
5470
+ // @ts-ignore
5471
+ this.webex.internal.newMetrics.submitClientEvent({
5472
+ name: 'client.share.initiated',
5473
+ payload: {
5474
+ mediaType: 'whiteboard'
5475
+ },
5476
+ options: {
5477
+ meetingId: this.id
5478
+ }
5275
5479
  });
5276
5480
  var body = {
5277
5481
  disposition: _constants.FLOOR_ACTION.GRANTED,
@@ -5284,13 +5488,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5284
5488
  body.resourceToken = resourceToken;
5285
5489
  }
5286
5490
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
5287
- _this41.isSharing = false;
5491
+ _this45.isSharing = false;
5288
5492
  return _promise.default.resolve();
5289
5493
  }).catch(function (error) {
5290
5494
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
5291
5495
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
5292
- correlation_id: _this41.correlationId,
5293
- locus_id: _this41.locusUrl.split('/').pop(),
5496
+ correlation_id: _this45.correlationId,
5497
+ locus_id: _this45.locusUrl.split('/').pop(),
5294
5498
  reason: error.message,
5295
5499
  stack: error.stack,
5296
5500
  board: {
@@ -5313,14 +5517,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5313
5517
  }, {
5314
5518
  key: "stopWhiteboardShare",
5315
5519
  value: function stopWhiteboardShare(channelUrl) {
5316
- var _this42 = this;
5520
+ var _this46 = this;
5317
5521
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
5318
5522
  return element.name === 'whiteboard';
5319
5523
  });
5320
5524
  if (whiteboard) {
5321
- _metrics.default.postEvent({
5322
- event: _config.eventType.WHITEBOARD_SHARE_STOPPED,
5323
- meeting: this
5525
+ // @ts-ignore
5526
+ this.webex.internal.newMetrics.submitClientEvent({
5527
+ name: 'client.share.stopped',
5528
+ payload: {
5529
+ mediaType: 'whiteboard'
5530
+ },
5531
+ options: {
5532
+ meetingId: this.id
5533
+ }
5324
5534
  });
5325
5535
  return this.meetingRequest.changeMeetingFloor({
5326
5536
  disposition: _constants.FLOOR_ACTION.RELEASED,
@@ -5332,8 +5542,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5332
5542
  _metrics.default.sendBehavioralMetric(
5333
5543
  // @ts-ignore - check if STOP_WHITEBOARD_SHARE_FAILURE exists
5334
5544
  _constants2.default.STOP_WHITEBOARD_SHARE_FAILURE, {
5335
- correlation_id: _this42.correlationId,
5336
- locus_id: _this42.locusUrl.split('/').pop(),
5545
+ correlation_id: _this46.correlationId,
5546
+ locus_id: _this46.locusUrl.split('/').pop(),
5337
5547
  reason: error.message,
5338
5548
  stack: error.stack,
5339
5549
  board: {
@@ -5355,7 +5565,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5355
5565
  }, {
5356
5566
  key: "requestScreenShareFloor",
5357
5567
  value: function requestScreenShareFloor() {
5358
- var _this43 = this;
5568
+ var _this47 = this;
5359
5569
  if (!this.mediaProperties.shareTrack || !this.mediaProperties.mediaDirection.sendShare) {
5360
5570
  _loggerProxy.default.logger.log("Meeting:index#requestScreenShareFloor --> NOT requesting floor, because we don't have the share track anymore (shareTrack=".concat(this.mediaProperties.shareTrack ? 'yes' : 'no', ", sendShare=").concat(this.mediaProperties.mediaDirection.sendShare, ")"));
5361
5571
  return _promise.default.resolve({});
@@ -5365,9 +5575,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5365
5575
  return element.name === _constants.CONTENT;
5366
5576
  });
5367
5577
  if (content && this.shareStatus !== _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
5368
- _metrics.default.postEvent({
5369
- event: _config.eventType.SHARE_INITIATED,
5370
- meeting: this
5578
+ // @ts-ignore
5579
+ this.webex.internal.newMetrics.submitClientEvent({
5580
+ name: 'client.share.initiated',
5581
+ payload: {
5582
+ mediaType: 'share'
5583
+ },
5584
+ options: {
5585
+ meetingId: this.id
5586
+ }
5371
5587
  });
5372
5588
  return this.meetingRequest.changeMeetingFloor({
5373
5589
  disposition: _constants.FLOOR_ACTION.GRANTED,
@@ -5377,13 +5593,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5377
5593
  resourceUrl: this.resourceUrl,
5378
5594
  annotationInfo: this.annotationInfo
5379
5595
  }).then(function () {
5380
- _this43.isSharing = true;
5596
+ _this47.isSharing = true;
5381
5597
  return _promise.default.resolve();
5382
5598
  }).catch(function (error) {
5383
5599
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
5384
5600
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
5385
- correlation_id: _this43.correlationId,
5386
- locus_id: _this43.locusUrl.split('/').pop(),
5601
+ correlation_id: _this47.correlationId,
5602
+ locus_id: _this47.locusUrl.split('/').pop(),
5387
5603
  reason: error.message,
5388
5604
  stack: error.stack
5389
5605
  });
@@ -5405,10 +5621,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5405
5621
  }, {
5406
5622
  key: "requestScreenShareFloorIfPending",
5407
5623
  value: function requestScreenShareFloorIfPending() {
5408
- var _this44 = this;
5624
+ var _this48 = this;
5409
5625
  if (this.floorGrantPending && this.state === _constants.MEETING_STATE.STATES.JOINED) {
5410
5626
  this.requestScreenShareFloor().then(function () {
5411
- _this44.floorGrantPending = false;
5627
+ _this48.floorGrantPending = false;
5412
5628
  });
5413
5629
  }
5414
5630
  }
@@ -5422,15 +5638,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5422
5638
  }, {
5423
5639
  key: "releaseScreenShareFloor",
5424
5640
  value: function releaseScreenShareFloor() {
5425
- var _this45 = this;
5641
+ var _this49 = this;
5426
5642
  var content = this.locusInfo.mediaShares.find(function (element) {
5427
5643
  return element.name === _constants.CONTENT;
5428
5644
  });
5429
5645
  if (content) {
5430
5646
  var _content$floor;
5431
- _metrics.default.postEvent({
5432
- event: _config.eventType.SHARE_STOPPED,
5433
- meeting: this
5647
+ // @ts-ignore
5648
+ this.webex.internal.newMetrics.submitClientEvent({
5649
+ name: 'client.share.stopped',
5650
+ payload: {
5651
+ mediaType: 'share'
5652
+ },
5653
+ options: {
5654
+ meetingId: this.id
5655
+ }
5434
5656
  });
5435
5657
  if (((_content$floor = content.floor) === null || _content$floor === void 0 ? void 0 : _content$floor.beneficiary.id) !== this.selfId) {
5436
5658
  // remote participant started sharing and caused our sharing to stop, we don't want to send any floor action request in that case
@@ -5446,14 +5668,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5446
5668
  }).catch(function (error) {
5447
5669
  _loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
5448
5670
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
5449
- correlation_id: _this45.correlationId,
5450
- locus_id: _this45.locusUrl.split('/').pop(),
5671
+ correlation_id: _this49.correlationId,
5672
+ locus_id: _this49.locusUrl.split('/').pop(),
5451
5673
  reason: error.message,
5452
5674
  stack: error.stack
5453
5675
  });
5454
5676
  return _promise.default.reject(error);
5455
5677
  }).finally(function () {
5456
- _this45.isSharing = false;
5678
+ _this49.isSharing = false;
5457
5679
  });
5458
5680
  }
5459
5681
 
@@ -5629,7 +5851,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5629
5851
  }, {
5630
5852
  key: "changeVideoLayout",
5631
5853
  value: function changeVideoLayout(layoutType) {
5632
- var _this46 = this;
5854
+ var _this50 = this;
5633
5855
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5634
5856
  var main = renderInfo.main,
5635
5857
  content = renderInfo.content;
@@ -5683,7 +5905,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5683
5905
  }
5684
5906
  this.lastVideoLayoutInfo = (0, _cloneDeep2.default)(layoutInfo);
5685
5907
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
5686
- _triggerProxy.default.trigger(_this46, {
5908
+ _triggerProxy.default.trigger(_this50, {
5687
5909
  file: 'meeting/index',
5688
5910
  function: 'changeVideoLayout'
5689
5911
  }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
@@ -5773,199 +5995,6 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5773
5995
  _util.default.handleAudioLogging(mediaProperties.audioTrack);
5774
5996
  }
5775
5997
 
5776
- /**
5777
- * @param {string} typeMedia 'audio' or 'video'
5778
- * @returns {undefined}
5779
- */
5780
- }, {
5781
- key: "setStartSetupDelay",
5782
- value: function setStartSetupDelay(typeMedia) {
5783
- this["startSetupDelay".concat(typeMedia)] = performance.now();
5784
- this["endSetupDelay".concat(typeMedia)] = undefined;
5785
- }
5786
-
5787
- /**
5788
- * @param {string} typeMedia 'audio' or 'video'
5789
- * @returns {undefined}
5790
- */
5791
- }, {
5792
- key: "setEndSetupDelay",
5793
- value: function setEndSetupDelay(typeMedia) {
5794
- this["endSetupDelay".concat(typeMedia)] = performance.now();
5795
- }
5796
-
5797
- /**
5798
- * @param {string} typeMedia 'audio' or 'video'
5799
- * @returns {string} duration between start and end of setup
5800
- */
5801
- }, {
5802
- key: "getSetupDelayDuration",
5803
- value: function getSetupDelayDuration(typeMedia) {
5804
- var start = this["startSetupDelay".concat(typeMedia)];
5805
- var end = this["endSetupDelay".concat(typeMedia)];
5806
- return start && end ? end - start : undefined;
5807
- }
5808
-
5809
- /**
5810
- * @param {string} typeMedia 'audio' or 'video'
5811
- * @returns {undefined}
5812
- */
5813
- }, {
5814
- key: "setStartSendingMediaDelay",
5815
- value: function setStartSendingMediaDelay(typeMedia) {
5816
- this["startSendingMediaDelay".concat(typeMedia)] = performance.now();
5817
- this["endSendingMediaDelay".concat(typeMedia)] = undefined;
5818
- }
5819
-
5820
- /**
5821
- * @param {string} typeMedia 'audio' or 'video'
5822
- * @returns {undefined}
5823
- */
5824
- }, {
5825
- key: "setEndSendingMediaDelay",
5826
- value: function setEndSendingMediaDelay(typeMedia) {
5827
- this["endSendingMediaDelay".concat(typeMedia)] = performance.now();
5828
- }
5829
-
5830
- /**
5831
- * @param {string} typeMedia 'audio' or 'video'
5832
- * @returns {string} duration between join response and first media tx
5833
- */
5834
- }, {
5835
- key: "getSendingMediaDelayDuration",
5836
- value: function getSendingMediaDelayDuration(typeMedia) {
5837
- var start = this["startSendingMediaDelay".concat(typeMedia)];
5838
- var end = this["endSendingMediaDelay".concat(typeMedia)];
5839
- return start && end ? end - start : undefined;
5840
- }
5841
-
5842
- /**
5843
- *
5844
- * @returns {undefined}
5845
- */
5846
- }, {
5847
- key: "setStartLocalSDPGenRemoteSDPRecvDelay",
5848
- value: function setStartLocalSDPGenRemoteSDPRecvDelay() {
5849
- if (!this.startLocalSDPGenRemoteSDPRecvDelay) {
5850
- this.startLocalSDPGenRemoteSDPRecvDelay = performance.now();
5851
- this.endLocalSDPGenRemoteSDPRecvDelay = undefined;
5852
- }
5853
- }
5854
-
5855
- /**
5856
- *
5857
- * @returns {undefined}
5858
- */
5859
- }, {
5860
- key: "setEndLocalSDPGenRemoteSDPRecvDelay",
5861
- value: function setEndLocalSDPGenRemoteSDPRecvDelay() {
5862
- if (!this.endLocalSDPGenRemoteSDPRecvDelay) {
5863
- this.endLocalSDPGenRemoteSDPRecvDelay = performance.now();
5864
- }
5865
- }
5866
-
5867
- /**
5868
- *
5869
- * @returns {string} duration between local SDP generation and remote SDP reception
5870
- */
5871
- }, {
5872
- key: "getLocalSDPGenRemoteSDPRecvDelay",
5873
- value: function getLocalSDPGenRemoteSDPRecvDelay() {
5874
- var start = this.startLocalSDPGenRemoteSDPRecvDelay;
5875
- var end = this.endLocalSDPGenRemoteSDPRecvDelay;
5876
- if (start && end) {
5877
- var calculatedDelay = Math.round(end - start);
5878
- return calculatedDelay > _constants.METRICS_JOIN_TIMES_MAX_DURATION ? undefined : calculatedDelay;
5879
- }
5880
- return undefined;
5881
- }
5882
-
5883
- /**
5884
- *
5885
- * @returns {undefined}
5886
- */
5887
- }, {
5888
- key: "setStartCallInitJoinReq",
5889
- value: function setStartCallInitJoinReq() {
5890
- this.startCallInitJoinReq = performance.now();
5891
- this.endCallInitJoinReq = undefined;
5892
- }
5893
-
5894
- /**
5895
- *
5896
- * @returns {undefined}
5897
- */
5898
- }, {
5899
- key: "setEndCallInitJoinReq",
5900
- value: function setEndCallInitJoinReq() {
5901
- this.endCallInitJoinReq = performance.now();
5902
- }
5903
-
5904
- /**
5905
- *
5906
- * @returns {string} duration between call initiate and sending join request to locus
5907
- */
5908
- }, {
5909
- key: "getCallInitJoinReq",
5910
- value: function getCallInitJoinReq() {
5911
- var start = this.startCallInitJoinReq;
5912
- var end = this.endCallInitJoinReq;
5913
- if (start && end) {
5914
- var calculatedDelay = end - start;
5915
- return calculatedDelay > _constants.METRICS_JOIN_TIMES_MAX_DURATION ? undefined : calculatedDelay;
5916
- }
5917
- return undefined;
5918
- }
5919
-
5920
- /**
5921
- *
5922
- * @returns {undefined}
5923
- */
5924
- }, {
5925
- key: "setStartJoinReqResp",
5926
- value: function setStartJoinReqResp() {
5927
- this.startJoinReqResp = performance.now();
5928
- this.endJoinReqResp = undefined;
5929
- }
5930
-
5931
- /**
5932
- *
5933
- * @returns {undefined}
5934
- */
5935
- }, {
5936
- key: "setEndJoinReqResp",
5937
- value: function setEndJoinReqResp() {
5938
- this.endJoinReqResp = performance.now();
5939
- }
5940
-
5941
- /**
5942
- *
5943
- * @returns {string} duration between sending locus join request and receiving join response
5944
- */
5945
- }, {
5946
- key: "getJoinReqResp",
5947
- value: function getJoinReqResp() {
5948
- var start = this.startJoinReqResp;
5949
- var end = this.endJoinReqResp;
5950
- if (start && end) {
5951
- var calculatedDelay = Math.round(end - start);
5952
- return calculatedDelay > _constants.METRICS_JOIN_TIMES_MAX_DURATION ? undefined : calculatedDelay;
5953
- }
5954
- return undefined;
5955
- }
5956
-
5957
- /**
5958
- *
5959
- * @returns {string} duration between call initiate and successful locus join (even if it is in lobby)
5960
- */
5961
- }, {
5962
- key: "getTotalJmt",
5963
- value: function getTotalJmt() {
5964
- var start = this.startCallInitJoinReq;
5965
- var end = this.endJoinReqResp;
5966
- return start && end ? Math.round(end - start) : undefined;
5967
- }
5968
-
5969
5998
  /**
5970
5999
  *
5971
6000
  * @returns {string} one of 'attendee','host','cohost', returns the user type of the current user
@@ -5988,21 +6017,6 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5988
6017
  return null;
5989
6018
  }
5990
6019
 
5991
- /**
5992
- *
5993
- * @returns {string} one of 'login-ci','unverified-guest', returns the login type of the current user
5994
- */
5995
- }, {
5996
- key: "getCurLoginType",
5997
- value: function getCurLoginType() {
5998
- // @ts-ignore
5999
- if (this.webex.canAuthorize) {
6000
- // @ts-ignore
6001
- return this.webex.credentials.isUnverifiedGuest ? 'unverified-guest' : 'login-ci';
6002
- }
6003
- return null;
6004
- }
6005
-
6006
6020
  /**
6007
6021
  * End the current meeting for all
6008
6022
  * @returns {Promise}
@@ -6012,13 +6026,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6012
6026
  }, {
6013
6027
  key: "endMeetingForAll",
6014
6028
  value: function endMeetingForAll() {
6015
- var _this47 = this;
6016
- _metrics.default.postEvent({
6017
- event: _config.eventType.LEAVE,
6018
- meeting: this,
6019
- data: {
6020
- trigger: _config.trigger.USER_INTERACTION,
6029
+ var _this51 = this;
6030
+ // @ts-ignore
6031
+ this.webex.internal.newMetrics.submitClientEvent({
6032
+ name: 'client.call.leave',
6033
+ payload: {
6034
+ trigger: 'user-interaction',
6021
6035
  canProceed: false
6036
+ },
6037
+ options: {
6038
+ meetingId: this.id
6022
6039
  }
6023
6040
  });
6024
6041
  _loggerProxy.default.logger.log('Meeting:index#endMeetingForAll --> End meeting for All');
@@ -6027,25 +6044,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6027
6044
  locus_id: this.locusId
6028
6045
  });
6029
6046
  return _util.default.endMeetingForAll(this).then(function (end) {
6030
- _this47.meetingFiniteStateMachine.end();
6031
- _this47.clearMeetingData();
6047
+ _this51.meetingFiniteStateMachine.end();
6048
+ _this51.clearMeetingData();
6032
6049
  // upload logs on leave irrespective of meeting delete
6033
- _triggerProxy.default.trigger(_this47, {
6050
+ _triggerProxy.default.trigger(_this51, {
6034
6051
  file: 'meeting/index',
6035
6052
  function: 'endMeetingForAll'
6036
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
6053
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this51);
6037
6054
  return end;
6038
6055
  }).catch(function (error) {
6039
- _this47.meetingFiniteStateMachine.fail(error);
6056
+ _this51.meetingFiniteStateMachine.fail(error);
6040
6057
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
6041
6058
  // upload logs on leave irrespective of meeting delete
6042
- _triggerProxy.default.trigger(_this47, {
6059
+ _triggerProxy.default.trigger(_this51, {
6043
6060
  file: 'meeting/index',
6044
6061
  function: 'endMeetingForAll'
6045
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
6062
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this51);
6046
6063
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
6047
- correlation_id: _this47.correlationId,
6048
- locus_id: _this47.locusUrl.split('/').pop(),
6064
+ correlation_id: _this51.correlationId,
6065
+ locus_id: _this51.locusUrl.split('/').pop(),
6049
6066
  reason: error.message,
6050
6067
  stack: error.stack,
6051
6068
  code: error.code
@@ -6188,7 +6205,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6188
6205
  var _this$mediaProperties6,
6189
6206
  _this$mediaProperties7,
6190
6207
  _this$mediaProperties8,
6191
- _this48 = this;
6208
+ _this52 = this;
6192
6209
  var LOG_HEADER = 'Meeting:index#updateTranscodedMediaConnection -->';
6193
6210
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " starting"));
6194
6211
  if (!this.canUpdateMedia()) {
@@ -6211,8 +6228,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6211
6228
  }).catch(function (error) {
6212
6229
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error: "), error);
6213
6230
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
6214
- correlation_id: _this48.correlationId,
6215
- locus_id: _this48.locusUrl.split('/').pop(),
6231
+ correlation_id: _this52.correlationId,
6232
+ locus_id: _this52.locusUrl.split('/').pop(),
6216
6233
  reason: error.message,
6217
6234
  stack: error.stack
6218
6235
  });