@webex/plugin-meetings 3.8.0-next.7 → 3.8.0-next.71

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 (167) 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 +4 -1
  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 +32 -12
  19. package/dist/locus-info/index.js.map +1 -1
  20. package/dist/locus-info/selfUtils.js +432 -418
  21. package/dist/locus-info/selfUtils.js.map +1 -1
  22. package/dist/media/index.js +14 -16
  23. package/dist/media/index.js.map +1 -1
  24. package/dist/media/properties.js +94 -6
  25. package/dist/media/properties.js.map +1 -1
  26. package/dist/meeting/brbState.js +6 -0
  27. package/dist/meeting/brbState.js.map +1 -1
  28. package/dist/meeting/in-meeting-actions.js +17 -1
  29. package/dist/meeting/in-meeting-actions.js.map +1 -1
  30. package/dist/meeting/index.js +541 -302
  31. package/dist/meeting/index.js.map +1 -1
  32. package/dist/meeting/locusMediaRequest.js +0 -17
  33. package/dist/meeting/locusMediaRequest.js.map +1 -1
  34. package/dist/meeting/muteState.js +0 -2
  35. package/dist/meeting/muteState.js.map +1 -1
  36. package/dist/meeting/request.js +30 -0
  37. package/dist/meeting/request.js.map +1 -1
  38. package/dist/meeting/request.type.js.map +1 -1
  39. package/dist/meeting/util.js +13 -2
  40. package/dist/meeting/util.js.map +1 -1
  41. package/dist/meeting-info/meeting-info-v2.js +359 -60
  42. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  43. package/dist/meetings/index.js +114 -1
  44. package/dist/meetings/index.js.map +1 -1
  45. package/dist/meetings/util.js +14 -0
  46. package/dist/meetings/util.js.map +1 -1
  47. package/dist/member/index.js +10 -0
  48. package/dist/member/index.js.map +1 -1
  49. package/dist/member/util.js +330 -353
  50. package/dist/member/util.js.map +1 -1
  51. package/dist/members/index.js +23 -0
  52. package/dist/members/index.js.map +1 -1
  53. package/dist/members/request.js +21 -0
  54. package/dist/members/request.js.map +1 -1
  55. package/dist/members/util.js +15 -0
  56. package/dist/members/util.js.map +1 -1
  57. package/dist/metrics/constants.js +9 -0
  58. package/dist/metrics/constants.js.map +1 -1
  59. package/dist/reachability/clusterReachability.js +63 -27
  60. package/dist/reachability/clusterReachability.js.map +1 -1
  61. package/dist/reachability/index.js +112 -47
  62. package/dist/reachability/index.js.map +1 -1
  63. package/dist/reachability/reachability.types.js +14 -0
  64. package/dist/reachability/reachability.types.js.map +1 -1
  65. package/dist/reachability/request.js +19 -3
  66. package/dist/reachability/request.js.map +1 -1
  67. package/dist/reconnection-manager/index.js +2 -2
  68. package/dist/reconnection-manager/index.js.map +1 -1
  69. package/dist/recording-controller/util.js +5 -5
  70. package/dist/recording-controller/util.js.map +1 -1
  71. package/dist/roap/index.js.map +1 -1
  72. package/dist/roap/turnDiscovery.js +45 -27
  73. package/dist/roap/turnDiscovery.js.map +1 -1
  74. package/dist/roap/types.js +17 -0
  75. package/dist/roap/types.js.map +1 -0
  76. package/dist/types/common/errors/webex-errors.d.ts +7 -1
  77. package/dist/types/config.d.ts +2 -0
  78. package/dist/types/constants.d.ts +12 -85
  79. package/dist/types/controls-options-manager/enums.d.ts +3 -1
  80. package/dist/types/controls-options-manager/types.d.ts +7 -1
  81. package/dist/types/locus-info/index.d.ts +3 -3
  82. package/dist/types/locus-info/selfUtils.d.ts +216 -1
  83. package/dist/types/media/properties.d.ts +15 -0
  84. package/dist/types/meeting/in-meeting-actions.d.ts +16 -0
  85. package/dist/types/meeting/index.d.ts +32 -1
  86. package/dist/types/meeting/muteState.d.ts +0 -1
  87. package/dist/types/meeting/request.d.ts +12 -1
  88. package/dist/types/meeting/request.type.d.ts +6 -0
  89. package/dist/types/meeting/util.d.ts +3 -1
  90. package/dist/types/meeting-info/meeting-info-v2.d.ts +80 -0
  91. package/dist/types/meetings/index.d.ts +48 -0
  92. package/dist/types/member/index.d.ts +1 -0
  93. package/dist/types/member/util.d.ts +159 -1
  94. package/dist/types/members/index.d.ts +8 -0
  95. package/dist/types/members/request.d.ts +19 -0
  96. package/dist/types/members/util.d.ts +13 -0
  97. package/dist/types/metrics/constants.d.ts +9 -0
  98. package/dist/types/reachability/clusterReachability.d.ts +15 -7
  99. package/dist/types/reachability/index.d.ts +10 -1
  100. package/dist/types/reachability/reachability.types.d.ts +5 -0
  101. package/dist/types/roap/index.d.ts +3 -2
  102. package/dist/types/roap/turnDiscovery.d.ts +5 -17
  103. package/dist/types/roap/types.d.ts +16 -0
  104. package/dist/webinar/index.js +1 -1
  105. package/package.json +24 -23
  106. package/src/common/errors/webex-errors.ts +8 -1
  107. package/src/config.ts +2 -0
  108. package/src/constants.ts +19 -90
  109. package/src/controls-options-manager/enums.ts +2 -0
  110. package/src/controls-options-manager/types.ts +11 -1
  111. package/src/controls-options-manager/util.ts +62 -0
  112. package/src/locus-info/controlsUtils.ts +44 -14
  113. package/src/locus-info/index.ts +38 -12
  114. package/src/locus-info/selfUtils.ts +496 -442
  115. package/src/media/index.ts +20 -21
  116. package/src/media/properties.ts +96 -0
  117. package/src/meeting/brbState.ts +7 -0
  118. package/src/meeting/in-meeting-actions.ts +32 -0
  119. package/src/meeting/index.ts +346 -93
  120. package/src/meeting/locusMediaRequest.ts +0 -18
  121. package/src/meeting/muteState.ts +0 -2
  122. package/src/meeting/request.ts +36 -1
  123. package/src/meeting/request.type.ts +7 -0
  124. package/src/meeting/util.ts +11 -2
  125. package/src/meeting-info/meeting-info-v2.ts +247 -6
  126. package/src/meetings/index.ts +128 -1
  127. package/src/meetings/util.ts +18 -0
  128. package/src/member/index.ts +13 -2
  129. package/src/member/util.ts +351 -348
  130. package/src/members/index.ts +25 -0
  131. package/src/members/request.ts +26 -0
  132. package/src/members/util.ts +16 -0
  133. package/src/metrics/constants.ts +9 -0
  134. package/src/reachability/clusterReachability.ts +73 -26
  135. package/src/reachability/index.ts +70 -1
  136. package/src/reachability/reachability.types.ts +6 -0
  137. package/src/reachability/request.ts +7 -0
  138. package/src/reconnection-manager/index.ts +2 -2
  139. package/src/recording-controller/util.ts +17 -13
  140. package/src/roap/index.ts +3 -7
  141. package/src/roap/turnDiscovery.ts +34 -39
  142. package/src/roap/types.ts +23 -0
  143. package/test/unit/spec/controls-options-manager/util.js +120 -0
  144. package/test/unit/spec/locus-info/controlsUtils.js +103 -9
  145. package/test/unit/spec/locus-info/index.js +141 -73
  146. package/test/unit/spec/locus-info/selfUtils.js +98 -24
  147. package/test/unit/spec/media/index.ts +98 -16
  148. package/test/unit/spec/media/properties.ts +130 -0
  149. package/test/unit/spec/meeting/brbState.ts +19 -0
  150. package/test/unit/spec/meeting/in-meeting-actions.ts +19 -4
  151. package/test/unit/spec/meeting/index.js +524 -35
  152. package/test/unit/spec/meeting/locusMediaRequest.ts +0 -30
  153. package/test/unit/spec/meeting/muteState.js +0 -2
  154. package/test/unit/spec/meeting/request.js +32 -1
  155. package/test/unit/spec/meeting/utils.js +119 -18
  156. package/test/unit/spec/meeting-info/meetinginfov2.js +443 -114
  157. package/test/unit/spec/meetings/index.js +133 -2
  158. package/test/unit/spec/member/index.js +7 -0
  159. package/test/unit/spec/member/util.js +24 -0
  160. package/test/unit/spec/members/index.js +103 -26
  161. package/test/unit/spec/members/request.js +45 -22
  162. package/test/unit/spec/members/utils.js +33 -0
  163. package/test/unit/spec/reachability/clusterReachability.ts +88 -56
  164. package/test/unit/spec/reachability/index.ts +101 -0
  165. package/test/unit/spec/reachability/request.js +47 -2
  166. package/test/unit/spec/reconnection-manager/index.js +4 -4
  167. 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
 
@@ -2370,6 +2442,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2370
2442
  return (0, _classPrivateFieldGet2.default)(this, _isoLocalClientMeetingJoinTime);
2371
2443
  }
