@webex/plugin-meetings 3.8.0-next.6 → 3.8.0-next.61

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 (156) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/common/errors/webex-errors.js +12 -2
  4. package/dist/common/errors/webex-errors.js.map +1 -1
  5. package/dist/config.js +1 -0
  6. package/dist/config.js.map +1 -1
  7. package/dist/constants.js +17 -121
  8. package/dist/constants.js.map +1 -1
  9. package/dist/controls-options-manager/enums.js +2 -0
  10. package/dist/controls-options-manager/enums.js.map +1 -1
  11. package/dist/controls-options-manager/types.js.map +1 -1
  12. package/dist/controls-options-manager/util.js +52 -0
  13. package/dist/controls-options-manager/util.js.map +1 -1
  14. package/dist/interpretation/index.js +1 -1
  15. package/dist/interpretation/siLanguage.js +1 -1
  16. package/dist/locus-info/controlsUtils.js +28 -10
  17. package/dist/locus-info/controlsUtils.js.map +1 -1
  18. package/dist/locus-info/index.js +20 -1
  19. package/dist/locus-info/index.js.map +1 -1
  20. package/dist/locus-info/selfUtils.js +405 -418
  21. package/dist/locus-info/selfUtils.js.map +1 -1
  22. package/dist/media/index.js +8 -16
  23. package/dist/media/index.js.map +1 -1
  24. package/dist/meeting/in-meeting-actions.js +17 -1
  25. package/dist/meeting/in-meeting-actions.js.map +1 -1
  26. package/dist/meeting/index.js +556 -288
  27. package/dist/meeting/index.js.map +1 -1
  28. package/dist/meeting/locusMediaRequest.js +0 -17
  29. package/dist/meeting/locusMediaRequest.js.map +1 -1
  30. package/dist/meeting/muteState.js +0 -2
  31. package/dist/meeting/muteState.js.map +1 -1
  32. package/dist/meeting/request.js +30 -0
  33. package/dist/meeting/request.js.map +1 -1
  34. package/dist/meeting/request.type.js.map +1 -1
  35. package/dist/meeting/util.js +13 -2
  36. package/dist/meeting/util.js.map +1 -1
  37. package/dist/meeting-info/meeting-info-v2.js +359 -60
  38. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  39. package/dist/meetings/index.js +91 -1
  40. package/dist/meetings/index.js.map +1 -1
  41. package/dist/meetings/util.js +14 -0
  42. package/dist/meetings/util.js.map +1 -1
  43. package/dist/member/index.js +10 -0
  44. package/dist/member/index.js.map +1 -1
  45. package/dist/member/util.js +3 -0
  46. package/dist/member/util.js.map +1 -1
  47. package/dist/members/index.js +23 -0
  48. package/dist/members/index.js.map +1 -1
  49. package/dist/members/request.js +21 -0
  50. package/dist/members/request.js.map +1 -1
  51. package/dist/members/util.js +15 -0
  52. package/dist/members/util.js.map +1 -1
  53. package/dist/metrics/constants.js +9 -0
  54. package/dist/metrics/constants.js.map +1 -1
  55. package/dist/reachability/clusterReachability.js +63 -27
  56. package/dist/reachability/clusterReachability.js.map +1 -1
  57. package/dist/reachability/index.js +112 -47
  58. package/dist/reachability/index.js.map +1 -1
  59. package/dist/reachability/reachability.types.js +14 -0
  60. package/dist/reachability/reachability.types.js.map +1 -1
  61. package/dist/reachability/request.js +19 -3
  62. package/dist/reachability/request.js.map +1 -1
  63. package/dist/reconnection-manager/index.js +2 -2
  64. package/dist/reconnection-manager/index.js.map +1 -1
  65. package/dist/recording-controller/util.js +5 -5
  66. package/dist/recording-controller/util.js.map +1 -1
  67. package/dist/roap/index.js.map +1 -1
  68. package/dist/roap/turnDiscovery.js +45 -27
  69. package/dist/roap/turnDiscovery.js.map +1 -1
  70. package/dist/roap/types.js +17 -0
  71. package/dist/roap/types.js.map +1 -0
  72. package/dist/types/common/errors/webex-errors.d.ts +7 -1
  73. package/dist/types/config.d.ts +1 -0
  74. package/dist/types/constants.d.ts +12 -85
  75. package/dist/types/controls-options-manager/enums.d.ts +3 -1
  76. package/dist/types/controls-options-manager/types.d.ts +7 -1
  77. package/dist/types/locus-info/index.d.ts +1 -0
  78. package/dist/types/locus-info/selfUtils.d.ts +247 -1
  79. package/dist/types/meeting/in-meeting-actions.d.ts +16 -0
  80. package/dist/types/meeting/index.d.ts +54 -1
  81. package/dist/types/meeting/muteState.d.ts +0 -1
  82. package/dist/types/meeting/request.d.ts +12 -1
  83. package/dist/types/meeting/request.type.d.ts +6 -0
  84. package/dist/types/meeting/util.d.ts +3 -1
  85. package/dist/types/meeting-info/meeting-info-v2.d.ts +80 -0
  86. package/dist/types/meetings/index.d.ts +38 -0
  87. package/dist/types/member/index.d.ts +1 -0
  88. package/dist/types/members/index.d.ts +8 -0
  89. package/dist/types/members/request.d.ts +19 -0
  90. package/dist/types/members/util.d.ts +13 -0
  91. package/dist/types/metrics/constants.d.ts +9 -0
  92. package/dist/types/reachability/clusterReachability.d.ts +15 -7
  93. package/dist/types/reachability/index.d.ts +10 -1
  94. package/dist/types/reachability/reachability.types.d.ts +5 -0
  95. package/dist/types/roap/index.d.ts +3 -2
  96. package/dist/types/roap/turnDiscovery.d.ts +5 -17
  97. package/dist/types/roap/types.d.ts +16 -0
  98. package/dist/webinar/index.js +1 -1
  99. package/package.json +23 -23
  100. package/src/common/errors/webex-errors.ts +8 -1
  101. package/src/config.ts +1 -0
  102. package/src/constants.ts +19 -90
  103. package/src/controls-options-manager/enums.ts +2 -0
  104. package/src/controls-options-manager/types.ts +11 -1
  105. package/src/controls-options-manager/util.ts +62 -0
  106. package/src/locus-info/controlsUtils.ts +44 -14
  107. package/src/locus-info/index.ts +23 -1
  108. package/src/locus-info/selfUtils.ts +451 -447
  109. package/src/media/index.ts +11 -21
  110. package/src/meeting/in-meeting-actions.ts +32 -0
  111. package/src/meeting/index.ts +372 -92
  112. package/src/meeting/locusMediaRequest.ts +0 -18
  113. package/src/meeting/muteState.ts +0 -2
  114. package/src/meeting/request.ts +36 -1
  115. package/src/meeting/request.type.ts +7 -0
  116. package/src/meeting/util.ts +11 -2
  117. package/src/meeting-info/meeting-info-v2.ts +247 -6
  118. package/src/meetings/index.ts +107 -1
  119. package/src/meetings/util.ts +18 -0
  120. package/src/member/index.ts +11 -0
  121. package/src/member/util.ts +3 -0
  122. package/src/members/index.ts +25 -0
  123. package/src/members/request.ts +26 -0
  124. package/src/members/util.ts +16 -0
  125. package/src/metrics/constants.ts +9 -0
  126. package/src/reachability/clusterReachability.ts +73 -26
  127. package/src/reachability/index.ts +70 -1
  128. package/src/reachability/reachability.types.ts +6 -0
  129. package/src/reachability/request.ts +7 -0
  130. package/src/reconnection-manager/index.ts +2 -2
  131. package/src/recording-controller/util.ts +17 -13
  132. package/src/roap/index.ts +3 -7
  133. package/src/roap/turnDiscovery.ts +34 -39
  134. package/src/roap/types.ts +23 -0
  135. package/test/unit/spec/controls-options-manager/util.js +120 -0
  136. package/test/unit/spec/locus-info/controlsUtils.js +103 -9
  137. package/test/unit/spec/locus-info/index.js +28 -0
  138. package/test/unit/spec/media/index.ts +36 -16
  139. package/test/unit/spec/meeting/in-meeting-actions.ts +19 -4
  140. package/test/unit/spec/meeting/index.js +528 -34
  141. package/test/unit/spec/meeting/locusMediaRequest.ts +0 -30
  142. package/test/unit/spec/meeting/muteState.js +0 -2
  143. package/test/unit/spec/meeting/request.js +32 -1
  144. package/test/unit/spec/meeting/utils.js +119 -18
  145. package/test/unit/spec/meeting-info/meetinginfov2.js +443 -114
  146. package/test/unit/spec/meetings/index.js +120 -2
  147. package/test/unit/spec/member/index.js +7 -0
  148. package/test/unit/spec/member/util.js +24 -0
  149. package/test/unit/spec/members/index.js +103 -26
  150. package/test/unit/spec/members/request.js +45 -22
  151. package/test/unit/spec/members/utils.js +33 -0
  152. package/test/unit/spec/reachability/clusterReachability.ts +88 -56
  153. package/test/unit/spec/reachability/index.ts +101 -0
  154. package/test/unit/spec/reachability/request.js +47 -2
  155. package/test/unit/spec/reconnection-manager/index.js +4 -4
  156. package/test/unit/spec/roap/turnDiscovery.ts +110 -28
@@ -21,6 +21,7 @@ var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/
21
21
  var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
22
22
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
23
23
  var _map = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/map"));
24
+ var _isNan = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/number/is-nan"));
24
25
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
25
26
  var _weakMap = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/weak-map"));
26
27
  var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/typeof"));
@@ -506,6 +507,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
506
507
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "allowMediaInLobby", void 0);
507
508
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "localShareInstanceId", void 0);
508
509
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "remoteShareInstanceId", void 0);
510
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "shareCAEventSentStatus", void 0);
509
511
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "turnDiscoverySkippedReason", void 0);
510
512
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "turnServerUsed", void 0);
511
513
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "areVoiceaEventsSetup", false);
@@ -560,6 +562,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
560
562
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "rtcMetrics", void 0);
561
563
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "uploadLogsTimer", void 0);
562
564
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "logUploadIntervalIndex", void 0);
565
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "mediaServerIp", void 0);
563
566
  /**
564
567
  * Callback called when a relay event is received from meeting LLM Connection
565
568
  * @param {RelayEvent} e Event object coming from LLM Connection
@@ -646,7 +649,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
646
649
  rawError: error
647
650
  }
648
651
  });
649
- } else if (error instanceof _internalMediaCore.Errors.SdpOfferHandlingError || error instanceof _internalMediaCore.Errors.SdpAnswerHandlingError) {
652
+ } else if (error instanceof _internalMediaCore.Errors.SdpOfferHandlingError) {
650
653
  sendBehavioralMetric(_constants2.default.PEERCONNECTION_FAILURE, error, _this.correlationId);
651
654
 
652
655
  // @ts-ignore
@@ -660,6 +663,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
660
663
  rawError: error
661
664
  }
662
665
  });
666
+ } else if (error instanceof _internalMediaCore.Errors.SdpAnswerHandlingError) {
667
+ sendBehavioralMetric(_constants2.default.PEERCONNECTION_FAILURE, error, _this.correlationId);
668
+
669
+ // @ts-ignore
670
+ _this.webex.internal.newMetrics.submitClientEvent({
671
+ name: 'client.media-engine.remote-sdp-received',
672
+ payload: {
673
+ canProceed: false
674
+ },
675
+ options: {
676
+ meetingId: _this.id,
677
+ rawError: error
678
+ }
679
+ });
680
+ if (_this.deferSDPAnswer) {
681
+ clearTimeout(_this.sdpResponseTimer);
682
+ _this.sdpResponseTimer = undefined;
683
+ _this.deferSDPAnswer.reject();
684
+ }
663
685
  } else if (error instanceof _internalMediaCore.Errors.SdpError) {
664
686
  // this covers also the case of Errors.IceGatheringError which extends Errors.SdpError
665
687
  sendBehavioralMetric(_constants2.default.INVALID_ICE_CANDIDATE, error, _this.correlationId);
@@ -685,6 +707,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
685
707
  */
686
708
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "roapMessageReceived", function (roapMessage) {
687
709
  var mediaServer = roapMessage.messageType === 'ANSWER' ? _util3.default.getMediaServer(roapMessage.sdp) : undefined;
710
+ var mediaServerIp = roapMessage.messageType === 'ANSWER' ? _util3.default.getMediaServerIp(roapMessage.sdp) : undefined;
688
711
  if (_this.isMultistream && mediaServer && mediaServer !== 'homer') {
689
712
  throw new _multistreamNotSupportedError.default("Client asked for multistream backend (Homer), but got ".concat(mediaServer, " instead"));
690
713
  }
@@ -692,6 +715,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
692
715
  if (mediaServer) {
693
716
  _this.mediaProperties.webrtcMediaConnection.mediaServer = mediaServer;
694
717
  }
718
+ if (_this.isMultistream && mediaServerIp) {
719
+ _this.mediaServerIp = mediaServerIp;
720
+ }
695
721
  });
696
722
  /**
697
723
  * This function makes sure we send the right metrics when local and remote SDPs are processed/generated
@@ -1034,18 +1060,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1034
1060
  * @memberof Meetings
1035
1061
  */
1036
1062
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "setupStatsAnalyzerEventHandlers", function () {
1037
- _this.statsAnalyzer.on(_internalMediaCore.StatsAnalyzerEventNames.MEDIA_QUALITY, function (options) {
1038
- var _this$webex$meetings$;
1039
- // TODO: might have to send the same event to the developer
1040
- // Add ip address info if geo hint is present
1041
- // @ts-ignore fix type
1042
- options.data.intervalMetadata.peerReflexiveIP =
1043
- // @ts-ignore
1044
- ((_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;
1045
- var members = _this.getMembers().membersCollection.members;
1063
+ _this.statsAnalyzer.on(_internalMediaCore.StatsAnalyzerEventNames.MEDIA_QUALITY, function (event) {
1064
+ // Add IP address from geoHintInfo if missing.
1065
+ if (event.data.intervalMetadata.maskedPeerReflexiveIP === '0.0.0.0') {
1066
+ var _this$webex$meetings$;
1067
+ // @ts-ignore fix type
1068
+ var clientAddressFromGeoHint = (_this$webex$meetings$ = _this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$ === void 0 ? void 0 : _this$webex$meetings$.clientAddress;
1069
+ if (clientAddressFromGeoHint) {
1070
+ event.data.intervalMetadata.maskedPeerReflexiveIP = _internalPluginMetrics.CallDiagnosticUtils.anonymizeIPAddress(clientAddressFromGeoHint);
1071
+ }
1072
+ }
1046
1073
 
1047
- // Count members that are in the meeting
1048
- options.data.intervalMetadata.meetingUserCount = (0, _values.default)(members).filter(function (member) {
1074
+ // Count members that are in the meeting.
1075
+ var members = _this.getMembers().membersCollection.members;
1076
+ event.data.intervalMetadata.meetingUserCount = (0, _values.default)(members).filter(function (member) {
1049
1077
  return member.isInMeeting;
1050
1078
  }).length;
1051
1079
 
@@ -1054,10 +1082,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1054
1082
  name: 'client.mediaquality.event',
1055
1083
  options: {
1056
1084
  meetingId: _this.id,
1057
- networkType: options.data.networkType
1085
+ networkType: _this.statsAnalyzer.getNetworkType()
1058
1086
  },
1059
1087
  payload: {
1060
- intervals: [options.data]
1088
+ intervals: [event.data]
1061
1089
  }
1062
1090
  });
1063
1091
  });
@@ -1066,85 +1094,101 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1066
1094
  file: 'meeting/index',
1067
1095
  function: 'addMedia'
1068
1096
  }, _constants.EVENT_TRIGGERS.MEETING_MEDIA_LOCAL_STARTED, data);
1069
- // @ts-ignore
1070
- _this.webex.internal.newMetrics.submitClientEvent({
1071
- name: 'client.media.tx.start',
1072
- payload: {
1073
- mediaType: data.mediaType,
1074
- shareInstanceId: data.mediaType === 'share' ? _this.localShareInstanceId : undefined
1075
- },
1076
- options: {
1077
- meetingId: _this.id
1097
+ if (data.mediaType !== 'share' || !_this.shareCAEventSentStatus.transmitStart) {
1098
+ // @ts-ignore
1099
+ _this.webex.internal.newMetrics.submitClientEvent({
1100
+ name: 'client.media.tx.start',
1101
+ payload: {
1102
+ mediaType: data.mediaType,
1103
+ shareInstanceId: data.mediaType === 'share' ? _this.localShareInstanceId : undefined
1104
+ },
1105
+ options: {
1106
+ meetingId: _this.id
1107
+ }
1108
+ });
1109
+ if (data.mediaType === 'share') {
1110
+ _this.shareCAEventSentStatus.transmitStart = true;
1078
1111
  }
1079
- });
1112
+ }
1080
1113
  });
1081
1114
  _this.statsAnalyzer.on(_internalMediaCore.StatsAnalyzerEventNames.LOCAL_MEDIA_STOPPED, function (data) {
1082
- // @ts-ignore
1083
- _this.webex.internal.newMetrics.submitClientEvent({
1084
- name: 'client.media.tx.stop',
1085
- payload: {
1086
- mediaType: data.mediaType,
1087
- shareInstanceId: data.mediaType === 'share' ? _this.localShareInstanceId : undefined
1088
- },
1089
- options: {
1090
- meetingId: _this.id
1115
+ if (data.mediaType !== 'share' || !_this.shareCAEventSentStatus.transmitStop) {
1116
+ // @ts-ignore
1117
+ _this.webex.internal.newMetrics.submitClientEvent({
1118
+ name: 'client.media.tx.stop',
1119
+ payload: {
1120
+ mediaType: data.mediaType,
1121
+ shareInstanceId: data.mediaType === 'share' ? _this.localShareInstanceId : undefined
1122
+ },
1123
+ options: {
1124
+ meetingId: _this.id
1125
+ }
1126
+ });
1127
+ if (data.mediaType === 'share') {
1128
+ _this.shareCAEventSentStatus.transmitStop = true;
1091
1129
  }
1092
- });
1130
+ }
1093
1131
  });
1094
1132
  _this.statsAnalyzer.on(_internalMediaCore.StatsAnalyzerEventNames.REMOTE_MEDIA_STARTED, function (data) {
1095
1133
  _triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
1096
1134
  file: 'meeting/index',
1097
1135
  function: 'addMedia'
1098
1136
  }, _constants.EVENT_TRIGGERS.MEETING_MEDIA_REMOTE_STARTED, data);
1099
- // @ts-ignore
1100
- _this.webex.internal.newMetrics.submitClientEvent({
1101
- name: 'client.media.rx.start',
1102
- payload: {
1103
- mediaType: data.mediaType,
1104
- shareInstanceId: data.mediaType === 'share' ? _this.remoteShareInstanceId : undefined
1105
- },
1106
- options: {
1107
- meetingId: _this.id
1108
- }
1109
- });
1110
- if (data.mediaType === 'share') {
1137
+ if (data.mediaType !== 'share' || !_this.shareCAEventSentStatus.receiveStart) {
1111
1138
  // @ts-ignore
1112
1139
  _this.webex.internal.newMetrics.submitClientEvent({
1113
- name: 'client.media.render.start',
1140
+ name: 'client.media.rx.start',
1114
1141
  payload: {
1115
- mediaType: 'share',
1116
- shareInstanceId: _this.remoteShareInstanceId
1142
+ mediaType: data.mediaType,
1143
+ shareInstanceId: data.mediaType === 'share' ? _this.remoteShareInstanceId : undefined
1117
1144
  },
1118
1145
  options: {
1119
1146
  meetingId: _this.id
1120
1147
  }
1121
1148
  });
1149
+ if (data.mediaType === 'share') {
1150
+ // @ts-ignore
1151
+ _this.webex.internal.newMetrics.submitClientEvent({
1152
+ name: 'client.media.render.start',
1153
+ payload: {
1154
+ mediaType: 'share',
1155
+ shareInstanceId: _this.remoteShareInstanceId
1156
+ },
1157
+ options: {
1158
+ meetingId: _this.id
1159
+ }
1160
+ });
1161
+ _this.shareCAEventSentStatus.receiveStart = true;
1162
+ }
1122
1163
  }
1123
1164
  });
1124
1165
  _this.statsAnalyzer.on(_internalMediaCore.StatsAnalyzerEventNames.REMOTE_MEDIA_STOPPED, function (data) {
1125
- // @ts-ignore
1126
- _this.webex.internal.newMetrics.submitClientEvent({
1127
- name: 'client.media.rx.stop',
1128
- payload: {
1129
- mediaType: data.mediaType,
1130
- shareInstanceId: data.mediaType === 'share' ? _this.remoteShareInstanceId : undefined
1131
- },
1132
- options: {
1133
- meetingId: _this.id
1134
- }
1135
- });
1136
- if (data.mediaType === 'share') {
1166
+ if (data.mediaType !== 'share' || !_this.shareCAEventSentStatus.receiveStop) {
1137
1167
  // @ts-ignore
1138
1168
  _this.webex.internal.newMetrics.submitClientEvent({
1139
- name: 'client.media.render.stop',
1169
+ name: 'client.media.rx.stop',
1140
1170
  payload: {
1141
- mediaType: 'share',
1142
- shareInstanceId: _this.remoteShareInstanceId
1171
+ mediaType: data.mediaType,
1172
+ shareInstanceId: data.mediaType === 'share' ? _this.remoteShareInstanceId : undefined
1143
1173
  },
1144
1174
  options: {
1145
1175
  meetingId: _this.id
1146
1176
  }
1147
1177
  });
1178
+ if (data.mediaType === 'share') {
1179
+ // @ts-ignore
1180
+ _this.webex.internal.newMetrics.submitClientEvent({
1181
+ name: 'client.media.render.stop',
1182
+ payload: {
1183
+ mediaType: 'share',
1184
+ shareInstanceId: _this.remoteShareInstanceId
1185
+ },
1186
+ options: {
1187
+ meetingId: _this.id
1188
+ }
1189
+ });
1190
+ _this.shareCAEventSentStatus.receiveStop = true;
1191
+ }
1148
1192
  }
1149
1193
  });
1150
1194
  });
@@ -1282,8 +1326,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1282
1326
  * @returns {undefined}
1283
1327
  */
1284
1328
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "handleShareVideoStreamMuteStateChange", function (muted) {
1285
- var _this$statsAnalyzer, _this$mediaProperties3, _this$mediaProperties4;
1329
+ var _this$mediaProperties3, _this$mediaProperties4, _this$statsAnalyzer;
1286
1330
  _loggerProxy.default.logger.log("Meeting:index#handleShareVideoStreamMuteStateChange --> Share video stream mute state changed to muted ".concat(muted));
1331
+ var shareVideoStreamSettings = (_this$mediaProperties3 = _this.mediaProperties) === null || _this$mediaProperties3 === void 0 ? void 0 : (_this$mediaProperties4 = _this$mediaProperties3.shareVideoStream) === null || _this$mediaProperties4 === void 0 ? void 0 : _this$mediaProperties4.getSettings();
1287
1332
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_VIDEO_MUTE_STATE_CHANGE, {
1288
1333
  correlationId: _this.correlationId,
1289
1334
  muted: muted,
@@ -1292,8 +1337,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1292
1337
  // SDK to TypeScript 5, which may affect other packages, use bracket notation for now, since
1293
1338
  // all we're doing here is adding metrics.
1294
1339
  // eslint-disable-next-line dot-notation
1295
- displaySurface: (_this$mediaProperties3 = _this.mediaProperties) === null || _this$mediaProperties3 === void 0 ? void 0 : (_this$mediaProperties4 = _this$mediaProperties3.shareVideoStream) === null || _this$mediaProperties4 === void 0 ? void 0 : _this$mediaProperties4.getSettings()['displaySurface'],
1296
- isMultistream: _this.isMultistream
1340
+ displaySurface: shareVideoStreamSettings === null || shareVideoStreamSettings === void 0 ? void 0 : shareVideoStreamSettings['displaySurface'],
1341
+ isMultistream: _this.isMultistream,
1342
+ frameRate: shareVideoStreamSettings === null || shareVideoStreamSettings === void 0 ? void 0 : shareVideoStreamSettings.frameRate
1297
1343
  });
1298
1344
  });
1299
1345
  /**
@@ -2084,6 +2130,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2084
2130
  */
2085
2131
  _this.remoteShareInstanceId = null;
2086
2132
 
2133
+ /**
2134
+ * Status used for ensuring we do not oversend metrics
2135
+ * @instance
2136
+ * @private
2137
+ * @memberof Meeting
2138
+ */
2139
+ _this.shareCAEventSentStatus = {
2140
+ transmitStart: false,
2141
+ transmitStop: false,
2142
+ receiveStart: false,
2143
+ receiveStop: false
2144
+ };
2145
+
2087
2146
  /**
2088
2147
  * The class that helps to control recording functions: start, stop, pause, resume, etc
2089
2148
  * @instance
@@ -2245,6 +2304,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2245
2304
  * @memberof Meeting
2246
2305
  */
2247
2306
  (0, _classPrivateFieldSet2.default)((0, _assertThisInitialized2.default)(_this), _isoLocalClientMeetingJoinTime, undefined);
2307
+
2308
+ // We clear the error cache of CA events on every new meeting instance
2309
+ // @ts-ignore - Fix type
2310
+ _this.webex.internal.newMetrics.callDiagnosticMetrics.clearErrorCache();
2311
+
2312
+ /**
2313
+ * IP Address of the remote media server
2314
+ * @instance
2315
+ * @type {string}
2316
+ * @private
2317
+ * @memberof Meeting
2318
+ */
2319
+ _this.mediaServerIp = undefined;
2248
2320
  return _this;