2372
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
+
2373
2470
  /**
2374
2471
  * Set meeting info and trigger `MEETING_INFO_AVAILABLE` event
2375
2472
  * @param {any} info
@@ -3429,6 +3526,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3429
3526
  state: state
3430
3527
  });
3431
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
+ });
3432
3547
  }
3433
3548
 
3434
3549
  /**
@@ -3468,7 +3583,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3468
3583
  var _this15 = this;
3469
3584
  // Will get triggered on local and remote share
3470
3585
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, /*#__PURE__*/function () {
3471
- 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) {
3472
3587
  var _payload$previous, _payload$previous2;
3473
3588
  var _payload$current, contentShare, whiteboardShare, previousContentShare, previousWhiteboardShare, newShareStatus, _this15$locusInfo, _this15$locusInfo$inf, _this15$webinar, oldShareStatus, sendStartedSharingRemote, _this15$mediaProperti;
3474
3589
  return _regenerator.default.wrap(function _callee8$(_context8) {
@@ -3554,6 +3669,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3554
3669
  case 26:
3555
3670
  sendStartedSharingRemote = function sendStartedSharingRemote() {
3556
3671
  _this15.remoteShareInstanceId = contentShare.shareInstanceId;
3672
+ _this15.shareCAEventSentStatus.receiveStart = false;
3673
+ _this15.shareCAEventSentStatus.receiveStop = false;
3557
3674
  _triggerProxy.default.trigger(_this15, {
3558
3675
  file: 'meetings/index',
3559
3676
  function: 'remoteShare'
@@ -3627,6 +3744,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3627
3744
  // if we got here, then some remote participant has stolen
3628
3745
  // the presentation from another remote participant
3629
3746
  _this15.remoteShareInstanceId = contentShare.shareInstanceId;
3747
+ _this15.shareCAEventSentStatus.receiveStart = false;
3748
+ _this15.shareCAEventSentStatus.receiveStop = false;
3630
3749
  _triggerProxy.default.trigger(_this15, {
3631
3750
  file: 'meetings/index',
3632
3751
  function: 'remoteShare'
@@ -3667,7 +3786,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3667
3786
  }, _callee8, null, [[27,, 31, 34]]);
3668
3787
  }));
3669
3788
  return function (_x8) {
3670
- return _ref27.apply(this, arguments);
3789
+ return _ref29.apply(this, arguments);
3671
3790
  };
3672
3791
  }());
3673
3792
  }
@@ -3781,8 +3900,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3781
3900
  });
3782
3901
  }
3783
3902
  });
3784
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (_ref28) {
3785
- var isInitializing = _ref28.isInitializing;
3903
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (_ref30) {
3904
+ var isInitializing = _ref30.isInitializing;
3786
3905
  _this19.updateMeetingActions();
3787
3906
  _this19.recordingController.setDisplayHints(_this19.userDisplayHints);
3788
3907
  _this19.recordingController.setUserPolicy(_this19.selfUserPolicies);
@@ -3920,7 +4039,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3920
4039
  _this21.updateLLMConnection();
3921
4040
  });
3922
4041
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, /*#__PURE__*/function () {
3923
- 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) {
3924
4043
  var _this21$rtcMetrics;
3925
4044
  return _regenerator.default.wrap(function _callee9$(_context9) {
3926
4045
  while (1) switch (_context9.prev = _context9.next) {
@@ -3954,7 +4073,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3954
4073
  }, _callee9);
3955
4074
  }));
3956
4075
  return function (_x9) {
3957
- return _ref29.apply(this, arguments);
4076
+ return _ref31.apply(this, arguments);
3958
4077
  };
3959
4078
  }());
3960
4079
 
@@ -4073,7 +4192,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4073
4192
  }
4074
4193
  });
4075
4194
  this.locusInfo.on(_constants.EVENTS.DESTROY_MEETING, /*#__PURE__*/function () {
4076
- 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) {
4077
4196
  return _regenerator.default.wrap(function _callee10$(_context10) {
4078
4197
  while (1) switch (_context10.prev = _context10.next) {
4079
4198
  case 0:
@@ -4133,7 +4252,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4133
4252
  }, _callee10, null, [[8, 14]]);
4134
4253
  }));
4135
4254
  return function (_x10) {
4136
- return _ref30.apply(this, arguments);
4255
+ return _ref32.apply(this, arguments);
4137
4256
  };
4138
4257
  }());
4139
4258
  }
@@ -4235,6 +4354,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4235
4354
  key: "beRightBack",