2249
2321
  }
2250
2322
 
@@ -2303,6 +2375,44 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2303
2375
  this.callStateForMetrics.correlationId = correlationId;
2304
2376
  }
2305
2377
 
2378
+ /**
2379
+ * Getter - Returns callStateForMetrics.userNameInput
2380
+ * @returns {string}
2381
+ */
2382
+ }, {
2383
+ key: "userNameInput",
2384
+ get: function get() {
2385
+ var _this$callStateForMet;
2386
+ return (_this$callStateForMet = this.callStateForMetrics) === null || _this$callStateForMet === void 0 ? void 0 : _this$callStateForMet.userNameInput;
2387
+ }
2388
+
2389
+ /**
2390
+ * Setter - sets callStateForMetrics.userNameInput
2391
+ * @param {string} userNameInput
2392
+ */,
2393
+ set: function set(userNameInput) {
2394
+ this.callStateForMetrics.userNameInput = userNameInput;
2395
+ }
2396
+
2397
+ /**
2398
+ * Getter - Returns callStateForMetrics.emailInput
2399
+ * @returns {string}
2400
+ */
2401
+ }, {
2402
+ key: "emailInput",
2403
+ get: function get() {
2404
+ var _this$callStateForMet2;
2405
+ return (_this$callStateForMet2 = this.callStateForMetrics) === null || _this$callStateForMet2 === void 0 ? void 0 : _this$callStateForMet2.emailInput;
2406
+ }
2407
+
2408
+ /**
2409
+ * Setter - sets callStateForMetrics.emailInput
2410
+ * @param {string} emailInput
2411
+ */,
2412
+ set: function set(emailInput) {
2413
+ this.callStateForMetrics.emailInput = emailInput;
2414
+ }
2415
+
2306
2416
  /**
2307
2417
  * Getter - Returns callStateForMetrics.sessionCorrelationId
2308
2418
  * @returns {string}
@@ -2332,6 +2442,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2332
2442
  return (0, _classPrivateFieldGet2.default)(this, _isoLocalClientMeetingJoinTime);
2333
2443
  }
2334
2444
 
2445
+ /**
2446
+ * Setter - sets isoLocalClientMeetingJoinTime
2447
+ * This will be set once on meeting join, and not updated again
2448
+ * this will always produce an ISO string
2449
+ * If the iso string is invalid, it will fallback to the current system time
2450
+ * @param {string | undefined} time
2451
+ */,
2452
+ set: function set(time) {
2453
+ var fallback = new Date().toISOString();
2454
+ if (!time) {
2455
+ (0, _classPrivateFieldSet2.default)(this, _isoLocalClientMeetingJoinTime, fallback);
2456
+ } else {
2457
+ var date = new Date(time);
2458
+
2459
+ // Check if the date is valid
2460
+ if ((0, _isNan.default)(date.getTime())) {
2461
+ _loggerProxy.default.logger.info( // @ts-ignore
2462
+ "Meeting:index#isoLocalClientMeetingJoinTime --> Invalid date provided: ".concat(time, ". Falling back to system clock."));
2463
+ (0, _classPrivateFieldSet2.default)(this, _isoLocalClientMeetingJoinTime, fallback);
2464
+ } else {
2465
+ (0, _classPrivateFieldSet2.default)(this, _isoLocalClientMeetingJoinTime, date.toISOString());
2466
+ }
2467
+ }
2468
+ }
2469
+
2335
2470
  /**
2336
2471
  * Set meeting info and trigger `MEETING_INFO_AVAILABLE` event
2337
2472
  * @param {any} info
@@ -3391,6 +3526,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3391
3526
  state: state
3392
3527
  });
3393
3528
  });
3529
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ANNOTATION_CHANGED, function (_ref27) {
3530
+ var state = _ref27.state;
3531
+ _triggerProxy.default.trigger(_this14, {
3532
+ file: 'meeting/index',
3533
+ function: 'setupLocusControlsListener'
3534
+ }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_ANNOTATION_UPDATED, {
3535
+ state: state
3536
+ });
3537
+ });
3538
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_REMOTE_DESKTOP_CONTROL_CHANGED, function (_ref28) {
3539
+ var state = _ref28.state;
3540
+ _triggerProxy.default.trigger(_this14, {
3541
+ file: 'meeting/index',
3542
+ function: 'setupLocusControlsListener'
3543
+ }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_REMOTE_DESKTOP_CONTROL_UPDATED, {
3544
+ state: state
3545
+ });
3546
+ });
3394
3547
  }
3395
3548
 
3396
3549
  /**
@@ -3430,7 +3583,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3430
3583
  var _this15 = this;
3431
3584
  // Will get triggered on local and remote share
3432
3585
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, /*#__PURE__*/function () {
3433
- var _ref27 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
3586
+ var _ref29 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
3434
3587
  var _payload$previous, _payload$previous2;
3435
3588
  var _payload$current, contentShare, whiteboardShare, previousContentShare, previousWhiteboardShare, newShareStatus, _this15$locusInfo, _this15$locusInfo$inf, _this15$webinar, oldShareStatus, sendStartedSharingRemote, _this15$mediaProperti;
3436
3589
  return _regenerator.default.wrap(function _callee8$(_context8) {
@@ -3516,6 +3669,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3516
3669
  case 26:
3517
3670
  sendStartedSharingRemote = function sendStartedSharingRemote() {
3518
3671
  _this15.remoteShareInstanceId = contentShare.shareInstanceId;
3672
+ _this15.shareCAEventSentStatus.receiveStart = false;
3673
+ _this15.shareCAEventSentStatus.receiveStop = false;
3519
3674
  _triggerProxy.default.trigger(_this15, {
3520
3675
  file: 'meetings/index',
3521
3676
  function: 'remoteShare'
@@ -3589,6 +3744,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3589
3744
  // if we got here, then some remote participant has stolen
3590
3745
  // the presentation from another remote participant
3591
3746
  _this15.remoteShareInstanceId = contentShare.shareInstanceId;
3747
+ _this15.shareCAEventSentStatus.receiveStart = false;
3748
+ _this15.shareCAEventSentStatus.receiveStop = false;
3592
3749
  _triggerProxy.default.trigger(_this15, {
3593
3750
  file: 'meetings/index',
3594
3751
  function: 'remoteShare'
@@ -3629,7 +3786,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3629
3786
  }, _callee8, null, [[27,, 31, 34]]);
3630
3787
  }));
3631
3788
  return function (_x8) {
3632
- return _ref27.apply(this, arguments);
3789
+ return _ref29.apply(this, arguments);
3633
3790
  };
3634
3791
  }());
3635
3792
  }
@@ -3743,8 +3900,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3743
3900
  });
3744
3901
  }
3745
3902
  });
3746
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (_ref28) {
3747
- var isInitializing = _ref28.isInitializing;
3903
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (_ref30) {
3904
+ var isInitializing = _ref30.isInitializing;
3748
3905
  _this19.updateMeetingActions();
3749
3906
  _this19.recordingController.setDisplayHints(_this19.userDisplayHints);
3750
3907
  _this19.recordingController.setUserPolicy(_this19.selfUserPolicies);
@@ -3882,7 +4039,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3882
4039
  _this21.updateLLMConnection();
3883
4040
  });
3884
4041
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, /*#__PURE__*/function () {
3885
- var _ref29 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(payload) {
4042
+ var _ref31 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(payload) {
3886
4043
  var _this21$rtcMetrics;
3887
4044
  return _regenerator.default.wrap(function _callee9$(_context9) {
3888
4045
  while (1) switch (_context9.prev = _context9.next) {
@@ -3916,7 +4073,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3916
4073
  }, _callee9);
3917
4074
  }));
3918
4075
  return function (_x9) {
3919
- return _ref29.apply(this, arguments);
4076
+ return _ref31.apply(this, arguments);
3920
4077
  };
3921
4078
  }());
3922
4079
 
@@ -4035,7 +4192,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4035
4192
  }
4036
4193
  });
4037
4194
  this.locusInfo.on(_constants.EVENTS.DESTROY_MEETING, /*#__PURE__*/function () {
4038
- var _ref30 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(payload) {
4195
+ var _ref32 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(payload) {
4039
4196
  return _regenerator.default.wrap(function _callee10$(_context10) {
4040
4197
  while (1) switch (_context10.prev = _context10.next) {
4041
4198
  case 0:
@@ -4095,7 +4252,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4095
4252
  }, _callee10, null, [[8, 14]]);
4096
4253
  }));
4097
4254
  return function (_x10) {
4098
- return _ref30.apply(this, arguments);
4255
+ return _ref32.apply(this, arguments);
4099
4256
  };
4100
4257
  }());
4101
4258
  }
@@ -4197,6 +4354,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4197
4354
  key: "beRightBack",
4198
4355
  value: (function () {
4199
4356
  var _beRightBack = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(enabled) {
4357
+ var _this24 = this;
4200
4358
  var errorMessage, error, _errorMessage, _error;
4201
4359
  return _regenerator.default.wrap(function _callee11$(_context11) {
4202
4360
  while (1) switch (_context11.prev = _context11.next) {
@@ -4219,7 +4377,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4219
4377
  _loggerProxy.default.logger.error(_error);
4220
4378
  return _context11.abrupt("return", _promise.default.reject(_error));
4221
4379
  case 10:
4222
- return _context11.abrupt("return", this.brbState.enable(enabled, this.sendSlotManager));
4380
+ return _context11.abrupt("return", this.brbState.enable(enabled, this.sendSlotManager).then(function () {
4381
+ if (_this24.audio && enabled) {
4382
+ // locus mutes the participant with brb enabled request,
4383
+ // so we need to explicitly update remote mute for correct logic flow
4384
+ _this24.audio.handleServerRemoteMuteUpdate(_this24, enabled);
4385
+ }
4386
+ }));
4223
4387
  case 11:
4224
4388
  case "end":
4225
4389
  return _context11.stop();
@@ -4405,7 +4569,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4405
4569
  canAdmitParticipant: _util2.default.canAdmitParticipant(this.userDisplayHints),
4406
4570
  canLock: _util2.default.canUserLock(this.userDisplayHints),
4407
4571
  canUnlock: _util2.default.canUserUnlock(this.userDisplayHints),
4408
- canShareWhiteBoard: _util2.default.canShareWhiteBoard(this.userDisplayHints),
4572
+ canShareWhiteBoard: _util2.default.canShareWhiteBoard(this.userDisplayHints, this.selfUserPolicies),
4409
4573
  canSetDisallowUnmute: _util5.default.canSetDisallowUnmute(this.userDisplayHints),
4410
4574
  canUnsetDisallowUnmute: _util5.default.canUnsetDisallowUnmute(this.userDisplayHints),
4411
4575
  canSetMuteOnEntry: _util5.default.canSetMuteOnEntry(this.userDisplayHints),
@@ -4435,6 +4599,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4435
4599
  canSelectSpokenLanguages: _util2.default.canSelectSpokenLanguages(this.userDisplayHints),
4436
4600
  waitingForOthersToJoin: _util2.default.waitingForOthersToJoin(this.userDisplayHints),
4437
4601
  canSendReactions: _util2.default.canSendReactions(this.inMeetingActions.canSendReactions, this.userDisplayHints),
4602
+ requiresPostMeetingDataConsentPrompt: _util2.default.requiresPostMeetingDataConsentPrompt(this.userDisplayHints),
4438
4603
  canManageBreakout: _util2.default.canManageBreakout(this.userDisplayHints),
4439
4604
  canStartBreakout: _util2.default.canStartBreakout(this.userDisplayHints),
4440
4605
  canBroadcastMessageToBreakout: _util2.default.canBroadcastMessageToBreakout(this.userDisplayHints, this.selfUserPolicies),
@@ -4443,6 +4608,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4443
4608
  canUserAskForHelp: _util2.default.canUserAskForHelp(this.userDisplayHints),
4444
4609
  canUserRenameSelfAndObserved: _util2.default.canUserRenameSelfAndObserved(this.userDisplayHints),
4445
4610
  canUserRenameOthers: _util2.default.canUserRenameOthers(this.userDisplayHints),
4611
+ canMoveToLobby: _util2.default.canMoveToLobby(this.userDisplayHints),
4446
4612
  canMuteAll: _util5.default.hasHints({
4447
4613
  requiredHints: [_constants.DISPLAY_HINTS.MUTE_ALL],
4448
4614
  displayHints: this.userDisplayHints
@@ -4574,6 +4740,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4574
4740
  requiredPolicies: [_constants.SELF_POLICY.SUPPORT_FILE_TRANSFER],
4575
4741
  policies: this.selfUserPolicies
4576
4742
  }),
4743
+ canRealtimeCloseCaption: _util5.default.hasPolicies({
4744
+ requiredPolicies: [_constants.SELF_POLICY.SUPPORT_REALTIME_CLOSE_CAPTION],
4745
+ policies: this.selfUserPolicies
4746
+ }),
4747
+ canRealtimeCloseCaptionManual: _util5.default.hasPolicies({
4748
+ requiredPolicies: [_constants.SELF_POLICY.SUPPORT_REALTIME_CLOSE_CAPTION_MANUAL],
4749
+ policies: this.selfUserPolicies
4750
+ }),
4577
4751
  canChat: _util5.default.hasPolicies({
4578
4752
  requiredPolicies: [_constants.SELF_POLICY.SUPPORT_CHAT],
4579
4753
  policies: this.selfUserPolicies
@@ -4610,6 +4784,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4610
4784
  canAnnotate: _util5.default.hasPolicies({
4611
4785
  requiredPolicies: [_constants.SELF_POLICY.SUPPORT_ANNOTATION],
4612
4786
  policies: this.selfUserPolicies
4787
+ }),
4788
+ canEnableAnnotation: _util5.default.hasHints({
4789
+ requiredHints: [_constants.DISPLAY_HINTS.ENABLE_ANNOTATION_MEETING_OPTION],
4790
+ displayHints: this.userDisplayHints
4791
+ }),
4792
+ canDisableAnnotation: _util5.default.hasHints({
4793
+ requiredHints: [_constants.DISPLAY_HINTS.DISABLE_ANNOTATION_MEETING_OPTION],
4794
+ displayHints: this.userDisplayHints
4795
+ }),
4796
+ canEnableRemoteDesktopControl: _util5.default.hasHints({
4797
+ requiredHints: [_constants.DISPLAY_HINTS.ENABLE_RDC_MEETING_OPTION],
4798
+ displayHints: this.userDisplayHints
4799
+ }),
4800
+ canDisableRemoteDesktopControl: _util5.default.hasHints({
4801
+ requiredHints: [_constants.DISPLAY_HINTS.DISABLE_RDC_MEETING_OPTION],
4802
+ displayHints: this.userDisplayHints
4613
4803
  })
4614
4804
  }) || changed;
4615
4805
  }
@@ -4714,7 +4904,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4714
4904
  }, {
4715
4905
  key: "setLogUploadTimer",
4716
4906
  value: function setLogUploadTimer() {
4717
- var _this24 = this;
4907
+ var _this25 = this;
4718
4908
  // start with short timeouts and increase them later on so in case users have very long multi-hour meetings we don't get too fragmented logs
4719
4909
  var LOG_UPLOAD_INTERVALS = [0.1, 15, 30, 60]; // in minutes
4720
4910
 
@@ -4725,15 +4915,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4725
4915
  this.logUploadIntervalIndex += 1;
4726
4916
  }
4727
4917
  this.uploadLogsTimer = (0, _commonTimers.safeSetTimeout)(function () {
4728
- _this24.uploadLogsTimer = undefined;
4729
- _this24.uploadLogs();
4918
+ _this25.uploadLogsTimer = undefined;
4919
+ _this25.uploadLogs();
4730
4920
 
4731
4921
  // just as an extra precaution, to avoid uploading logs forever in case something goes wrong
4732
4922
  // and the page remains opened, we stop it if there is no media connection
4733
- if (!_this24.mediaProperties.webrtcMediaConnection) {
4923
+ if (!_this25.mediaProperties.webrtcMediaConnection) {
4734
4924
  return;
4735
4925
  }
4736
- _this24.setLogUploadTimer();
4926
+ _this25.setLogUploadTimer();
4737
4927
  }, delay);
4738
4928
  }
4739
4929
 
@@ -4800,7 +4990,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4800
4990
  }, {
4801
4991
  key: "closeRemoteStreams",
4802
4992
  value: function closeRemoteStreams() {
4803
- var _this25 = this;
4993
+ var _this26 = this;
4804
4994
  var _this$mediaProperties6 = this.mediaProperties,
4805
4995
  remoteAudioStream = _this$mediaProperties6.remoteAudioStream,
4806
4996
  remoteVideoStream = _this$mediaProperties6.remoteVideoStream,
@@ -4814,7 +5004,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4814
5004
  */
4815
5005
  // eslint-disable-next-line @typescript-eslint/no-shadow
4816
5006
  var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
4817
- _triggerProxy.default.trigger(_this25, {
5007
+ _triggerProxy.default.trigger(_this26, {
4818
5008
  file: 'meeting/index',
4819
5009
  function: 'closeRemoteStreams'
4820
5010
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -5122,7 +5312,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5122
5312
  }, {
5123
5313
  key: "setMercuryListener",
5124
5314
  value: function setMercuryListener() {
5125
- var _this26 = this;
5315
+ var _this27 = this;
5126
5316
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
5127
5317
  // if the meeting has active peer connections, it should try to reconnect.
5128
5318
  // @ts-ignore
@@ -5130,33 +5320,33 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5130
5320
  _loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online');
5131
5321
 
5132
5322
  // Only send restore event when it was disconnected before and for connected later
5133
- if (!_this26.hasWebsocketConnected) {
5323
+ if (!_this27.hasWebsocketConnected) {
5134
5324
  // @ts-ignore
5135
- _this26.webex.internal.newMetrics.submitClientEvent({
5325
+ _this27.webex.internal.newMetrics.submitClientEvent({
5136
5326
  name: 'client.mercury.connection.restored',
5137
5327
  options: {
5138
- meetingId: _this26.id
5328
+ meetingId: _this27.id
5139
5329
  }
5140
5330
  });
5141
5331
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
5142
- correlation_id: _this26.correlationId
5332
+ correlation_id: _this27.correlationId
5143
5333
  });
5144
5334
  }
5145
- _this26.hasWebsocketConnected = true;
5335
+ _this27.hasWebsocketConnected = true;
5146
5336
  });
5147
5337
 
5148
5338
  // @ts-ignore
5149
5339
  this.webex.internal.mercury.on(_constants.OFFLINE, function () {
5150
5340
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
5151
5341
  // @ts-ignore
5152
- _this26.webex.internal.newMetrics.submitClientEvent({
5342
+ _this27.webex.internal.newMetrics.submitClientEvent({
5153
5343
  name: 'client.mercury.connection.lost',
5154
5344
  options: {
5155
- meetingId: _this26.id
5345
+ meetingId: _this27.id
5156
5346
  }
5157
5347
  });
5158
5348
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
5159
- correlation_id: _this26.correlationId
5349
+ correlation_id: _this27.correlationId
5160
5350
  });
5161
5351
  });
5162
5352
  }
@@ -5263,7 +5453,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5263
5453
  }, {
5264
5454
  key: "muteAudio",
5265
5455
  value: function muteAudio() {
5266
- var _this27 = this;
5456
+ var _this28 = this;
5267
5457
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5268
5458
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5269
5459
  }
@@ -5279,22 +5469,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5279
5469
 
5280
5470
  // First, stop sending the local audio media
5281
5471
  return logRequest(this.audio.handleClientRequest(this, true).then(function () {
5282
- _util2.default.handleAudioLogging(_this27.mediaProperties.audioStream);
5472
+ _util2.default.handleAudioLogging(_this28.mediaProperties.audioStream);
5283
5473
  // @ts-ignore
5284
- _this27.webex.internal.newMetrics.submitClientEvent({
5474
+ _this28.webex.internal.newMetrics.submitClientEvent({
5285
5475
  name: 'client.muted',
5286
5476
  payload: {
5287
5477
  trigger: 'user-interaction',
5288
5478
  mediaType: 'audio'
5289
5479
  },
5290
5480
  options: {
5291
- meetingId: _this27.id
5481
+ meetingId: _this28.id
5292
5482
  }
5293
5483
  });
5294
5484
  }).catch(function (error) {
5295
5485
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
5296
- correlation_id: _this27.correlationId,
5297
- locus_id: _this27.locusUrl.split('/').pop(),
5486
+ correlation_id: _this28.correlationId,
5487
+ locus_id: _this28.locusUrl.split('/').pop(),
5298
5488
  reason: error.message,
5299
5489
  stack: error.stack
5300
5490
  });
@@ -5313,7 +5503,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5313
5503
  }, {
5314
5504
  key: "unmuteAudio",
5315
5505
  value: function unmuteAudio() {
5316
- var _this28 = this;
5506
+ var _this29 = this;
5317
5507
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5318
5508
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5319
5509
  }
@@ -5329,22 +5519,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5329
5519
 
5330
5520
  // First, send the control to unmute the participant on the server
5331
5521
  return logRequest(this.audio.handleClientRequest(this, false).then(function () {
5332
- _util2.default.handleAudioLogging(_this28.mediaProperties.audioStream);
5522
+ _util2.default.handleAudioLogging(_this29.mediaProperties.audioStream);
5333
5523
  // @ts-ignore
5334
- _this28.webex.internal.newMetrics.submitClientEvent({
5524
+ _this29.webex.internal.newMetrics.submitClientEvent({
5335
5525
  name: 'client.unmuted',
5336
5526
  payload: {
5337
5527
  trigger: 'user-interaction',
5338
5528
  mediaType: 'audio'
5339
5529
  },
5340
5530
  options: {
5341
- meetingId: _this28.id
5531
+ meetingId: _this29.id
5342
5532
  }
5343
5533
  });
5344
5534
  }).catch(function (error) {
5345
5535
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_AUDIO_FAILURE, {
5346
- correlation_id: _this28.correlationId,
5347
- locus_id: _this28.locusUrl.split('/').pop(),
5536
+ correlation_id: _this29.correlationId,
5537
+ locus_id: _this29.locusUrl.split('/').pop(),
5348
5538
  reason: error.message,
5349
5539
  stack: error.stack
5350
5540
  });
@@ -5363,7 +5553,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5363
5553
  }, {
5364
5554
  key: "muteVideo",
5365
5555
  value: function muteVideo() {
5366
- var _this29 = this;
5556
+ var _this30 = this;
5367
5557
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5368
5558
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5369
5559
  }
@@ -5377,22 +5567,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5377
5567
  return _promise.default.reject(new _parameter.default('no video control associated to the meeting'));
5378
5568
  }
5379
5569
  return logRequest(this.video.handleClientRequest(this, true).then(function () {
5380
- _util2.default.handleVideoLogging(_this29.mediaProperties.videoStream);
5570
+ _util2.default.handleVideoLogging(_this30.mediaProperties.videoStream);
5381
5571
  // @ts-ignore
5382
- _this29.webex.internal.newMetrics.submitClientEvent({
5572
+ _this30.webex.internal.newMetrics.submitClientEvent({
5383
5573
  name: 'client.muted',
5384
5574
  payload: {
5385
5575
  trigger: 'user-interaction',
5386
5576
  mediaType: 'video'
5387
5577
  },
5388
5578
  options: {
5389
- meetingId: _this29.id
5579
+ meetingId: _this30.id
5390
5580
  }
5391
5581
  });
5392
5582
  }).catch(function (error) {
5393
5583
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_VIDEO_FAILURE, {
5394
- correlation_id: _this29.correlationId,
5395
- locus_id: _this29.locusUrl.split('/').pop(),
5584
+ correlation_id: _this30.correlationId,
5585
+ locus_id: _this30.locusUrl.split('/').pop(),
5396
5586
  reason: error.message,
5397
5587
  stack: error.stack
5398
5588
  });
@@ -5411,7 +5601,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5411
5601
  }, {
5412
5602
  key: "unmuteVideo",
5413
5603
  value: function unmuteVideo() {
5414
- var _this30 = this;
5604
+ var _this31 = this;
5415
5605
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5416
5606
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5417
5607
  }
@@ -5425,22 +5615,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5425
5615
  return _promise.default.reject(new _parameter.default('no audio control associated to the meeting'));
5426
5616
  }
5427
5617
  return logRequest(this.video.handleClientRequest(this, false).then(function () {
5428
- _util2.default.handleVideoLogging(_this30.mediaProperties.videoStream);
5618
+ _util2.default.handleVideoLogging(_this31.mediaProperties.videoStream);
5429
5619
  // @ts-ignore
5430
- _this30.webex.internal.newMetrics.submitClientEvent({
5620
+ _this31.webex.internal.newMetrics.submitClientEvent({
5431
5621
  name: 'client.unmuted',
5432
5622
  payload: {
5433
5623
  trigger: 'user-interaction',
5434
5624
  mediaType: 'video'
5435
5625
  },
5436
5626
  options: {
5437
- meetingId: _this30.id
5627
+ meetingId: _this31.id
5438
5628
  }
5439
5629
  });
5440
5630
  }).catch(function (error) {
5441
5631
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_VIDEO_FAILURE, {
5442
- correlation_id: _this30.correlationId,
5443
- locus_id: _this30.locusUrl.split('/').pop(),
5632
+ correlation_id: _this31.correlationId,
5633
+ locus_id: _this31.locusUrl.split('/').pop(),
5444
5634
  reason: error.message,
5445
5635
  stack: error.stack
5446
5636
  });
@@ -5470,7 +5660,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5470
5660
  key: "joinWithMedia",
5471
5661
  value: (function () {
5472
5662
  var _joinWithMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5473
- var _this31 = this;
5663
+ var _this32 = this;
5474
5664
  var options,
5475
5665
  mediaOptions,
5476
5666
  _options$joinOptions,
@@ -5553,7 +5743,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5553
5743
  case 35:
5554
5744
  _context16.next = 37;
5555
5745
  return this.addMediaInternal(function () {
5556
- return _this31.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
5746
+ return _this32.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
5557
5747
  }, turnServerInfo, forceTurnDiscovery, mediaOptions);
5558
5748
  case 37:
5559
5749
  mediaResponse = _context16.sent;
@@ -5648,7 +5838,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5648
5838
  }, {
5649
5839
  key: "reconnect",
5650
5840
  value: function reconnect(options) {
5651
- var _this32 = this;
5841
+ var _this33 = this;
5652
5842
  _loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
5653
5843
  if (!this.reconnectionManager || !this.reconnectionManager.reconnect) {
5654
5844
  return _promise.default.reject(new _parameter.default('Cannot reconnect, ReconnectionManager must first be defined.'));
@@ -5664,10 +5854,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5664
5854
  while (1) switch (_context17.prev = _context17.next) {
5665
5855
  case 0:
5666
5856
  _context17.next = 2;
5667
- return _this32.waitForRemoteSDPAnswer();
5857
+ return _this33.waitForRemoteSDPAnswer();
5668
5858
  case 2:
5669
5859
  _context17.next = 4;
5670
- return _this32.waitForMediaConnectionConnected();
5860
+ return _this33.waitForMediaConnectionConnected();
5671
5861
  case 4:
5672
5862
  case "end":
5673
5863
  return _context17.stop();
@@ -5681,7 +5871,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5681
5871
  return _promise.default.resolve();
5682
5872
  }
5683
5873
  _loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
5684
- _this32.uploadLogs({
5874
+ _this33.uploadLogs({
5685
5875
  file: 'meeting/index',
5686
5876
  function: 'reconnect'
5687
5877
  });
@@ -5728,19 +5918,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5728
5918
  }, {
5729
5919
  key: "setCaptionLanguage",
5730
5920
  value: function setCaptionLanguage(language) {
5731
- var _this33 = this;
5921
+ var _this34 = this;
5732
5922
  return new _promise.default(function (resolve, reject) {
5733
- if (!_this33.isTranscriptionSupported()) {
5923
+ if (!_this34.isTranscriptionSupported()) {
5734
5924
  _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
5735
5925
  reject(new Error('Webex Assistant is not enabled/supported'));
5736
5926
  }
5737
5927
  try {
5738
5928
  var voiceaListenerCaptionUpdate = function voiceaListenerCaptionUpdate(payload) {
5739
5929
  // @ts-ignore
5740
- _this33.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5930
+ _this34.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5741
5931
  var statusCode = payload.statusCode;
5742
5932
  if (statusCode === 200) {
5743
- _this33.transcription.languageOptions = _objectSpread(_objectSpread({}, _this33.transcription.languageOptions), {}, {
5933
+ _this34.transcription.languageOptions = _objectSpread(_objectSpread({}, _this34.transcription.languageOptions), {}, {
5744
5934
  currentCaptionLanguage: language
5745
5935
  });
5746
5936
  resolve(language);
@@ -5749,9 +5939,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5749
5939
  }
5750
5940
  };
5751
5941
  // @ts-ignore
5752
- _this33.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5942
+ _this34.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5753
5943
  // @ts-ignore
5754
- _this33.webex.internal.voicea.requestLanguage(language);
5944
+ _this34.webex.internal.voicea.requestLanguage(language);
5755
5945
  } catch (error) {
5756
5946
  _loggerProxy.default.logger.error("Meeting:index#setCaptionLanguage --> ".concat(error));
5757
5947
  reject(error);
@@ -5767,23 +5957,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5767
5957
  }, {
5768
5958
  key: "setSpokenLanguage",
5769
5959
  value: function setSpokenLanguage(language) {
5770
- var _this34 = this;
5960
+ var _this35 = this;
5771
5961
  return new _promise.default(function (resolve, reject) {
5772
- if (!_this34.isTranscriptionSupported()) {
5962
+ if (!_this35.isTranscriptionSupported()) {
5773
5963
  _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
5774
5964
  reject(new Error('Webex Assistant is not enabled/supported'));
5775
5965
  }
5776
- if (_this34.getCurUserType() !== 'host') {
5966
+ if (_this35.getCurUserType() !== 'host') {
5777
5967
  _loggerProxy.default.logger.error('Meeting:index#setSpokenLanguage --> Only host can set spoken language');
5778
5968
  reject(new Error('Only host can set spoken language'));
5779
5969
  }
5780
5970
  try {
5781
5971
  var voiceaListenerLanguageUpdate = function voiceaListenerLanguageUpdate(payload) {
5782
5972
  // @ts-ignore
5783
- _this34.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5973
+ _this35.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5784
5974
  var languageCode = payload.languageCode;
5785
5975
  if (languageCode) {
5786
- _this34.transcription.languageOptions = _objectSpread(_objectSpread({}, _this34.transcription.languageOptions), {}, {
5976
+ _this35.transcription.languageOptions = _objectSpread(_objectSpread({}, _this35.transcription.languageOptions), {}, {
5787
5977
  currentSpokenLanguage: languageCode
5788
5978
  });
5789
5979
  resolve(languageCode);
@@ -5793,10 +5983,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5793
5983
  };
5794
5984
 
5795
5985
  // @ts-ignore
5796
- _this34.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5986
+ _this35.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5797
5987
 
5798
5988
  // @ts-ignore
5799
- _this34.webex.internal.voicea.setSpokenLanguage(language);
5989
+ _this35.webex.internal.voicea.setSpokenLanguage(language);
5800
5990
  } catch (error) {
5801
5991
  _loggerProxy.default.logger.error("Meeting:index#setSpokenLanguage --> ".concat(error));
5802
5992
  reject(error);
@@ -5919,7 +6109,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5919
6109
  */
5920
6110
  function () {
5921
6111
  var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
5922
- var _this35 = this;
6112
+ var _this36 = this;
5923
6113
  var options,
5924
6114
  errorMessage,
5925
6115
  error,
@@ -6068,62 +6258,61 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6068
6258
  return _context19.abrupt("return", _promise.default.reject(_context19.t0));
6069
6259
  case 51:
6070
6260
  return _context19.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
6071
- _this35.meetingFiniteStateMachine.join();
6072
- _this35.setupLocusMediaRequest();
6261
+ _this36.meetingFiniteStateMachine.join();
6262
+ _this36.setupLocusMediaRequest();
6073
6263
 
6074
6264
  // @ts-ignore
6075
- _this35.webex.internal.device.meetingStarted();
6076
- (0, _classPrivateFieldSet2.default)(_this35, _isoLocalClientMeetingJoinTime, new Date().toISOString());
6265
+ _this36.webex.internal.device.meetingStarted();
6077
6266
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
6078
6267
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
6079
- correlation_id: _this35.correlationId
6268
+ correlation_id: _this36.correlationId
6080
6269
  });
6081
6270
  joinSuccess(join);
6082
- _this35.deferJoin = undefined;
6271
+ _this36.deferJoin = undefined;
6083
6272
  return join;
6084
6273
  }).catch(function (error) {
6085
- var _this35$meetingInfo, _error$error;
6086
- _this35.meetingFiniteStateMachine.fail(error);
6274
+ var _this36$meetingInfo, _error$error;
6275
+ _this36.meetingFiniteStateMachine.fail(error);
6087
6276
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
6088
6277
 
6089
6278
  // @ts-ignore
6090
- _this35.webex.internal.newMetrics.submitClientEvent({
6279
+ _this36.webex.internal.newMetrics.submitClientEvent({
6091
6280
  name: 'client.locus.join.response',
6092
6281
  payload: {
6093
6282
  identifiers: {
6094
- meetingLookupUrl: (_this35$meetingInfo = _this35.meetingInfo) === null || _this35$meetingInfo === void 0 ? void 0 : _this35$meetingInfo.meetingLookupUrl
6283
+ meetingLookupUrl: (_this36$meetingInfo = _this36.meetingInfo) === null || _this36$meetingInfo === void 0 ? void 0 : _this36$meetingInfo.meetingLookupUrl
6095
6284
  }
6096
6285
  },
6097
6286
  options: {
6098
- meetingId: _this35.id,
6287
+ meetingId: _this36.id,
6099
6288
  rawError: error
6100
6289
  }
6101
6290
  });
6102
6291
 
6103
6292
  // TODO: change this to error codes and pre defined dictionary
6104
6293
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
6105
- correlation_id: _this35.correlationId,
6294
+ correlation_id: _this36.correlationId,
6106
6295
  reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
6107
6296
  stack: error.stack
6108
6297
  });
6109
6298
 
6110
6299
  // Upload logs on join Failure
6111
- _triggerProxy.default.trigger(_this35, {
6300
+ _triggerProxy.default.trigger(_this36, {
6112
6301
  file: 'meeting/index',
6113
6302
  function: 'join'
6114
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this35);
6303
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this36);
6115
6304
  joinFailed(error);
6116
- _this35.deferJoin = undefined;
6305
+ _this36.deferJoin = undefined;
6117
6306
  return _promise.default.reject(error);
6118
6307
  }).then(function (join) {
6119
6308
  // @ts-ignore - config coming from registerPlugin
6120
- if (_this35.config.enableAutomaticLLM) {
6309
+ if (_this36.config.enableAutomaticLLM) {
6121
6310
  // @ts-ignore
6122
- _this35.webex.internal.llm.on('online', _this35.handleLLMOnline);
6123
- _this35.updateLLMConnection().catch(function (error) {
6311
+ _this36.webex.internal.llm.on('online', _this36.handleLLMOnline);
6312
+ _this36.updateLLMConnection().catch(function (error) {
6124
6313
  _loggerProxy.default.logger.error('Meeting:index#join --> Transcription Socket Connection Failed', error);
6125
6314
  _metrics.default.sendBehavioralMetric(_constants2.default.LLM_CONNECTION_AFTER_JOIN_FAILURE, {
6126
- correlation_id: _this35.correlationId,
6315
+ correlation_id: _this36.correlationId,
6127
6316
  reason: error === null || error === void 0 ? void 0 : error.message,
6128
6317
  stack: error.stack
6129
6318
  });
@@ -6155,7 +6344,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6155
6344
  key: "updateLLMConnection",
6156
6345
  value: (function () {
6157
6346
  var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
6158
- var _this36 = this;
6347
+ var _this37 = this;
6159
6348
  var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, practiceSessionDatachannelUrl, isJoined, dataChannelUrl;
6160
6349
  return _regenerator.default.wrap(function _callee20$(_context20) {
6161
6350
  while (1) switch (_context20.prev = _context20.next) {
@@ -6195,9 +6384,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6195
6384
  case 11:
6196
6385
  return _context20.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl).then(function (registerAndConnectResult) {
6197
6386
  // @ts-ignore - Fix type
6198
- _this36.webex.internal.llm.off('event:relay.event', _this36.processRelayEvent);
6387
+ _this37.webex.internal.llm.off('event:relay.event', _this37.processRelayEvent);
6199
6388
  // @ts-ignore - Fix type
6200
- _this36.webex.internal.llm.on('event:relay.event', _this36.processRelayEvent);
6389
+ _this37.webex.internal.llm.on('event:relay.event', _this37.processRelayEvent);
6201
6390
  _loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
6202
6391
  return _promise.default.resolve(registerAndConnectResult);
6203
6392
  }));
@@ -6251,7 +6440,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6251
6440
  }, {
6252
6441
  key: "dialInPstn",
6253
6442
  value: function dialInPstn() {
6254
- var _this37 = this;
6443
+ var _this38 = this;
6255
6444
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
6256
6445
 
6257
6446
  var correlationId = this.correlationId,
@@ -6267,10 +6456,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6267
6456
  }).catch(function (error) {
6268
6457
  var _error$error2;
6269
6458
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
6270
- correlation_id: _this37.correlationId,
6271
- dial_in_url: _this37.dialInUrl,
6459
+ correlation_id: _this38.correlationId,
6460
+ dial_in_url: _this38.dialInUrl,
6272
6461
  locus_id: locusUrl.split('/').pop(),
6273
- client_url: _this37.deviceUrl,
6462
+ client_url: _this38.deviceUrl,
6274
6463
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
6275
6464
  stack: error.stack
6276
6465
  });
@@ -6288,7 +6477,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6288
6477
  }, {
6289
6478
  key: "dialOutPstn",
6290
6479
  value: function dialOutPstn(phoneNumber) {
6291
- var _this38 = this;
6480
+ var _this39 = this;
6292
6481
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
6293
6482
 
6294
6483
  var correlationId = this.correlationId,
@@ -6305,10 +6494,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6305
6494
  }).catch(function (error) {
6306
6495
  var _error$error3;
6307
6496
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
6308
- correlation_id: _this38.correlationId,
6309
- dial_out_url: _this38.dialOutUrl,
6497
+ correlation_id: _this39.correlationId,
6498
+ dial_out_url: _this39.dialOutUrl,
6310
6499
  locus_id: locusUrl.split('/').pop(),
6311
- client_url: _this38.deviceUrl,
6500
+ client_url: _this39.deviceUrl,
6312
6501
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
6313
6502
  stack: error.stack
6314
6503
  });
@@ -6339,7 +6528,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6339
6528
  }, {
6340
6529
  key: "moveTo",
6341
6530
  value: function moveTo(resourceId) {
6342
- var _this39 = this;
6531
+ var _this40 = this;
6343
6532
  if (!resourceId) {
6344
6533
  throw new _parameter.default('Cannot move call without a resourceId.');
6345
6534
  }
@@ -6383,12 +6572,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6383
6572
  while (1) switch (_context21.prev = _context21.next) {
6384
6573
  case 0:
6385
6574
  _context21.prev = 0;
6386
- if (!(_this39.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6575
+ if (!(_this40.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6387
6576
  _context21.next = 4;
6388
6577
  break;
6389
6578
  }
6390
6579
  _context21.next = 4;
6391
- return _this39.releaseScreenShareFloor();
6580
+ return _this40.releaseScreenShareFloor();
6392
6581
  case 4:
6393
6582
  mediaSettings = {
6394
6583
  mediaDirection: {
@@ -6400,37 +6589,37 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6400
6589
  receiveShare: true
6401
6590
  }
6402
6591
  };
6403
- _this39.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6404
- _this39.mediaProperties.unsetRemoteMedia();
6592
+ _this40.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6593
+ _this40.mediaProperties.unsetRemoteMedia();
6405
6594
 
6406
6595
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the device answers the meeting
6407
6596
  // once the device answers we close the old connection and create new media server connection with only share enabled
6408
- if (!_this39.statsAnalyzer) {
6597
+ if (!_this40.statsAnalyzer) {
6409
6598
  _context21.next = 10;
6410
6599
  break;
6411
6600
  }
6412
6601
  _context21.next = 10;
6413
- return _this39.statsAnalyzer.stopAnalyzer();
6602
+ return _this40.statsAnalyzer.stopAnalyzer();
6414
6603
  case 10:
6415
6604
  _context21.next = 12;
6416
- return _this39.closeRemoteStreams();
6605
+ return _this40.closeRemoteStreams();
6417
6606
  case 12:
6418
6607
  _context21.next = 14;
6419
- return _this39.closePeerConnections();
6608
+ return _this40.closePeerConnections();
6420
6609
  case 14:
6421
- _this39.cleanupLocalStreams();
6422
- _this39.unsetRemoteStreams();
6423
- _this39.unsetPeerConnections();
6424
- _this39.reconnectionManager.cleanUp();
6610
+ _this40.cleanupLocalStreams();
6611
+ _this40.unsetRemoteStreams();
6612
+ _this40.unsetPeerConnections();
6613
+ _this40.reconnectionManager.cleanUp();
6425
6614
  _context21.next = 20;
6426
- return _this39.addMedia({
6615
+ return _this40.addMedia({
6427
6616
  audioEnabled: false,
6428
6617
  videoEnabled: false,
6429
6618
  shareVideoEnabled: true
6430
6619
  });
6431
6620
  case 20:
6432
6621
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
6433
- _this39.isMoveToInProgress = false;
6622
+ _this40.isMoveToInProgress = false;
6434
6623
  _context21.next = 29;
6435
6624
  break;
6436
6625
  case 24:
@@ -6438,12 +6627,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6438
6627
  _context21.t0 = _context21["catch"](0);
6439
6628
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context21.t0);
6440
6629
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6441
- correlation_id: _this39.correlationId,
6442
- locus_id: _this39.locusUrl.split('/').pop(),
6630
+ correlation_id: _this40.correlationId,
6631
+ locus_id: _this40.locusUrl.split('/').pop(),
6443
6632
  reason: _context21.t0.message,
6444
6633
  stack: _context21.t0.stack
6445
6634
  });
6446
- _this39.isMoveToInProgress = false;
6635
+ _this40.isMoveToInProgress = false;
6447
6636
  case 29:
6448
6637
  case "end":
6449
6638
  return _context21.stop();
@@ -6459,17 +6648,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6459
6648
  resourceId: resourceId,
6460
6649
  moveToResource: true
6461
6650
  }).then(function () {
6462
- _this39.meetingFiniteStateMachine.join();
6651
+ _this40.meetingFiniteStateMachine.join();
6463
6652
  }).catch(function (error) {
6464
- _this39.meetingFiniteStateMachine.fail(error);
6653
+ _this40.meetingFiniteStateMachine.fail(error);
6465
6654
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6466
- correlation_id: _this39.correlationId,
6467
- locus_id: _this39.locusUrl.split('/').pop(),
6655
+ correlation_id: _this40.correlationId,
6656
+ locus_id: _this40.locusUrl.split('/').pop(),
6468
6657
  reason: error.message,
6469
6658
  stack: error.stack
6470
6659
  });
6471
6660
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', error);
6472
- _this39.isMoveToInProgress = false;
6661
+ _this40.isMoveToInProgress = false;
6473
6662
  return _promise.default.reject(error);
6474
6663
  });
6475
6664
  }
@@ -6484,7 +6673,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6484
6673
  }, {
6485
6674
  key: "moveFrom",
6486
6675
  value: function moveFrom(resourceId) {
6487
- var _this40 = this;
6676
+ var _this41 = this;
6488
6677
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
6489
6678
  if (!resourceId) {
6490
6679
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -6499,19 +6688,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6499
6688
  }
6500
6689
  });
6501
6690
  return _util2.default.joinMeetingOptions(this).then(function () {
6502
- return _util2.default.leaveMeeting(_this40, {
6691
+ return _util2.default.leaveMeeting(_this41, {
6503
6692
  resourceId: resourceId,
6504
6693
  correlationId: oldCorrelationId,
6505
6694
  moveMeeting: true
6506
6695
  }).then(function () {
6507
- _this40.resourceId = '';
6696
+ _this41.resourceId = '';
6508
6697
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
6509
6698
  });
6510
6699
  }).catch(function (error) {
6511
- _this40.meetingFiniteStateMachine.fail(error);
6700
+ _this41.meetingFiniteStateMachine.fail(error);
6512
6701
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
6513
- correlation_id: _this40.correlationId,
6514
- locus_id: _this40.locusUrl.split('/').pop(),
6702
+ correlation_id: _this41.correlationId,
6703
+ locus_id: _this41.locusUrl.split('/').pop(),
6515
6704
  reason: error.message,
6516
6705
  stack: error.stack
6517
6706
  });
@@ -6560,7 +6749,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6560
6749
  turnServerInfo: turnServerInfo,
6561
6750
  bundlePolicy: bundlePolicy,
6562
6751
  // @ts-ignore - config coming from registerPlugin
6563
- iceCandidatesTimeout: this.config.iceCandidatesGatheringTimeout
6752
+ iceCandidatesTimeout: this.config.iceCandidatesGatheringTimeout,
6753
+ // @ts-ignore - config coming from registerPlugin
6754
+ disableAudioMainDtx: this.config.experimental.disableAudioMainDtx
6564
6755
  });
6565
6756
  this.mediaProperties.setMediaPeerConnection(mc);
6566
6757
  this.setupMediaConnectionListeners();
@@ -6627,9 +6818,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6627
6818
  }, {
6628
6819
  key: "forwardEvent",
6629
6820
  value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
6630
- var _this41 = this;
6821
+ var _this42 = this;
6631
6822
  eventEmitter.on(eventTypeToForward, function (data) {
6632
- return _triggerProxy.default.trigger(_this41, {
6823
+ return _triggerProxy.default.trigger(_this42, {
6633
6824
  file: 'meetings',
6634
6825
  function: 'addMedia'
6635
6826
  }, meetingEventType, data);
@@ -6699,7 +6890,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6699
6890
  key: "waitForMediaConnectionConnected",
6700
6891
  value: (function () {
6701
6892
  var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
6702
- var iceConnected, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, _this$mediaProperties14;
6893
+ var iceConnected, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, _this$mediaProperties14, timedOutError;
6703
6894
  return _regenerator.default.wrap(function _callee24$(_context24) {
6704
6895
  while (1) switch (_context24.prev = _context24.next) {
6705
6896
  case 0:
@@ -6707,7 +6898,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6707
6898
  _context24.next = 3;
6708
6899
  return this.mediaProperties.waitForMediaConnectionConnected();
6709
6900
  case 3:
6710
- _context24.next = 30;
6901
+ _context24.next = 32;
6711
6902
  break;
6712
6903
  case 5:
6713
6904
  _context24.prev = 5;
@@ -6749,7 +6940,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6749
6940
  errors: _context24.t14
6750
6941
  };
6751
6942
  _context24.t16 = {
6752
- meetingId: this.id
6943
+ meetingId: this.id,
6944
+ rawError: _context24.t0
6753
6945
  };
6754
6946
  _context24.t17 = {
6755
6947
  name: 'client.ice.end',
@@ -6758,8 +6950,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6758
6950
  };
6759
6951
  _context24.t1.submitClientEvent.call(_context24.t1, _context24.t17);
6760
6952
  case 29:
6761
- throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
6762
- case 30:
6953
+ timedOutError = new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
6954
+ timedOutError.cause = _context24.t0;
6955
+ throw timedOutError;
6956
+ case 32:
6763
6957
  case "end":
6764
6958
  return _context24.stop();
6765
6959
  }
@@ -6790,6 +6984,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6790
6984
  networkQualityMonitor: this.networkQualityMonitor,
6791
6985
  isMultistream: this.isMultistream
6792
6986
  });
6987
+ this.shareCAEventSentStatus = {
6988
+ transmitStart: false,
6989
+ transmitStop: false,
6990
+ receiveStart: false,
6991
+ receiveStop: false
6992
+ };
6793
6993
  this.setupStatsAnalyzerEventHandlers();
6794
6994
  this.networkQualityMonitor.on(_internalMediaCore.NetworkQualityEventNames.NETWORK_QUALITY, this.sendNetworkQualityEvent.bind(this));
6795
6995
  }
@@ -6806,7 +7006,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6806
7006
  key: "waitForRemoteSDPAnswer",
6807
7007
  value: (function () {
6808
7008
  var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
6809
- var _this42 = this;
7009
+ var _this43 = this;
6810
7010
  var LOG_HEADER, deferSDPAnswer;
6811
7011
  return _regenerator.default.wrap(function _callee25$(_context25) {
6812
7012
  while (1) switch (_context25.prev = _context25.next) {
@@ -6822,23 +7022,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6822
7022
  deferSDPAnswer = this.deferSDPAnswer;
6823
7023
  this.sdpResponseTimer = setTimeout(function () {
6824
7024
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " timeout! no REMOTE SDP ANSWER received within ").concat(_constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT / 1000, " seconds"));
7025
+ var error = new Error('Timed out waiting for REMOTE SDP ANSWER');
7026
+
6825
7027
  // @ts-ignore
6826
- _this42.webex.internal.newMetrics.submitClientEvent({
7028
+ _this43.webex.internal.newMetrics.submitClientEvent({
6827
7029
  name: 'client.media-engine.remote-sdp-received',
6828
7030
  payload: {
6829
7031
  canProceed: false,
6830
7032
  errors: [
6831
7033
  // @ts-ignore
6832
- _this42.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
7034
+ _this43.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
6833
7035
  clientErrorCode: _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MISSING_ROAP_ANSWER_CLIENT_CODE
6834
7036
  })]
6835
7037
  },
6836
7038
  options: {
6837
- meetingId: _this42.id,
6838
- rawError: new Error('Timeout waiting for SDP answer')
7039
+ meetingId: _this43.id,
7040
+ rawError: error
6839
7041
  }
6840
7042
  });
6841
- deferSDPAnswer.reject(new Error('Timed out waiting for REMOTE SDP ANSWER'));
7043
+ deferSDPAnswer.reject(error);
6842
7044
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
6843
7045
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
6844
7046
  return _context25.abrupt("return", deferSDPAnswer.promise);
@@ -6978,7 +7180,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6978
7180
  break;
6979
7181
  case 7:
6980
7182
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
6981
- throw new _webexErrors.AddMediaFailed();
7183
+ throw new _webexErrors.AddMediaFailed(error);
6982
7184
  case 9:
6983
7185
  case "end":
6984
7186
  return _context28.stop();
@@ -7341,10 +7543,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7341
7543
  }, {
7342
7544
  key: "addMedia",
7343
7545
  value: function addMedia() {
7344
- var _this43 = this;
7546
+ var _this44 = this;
7345
7547
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7346
7548
  return this.addMediaInternal(function () {
7347
- return _this43.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7549
+ return _this44.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7348
7550
  }, undefined, false, options);
7349
7551
  }
7350
7552
 
@@ -7382,8 +7584,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7382
7584
  connectionType,
7383
7585
  selectedCandidatePairChanges,
7384
7586
  numTransports,
7385
- reachabilityStats,
7386
7587
  iceCandidateErrors,
7588
+ reachabilityMetrics,
7387
7589
  _this$mediaProperties15,
7388
7590
  _this$mediaProperties16,
7389
7591
  _this$mediaProperties17,
@@ -7405,7 +7607,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7405
7607
  _this$mediaProperties33,
7406
7608
  _this$mediaProperties34,
7407
7609
  _this$mediaProperties35,
7408
- reachabilityMetrics,
7610
+ _reachabilityMetrics,
7409
7611
  _yield$this$mediaProp2,
7410
7612
  _selectedCandidatePairChanges,
7411
7613
  _numTransports,
@@ -7528,11 +7730,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7528
7730
  connectionType = _yield$this$mediaProp.connectionType;
7529
7731
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
7530
7732
  numTransports = _yield$this$mediaProp.numTransports;
7531
- _context35.next = 52;
7532
- return this.webex.meetings.reachability.getReachabilityMetrics();
7533
- case 52:
7534
- reachabilityStats = _context35.sent;
7535
7733
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7734
+ _context35.next = 53;
7735
+ return this.getMediaReachabilityMetricFields();
7736
+ case 53:
7737
+ reachabilityMetrics = _context35.sent;
7536
7738
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
7537
7739
  correlation_id: this.correlationId,
7538
7740
  locus_id: this.locusUrl.split('/').pop(),
@@ -7542,7 +7744,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7542
7744
  isMultistream: this.isMultistream,
7543
7745
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer,
7544
7746
  isJoinWithMediaRetry: this.joinWithMediaRetryInfo.isRetry
7545
- }, reachabilityStats), iceCandidateErrors), {}, {
7747
+ }, reachabilityMetrics), iceCandidateErrors), {}, {
7546
7748
  iceCandidatesCount: this.iceCandidatesCount
7547
7749
  }));
7548
7750
  // @ts-ignore
@@ -7566,9 +7768,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7566
7768
 
7567
7769
  // @ts-ignore
7568
7770
  _context35.next = 66;
7569
- return this.webex.meetings.reachability.getReachabilityMetrics();
7771
+ return this.getMediaReachabilityMetricFields();
7570
7772
  case 66:
7571
- reachabilityMetrics = _context35.sent;
7773
+ _reachabilityMetrics = _context35.sent;
7572
7774
  _context35.next = 69;
7573
7775
  return this.mediaProperties.getCurrentConnectionInfo();
7574
7776
  case 69:
@@ -7592,7 +7794,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7592
7794
  signalingState: ((_this$mediaProperties15 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties15 === void 0 ? void 0 : (_this$mediaProperties16 = _this$mediaProperties15.multistreamConnection) === null || _this$mediaProperties16 === void 0 ? void 0 : (_this$mediaProperties17 = _this$mediaProperties16.pc) === null || _this$mediaProperties17 === void 0 ? void 0 : (_this$mediaProperties18 = _this$mediaProperties17.pc) === null || _this$mediaProperties18 === void 0 ? void 0 : _this$mediaProperties18.signalingState) || ((_this$mediaProperties19 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties19 === void 0 ? void 0 : (_this$mediaProperties20 = _this$mediaProperties19.mediaConnection) === null || _this$mediaProperties20 === void 0 ? void 0 : (_this$mediaProperties21 = _this$mediaProperties20.pc) === null || _this$mediaProperties21 === void 0 ? void 0 : _this$mediaProperties21.signalingState) || 'unknown',
7593
7795
  connectionState: ((_this$mediaProperties22 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties22 === void 0 ? void 0 : (_this$mediaProperties23 = _this$mediaProperties22.multistreamConnection) === null || _this$mediaProperties23 === void 0 ? void 0 : (_this$mediaProperties24 = _this$mediaProperties23.pc) === null || _this$mediaProperties24 === void 0 ? void 0 : (_this$mediaProperties25 = _this$mediaProperties24.pc) === null || _this$mediaProperties25 === void 0 ? void 0 : _this$mediaProperties25.connectionState) || ((_this$mediaProperties26 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties26 === void 0 ? void 0 : (_this$mediaProperties27 = _this$mediaProperties26.mediaConnection) === null || _this$mediaProperties27 === void 0 ? void 0 : (_this$mediaProperties28 = _this$mediaProperties27.pc) === null || _this$mediaProperties28 === void 0 ? void 0 : _this$mediaProperties28.connectionState) || 'unknown',
7594
7796
  iceConnectionState: ((_this$mediaProperties29 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties29 === void 0 ? void 0 : (_this$mediaProperties30 = _this$mediaProperties29.multistreamConnection) === null || _this$mediaProperties30 === void 0 ? void 0 : (_this$mediaProperties31 = _this$mediaProperties30.pc) === null || _this$mediaProperties31 === void 0 ? void 0 : (_this$mediaProperties32 = _this$mediaProperties31.pc) === null || _this$mediaProperties32 === void 0 ? void 0 : _this$mediaProperties32.iceConnectionState) || ((_this$mediaProperties33 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties33 === void 0 ? void 0 : (_this$mediaProperties34 = _this$mediaProperties33.mediaConnection) === null || _this$mediaProperties34 === void 0 ? void 0 : (_this$mediaProperties35 = _this$mediaProperties34.pc) === null || _this$mediaProperties35 === void 0 ? void 0 : _this$mediaProperties35.iceConnectionState) || 'unknown'
7595
- }, reachabilityMetrics), _iceCandidateErrors), {}, {
7797
+ }, _reachabilityMetrics), _iceCandidateErrors), {}, {
7596
7798
  iceCandidatesCount: this.iceCandidatesCount
7597
7799
  }));
7598
7800
  _context35.next = 76;
@@ -7649,7 +7851,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7649
7851
  * @memberof Meeting
7650
7852
  */
7651
7853
  function enqueueMediaUpdate(mediaUpdateType) {
7652
- var _this44 = this;
7854
+ var _this45 = this;
7653
7855
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7654
7856
  var canUpdateMediaNow = this.canUpdateMedia();
7655
7857
  return new _promise.default(function (resolve, reject) {
@@ -7660,9 +7862,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7660
7862
  options: options
7661
7863
  };
7662
7864
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
7663
- _this44.queuedMediaUpdates.push(queueItem);
7865
+ _this45.queuedMediaUpdates.push(queueItem);
7664
7866
  if (canUpdateMediaNow) {
7665
- _this44.processNextQueuedMediaUpdate();
7867
+ _this45.processNextQueuedMediaUpdate();
7666
7868
  }
7667
7869
  });
7668
7870
  }
@@ -7767,7 +7969,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7767
7969
  }, {
7768
7970
  key: "acknowledge",
7769
7971
  value: function acknowledge(type) {
7770
- var _this45 = this;
7972
+ var _this46 = this;
7771
7973
  if (!type) {
7772
7974
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
7773
7975
  }
@@ -7779,12 +7981,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7779
7981
  }).then(function (response) {
7780
7982
  return _promise.default.resolve(response);
7781
7983
  }).then(function (response) {
7782
- _this45.meetingFiniteStateMachine.ring(type);
7984
+ _this46.meetingFiniteStateMachine.ring(type);
7783
7985
  // @ts-ignore
7784
- _this45.webex.internal.newMetrics.submitClientEvent({
7986
+ _this46.webex.internal.newMetrics.submitClientEvent({
7785
7987
  name: 'client.alert.displayed',
7786
7988
  options: {
7787
- meetingId: _this45.id
7989
+ meetingId: _this46.id
7788
7990
  }
7789
7991
  });
7790
7992
  return _promise.default.resolve({
@@ -7809,12 +8011,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7809
8011
  }, {
7810
8012
  key: "decline",
7811
8013
  value: function decline(reason) {
7812
- var _this46 = this;
8014
+ var _this47 = this;
7813
8015
  return _util2.default.declineMeeting(this, reason).then(function (decline) {
7814
- _this46.meetingFiniteStateMachine.decline();
8016
+ _this47.meetingFiniteStateMachine.decline();
7815
8017
  return _promise.default.resolve(decline);
7816
8018
  }).catch(function (error) {
7817
- _this46.meetingFiniteStateMachine.fail(error);
8019
+ _this47.meetingFiniteStateMachine.fail(error);
7818
8020
  return _promise.default.reject(error);
7819
8021
  });
7820
8022
  }
@@ -7865,7 +8067,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7865
8067
  }, {
7866
8068
  key: "leave",
7867
8069
  value: function leave() {
7868
- var _this47 = this;
8070
+ var _this48 = this;
7869
8071
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7870
8072
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
7871
8073
 
@@ -7877,7 +8079,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7877
8079
  var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7878
8080
  return (
7879
8081
  // @ts-ignore
7880
- _this47.webex.internal.newMetrics.submitClientEvent({
8082
+ _this48.webex.internal.newMetrics.submitClientEvent({
7881
8083
  name: 'client.call.leave',
7882
8084
  payload: _objectSpread({
7883
8085
  trigger: 'user-interaction',
@@ -7885,7 +8087,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7885
8087
  leaveReason: options.clientEventLeaveReason
7886
8088
  }, payload),
7887
8089
  options: {
7888
- meetingId: _this47.id
8090
+ meetingId: _this48.id
7889
8091
  }
7890
8092
  })
7891
8093
  );
@@ -7894,24 +8096,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7894
8096
  return _util2.default.leaveMeeting(this, options).then(function (leave) {
7895
8097
  // CA team recommends submitting this *after* locus /leave
7896
8098
  submitLeaveMetric();
7897
- _this47.meetingFiniteStateMachine.leave();
7898
- _this47.clearMeetingData();
8099
+ _this48.meetingFiniteStateMachine.leave();
8100
+ _this48.clearMeetingData();
7899
8101
 
7900
8102
  // upload logs on leave irrespective of meeting delete
7901
- _triggerProxy.default.trigger(_this47, {
8103
+ _triggerProxy.default.trigger(_this48, {
7902
8104
  file: 'meeting/index',
7903
8105
  function: 'leave'
7904
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
8106
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this48);
7905
8107
 
7906
8108
  // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
7907
- if (_this47.wirelessShare || _this47.guest) {
8109
+ if (_this48.wirelessShare || _this48.guest) {
7908
8110
  // If screen sharing clean the meeting object
7909
- _triggerProxy.default.trigger(_this47, {
8111
+ _triggerProxy.default.trigger(_this48, {
7910
8112
  file: 'meeting/index',
7911
8113
  function: 'leave'
7912
8114
  }, _constants.EVENTS.DESTROY_MEETING, {
7913
8115
  reason: options.reason,
7914
- meetingId: _this47.id
8116
+ meetingId: _this48.id
7915
8117
  });
7916
8118
  }
7917
8119
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
@@ -7928,16 +8130,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7928
8130
  shownToUser: false
7929
8131
  }]
7930
8132
  });
7931
- _this47.meetingFiniteStateMachine.fail(error);
8133
+ _this48.meetingFiniteStateMachine.fail(error);
7932
8134
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
7933
8135
  // upload logs on leave irrespective of meeting delete
7934
- _triggerProxy.default.trigger(_this47, {
8136
+ _triggerProxy.default.trigger(_this48, {
7935
8137
  file: 'meeting/index',
7936
8138
  function: 'leave'
7937
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
8139
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this48);
7938
8140
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
7939
- correlation_id: _this47.correlationId,
7940
- locus_id: _this47.locusUrl.split('/').pop(),
8141
+ correlation_id: _this48.correlationId,
8142
+ locus_id: _this48.locusUrl.split('/').pop(),
7941
8143
  reason: error.message,
7942
8144
  stack: error.stack,
7943
8145
  code: error.code
@@ -7957,7 +8159,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7957
8159
  }, {
7958
8160
  key: "startWhiteboardShare",
7959
8161
  value: function startWhiteboardShare(channelUrl, resourceToken) {
7960
- var _this48 = this;
8162
+ var _this49 = this;
7961
8163
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
7962
8164
  return element.name === 'whiteboard';
7963
8165
  });
@@ -7986,13 +8188,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7986
8188
  body.resourceToken = resourceToken;
7987
8189
  }
7988
8190
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
7989
- _this48.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8191
+ _this49.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
7990
8192
  return _promise.default.resolve();
7991
8193
  }).catch(function (error) {
7992
8194
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
7993
8195
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
7994
- correlation_id: _this48.correlationId,
7995
- locus_id: _this48.locusUrl.split('/').pop(),
8196
+ correlation_id: _this49.correlationId,
8197
+ locus_id: _this49.locusUrl.split('/').pop(),
7996
8198
  reason: error.message,
7997
8199
  stack: error.stack,
7998
8200
  board: {
@@ -8015,7 +8217,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8015
8217
  }, {
8016
8218
  key: "stopWhiteboardShare",
8017
8219
  value: function stopWhiteboardShare(channelUrl) {
8018
- var _this49 = this;
8220
+ var _this50 = this;
8019
8221
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
8020
8222
  return element.name === 'whiteboard';
8021
8223
  });
@@ -8038,8 +8240,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8038
8240
  }).catch(function (error) {
8039
8241
  _loggerProxy.default.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
8040
8242
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_STOP_WHITEBOARD_SHARE_FAILURE, {
8041
- correlation_id: _this49.correlationId,
8042
- locus_id: _this49.locusUrl.split('/').pop(),
8243
+ correlation_id: _this50.correlationId,
8244
+ locus_id: _this50.locusUrl.split('/').pop(),
8043
8245
  reason: error.message,
8044
8246
  stack: error.stack,
8045
8247
  board: {
@@ -8061,7 +8263,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8061
8263
  }, {
8062
8264
  key: "requestScreenShareFloor",
8063
8265
  value: function requestScreenShareFloor() {
8064
- var _this50 = this;
8266
+ var _this51 = this;
8065
8267
  if (!this.mediaProperties.hasLocalShareStream() || !this.mediaProperties.mediaDirection.sendShare) {
8066
8268
  _loggerProxy.default.logger.log("Meeting:index#requestScreenShareFloor --> NOT requesting floor, because we don't have the share stream anymore (shareStream=".concat(this.mediaProperties.shareVideoStream ? 'yes' : 'no', ", sendShare=").concat(this.mediaProperties.mediaDirection.sendShare, ")"));
8067
8269
  this.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
@@ -8092,34 +8294,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8092
8294
  resourceUrl: this.resourceUrl,
8093
8295
  shareInstanceId: this.localShareInstanceId
8094
8296
  }).then(function () {
8095
- _this50.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
8297
+ _this51.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
8096
8298
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_SUCCESS, {
8097
- correlation_id: _this50.correlationId,
8098
- locus_id: _this50.locusUrl.split('/').pop()
8299
+ correlation_id: _this51.correlationId,
8300
+ locus_id: _this51.locusUrl.split('/').pop()
8099
8301
  });
8100
8302
  return _promise.default.resolve();
8101
8303
  }).catch(function (error) {
8102
8304
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
8103
8305
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
8104
- correlation_id: _this50.correlationId,
8105
- locus_id: _this50.locusUrl.split('/').pop(),
8306
+ correlation_id: _this51.correlationId,
8307
+ locus_id: _this51.locusUrl.split('/').pop(),
8106
8308
  reason: error.message,
8107
8309
  stack: error.stack
8108
8310
  });
8109
8311
 
8110
8312
  // @ts-ignore
8111
- _this50.webex.internal.newMetrics.submitClientEvent({
8313
+ _this51.webex.internal.newMetrics.submitClientEvent({
8112
8314
  name: 'client.share.floor-granted.local',
8113
8315
  payload: {
8114
8316
  mediaType: 'share',
8115
8317
  errors: _util2.default.getChangeMeetingFloorErrorPayload(error.message),
8116
- shareInstanceId: _this50.localShareInstanceId
8318
+ shareInstanceId: _this51.localShareInstanceId
8117
8319
  },
8118
8320
  options: {
8119
- meetingId: _this50.id
8321
+ meetingId: _this51.id
8120
8322
  }
8121
8323
  });
8122
- _this50.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8324
+ _this51.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8123
8325
  return _promise.default.reject(error);
8124
8326
  });
8125
8327
  }
@@ -8142,10 +8344,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8142
8344
  }, {
8143
8345
  key: "requestScreenShareFloorIfPending",
8144
8346
  value: function requestScreenShareFloorIfPending() {
8145
- var _this51 = this;
8347
+ var _this52 = this;
8146
8348
  if (this.floorGrantPending && this.state === _constants.MEETING_STATE.STATES.JOINED) {
8147
8349
  this.requestScreenShareFloor().then(function () {
8148
- _this51.floorGrantPending = false;
8350
+ _this52.floorGrantPending = false;
8149
8351
  });
8150
8352
  }
8151
8353
  }
@@ -8159,7 +8361,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8159
8361
  }, {
8160
8362
  key: "releaseScreenShareFloor",
8161
8363
  value: function releaseScreenShareFloor() {
8162
- var _this52 = this;
8364
+ var _this53 = this;
8163
8365
  var content = this.locusInfo.mediaShares.find(function (element) {
8164
8366
  return element.name === _constants.CONTENT;
8165
8367
  });
@@ -8194,8 +8396,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8194
8396
  }).catch(function (error) {
8195
8397
  _loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
8196
8398
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
8197
- correlation_id: _this52.correlationId,
8198
- locus_id: _this52.locusUrl.split('/').pop(),
8399
+ correlation_id: _this53.correlationId,
8400
+ locus_id: _this53.locusUrl.split('/').pop(),
8199
8401
  reason: error.message,
8200
8402
  stack: error.stack
8201
8403
  });
@@ -8375,7 +8577,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8375
8577
  }, {
8376
8578
  key: "changeVideoLayout",
8377
8579
  value: function changeVideoLayout(layoutType) {
8378
- var _this53 = this;
8580
+ var _this54 = this;
8379
8581
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8380
8582
  var main = renderInfo.main,
8381
8583
  content = renderInfo.content;
@@ -8429,7 +8631,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8429
8631
  }
8430
8632
  this.lastVideoLayoutInfo = (0, _lodash.cloneDeep)(layoutInfo);
8431
8633
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
8432
- _triggerProxy.default.trigger(_this53, {
8634
+ _triggerProxy.default.trigger(_this54, {
8433
8635
  file: 'meeting/index',
8434
8636
  function: 'changeVideoLayout'
8435
8637
  }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
@@ -8545,7 +8747,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8545
8747
  }, {
8546
8748
  key: "endMeetingForAll",
8547
8749
  value: function endMeetingForAll() {
8548
- var _this54 = this;
8750
+ var _this55 = this;
8549
8751
  // @ts-ignore
8550
8752
  this.webex.internal.newMetrics.submitClientEvent({
8551
8753
  name: 'client.call.leave',
@@ -8563,25 +8765,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8563
8765
  locus_id: this.locusId
8564
8766
  });
8565
8767
  return _util2.default.endMeetingForAll(this).then(function (end) {
8566
- _this54.meetingFiniteStateMachine.end();
8567
- _this54.clearMeetingData();
8768
+ _this55.meetingFiniteStateMachine.end();
8769
+ _this55.clearMeetingData();
8568
8770
  // upload logs on leave irrespective of meeting delete
8569
- _triggerProxy.default.trigger(_this54, {
8771
+ _triggerProxy.default.trigger(_this55, {
8570
8772
  file: 'meeting/index',
8571
8773
  function: 'endMeetingForAll'
8572
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
8774
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this55);
8573
8775
  return end;
8574
8776
  }).catch(function (error) {
8575
- _this54.meetingFiniteStateMachine.fail(error);
8777
+ _this55.meetingFiniteStateMachine.fail(error);
8576
8778
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
8577
8779
  // upload logs on leave irrespective of meeting delete
8578
- _triggerProxy.default.trigger(_this54, {
8780
+ _triggerProxy.default.trigger(_this55, {
8579
8781
  file: 'meeting/index',
8580
8782
  function: 'endMeetingForAll'
8581
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
8783
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this55);
8582
8784
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
8583
- correlation_id: _this54.correlationId,
8584
- locus_id: _this54.locusUrl.split('/').pop(),
8785
+ correlation_id: _this55.correlationId,
8786
+ locus_id: _this55.locusUrl.split('/').pop(),
8585
8787
  reason: error.message,
8586
8788
  stack: error.stack,
8587
8789
  code: error.code
@@ -8646,6 +8848,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8646
8848
  });
8647
8849
  }
8648
8850
 
8851
+ /**
8852
+ * Method to set post meeting data consent.
8853
+ *
8854
+ * @param {boolean} accept - whether consent accepted or declined
8855
+ * @returns {Promise}
8856
+ * @public
8857
+ * @memberof Meeting
8858
+ */
8859
+ }, {
8860
+ key: "setPostMeetingDataConsent",
8861
+ value: function setPostMeetingDataConsent(accept) {
8862
+ return this.meetingRequest.setPostMeetingDataConsent({
8863
+ postMeetingDataConsent: accept,
8864
+ locusUrl: this.locusUrl,
8865
+ deviceUrl: this.deviceUrl,
8866
+ selfId: this.members.selfId
8867
+ });
8868
+ }
8869
+
8649
8870
  /**
8650
8871
  * Throws if we don't have a media connection created
8651
8872
  *
@@ -8723,7 +8944,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8723
8944
  _this$mediaProperties43,
8724
8945
  _this$mediaProperties44,
8725
8946
  _this$mediaProperties45,
8726
- _this55 = this;
8947
+ _this56 = this;
8727
8948
  var LOG_HEADER = 'Meeting:index#updateTranscodedMediaConnection -->';
8728
8949
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " starting"));
8729
8950
  if (!this.canUpdateMedia()) {
@@ -8748,8 +8969,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8748
8969
  }).catch(function (error) {
8749
8970
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error: "), error);
8750
8971
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
8751
- correlation_id: _this55.correlationId,
8752
- locus_id: _this55.locusUrl.split('/').pop(),
8972
+ correlation_id: _this56.correlationId,
8973
+ locus_id: _this56.locusUrl.split('/').pop(),
8753
8974
  reason: error.message,
8754
8975
  stack: error.stack
8755
8976
  });
@@ -8971,10 +9192,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8971
9192
  return this.updateTranscodedMediaConnection();
8972
9193
  case 31:
8973
9194
  if (!floorRequestNeeded) {
8974
- _context40.next = 37;
9195
+ _context40.next = 39;
8975
9196
  break;
8976
9197
  }
8977
9198
  this.localShareInstanceId = _uuid.default.v4();
9199
+ this.shareCAEventSentStatus.transmitStart = false;
9200
+ this.shareCAEventSentStatus.transmitStop = false;
8978
9201
 
8979
9202
  // @ts-ignore
8980
9203
  this.webex.internal.newMetrics.submitClientEvent({
@@ -8995,9 +9218,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8995
9218
  // we're sending the http request to Locus to request the screen share floor
8996
9219
  // only after the SDP update, because that's how it's always been done for transcoded meetings
8997
9220
  // and also if sharing from the start, we need confluence to have been created
8998
- _context40.next = 37;
9221
+ _context40.next = 39;
8999
9222
  return this.enqueueScreenShareFloorRequest();
9000
- case 37:
9223
+ case 39:
9001
9224
  case "end":
9002
9225
  return _context40.stop();
9003
9226
  }
@@ -9135,6 +9358,51 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9135
9358
  }
9136
9359
  return _promise.default.resolve();
9137
9360
  }
9361
+
9362
+ /**
9363
+ * Gets the media reachability metrics
9364
+ *
9365
+ * @returns {Promise<MediaReachabilityMetrics>}
9366
+ */
9367
+ }, {
9368
+ key: "getMediaReachabilityMetricFields",
9369
+ value: (function () {
9370
+ var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
9371
+ var reachabilityMetrics, successKeys, totalSuccessCases, isSubnetReachable;
9372
+ return _regenerator.default.wrap(function _callee42$(_context42) {
9373
+ while (1) switch (_context42.prev = _context42.next) {
9374
+ case 0:
9375
+ _context42.next = 2;
9376
+ return this.webex.meetings.reachability.getReachabilityMetrics();
9377
+ case 2:
9378
+ reachabilityMetrics = _context42.sent;
9379
+ successKeys = ['reachability_public_udp_success', 'reachability_public_tcp_success', 'reachability_public_xtls_success', 'reachability_vmn_udp_success', 'reachability_vmn_tcp_success', 'reachability_vmn_xtls_success'];
9380
+ totalSuccessCases = successKeys.reduce(function (total, key) {
9381
+ var value = reachabilityMetrics[key];
9382
+ if (typeof value === 'number') {
9383
+ return total + value;
9384
+ }
9385
+ return total;
9386
+ }, 0);
9387
+ isSubnetReachable = null;
9388
+ if (totalSuccessCases > 0) {
9389
+ // @ts-ignore
9390
+ isSubnetReachable = this.webex.meetings.reachability.isSubnetReachable(this.mediaServerIp);
9391
+ }
9392
+ return _context42.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
9393
+ isSubnetReachable: isSubnetReachable
9394
+ }));
9395
+ case 8:
9396
+ case "end":
9397
+ return _context42.stop();
9398
+ }
9399
+ }, _callee42, this);
9400
+ }));
9401
+ function getMediaReachabilityMetricFields() {
9402
+ return _getMediaReachabilityMetricFields.apply(this, arguments);
9403
+ }
9404
+ return getMediaReachabilityMetricFields;
9405
+ }())
9138
9406
  }]);
9139
9407
  return Meeting;
9140
9408
  }(_webexCore.StatelessWebexPlugin);