4236
4355
  value: (function () {
4237
4356
  var _beRightBack = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(enabled) {
4357
+ var _this24 = this;
4238
4358
  var errorMessage, error, _errorMessage, _error;
4239
4359
  return _regenerator.default.wrap(function _callee11$(_context11) {
4240
4360
  while (1) switch (_context11.prev = _context11.next) {
@@ -4257,7 +4377,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4257
4377
  _loggerProxy.default.logger.error(_error);
4258
4378
  return _context11.abrupt("return", _promise.default.reject(_error));
4259
4379
  case 10:
4260
- 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
+ }));
4261
4387
  case 11:
4262
4388
  case "end":
4263
4389
  return _context11.stop();
@@ -4443,7 +4569,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4443
4569
  canAdmitParticipant: _util2.default.canAdmitParticipant(this.userDisplayHints),
4444
4570
  canLock: _util2.default.canUserLock(this.userDisplayHints),
4445
4571
  canUnlock: _util2.default.canUserUnlock(this.userDisplayHints),
4446
- canShareWhiteBoard: _util2.default.canShareWhiteBoard(this.userDisplayHints),
4572
+ canShareWhiteBoard: _util2.default.canShareWhiteBoard(this.userDisplayHints, this.selfUserPolicies),
4447
4573
  canSetDisallowUnmute: _util5.default.canSetDisallowUnmute(this.userDisplayHints),
4448
4574
  canUnsetDisallowUnmute: _util5.default.canUnsetDisallowUnmute(this.userDisplayHints),
4449
4575
  canSetMuteOnEntry: _util5.default.canSetMuteOnEntry(this.userDisplayHints),
@@ -4473,6 +4599,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4473
4599
  canSelectSpokenLanguages: _util2.default.canSelectSpokenLanguages(this.userDisplayHints),
4474
4600
  waitingForOthersToJoin: _util2.default.waitingForOthersToJoin(this.userDisplayHints),
4475
4601
  canSendReactions: _util2.default.canSendReactions(this.inMeetingActions.canSendReactions, this.userDisplayHints),
4602
+ requiresPostMeetingDataConsentPrompt: _util2.default.requiresPostMeetingDataConsentPrompt(this.userDisplayHints),
4476
4603
  canManageBreakout: _util2.default.canManageBreakout(this.userDisplayHints),
4477
4604
  canStartBreakout: _util2.default.canStartBreakout(this.userDisplayHints),
4478
4605
  canBroadcastMessageToBreakout: _util2.default.canBroadcastMessageToBreakout(this.userDisplayHints, this.selfUserPolicies),
@@ -4481,6 +4608,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4481
4608
  canUserAskForHelp: _util2.default.canUserAskForHelp(this.userDisplayHints),
4482
4609
  canUserRenameSelfAndObserved: _util2.default.canUserRenameSelfAndObserved(this.userDisplayHints),
4483
4610
  canUserRenameOthers: _util2.default.canUserRenameOthers(this.userDisplayHints),
4611
+ canMoveToLobby: _util2.default.canMoveToLobby(this.userDisplayHints),
4484
4612
  canMuteAll: _util5.default.hasHints({
4485
4613
  requiredHints: [_constants.DISPLAY_HINTS.MUTE_ALL],
4486
4614
  displayHints: this.userDisplayHints
@@ -4612,6 +4740,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4612
4740
  requiredPolicies: [_constants.SELF_POLICY.SUPPORT_FILE_TRANSFER],
4613
4741
  policies: this.selfUserPolicies
4614
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
+ }),
4615
4751
  canChat: _util5.default.hasPolicies({
4616
4752
  requiredPolicies: [_constants.SELF_POLICY.SUPPORT_CHAT],
4617
4753
  policies: this.selfUserPolicies
@@ -4648,6 +4784,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4648
4784
  canAnnotate: _util5.default.hasPolicies({
4649
4785
  requiredPolicies: [_constants.SELF_POLICY.SUPPORT_ANNOTATION],
4650
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
4651
4803
  })
4652
4804
  }) || changed;
4653
4805
  }
@@ -4752,7 +4904,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4752
4904
  }, {
4753
4905
  key: "setLogUploadTimer",
4754
4906
  value: function setLogUploadTimer() {
4755
- var _this24 = this;
4907
+ var _this25 = this;
4756
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
4757
4909
  var LOG_UPLOAD_INTERVALS = [0.1, 15, 30, 60]; // in minutes
4758
4910
 
@@ -4763,15 +4915,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4763
4915
  this.logUploadIntervalIndex += 1;
4764
4916
  }
4765
4917
  this.uploadLogsTimer = (0, _commonTimers.safeSetTimeout)(function () {
4766
- _this24.uploadLogsTimer = undefined;
4767
- _this24.uploadLogs();
4918
+ _this25.uploadLogsTimer = undefined;
4919
+ _this25.uploadLogs();
4768
4920
 
4769
4921
  // just as an extra precaution, to avoid uploading logs forever in case something goes wrong
4770
4922
  // and the page remains opened, we stop it if there is no media connection
4771
- if (!_this24.mediaProperties.webrtcMediaConnection) {
4923
+ if (!_this25.mediaProperties.webrtcMediaConnection) {
4772
4924
  return;
4773
4925
  }
4774
- _this24.setLogUploadTimer();
4926
+ _this25.setLogUploadTimer();
4775
4927
  }, delay);
4776
4928
  }
4777
4929
 
@@ -4838,7 +4990,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4838
4990
  }, {
4839
4991
  key: "closeRemoteStreams",
4840
4992
  value: function closeRemoteStreams() {
4841
- var _this25 = this;
4993
+ var _this26 = this;
4842
4994
  var _this$mediaProperties6 = this.mediaProperties,
4843
4995
  remoteAudioStream = _this$mediaProperties6.remoteAudioStream,
4844
4996
  remoteVideoStream = _this$mediaProperties6.remoteVideoStream,
@@ -4852,7 +5004,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4852
5004
  */
4853
5005
  // eslint-disable-next-line @typescript-eslint/no-shadow
4854
5006
  var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
4855
- _triggerProxy.default.trigger(_this25, {
5007
+ _triggerProxy.default.trigger(_this26, {
4856
5008
  file: 'meeting/index',
4857
5009
  function: 'closeRemoteStreams'
4858
5010
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -5160,7 +5312,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5160
5312
  }, {
5161
5313
  key: "setMercuryListener",
5162
5314
  value: function setMercuryListener() {
5163
- var _this26 = this;
5315
+ var _this27 = this;
5164
5316
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
5165
5317
  // if the meeting has active peer connections, it should try to reconnect.
5166
5318
  // @ts-ignore
@@ -5168,33 +5320,33 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5168
5320
  _loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online');
5169
5321
 
5170
5322
  // Only send restore event when it was disconnected before and for connected later
5171
- if (!_this26.hasWebsocketConnected) {
5323
+ if (!_this27.hasWebsocketConnected) {
5172
5324
  // @ts-ignore
5173
- _this26.webex.internal.newMetrics.submitClientEvent({
5325
+ _this27.webex.internal.newMetrics.submitClientEvent({
5174
5326
  name: 'client.mercury.connection.restored',
5175
5327
  options: {
5176
- meetingId: _this26.id
5328
+ meetingId: _this27.id
5177
5329
  }
5178
5330
  });
5179
5331
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
5180
- correlation_id: _this26.correlationId
5332
+ correlation_id: _this27.correlationId
5181
5333
  });
5182
5334
  }
5183
- _this26.hasWebsocketConnected = true;
5335
+ _this27.hasWebsocketConnected = true;
5184
5336
  });
5185
5337
 
5186
5338
  // @ts-ignore
5187
5339
  this.webex.internal.mercury.on(_constants.OFFLINE, function () {
5188
5340
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
5189
5341
  // @ts-ignore
5190
- _this26.webex.internal.newMetrics.submitClientEvent({
5342
+ _this27.webex.internal.newMetrics.submitClientEvent({
5191
5343
  name: 'client.mercury.connection.lost',
5192
5344
  options: {
5193
- meetingId: _this26.id
5345
+ meetingId: _this27.id
5194
5346
  }
5195
5347
  });
5196
5348
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
5197
- correlation_id: _this26.correlationId
5349
+ correlation_id: _this27.correlationId
5198
5350
  });
5199
5351
  });
5200
5352
  }
@@ -5301,7 +5453,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5301
5453
  }, {
5302
5454
  key: "muteAudio",
5303
5455
  value: function muteAudio() {
5304
- var _this27 = this;
5456
+ var _this28 = this;
5305
5457
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5306
5458
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5307
5459
  }
@@ -5317,22 +5469,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5317
5469
 
5318
5470
  // First, stop sending the local audio media
5319
5471
  return logRequest(this.audio.handleClientRequest(this, true).then(function () {
5320
- _util2.default.handleAudioLogging(_this27.mediaProperties.audioStream);
5472
+ _util2.default.handleAudioLogging(_this28.mediaProperties.audioStream);
5321
5473
  // @ts-ignore
5322
- _this27.webex.internal.newMetrics.submitClientEvent({
5474
+ _this28.webex.internal.newMetrics.submitClientEvent({
5323
5475
  name: 'client.muted',
5324
5476
  payload: {
5325
5477
  trigger: 'user-interaction',
5326
5478
  mediaType: 'audio'
5327
5479
  },
5328
5480
  options: {
5329
- meetingId: _this27.id
5481
+ meetingId: _this28.id
5330
5482
  }
5331
5483
  });
5332
5484
  }).catch(function (error) {
5333
5485
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
5334
- correlation_id: _this27.correlationId,
5335
- locus_id: _this27.locusUrl.split('/').pop(),
5486
+ correlation_id: _this28.correlationId,
5487
+ locus_id: _this28.locusUrl.split('/').pop(),
5336
5488
  reason: error.message,
5337
5489
  stack: error.stack
5338
5490
  });
@@ -5351,7 +5503,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5351
5503
  }, {
5352
5504
  key: "unmuteAudio",
5353
5505
  value: function unmuteAudio() {
5354
- var _this28 = this;
5506
+ var _this29 = this;
5355
5507
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5356
5508
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5357
5509
  }
@@ -5367,22 +5519,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5367
5519
 
5368
5520
  // First, send the control to unmute the participant on the server
5369
5521
  return logRequest(this.audio.handleClientRequest(this, false).then(function () {
5370
- _util2.default.handleAudioLogging(_this28.mediaProperties.audioStream);
5522
+ _util2.default.handleAudioLogging(_this29.mediaProperties.audioStream);
5371
5523
  // @ts-ignore
5372
- _this28.webex.internal.newMetrics.submitClientEvent({
5524
+ _this29.webex.internal.newMetrics.submitClientEvent({
5373
5525
  name: 'client.unmuted',
5374
5526
  payload: {
5375
5527
  trigger: 'user-interaction',
5376
5528
  mediaType: 'audio'
5377
5529
  },
5378
5530
  options: {
5379
- meetingId: _this28.id
5531
+ meetingId: _this29.id
5380
5532
  }
5381
5533
  });
5382
5534
  }).catch(function (error) {
5383
5535
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_AUDIO_FAILURE, {
5384
- correlation_id: _this28.correlationId,
5385
- locus_id: _this28.locusUrl.split('/').pop(),
5536
+ correlation_id: _this29.correlationId,
5537
+ locus_id: _this29.locusUrl.split('/').pop(),
5386
5538
  reason: error.message,
5387
5539
  stack: error.stack
5388
5540
  });
@@ -5401,7 +5553,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5401
5553
  }, {
5402
5554
  key: "muteVideo",
5403
5555
  value: function muteVideo() {
5404
- var _this29 = this;
5556
+ var _this30 = this;
5405
5557
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5406
5558
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5407
5559
  }
@@ -5415,22 +5567,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5415
5567
  return _promise.default.reject(new _parameter.default('no video control associated to the meeting'));
5416
5568
  }
5417
5569
  return logRequest(this.video.handleClientRequest(this, true).then(function () {
5418
- _util2.default.handleVideoLogging(_this29.mediaProperties.videoStream);
5570
+ _util2.default.handleVideoLogging(_this30.mediaProperties.videoStream);
5419
5571
  // @ts-ignore
5420
- _this29.webex.internal.newMetrics.submitClientEvent({
5572
+ _this30.webex.internal.newMetrics.submitClientEvent({
5421
5573
  name: 'client.muted',
5422
5574
  payload: {
5423
5575
  trigger: 'user-interaction',
5424
5576
  mediaType: 'video'
5425
5577
  },
5426
5578
  options: {
5427
- meetingId: _this29.id
5579
+ meetingId: _this30.id
5428
5580
  }
5429
5581
  });
5430
5582
  }).catch(function (error) {
5431
5583
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_VIDEO_FAILURE, {
5432
- correlation_id: _this29.correlationId,
5433
- locus_id: _this29.locusUrl.split('/').pop(),
5584
+ correlation_id: _this30.correlationId,
5585
+ locus_id: _this30.locusUrl.split('/').pop(),
5434
5586
  reason: error.message,
5435
5587
  stack: error.stack
5436
5588
  });
@@ -5449,7 +5601,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5449
5601
  }, {
5450
5602
  key: "unmuteVideo",
5451
5603
  value: function unmuteVideo() {
5452
- var _this30 = this;
5604
+ var _this31 = this;
5453
5605
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5454
5606
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5455
5607
  }
@@ -5463,22 +5615,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5463
5615
  return _promise.default.reject(new _parameter.default('no audio control associated to the meeting'));
5464
5616
  }
5465
5617
  return logRequest(this.video.handleClientRequest(this, false).then(function () {
5466
- _util2.default.handleVideoLogging(_this30.mediaProperties.videoStream);
5618
+ _util2.default.handleVideoLogging(_this31.mediaProperties.videoStream);
5467
5619
  // @ts-ignore
5468
- _this30.webex.internal.newMetrics.submitClientEvent({
5620
+ _this31.webex.internal.newMetrics.submitClientEvent({
5469
5621
  name: 'client.unmuted',
5470
5622
  payload: {
5471
5623
  trigger: 'user-interaction',
5472
5624
  mediaType: 'video'
5473
5625
  },
5474
5626
  options: {
5475
- meetingId: _this30.id
5627
+ meetingId: _this31.id
5476
5628
  }
5477
5629
  });
5478
5630
  }).catch(function (error) {
5479
5631
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_VIDEO_FAILURE, {
5480
- correlation_id: _this30.correlationId,
5481
- locus_id: _this30.locusUrl.split('/').pop(),
5632
+ correlation_id: _this31.correlationId,
5633
+ locus_id: _this31.locusUrl.split('/').pop(),
5482
5634
  reason: error.message,
5483
5635
  stack: error.stack
5484
5636
  });
@@ -5508,7 +5660,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5508
5660
  key: "joinWithMedia",
5509
5661
  value: (function () {
5510
5662
  var _joinWithMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5511
- var _this31 = this;
5663
+ var _this32 = this;
5512
5664
  var options,
5513
5665
  mediaOptions,
5514
5666
  _options$joinOptions,
@@ -5591,7 +5743,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5591
5743
  case 35:
5592
5744
  _context16.next = 37;
5593
5745
  return this.addMediaInternal(function () {
5594
- return _this31.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
5746
+ return _this32.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
5595
5747
  }, turnServerInfo, forceTurnDiscovery, mediaOptions);
5596
5748
  case 37:
5597
5749
  mediaResponse = _context16.sent;
@@ -5686,7 +5838,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5686
5838
  }, {
5687
5839
  key: "reconnect",
5688
5840
  value: function reconnect(options) {
5689
- var _this32 = this;
5841
+ var _this33 = this;
5690
5842
  _loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
5691
5843
  if (!this.reconnectionManager || !this.reconnectionManager.reconnect) {
5692
5844
  return _promise.default.reject(new _parameter.default('Cannot reconnect, ReconnectionManager must first be defined.'));
@@ -5702,10 +5854,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5702
5854
  while (1) switch (_context17.prev = _context17.next) {
5703
5855
  case 0:
5704
5856
  _context17.next = 2;
5705
- return _this32.waitForRemoteSDPAnswer();
5857
+ return _this33.waitForRemoteSDPAnswer();
5706
5858
  case 2:
5707
5859
  _context17.next = 4;
5708
- return _this32.waitForMediaConnectionConnected();
5860
+ return _this33.waitForMediaConnectionConnected();
5709
5861
  case 4:
5710
5862
  case "end":
5711
5863
  return _context17.stop();
@@ -5719,7 +5871,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5719
5871
  return _promise.default.resolve();
5720
5872
  }
5721
5873
  _loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
5722
- _this32.uploadLogs({
5874
+ _this33.uploadLogs({
5723
5875
  file: 'meeting/index',
5724
5876
  function: 'reconnect'
5725
5877
  });
@@ -5766,19 +5918,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5766
5918
  }, {
5767
5919
  key: "setCaptionLanguage",
5768
5920
  value: function setCaptionLanguage(language) {
5769
- var _this33 = this;
5921
+ var _this34 = this;
5770
5922
  return new _promise.default(function (resolve, reject) {
5771
- if (!_this33.isTranscriptionSupported()) {
5923
+ if (!_this34.isTranscriptionSupported()) {
5772
5924
  _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
5773
5925
  reject(new Error('Webex Assistant is not enabled/supported'));
5774
5926
  }
5775
5927
  try {
5776
5928
  var voiceaListenerCaptionUpdate = function voiceaListenerCaptionUpdate(payload) {
5777
5929
  // @ts-ignore
5778
- _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);
5779
5931
  var statusCode = payload.statusCode;
5780
5932
  if (statusCode === 200) {
5781
- _this33.transcription.languageOptions = _objectSpread(_objectSpread({}, _this33.transcription.languageOptions), {}, {
5933
+ _this34.transcription.languageOptions = _objectSpread(_objectSpread({}, _this34.transcription.languageOptions), {}, {
5782
5934
  currentCaptionLanguage: language
5783
5935
  });
5784
5936
  resolve(language);
@@ -5787,9 +5939,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5787
5939
  }
5788
5940
  };
5789
5941
  // @ts-ignore
5790
- _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);
5791
5943
  // @ts-ignore
5792
- _this33.webex.internal.voicea.requestLanguage(language);
5944
+ _this34.webex.internal.voicea.requestLanguage(language);
5793
5945
  } catch (error) {
5794
5946
  _loggerProxy.default.logger.error("Meeting:index#setCaptionLanguage --> ".concat(error));
5795
5947
  reject(error);
@@ -5805,23 +5957,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5805
5957
  }, {
5806
5958
  key: "setSpokenLanguage",
5807
5959
  value: function setSpokenLanguage(language) {
5808
- var _this34 = this;
5960
+ var _this35 = this;
5809
5961
  return new _promise.default(function (resolve, reject) {
5810
- if (!_this34.isTranscriptionSupported()) {
5962
+ if (!_this35.isTranscriptionSupported()) {
5811
5963
  _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
5812
5964
  reject(new Error('Webex Assistant is not enabled/supported'));
5813
5965
  }
5814
- if (_this34.getCurUserType() !== 'host') {
5966
+ if (_this35.getCurUserType() !== 'host') {
5815
5967
  _loggerProxy.default.logger.error('Meeting:index#setSpokenLanguage --> Only host can set spoken language');
5816
5968
  reject(new Error('Only host can set spoken language'));
5817
5969
  }
5818
5970
  try {
5819
5971
  var voiceaListenerLanguageUpdate = function voiceaListenerLanguageUpdate(payload) {
5820
5972
  // @ts-ignore
5821
- _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);
5822
5974
  var languageCode = payload.languageCode;
5823
5975
  if (languageCode) {
5824
- _this34.transcription.languageOptions = _objectSpread(_objectSpread({}, _this34.transcription.languageOptions), {}, {
5976
+ _this35.transcription.languageOptions = _objectSpread(_objectSpread({}, _this35.transcription.languageOptions), {}, {
5825
5977
  currentSpokenLanguage: languageCode
5826
5978
  });
5827
5979
  resolve(languageCode);
@@ -5831,10 +5983,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5831
5983
  };
5832
5984
 
5833
5985
  // @ts-ignore
5834
- _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);
5835
5987
 
5836
5988
  // @ts-ignore
5837
- _this34.webex.internal.voicea.setSpokenLanguage(language);
5989
+ _this35.webex.internal.voicea.setSpokenLanguage(language);
5838
5990
  } catch (error) {
5839
5991
  _loggerProxy.default.logger.error("Meeting:index#setSpokenLanguage --> ".concat(error));
5840
5992
  reject(error);
@@ -5957,7 +6109,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5957
6109
  */
5958
6110
  function () {
5959
6111
  var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
5960
- var _this35 = this;
6112
+ var _this36 = this;
5961
6113
  var options,
5962
6114
  errorMessage,
5963
6115
  error,
@@ -6106,62 +6258,61 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6106
6258
  return _context19.abrupt("return", _promise.default.reject(_context19.t0));
6107
6259
  case 51:
6108
6260
  return _context19.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
6109
- _this35.meetingFiniteStateMachine.join();
6110
- _this35.setupLocusMediaRequest();
6261
+ _this36.meetingFiniteStateMachine.join();
6262
+ _this36.setupLocusMediaRequest();
6111
6263
 
6112
6264
  // @ts-ignore
6113
- _this35.webex.internal.device.meetingStarted();
6114
- (0, _classPrivateFieldSet2.default)(_this35, _isoLocalClientMeetingJoinTime, new Date().toISOString());
6265
+ _this36.webex.internal.device.meetingStarted();
6115
6266
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
6116
6267
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
6117
- correlation_id: _this35.correlationId
6268
+ correlation_id: _this36.correlationId
6118
6269
  });
6119
6270
  joinSuccess(join);
6120
- _this35.deferJoin = undefined;
6271
+ _this36.deferJoin = undefined;
6121
6272
  return join;
6122
6273
  }).catch(function (error) {
6123
- var _this35$meetingInfo, _error$error;
6124
- _this35.meetingFiniteStateMachine.fail(error);
6274
+ var _this36$meetingInfo, _error$error;
6275
+ _this36.meetingFiniteStateMachine.fail(error);
6125
6276
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
6126
6277
 
6127
6278
  // @ts-ignore
6128
- _this35.webex.internal.newMetrics.submitClientEvent({
6279
+ _this36.webex.internal.newMetrics.submitClientEvent({
6129
6280
  name: 'client.locus.join.response',
6130
6281
  payload: {
6131
6282
  identifiers: {
6132
- 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
6133
6284
  }
6134
6285
  },
6135
6286
  options: {
6136
- meetingId: _this35.id,
6287
+ meetingId: _this36.id,
6137
6288
  rawError: error
6138
6289
  }
6139
6290
  });
6140
6291
 
6141
6292
  // TODO: change this to error codes and pre defined dictionary
6142
6293
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
6143
- correlation_id: _this35.correlationId,
6294
+ correlation_id: _this36.correlationId,
6144
6295
  reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
6145
6296
  stack: error.stack
6146
6297
  });
6147
6298
 
6148
6299
  // Upload logs on join Failure
6149
- _triggerProxy.default.trigger(_this35, {
6300
+ _triggerProxy.default.trigger(_this36, {
6150
6301
  file: 'meeting/index',
6151
6302
  function: 'join'
6152
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this35);
6303
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this36);
6153
6304
  joinFailed(error);
6154
- _this35.deferJoin = undefined;
6305
+ _this36.deferJoin = undefined;
6155
6306
  return _promise.default.reject(error);
6156
6307
  }).then(function (join) {
6157
6308
  // @ts-ignore - config coming from registerPlugin
6158
- if (_this35.config.enableAutomaticLLM) {
6309
+ if (_this36.config.enableAutomaticLLM) {
6159
6310
  // @ts-ignore
6160
- _this35.webex.internal.llm.on('online', _this35.handleLLMOnline);
6161
- _this35.updateLLMConnection().catch(function (error) {
6311
+ _this36.webex.internal.llm.on('online', _this36.handleLLMOnline);
6312
+ _this36.updateLLMConnection().catch(function (error) {
6162
6313
  _loggerProxy.default.logger.error('Meeting:index#join --> Transcription Socket Connection Failed', error);
6163
6314
  _metrics.default.sendBehavioralMetric(_constants2.default.LLM_CONNECTION_AFTER_JOIN_FAILURE, {
6164
- correlation_id: _this35.correlationId,
6315
+ correlation_id: _this36.correlationId,
6165
6316
  reason: error === null || error === void 0 ? void 0 : error.message,
6166
6317
  stack: error.stack
6167
6318
  });
@@ -6193,7 +6344,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6193
6344
  key: "updateLLMConnection",
6194
6345
  value: (function () {
6195
6346
  var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
6196
- var _this36 = this;
6347
+ var _this37 = this;
6197
6348
  var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, practiceSessionDatachannelUrl, isJoined, dataChannelUrl;
6198
6349
  return _regenerator.default.wrap(function _callee20$(_context20) {
6199
6350
  while (1) switch (_context20.prev = _context20.next) {
@@ -6233,9 +6384,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6233
6384
  case 11:
6234
6385
  return _context20.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl).then(function (registerAndConnectResult) {
6235
6386
  // @ts-ignore - Fix type
6236
- _this36.webex.internal.llm.off('event:relay.event', _this36.processRelayEvent);
6387
+ _this37.webex.internal.llm.off('event:relay.event', _this37.processRelayEvent);
6237
6388
  // @ts-ignore - Fix type
6238
- _this36.webex.internal.llm.on('event:relay.event', _this36.processRelayEvent);
6389
+ _this37.webex.internal.llm.on('event:relay.event', _this37.processRelayEvent);
6239
6390
  _loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
6240
6391
  return _promise.default.resolve(registerAndConnectResult);
6241
6392
  }));
@@ -6289,7 +6440,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6289
6440
  }, {
6290
6441
  key: "dialInPstn",
6291
6442
  value: function dialInPstn() {
6292
- var _this37 = this;
6443
+ var _this38 = this;
6293
6444
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
6294
6445
 
6295
6446
  var correlationId = this.correlationId,
@@ -6305,10 +6456,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6305
6456
  }).catch(function (error) {
6306
6457
  var _error$error2;
6307
6458
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
6308
- correlation_id: _this37.correlationId,
6309
- dial_in_url: _this37.dialInUrl,
6459
+ correlation_id: _this38.correlationId,
6460
+ dial_in_url: _this38.dialInUrl,
6310
6461
  locus_id: locusUrl.split('/').pop(),
6311
- client_url: _this37.deviceUrl,
6462
+ client_url: _this38.deviceUrl,
6312
6463
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
6313
6464
  stack: error.stack
6314
6465
  });
@@ -6326,7 +6477,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6326
6477
  }, {
6327
6478
  key: "dialOutPstn",
6328
6479
  value: function dialOutPstn(phoneNumber) {
6329
- var _this38 = this;
6480
+ var _this39 = this;
6330
6481
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
6331
6482
 
6332
6483
  var correlationId = this.correlationId,
@@ -6343,10 +6494,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6343
6494
  }).catch(function (error) {
6344
6495
  var _error$error3;
6345
6496
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
6346
- correlation_id: _this38.correlationId,
6347
- dial_out_url: _this38.dialOutUrl,
6497
+ correlation_id: _this39.correlationId,
6498
+ dial_out_url: _this39.dialOutUrl,
6348
6499
  locus_id: locusUrl.split('/').pop(),
6349
- client_url: _this38.deviceUrl,
6500
+ client_url: _this39.deviceUrl,
6350
6501
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
6351
6502
  stack: error.stack
6352
6503
  });
@@ -6377,7 +6528,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6377
6528
  }, {
6378
6529
  key: "moveTo",
6379
6530
  value: function moveTo(resourceId) {
6380
- var _this39 = this;
6531
+ var _this40 = this;
6381
6532
  if (!resourceId) {
6382
6533
  throw new _parameter.default('Cannot move call without a resourceId.');
6383
6534
  }
@@ -6421,12 +6572,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6421
6572
  while (1) switch (_context21.prev = _context21.next) {
6422
6573
  case 0:
6423
6574
  _context21.prev = 0;
6424
- if (!(_this39.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6575
+ if (!(_this40.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6425
6576
  _context21.next = 4;
6426
6577
  break;
6427
6578
  }
6428
6579
  _context21.next = 4;
6429
- return _this39.releaseScreenShareFloor();
6580
+ return _this40.releaseScreenShareFloor();
6430
6581
  case 4:
6431
6582
  mediaSettings = {
6432
6583
  mediaDirection: {
@@ -6438,37 +6589,37 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6438
6589
  receiveShare: true
6439
6590
  }
6440
6591
  };
6441
- _this39.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6442
- _this39.mediaProperties.unsetRemoteMedia();
6592
+ _this40.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6593
+ _this40.mediaProperties.unsetRemoteMedia();
6443
6594
 
6444
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
6445
6596
  // once the device answers we close the old connection and create new media server connection with only share enabled
6446
- if (!_this39.statsAnalyzer) {
6597
+ if (!_this40.statsAnalyzer) {
6447
6598
  _context21.next = 10;
6448
6599
  break;
6449
6600
  }
6450
6601
  _context21.next = 10;
6451
- return _this39.statsAnalyzer.stopAnalyzer();
6602
+ return _this40.statsAnalyzer.stopAnalyzer();
6452
6603
  case 10:
6453
6604
  _context21.next = 12;
6454
- return _this39.closeRemoteStreams();
6605
+ return _this40.closeRemoteStreams();
6455
6606
  case 12:
6456
6607
  _context21.next = 14;
6457
- return _this39.closePeerConnections();
6608
+ return _this40.closePeerConnections();
6458
6609
  case 14:
6459
- _this39.cleanupLocalStreams();
6460
- _this39.unsetRemoteStreams();
6461
- _this39.unsetPeerConnections();
6462
- _this39.reconnectionManager.cleanUp();
6610
+ _this40.cleanupLocalStreams();
6611
+ _this40.unsetRemoteStreams();
6612
+ _this40.unsetPeerConnections();
6613
+ _this40.reconnectionManager.cleanUp();
6463
6614
  _context21.next = 20;
6464
- return _this39.addMedia({
6615
+ return _this40.addMedia({
6465
6616
  audioEnabled: false,
6466
6617
  videoEnabled: false,
6467
6618
  shareVideoEnabled: true
6468
6619
  });
6469
6620
  case 20:
6470
6621
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
6471
- _this39.isMoveToInProgress = false;
6622
+ _this40.isMoveToInProgress = false;
6472
6623
  _context21.next = 29;
6473
6624
  break;
6474
6625
  case 24:
@@ -6476,12 +6627,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6476
6627
  _context21.t0 = _context21["catch"](0);
6477
6628
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context21.t0);
6478
6629
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6479
- correlation_id: _this39.correlationId,
6480
- locus_id: _this39.locusUrl.split('/').pop(),
6630
+ correlation_id: _this40.correlationId,
6631
+ locus_id: _this40.locusUrl.split('/').pop(),
6481
6632
  reason: _context21.t0.message,
6482
6633
  stack: _context21.t0.stack
6483
6634
  });
6484
- _this39.isMoveToInProgress = false;
6635
+ _this40.isMoveToInProgress = false;
6485
6636
  case 29:
6486
6637
  case "end":
6487
6638
  return _context21.stop();
@@ -6497,17 +6648,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6497
6648
  resourceId: resourceId,
6498
6649
  moveToResource: true
6499
6650
  }).then(function () {
6500
- _this39.meetingFiniteStateMachine.join();
6651
+ _this40.meetingFiniteStateMachine.join();
6501
6652
  }).catch(function (error) {
6502
- _this39.meetingFiniteStateMachine.fail(error);
6653
+ _this40.meetingFiniteStateMachine.fail(error);
6503
6654
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6504
- correlation_id: _this39.correlationId,
6505
- locus_id: _this39.locusUrl.split('/').pop(),
6655
+ correlation_id: _this40.correlationId,
6656
+ locus_id: _this40.locusUrl.split('/').pop(),
6506
6657
  reason: error.message,
6507
6658
  stack: error.stack
6508
6659
  });
6509
6660
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', error);
6510
- _this39.isMoveToInProgress = false;
6661
+ _this40.isMoveToInProgress = false;
6511
6662
  return _promise.default.reject(error);
6512
6663
  });
6513
6664
  }
@@ -6522,7 +6673,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6522
6673
  }, {
6523
6674
  key: "moveFrom",
6524
6675
  value: function moveFrom(resourceId) {
6525
- var _this40 = this;
6676
+ var _this41 = this;
6526
6677
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
6527
6678
  if (!resourceId) {
6528
6679
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -6537,19 +6688,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6537
6688
  }
6538
6689
  });
6539
6690
  return _util2.default.joinMeetingOptions(this).then(function () {
6540
- return _util2.default.leaveMeeting(_this40, {
6691
+ return _util2.default.leaveMeeting(_this41, {
6541
6692
  resourceId: resourceId,
6542
6693
  correlationId: oldCorrelationId,
6543
6694
  moveMeeting: true
6544
6695
  }).then(function () {
6545
- _this40.resourceId = '';
6696
+ _this41.resourceId = '';
6546
6697
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
6547
6698
  });
6548
6699
  }).catch(function (error) {
6549
- _this40.meetingFiniteStateMachine.fail(error);
6700
+ _this41.meetingFiniteStateMachine.fail(error);
6550
6701
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
6551
- correlation_id: _this40.correlationId,
6552
- locus_id: _this40.locusUrl.split('/').pop(),
6702
+ correlation_id: _this41.correlationId,
6703
+ locus_id: _this41.locusUrl.split('/').pop(),
6553
6704
  reason: error.message,
6554
6705
  stack: error.stack
6555
6706
  });
@@ -6598,7 +6749,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6598
6749
  turnServerInfo: turnServerInfo,
6599
6750
  bundlePolicy: bundlePolicy,
6600
6751
  // @ts-ignore - config coming from registerPlugin
6601
- iceCandidatesTimeout: this.config.iceCandidatesGatheringTimeout
6752
+ iceCandidatesTimeout: this.config.iceCandidatesGatheringTimeout,
6753
+ // @ts-ignore - config coming from registerPlugin
6754
+ disableAudioMainDtx: this.config.experimental.disableAudioMainDtx,
6755
+ stopIceGatheringAfterFirstRelayCandidate:
6756
+ // @ts-ignore - config coming from registerPlugin
6757
+ this.config.stopIceGatheringAfterFirstRelayCandidate
6602
6758
  });
6603
6759
  this.mediaProperties.setMediaPeerConnection(mc);
6604
6760
  this.setupMediaConnectionListeners();
@@ -6665,9 +6821,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6665
6821
  }, {
6666
6822
  key: "forwardEvent",
6667
6823
  value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
6668
- var _this41 = this;
6824
+ var _this42 = this;
6669
6825
  eventEmitter.on(eventTypeToForward, function (data) {
6670
- return _triggerProxy.default.trigger(_this41, {
6826
+ return _triggerProxy.default.trigger(_this42, {
6671
6827
  file: 'meetings',
6672
6828
  function: 'addMedia'
6673
6829
  }, meetingEventType, data);
@@ -6737,7 +6893,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6737
6893
  key: "waitForMediaConnectionConnected",
6738
6894
  value: (function () {
6739
6895
  var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
6740
- var iceConnected, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, _this$mediaProperties14;
6896
+ var iceConnected, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, _this$mediaProperties14, timedOutError;
6741
6897
  return _regenerator.default.wrap(function _callee24$(_context24) {
6742
6898
  while (1) switch (_context24.prev = _context24.next) {
6743
6899
  case 0:
@@ -6745,7 +6901,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6745
6901
  _context24.next = 3;
6746
6902
  return this.mediaProperties.waitForMediaConnectionConnected();
6747
6903
  case 3:
6748
- _context24.next = 30;
6904
+ _context24.next = 32;
6749
6905
  break;
6750
6906
  case 5:
6751
6907
  _context24.prev = 5;
@@ -6787,7 +6943,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6787
6943
  errors: _context24.t14
6788
6944
  };
6789
6945
  _context24.t16 = {
6790
- meetingId: this.id
6946
+ meetingId: this.id,
6947
+ rawError: _context24.t0
6791
6948
  };
6792
6949
  _context24.t17 = {
6793
6950
  name: 'client.ice.end',
@@ -6796,8 +6953,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6796
6953
  };
6797
6954
  _context24.t1.submitClientEvent.call(_context24.t1, _context24.t17);
6798
6955
  case 29:
6799
- throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
6800
- case 30:
6956
+ timedOutError = new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
6957
+ timedOutError.cause = _context24.t0;
6958
+ throw timedOutError;
6959
+ case 32:
6801
6960
  case "end":
6802
6961
  return _context24.stop();
6803
6962
  }
@@ -6828,6 +6987,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6828
6987
  networkQualityMonitor: this.networkQualityMonitor,
6829
6988
  isMultistream: this.isMultistream
6830
6989
  });
6990
+ this.shareCAEventSentStatus = {
6991
+ transmitStart: false,
6992
+ transmitStop: false,
6993
+ receiveStart: false,
6994
+ receiveStop: false
6995
+ };
6831
6996
  this.setupStatsAnalyzerEventHandlers();
6832
6997
  this.networkQualityMonitor.on(_internalMediaCore.NetworkQualityEventNames.NETWORK_QUALITY, this.sendNetworkQualityEvent.bind(this));
6833
6998
  }
@@ -6844,7 +7009,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6844
7009
  key: "waitForRemoteSDPAnswer",
6845
7010
  value: (function () {
6846
7011
  var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
6847
- var _this42 = this;
7012
+ var _this43 = this;
6848
7013
  var LOG_HEADER, deferSDPAnswer;
6849
7014
  return _regenerator.default.wrap(function _callee25$(_context25) {
6850
7015
  while (1) switch (_context25.prev = _context25.next) {
@@ -6860,23 +7025,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6860
7025
  deferSDPAnswer = this.deferSDPAnswer;
6861
7026
  this.sdpResponseTimer = setTimeout(function () {
6862
7027
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " timeout! no REMOTE SDP ANSWER received within ").concat(_constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT / 1000, " seconds"));
7028
+ var error = new Error('Timed out waiting for REMOTE SDP ANSWER');
7029
+
6863
7030
  // @ts-ignore
6864
- _this42.webex.internal.newMetrics.submitClientEvent({
7031
+ _this43.webex.internal.newMetrics.submitClientEvent({
6865
7032
  name: 'client.media-engine.remote-sdp-received',
6866
7033
  payload: {
6867
7034
  canProceed: false,
6868
7035
  errors: [
6869
7036
  // @ts-ignore
6870
- _this42.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
7037
+ _this43.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
6871
7038
  clientErrorCode: _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MISSING_ROAP_ANSWER_CLIENT_CODE
6872
7039
  })]
6873
7040
  },
6874
7041
  options: {
6875
- meetingId: _this42.id,
6876
- rawError: new Error('Timeout waiting for SDP answer')
7042
+ meetingId: _this43.id,
7043
+ rawError: error
6877
7044
  }
6878
7045
  });
6879
- deferSDPAnswer.reject(new Error('Timed out waiting for REMOTE SDP ANSWER'));
7046
+ deferSDPAnswer.reject(error);
6880
7047
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
6881
7048
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
6882
7049
  return _context25.abrupt("return", deferSDPAnswer.promise);
@@ -7016,7 +7183,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7016
7183
  break;
7017
7184
  case 7:
7018
7185
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
7019
- throw new _webexErrors.AddMediaFailed();
7186
+ throw new _webexErrors.AddMediaFailed(error);
7020
7187
  case 9:
7021
7188
  case "end":
7022
7189
  return _context28.stop();
@@ -7379,10 +7546,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7379
7546
  }, {
7380
7547
  key: "addMedia",
7381
7548
  value: function addMedia() {
7382
- var _this43 = this;
7549
+ var _this44 = this;
7383
7550
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7384
7551
  return this.addMediaInternal(function () {
7385
- return _this43.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7552
+ return _this44.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7386
7553
  }, undefined, false, options);
7387
7554
  }
7388
7555
 
@@ -7418,10 +7585,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7418
7585
  _this$remoteMediaMana,
7419
7586
  _yield$this$mediaProp,
7420
7587
  connectionType,
7588
+ ipVersion,
7421
7589
  selectedCandidatePairChanges,
7422
7590
  numTransports,
7423
- reachabilityStats,
7424
7591
  iceCandidateErrors,
7592
+ reachabilityMetrics,
7425
7593
  _this$mediaProperties15,
7426
7594
  _this$mediaProperties16,
7427
7595
  _this$mediaProperties17,
@@ -7443,7 +7611,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7443
7611
  _this$mediaProperties33,
7444
7612
  _this$mediaProperties34,
7445
7613
  _this$mediaProperties35,
7446
- reachabilityMetrics,
7614
+ _reachabilityMetrics,
7447
7615
  _yield$this$mediaProp2,
7448
7616
  _selectedCandidatePairChanges,
7449
7617
  _numTransports,
@@ -7564,28 +7732,33 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7564
7732
  case 46:
7565
7733
  _yield$this$mediaProp = _context35.sent;
7566
7734
  connectionType = _yield$this$mediaProp.connectionType;
7735
+ ipVersion = _yield$this$mediaProp.ipVersion;
7567
7736
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
7568
7737
  numTransports = _yield$this$mediaProp.numTransports;
7569
- _context35.next = 52;
7570
- return this.webex.meetings.reachability.getReachabilityMetrics();
7571
- case 52:
7572
- reachabilityStats = _context35.sent;
7573
7738
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7739
+ _context35.next = 54;
7740
+ return this.getMediaReachabilityMetricFields();
7741
+ case 54:
7742
+ reachabilityMetrics = _context35.sent;
7574
7743
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
7575
7744
  correlation_id: this.correlationId,
7576
7745
  locus_id: this.locusUrl.split('/').pop(),
7577
7746
  connectionType: connectionType,
7747
+ ipVersion: ipVersion,
7578
7748
  selectedCandidatePairChanges: selectedCandidatePairChanges,
7579
7749
  numTransports: numTransports,
7580
7750
  isMultistream: this.isMultistream,
7581
7751
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer,
7582
7752
  isJoinWithMediaRetry: this.joinWithMediaRetryInfo.isRetry
7583
- }, reachabilityStats), iceCandidateErrors), {}, {
7753
+ }, reachabilityMetrics), iceCandidateErrors), {}, {
7584
7754
  iceCandidatesCount: this.iceCandidatesCount
7585
7755
  }));
7586
7756
  // @ts-ignore
7587
7757
  this.webex.internal.newMetrics.submitClientEvent({
7588
7758
  name: 'client.media-engine.ready',
7759
+ payload: {
7760
+ ipVersion: ipVersion
7761
+ },
7589
7762
  options: {
7590
7763
  meetingId: this.id
7591
7764
  }
@@ -7595,21 +7768,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7595
7768
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
7596
7769
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
7597
7770
  this.startPeriodicLogUpload();
7598
- _context35.next = 79;
7771
+ _context35.next = 80;
7599
7772
  break;
7600
- case 61:
7601
- _context35.prev = 61;
7773
+ case 62:
7774
+ _context35.prev = 62;
7602
7775
  _context35.t1 = _context35["catch"](19);
7603
7776
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context35.t1);
7604
7777
 
7605
7778
  // @ts-ignore
7606
- _context35.next = 66;
7607
- return this.webex.meetings.reachability.getReachabilityMetrics();
7608
- case 66:
7609
- reachabilityMetrics = _context35.sent;
7610
- _context35.next = 69;
7779
+ _context35.next = 67;
7780
+ return this.getMediaReachabilityMetricFields();
7781
+ case 67:
7782
+ _reachabilityMetrics = _context35.sent;
7783
+ _context35.next = 70;
7611
7784
  return this.mediaProperties.getCurrentConnectionInfo();
7612
- case 69:
7785
+ case 70:
7613
7786
  _yield$this$mediaProp2 = _context35.sent;
7614
7787
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
7615
7788
  _numTransports = _yield$this$mediaProp2.numTransports;
@@ -7630,12 +7803,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7630
7803
  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',
7631
7804
  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',
7632
7805
  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'
7633
- }, reachabilityMetrics), _iceCandidateErrors), {}, {
7806
+ }, _reachabilityMetrics), _iceCandidateErrors), {}, {
7634
7807
  iceCandidatesCount: this.iceCandidatesCount
7635
7808
  }));
7636
- _context35.next = 76;
7809
+ _context35.next = 77;
7637
7810
  return this.cleanUpOnAddMediaFailure();
7638
- case 76:
7811
+ case 77:
7639
7812
  // Upload logs on error while adding media
7640
7813
  _triggerProxy.default.trigger(this, {
7641
7814
  file: 'meeting/index',
@@ -7647,15 +7820,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7647
7820
  });
7648
7821
  }
7649
7822
  throw _context35.t1;
7650
- case 79:
7651
- _context35.prev = 79;
7823
+ case 80:
7824
+ _context35.prev = 80;
7652
7825
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
7653
- return _context35.finish(79);
7654
- case 82:
7826
+ return _context35.finish(80);
7827
+ case 83:
7655
7828
  case "end":
7656
7829
  return _context35.stop();
7657
7830
  }
7658
- }, _callee35, this, [[19, 61, 79, 82], [24, 29]]);
7831
+ }, _callee35, this, [[19, 62, 80, 83], [24, 29]]);
7659
7832
  }));
7660
7833
  function addMediaInternal(_x33, _x34, _x35) {
7661
7834
  return _addMediaInternal.apply(this, arguments);
@@ -7687,7 +7860,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7687
7860
  * @memberof Meeting
7688
7861
  */
7689
7862
  function enqueueMediaUpdate(mediaUpdateType) {
7690
- var _this44 = this;
7863
+ var _this45 = this;
7691
7864
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7692
7865
  var canUpdateMediaNow = this.canUpdateMedia();
7693
7866
  return new _promise.default(function (resolve, reject) {
@@ -7698,9 +7871,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7698
7871
  options: options
7699
7872
  };
7700
7873
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
7701
- _this44.queuedMediaUpdates.push(queueItem);
7874
+ _this45.queuedMediaUpdates.push(queueItem);
7702
7875
  if (canUpdateMediaNow) {
7703
- _this44.processNextQueuedMediaUpdate();
7876
+ _this45.processNextQueuedMediaUpdate();
7704
7877
  }
7705
7878
  });
7706
7879
  }
@@ -7805,7 +7978,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7805
7978
  }, {
7806
7979
  key: "acknowledge",
7807
7980
  value: function acknowledge(type) {
7808
- var _this45 = this;
7981
+ var _this46 = this;
7809
7982
  if (!type) {
7810
7983
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
7811
7984
  }
@@ -7817,12 +7990,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7817
7990
  }).then(function (response) {
7818
7991
  return _promise.default.resolve(response);
7819
7992
  }).then(function (response) {
7820
- _this45.meetingFiniteStateMachine.ring(type);
7993
+ _this46.meetingFiniteStateMachine.ring(type);
7821
7994
  // @ts-ignore
7822
- _this45.webex.internal.newMetrics.submitClientEvent({
7995
+ _this46.webex.internal.newMetrics.submitClientEvent({
7823
7996
  name: 'client.alert.displayed',
7824
7997
  options: {
7825
- meetingId: _this45.id
7998
+ meetingId: _this46.id
7826
7999
  }
7827
8000
  });
7828
8001
  return _promise.default.resolve({
@@ -7847,12 +8020,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7847
8020
  }, {
7848
8021
  key: "decline",
7849
8022
  value: function decline(reason) {
7850
- var _this46 = this;
8023
+ var _this47 = this;
7851
8024
  return _util2.default.declineMeeting(this, reason).then(function (decline) {
7852
- _this46.meetingFiniteStateMachine.decline();
8025
+ _this47.meetingFiniteStateMachine.decline();
7853
8026
  return _promise.default.resolve(decline);
7854
8027
  }).catch(function (error) {
7855
- _this46.meetingFiniteStateMachine.fail(error);
8028
+ _this47.meetingFiniteStateMachine.fail(error);
7856
8029
  return _promise.default.reject(error);
7857
8030
  });
7858
8031
  }
@@ -7903,7 +8076,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7903
8076
  }, {
7904
8077
  key: "leave",
7905
8078
  value: function leave() {
7906
- var _this47 = this;
8079
+ var _this48 = this;
7907
8080
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7908
8081
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
7909
8082
 
@@ -7915,7 +8088,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7915
8088
  var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7916
8089
  return (
7917
8090
  // @ts-ignore
7918
- _this47.webex.internal.newMetrics.submitClientEvent({
8091
+ _this48.webex.internal.newMetrics.submitClientEvent({
7919
8092
  name: 'client.call.leave',
7920
8093
  payload: _objectSpread({
7921
8094
  trigger: 'user-interaction',
@@ -7923,7 +8096,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7923
8096
  leaveReason: options.clientEventLeaveReason
7924
8097
  }, payload),
7925
8098
  options: {
7926
- meetingId: _this47.id
8099
+ meetingId: _this48.id
7927
8100
  }
7928
8101
  })
7929
8102
  );
@@ -7932,24 +8105,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7932
8105
  return _util2.default.leaveMeeting(this, options).then(function (leave) {
7933
8106
  // CA team recommends submitting this *after* locus /leave
7934
8107
  submitLeaveMetric();
7935
- _this47.meetingFiniteStateMachine.leave();
7936
- _this47.clearMeetingData();
8108
+ _this48.meetingFiniteStateMachine.leave();
8109
+ _this48.clearMeetingData();
7937
8110
 
7938
8111
  // upload logs on leave irrespective of meeting delete
7939
- _triggerProxy.default.trigger(_this47, {
8112
+ _triggerProxy.default.trigger(_this48, {
7940
8113
  file: 'meeting/index',
7941
8114
  function: 'leave'
7942
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
8115
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this48);
7943
8116
 
7944
8117
  // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
7945
- if (_this47.wirelessShare || _this47.guest) {
8118
+ if (_this48.wirelessShare || _this48.guest) {
7946
8119
  // If screen sharing clean the meeting object
7947
- _triggerProxy.default.trigger(_this47, {
8120
+ _triggerProxy.default.trigger(_this48, {
7948
8121
  file: 'meeting/index',
7949
8122
  function: 'leave'
7950
8123
  }, _constants.EVENTS.DESTROY_MEETING, {
7951
8124
  reason: options.reason,
7952
- meetingId: _this47.id
8125
+ meetingId: _this48.id
7953
8126
  });
7954
8127
  }
7955
8128
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
@@ -7966,16 +8139,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7966
8139
  shownToUser: false
7967
8140
  }]
7968
8141
  });
7969
- _this47.meetingFiniteStateMachine.fail(error);
8142
+ _this48.meetingFiniteStateMachine.fail(error);
7970
8143
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
7971
8144
  // upload logs on leave irrespective of meeting delete
7972
- _triggerProxy.default.trigger(_this47, {
8145
+ _triggerProxy.default.trigger(_this48, {
7973
8146
  file: 'meeting/index',
7974
8147
  function: 'leave'
7975
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
8148
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this48);
7976
8149
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
7977
- correlation_id: _this47.correlationId,
7978
- locus_id: _this47.locusUrl.split('/').pop(),
8150
+ correlation_id: _this48.correlationId,
8151
+ locus_id: _this48.locusUrl.split('/').pop(),
7979
8152
  reason: error.message,
7980
8153
  stack: error.stack,
7981
8154
  code: error.code
@@ -7995,7 +8168,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7995
8168
  }, {
7996
8169
  key: "startWhiteboardShare",
7997
8170
  value: function startWhiteboardShare(channelUrl, resourceToken) {
7998
- var _this48 = this;
8171
+ var _this49 = this;
7999
8172
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
8000
8173
  return element.name === 'whiteboard';
8001
8174
  });
@@ -8024,13 +8197,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8024
8197
  body.resourceToken = resourceToken;
8025
8198
  }
8026
8199
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
8027
- _this48.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8200
+ _this49.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8028
8201
  return _promise.default.resolve();
8029
8202
  }).catch(function (error) {
8030
8203
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
8031
8204
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
8032
- correlation_id: _this48.correlationId,
8033
- locus_id: _this48.locusUrl.split('/').pop(),
8205
+ correlation_id: _this49.correlationId,
8206
+ locus_id: _this49.locusUrl.split('/').pop(),
8034
8207
  reason: error.message,
8035
8208
  stack: error.stack,
8036
8209
  board: {
@@ -8053,7 +8226,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8053
8226
  }, {
8054
8227
  key: "stopWhiteboardShare",
8055
8228
  value: function stopWhiteboardShare(channelUrl) {
8056
- var _this49 = this;
8229
+ var _this50 = this;
8057
8230
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
8058
8231
  return element.name === 'whiteboard';
8059
8232
  });
@@ -8076,8 +8249,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8076
8249
  }).catch(function (error) {
8077
8250
  _loggerProxy.default.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
8078
8251
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_STOP_WHITEBOARD_SHARE_FAILURE, {
8079
- correlation_id: _this49.correlationId,
8080
- locus_id: _this49.locusUrl.split('/').pop(),
8252
+ correlation_id: _this50.correlationId,
8253
+ locus_id: _this50.locusUrl.split('/').pop(),
8081
8254
  reason: error.message,
8082
8255
  stack: error.stack,
8083
8256
  board: {
@@ -8099,7 +8272,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8099
8272
  }, {
8100
8273
  key: "requestScreenShareFloor",
8101
8274
  value: function requestScreenShareFloor() {
8102
- var _this50 = this;
8275
+ var _this51 = this;
8103
8276
  if (!this.mediaProperties.hasLocalShareStream() || !this.mediaProperties.mediaDirection.sendShare) {
8104
8277
  _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, ")"));
8105
8278
  this.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
@@ -8130,34 +8303,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8130
8303
  resourceUrl: this.resourceUrl,
8131
8304
  shareInstanceId: this.localShareInstanceId
8132
8305
  }).then(function () {
8133
- _this50.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
8306
+ _this51.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
8134
8307
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_SUCCESS, {
8135
- correlation_id: _this50.correlationId,
8136
- locus_id: _this50.locusUrl.split('/').pop()
8308
+ correlation_id: _this51.correlationId,
8309
+ locus_id: _this51.locusUrl.split('/').pop()
8137
8310
  });
8138
8311
  return _promise.default.resolve();
8139
8312
  }).catch(function (error) {
8140
8313
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
8141
8314
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
8142
- correlation_id: _this50.correlationId,
8143
- locus_id: _this50.locusUrl.split('/').pop(),
8315
+ correlation_id: _this51.correlationId,
8316
+ locus_id: _this51.locusUrl.split('/').pop(),
8144
8317
  reason: error.message,
8145
8318
  stack: error.stack
8146
8319
  });
8147
8320
 
8148
8321
  // @ts-ignore
8149
- _this50.webex.internal.newMetrics.submitClientEvent({
8322
+ _this51.webex.internal.newMetrics.submitClientEvent({
8150
8323
  name: 'client.share.floor-granted.local',
8151
8324
  payload: {
8152
8325
  mediaType: 'share',
8153
8326
  errors: _util2.default.getChangeMeetingFloorErrorPayload(error.message),
8154
- shareInstanceId: _this50.localShareInstanceId
8327
+ shareInstanceId: _this51.localShareInstanceId
8155
8328
  },
8156
8329
  options: {
8157
- meetingId: _this50.id
8330
+ meetingId: _this51.id
8158
8331
  }
8159
8332
  });
8160
- _this50.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8333
+ _this51.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8161
8334
  return _promise.default.reject(error);
8162
8335
  });
8163
8336
  }
@@ -8180,10 +8353,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8180
8353
  }, {
8181
8354
  key: "requestScreenShareFloorIfPending",
8182
8355
  value: function requestScreenShareFloorIfPending() {
8183
- var _this51 = this;
8356
+ var _this52 = this;
8184
8357
  if (this.floorGrantPending && this.state === _constants.MEETING_STATE.STATES.JOINED) {
8185
8358
  this.requestScreenShareFloor().then(function () {
8186
- _this51.floorGrantPending = false;
8359
+ _this52.floorGrantPending = false;
8187
8360
  });
8188
8361
  }
8189
8362
  }
@@ -8197,7 +8370,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8197
8370
  }, {
8198
8371
  key: "releaseScreenShareFloor",
8199
8372
  value: function releaseScreenShareFloor() {
8200
- var _this52 = this;
8373
+ var _this53 = this;
8201
8374
  var content = this.locusInfo.mediaShares.find(function (element) {
8202
8375
  return element.name === _constants.CONTENT;
8203
8376
  });
@@ -8232,8 +8405,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8232
8405
  }).catch(function (error) {
8233
8406
  _loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
8234
8407
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
8235
- correlation_id: _this52.correlationId,
8236
- locus_id: _this52.locusUrl.split('/').pop(),
8408
+ correlation_id: _this53.correlationId,
8409
+ locus_id: _this53.locusUrl.split('/').pop(),
8237
8410
  reason: error.message,
8238
8411
  stack: error.stack
8239
8412
  });
@@ -8413,7 +8586,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8413
8586
  }, {
8414
8587
  key: "changeVideoLayout",
8415
8588
  value: function changeVideoLayout(layoutType) {
8416
- var _this53 = this;
8589
+ var _this54 = this;
8417
8590
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8418
8591
  var main = renderInfo.main,
8419
8592
  content = renderInfo.content;
@@ -8467,7 +8640,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8467
8640
  }
8468
8641
  this.lastVideoLayoutInfo = (0, _lodash.cloneDeep)(layoutInfo);
8469
8642
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
8470
- _triggerProxy.default.trigger(_this53, {
8643
+ _triggerProxy.default.trigger(_this54, {
8471
8644
  file: 'meeting/index',
8472
8645
  function: 'changeVideoLayout'
8473
8646
  }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
@@ -8583,7 +8756,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8583
8756
  }, {
8584
8757
  key: "endMeetingForAll",
8585
8758
  value: function endMeetingForAll() {
8586
- var _this54 = this;
8759
+ var _this55 = this;
8587
8760
  // @ts-ignore
8588
8761
  this.webex.internal.newMetrics.submitClientEvent({
8589
8762
  name: 'client.call.leave',
@@ -8601,25 +8774,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8601
8774
  locus_id: this.locusId
8602
8775
  });
8603
8776
  return _util2.default.endMeetingForAll(this).then(function (end) {
8604
- _this54.meetingFiniteStateMachine.end();
8605
- _this54.clearMeetingData();
8777
+ _this55.meetingFiniteStateMachine.end();
8778
+ _this55.clearMeetingData();
8606
8779
  // upload logs on leave irrespective of meeting delete
8607
- _triggerProxy.default.trigger(_this54, {
8780
+ _triggerProxy.default.trigger(_this55, {
8608
8781
  file: 'meeting/index',
8609
8782
  function: 'endMeetingForAll'
8610
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
8783
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this55);
8611
8784
  return end;
8612
8785
  }).catch(function (error) {
8613
- _this54.meetingFiniteStateMachine.fail(error);
8786
+ _this55.meetingFiniteStateMachine.fail(error);
8614
8787
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
8615
8788
  // upload logs on leave irrespective of meeting delete
8616
- _triggerProxy.default.trigger(_this54, {
8789
+ _triggerProxy.default.trigger(_this55, {
8617
8790
  file: 'meeting/index',
8618
8791
  function: 'endMeetingForAll'
8619
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
8792
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this55);
8620
8793
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
8621
- correlation_id: _this54.correlationId,
8622
- locus_id: _this54.locusUrl.split('/').pop(),
8794
+ correlation_id: _this55.correlationId,
8795
+ locus_id: _this55.locusUrl.split('/').pop(),
8623
8796
  reason: error.message,
8624
8797
  stack: error.stack,
8625
8798
  code: error.code
@@ -8684,6 +8857,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8684
8857
  });
8685
8858
  }
8686
8859
 
8860
+ /**
8861
+ * Method to set post meeting data consent.
8862
+ *
8863
+ * @param {boolean} accept - whether consent accepted or declined
8864
+ * @returns {Promise}
8865
+ * @public
8866
+ * @memberof Meeting
8867
+ */
8868
+ }, {
8869
+ key: "setPostMeetingDataConsent",
8870
+ value: function setPostMeetingDataConsent(accept) {
8871
+ return this.meetingRequest.setPostMeetingDataConsent({
8872
+ postMeetingDataConsent: accept,
8873
+ locusUrl: this.locusUrl,
8874
+ deviceUrl: this.deviceUrl,
8875
+ selfId: this.members.selfId
8876
+ });
8877
+ }
8878
+
8687
8879
  /**
8688
8880
  * Throws if we don't have a media connection created
8689
8881
  *
@@ -8761,7 +8953,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8761
8953
  _this$mediaProperties43,
8762
8954
  _this$mediaProperties44,
8763
8955
  _this$mediaProperties45,
8764
- _this55 = this;
8956
+ _this56 = this;
8765
8957
  var LOG_HEADER = 'Meeting:index#updateTranscodedMediaConnection -->';
8766
8958
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " starting"));
8767
8959
  if (!this.canUpdateMedia()) {
@@ -8786,8 +8978,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8786
8978
  }).catch(function (error) {
8787
8979
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error: "), error);
8788
8980
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
8789
- correlation_id: _this55.correlationId,
8790
- locus_id: _this55.locusUrl.split('/').pop(),
8981
+ correlation_id: _this56.correlationId,
8982
+ locus_id: _this56.locusUrl.split('/').pop(),
8791
8983
  reason: error.message,
8792
8984
  stack: error.stack
8793
8985
  });
@@ -9009,10 +9201,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9009
9201
  return this.updateTranscodedMediaConnection();
9010
9202
  case 31:
9011
9203
  if (!floorRequestNeeded) {
9012
- _context40.next = 37;
9204
+ _context40.next = 39;
9013
9205
  break;
9014
9206
  }
9015
9207
  this.localShareInstanceId = _uuid.default.v4();
9208
+ this.shareCAEventSentStatus.transmitStart = false;
9209
+ this.shareCAEventSentStatus.transmitStop = false;
9016
9210
 
9017
9211
  // @ts-ignore
9018
9212
  this.webex.internal.newMetrics.submitClientEvent({
@@ -9033,9 +9227,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9033
9227
  // we're sending the http request to Locus to request the screen share floor
9034
9228
  // only after the SDP update, because that's how it's always been done for transcoded meetings
9035
9229
  // and also if sharing from the start, we need confluence to have been created
9036
- _context40.next = 37;
9230
+ _context40.next = 39;
9037
9231
  return this.enqueueScreenShareFloorRequest();
9038
- case 37:
9232
+ case 39:
9039
9233
  case "end":
9040
9234
  return _context40.stop();
9041
9235
  }
@@ -9173,6 +9367,51 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9173
9367
  }
9174
9368
  return _promise.default.resolve();
9175
9369
  }
9370
+
9371
+ /**
9372
+ * Gets the media reachability metrics
9373
+ *
9374
+ * @returns {Promise<MediaReachabilityMetrics>}
9375
+ */
9376
+ }, {
9377
+ key: "getMediaReachabilityMetricFields",
9378
+ value: (function () {
9379
+ var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
9380
+ var reachabilityMetrics, successKeys, totalSuccessCases, isSubnetReachable;
9381
+ return _regenerator.default.wrap(function _callee42$(_context42) {
9382
+ while (1) switch (_context42.prev = _context42.next) {
9383
+ case 0:
9384
+ _context42.next = 2;
9385
+ return this.webex.meetings.reachability.getReachabilityMetrics();
9386
+ case 2:
9387
+ reachabilityMetrics = _context42.sent;
9388
+ 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'];
9389
+ totalSuccessCases = successKeys.reduce(function (total, key) {
9390
+ var value = reachabilityMetrics[key];
9391
+ if (typeof value === 'number') {
9392
+ return total + value;
9393
+ }
9394
+ return total;
9395
+ }, 0);
9396
+ isSubnetReachable = null;
9397
+ if (totalSuccessCases > 0) {
9398
+ // @ts-ignore
9399
+ isSubnetReachable = this.webex.meetings.reachability.isSubnetReachable(this.mediaServerIp);
9400
+ }
9401
+ return _context42.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
9402
+ isSubnetReachable: isSubnetReachable
9403
+ }));
9404
+ case 8:
9405
+ case "end":
9406
+ return _context42.stop();
9407
+ }
9408
+ }, _callee42, this);
9409
+ }));
9410
+ function getMediaReachabilityMetricFields() {
9411
+ return _getMediaReachabilityMetricFields.apply(this, arguments);
9412
+ }
9413
+ return getMediaReachabilityMetricFields;
9414
+ }())
9176
9415
  }]);
9177
9416
  return Meeting;
9178
9417
  }(_webexCore.StatelessWebexPlugin);