@webex/plugin-meetings 3.8.0-next.5 → 3.8.0-next.50

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 (133) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/config.js +1 -0
  4. package/dist/config.js.map +1 -1
  5. package/dist/constants.js +14 -1
  6. package/dist/constants.js.map +1 -1
  7. package/dist/controls-options-manager/enums.js +2 -0
  8. package/dist/controls-options-manager/enums.js.map +1 -1
  9. package/dist/controls-options-manager/types.js.map +1 -1
  10. package/dist/controls-options-manager/util.js +52 -0
  11. package/dist/controls-options-manager/util.js.map +1 -1
  12. package/dist/interpretation/index.js +1 -1
  13. package/dist/interpretation/siLanguage.js +1 -1
  14. package/dist/locus-info/controlsUtils.js +28 -10
  15. package/dist/locus-info/controlsUtils.js.map +1 -1
  16. package/dist/locus-info/index.js +20 -1
  17. package/dist/locus-info/index.js.map +1 -1
  18. package/dist/media/index.js +3 -15
  19. package/dist/media/index.js.map +1 -1
  20. package/dist/meeting/in-meeting-actions.js +11 -1
  21. package/dist/meeting/in-meeting-actions.js.map +1 -1
  22. package/dist/meeting/index.js +544 -324
  23. package/dist/meeting/index.js.map +1 -1
  24. package/dist/meeting/locusMediaRequest.js +26 -23
  25. package/dist/meeting/locusMediaRequest.js.map +1 -1
  26. package/dist/meeting/muteState.js +0 -2
  27. package/dist/meeting/muteState.js.map +1 -1
  28. package/dist/meeting/request.js +30 -0
  29. package/dist/meeting/request.js.map +1 -1
  30. package/dist/meeting/request.type.js.map +1 -1
  31. package/dist/meeting/util.js +27 -2
  32. package/dist/meeting/util.js.map +1 -1
  33. package/dist/meeting-info/meeting-info-v2.js +359 -60
  34. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  35. package/dist/meetings/index.js +69 -1
  36. package/dist/meetings/index.js.map +1 -1
  37. package/dist/meetings/util.js +14 -0
  38. package/dist/meetings/util.js.map +1 -1
  39. package/dist/member/index.js +10 -0
  40. package/dist/member/index.js.map +1 -1
  41. package/dist/member/util.js +3 -0
  42. package/dist/member/util.js.map +1 -1
  43. package/dist/metrics/constants.js +9 -0
  44. package/dist/metrics/constants.js.map +1 -1
  45. package/dist/reachability/clusterReachability.js +63 -27
  46. package/dist/reachability/clusterReachability.js.map +1 -1
  47. package/dist/reachability/index.js +111 -46
  48. package/dist/reachability/index.js.map +1 -1
  49. package/dist/reachability/reachability.types.js +14 -0
  50. package/dist/reachability/reachability.types.js.map +1 -1
  51. package/dist/reachability/request.js +19 -3
  52. package/dist/reachability/request.js.map +1 -1
  53. package/dist/reconnection-manager/index.js +2 -2
  54. package/dist/reconnection-manager/index.js.map +1 -1
  55. package/dist/recording-controller/util.js +5 -5
  56. package/dist/recording-controller/util.js.map +1 -1
  57. package/dist/roap/index.js.map +1 -1
  58. package/dist/roap/turnDiscovery.js +45 -27
  59. package/dist/roap/turnDiscovery.js.map +1 -1
  60. package/dist/roap/types.js +17 -0
  61. package/dist/roap/types.js.map +1 -0
  62. package/dist/types/config.d.ts +1 -0
  63. package/dist/types/constants.d.ts +10 -0
  64. package/dist/types/controls-options-manager/enums.d.ts +3 -1
  65. package/dist/types/controls-options-manager/types.d.ts +7 -1
  66. package/dist/types/locus-info/index.d.ts +1 -0
  67. package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
  68. package/dist/types/meeting/index.d.ts +50 -3
  69. package/dist/types/meeting/muteState.d.ts +0 -1
  70. package/dist/types/meeting/request.d.ts +12 -1
  71. package/dist/types/meeting/request.type.d.ts +6 -0
  72. package/dist/types/meeting/util.d.ts +8 -1
  73. package/dist/types/meeting-info/meeting-info-v2.d.ts +80 -0
  74. package/dist/types/meetings/index.d.ts +29 -0
  75. package/dist/types/member/index.d.ts +1 -0
  76. package/dist/types/metrics/constants.d.ts +9 -0
  77. package/dist/types/reachability/clusterReachability.d.ts +15 -7
  78. package/dist/types/reachability/index.d.ts +10 -1
  79. package/dist/types/reachability/reachability.types.d.ts +5 -0
  80. package/dist/types/roap/index.d.ts +3 -2
  81. package/dist/types/roap/turnDiscovery.d.ts +5 -17
  82. package/dist/types/roap/types.d.ts +16 -0
  83. package/dist/webinar/index.js +1 -1
  84. package/package.json +22 -22
  85. package/src/config.ts +1 -0
  86. package/src/constants.ts +17 -0
  87. package/src/controls-options-manager/enums.ts +2 -0
  88. package/src/controls-options-manager/types.ts +11 -1
  89. package/src/controls-options-manager/util.ts +62 -0
  90. package/src/locus-info/controlsUtils.ts +44 -14
  91. package/src/locus-info/index.ts +23 -1
  92. package/src/media/index.ts +5 -21
  93. package/src/meeting/in-meeting-actions.ts +20 -0
  94. package/src/meeting/index.ts +351 -99
  95. package/src/meeting/locusMediaRequest.ts +33 -23
  96. package/src/meeting/muteState.ts +0 -2
  97. package/src/meeting/request.ts +36 -1
  98. package/src/meeting/request.type.ts +7 -0
  99. package/src/meeting/util.ts +27 -2
  100. package/src/meeting-info/meeting-info-v2.ts +247 -6
  101. package/src/meetings/index.ts +87 -1
  102. package/src/meetings/util.ts +18 -0
  103. package/src/member/index.ts +11 -0
  104. package/src/member/util.ts +3 -0
  105. package/src/metrics/constants.ts +9 -0
  106. package/src/reachability/clusterReachability.ts +73 -26
  107. package/src/reachability/index.ts +69 -0
  108. package/src/reachability/reachability.types.ts +6 -0
  109. package/src/reachability/request.ts +7 -0
  110. package/src/reconnection-manager/index.ts +2 -2
  111. package/src/recording-controller/util.ts +17 -13
  112. package/src/roap/index.ts +3 -7
  113. package/src/roap/turnDiscovery.ts +34 -39
  114. package/src/roap/types.ts +23 -0
  115. package/test/unit/spec/controls-options-manager/util.js +120 -0
  116. package/test/unit/spec/locus-info/controlsUtils.js +103 -9
  117. package/test/unit/spec/locus-info/index.js +28 -0
  118. package/test/unit/spec/media/index.ts +6 -16
  119. package/test/unit/spec/meeting/in-meeting-actions.ts +13 -4
  120. package/test/unit/spec/meeting/index.js +558 -145
  121. package/test/unit/spec/meeting/locusMediaRequest.ts +101 -88
  122. package/test/unit/spec/meeting/muteState.js +0 -2
  123. package/test/unit/spec/meeting/request.js +32 -1
  124. package/test/unit/spec/meeting/utils.js +123 -18
  125. package/test/unit/spec/meeting-info/meetinginfov2.js +443 -114
  126. package/test/unit/spec/meetings/index.js +96 -1
  127. package/test/unit/spec/member/index.js +7 -0
  128. package/test/unit/spec/member/util.js +24 -0
  129. package/test/unit/spec/reachability/clusterReachability.ts +88 -56
  130. package/test/unit/spec/reachability/index.ts +47 -0
  131. package/test/unit/spec/reachability/request.js +47 -2
  132. package/test/unit/spec/reconnection-manager/index.js +4 -4
  133. 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
@@ -614,10 +617,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
614
617
  /**
615
618
  * Handles ROAP_FAILURE event from the webrtc media connection
616
619
  *
617
- * @param {Error} error
620
+ * @param {Error} roapError
618
621
  * @returns {void}
619
622
  */
620
- (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "handleRoapFailure", function (error) {
623
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "handleRoapFailure", function (roapError) {
621
624
  // eslint-disable-next-line @typescript-eslint/no-shadow
622
625
  var sendBehavioralMetric = function sendBehavioralMetric(metricName, error, correlationId) {
623
626
  var _error$cause;
@@ -632,6 +635,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
632
635
  };
633
636
  _metrics.default.sendBehavioralMetric(metricName, data, metadata);
634
637
  };
638
+ var error = _util2.default.markErrorAsHandledBySdk(roapError);
635
639
  if (error instanceof _internalMediaCore.Errors.SdpOfferCreationError) {
636
640
  sendBehavioralMetric(_constants2.default.PEERCONNECTION_FAILURE, error, _this.correlationId);
637
641
 
@@ -646,7 +650,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
646
650
  rawError: error
647
651
  }
648
652
  });
649
- } else if (error instanceof _internalMediaCore.Errors.SdpOfferHandlingError || error instanceof _internalMediaCore.Errors.SdpAnswerHandlingError) {
653
+ } else if (error instanceof _internalMediaCore.Errors.SdpOfferHandlingError) {
654
+ sendBehavioralMetric(_constants2.default.PEERCONNECTION_FAILURE, error, _this.correlationId);
655
+
656
+ // @ts-ignore
657
+ _this.webex.internal.newMetrics.submitClientEvent({
658
+ name: 'client.media-engine.remote-sdp-received',
659
+ payload: {
660
+ canProceed: false
661
+ },
662
+ options: {
663
+ meetingId: _this.id,
664
+ rawError: error
665
+ }
666
+ });
667
+ } else if (error instanceof _internalMediaCore.Errors.SdpAnswerHandlingError) {
650
668
  sendBehavioralMetric(_constants2.default.PEERCONNECTION_FAILURE, error, _this.correlationId);
651
669
 
652
670
  // @ts-ignore
@@ -660,6 +678,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
660
678
  rawError: error
661
679
  }
662
680
  });
681
+ if (_this.deferSDPAnswer) {
682
+ clearTimeout(_this.sdpResponseTimer);
683
+ _this.sdpResponseTimer = undefined;
684
+ _this.deferSDPAnswer.reject(error);
685
+ }
663
686
  } else if (error instanceof _internalMediaCore.Errors.SdpError) {
664
687
  // this covers also the case of Errors.IceGatheringError which extends Errors.SdpError
665
688
  sendBehavioralMetric(_constants2.default.INVALID_ICE_CANDIDATE, error, _this.correlationId);
@@ -685,6 +708,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
685
708
  */
686
709
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "roapMessageReceived", function (roapMessage) {
687
710
  var mediaServer = roapMessage.messageType === 'ANSWER' ? _util3.default.getMediaServer(roapMessage.sdp) : undefined;
711
+ var mediaServerIp = roapMessage.messageType === 'ANSWER' ? _util3.default.getMediaServerIp(roapMessage.sdp) : undefined;
688
712
  if (_this.isMultistream && mediaServer && mediaServer !== 'homer') {
689
713
  throw new _multistreamNotSupportedError.default("Client asked for multistream backend (Homer), but got ".concat(mediaServer, " instead"));
690
714
  }
@@ -692,6 +716,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
692
716
  if (mediaServer) {
693
717
  _this.mediaProperties.webrtcMediaConnection.mediaServer = mediaServer;
694
718
  }
719
+ if (_this.isMultistream && mediaServerIp) {
720
+ _this.mediaServerIp = mediaServerIp;
721
+ }
695
722
  });
696
723
  /**
697
724
  * This function makes sure we send the right metrics when local and remote SDPs are processed/generated
@@ -781,7 +808,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
781
808
  }
782
809
  }), {
783
810
  logText: "".concat(LOG_HEADER, " Roap Offer")
784
- }).catch(function (error) {
811
+ }).catch(function (originalError) {
812
+ var error = _util2.default.markErrorAsHandledBySdk(originalError);
785
813
  var multistreamNotSupported = error instanceof _multistreamNotSupportedError.default;
786
814
 
787
815
  // @ts-ignore
@@ -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,15 @@ 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
+ /**
2309
+ * IP Address of the remote media server
2310
+ * @instance
2311
+ * @type {string}
2312
+ * @private
2313
+ * @memberof Meeting
2314
+ */
2315
+ _this.mediaServerIp = undefined;
2248
2316
  return _this;
2249
2317
  }
2250
2318
 
@@ -2303,6 +2371,44 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2303
2371
  this.callStateForMetrics.correlationId = correlationId;
2304
2372
  }
2305
2373
 
2374
+ /**
2375
+ * Getter - Returns callStateForMetrics.userNameInput
2376
+ * @returns {string}
2377
+ */
2378
+ }, {
2379
+ key: "userNameInput",
2380
+ get: function get() {
2381
+ var _this$callStateForMet;
2382
+ return (_this$callStateForMet = this.callStateForMetrics) === null || _this$callStateForMet === void 0 ? void 0 : _this$callStateForMet.userNameInput;
2383
+ }
2384
+
2385
+ /**
2386
+ * Setter - sets callStateForMetrics.userNameInput
2387
+ * @param {string} userNameInput
2388
+ */,
2389
+ set: function set(userNameInput) {
2390
+ this.callStateForMetrics.userNameInput = userNameInput;
2391
+ }
2392
+
2393
+ /**
2394
+ * Getter - Returns callStateForMetrics.emailInput
2395
+ * @returns {string}
2396
+ */
2397
+ }, {
2398
+ key: "emailInput",
2399
+ get: function get() {
2400
+ var _this$callStateForMet2;
2401
+ return (_this$callStateForMet2 = this.callStateForMetrics) === null || _this$callStateForMet2 === void 0 ? void 0 : _this$callStateForMet2.emailInput;
2402
+ }
2403
+
2404
+ /**
2405
+ * Setter - sets callStateForMetrics.emailInput
2406
+ * @param {string} emailInput
2407
+ */,
2408
+ set: function set(emailInput) {
2409
+ this.callStateForMetrics.emailInput = emailInput;
2410
+ }
2411
+
2306
2412
  /**
2307
2413
  * Getter - Returns callStateForMetrics.sessionCorrelationId
2308
2414
  * @returns {string}
@@ -2332,6 +2438,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2332
2438
  return (0, _classPrivateFieldGet2.default)(this, _isoLocalClientMeetingJoinTime);
2333
2439
  }
2334
2440
 
2441
+ /**
2442
+ * Setter - sets isoLocalClientMeetingJoinTime
2443
+ * This will be set once on meeting join, and not updated again
2444
+ * this will always produce an ISO string
2445
+ * If the iso string is invalid, it will fallback to the current system time
2446
+ * @param {string | undefined} time
2447
+ */,
2448
+ set: function set(time) {
2449
+ var fallback = new Date().toISOString();
2450
+ if (!time) {
2451
+ (0, _classPrivateFieldSet2.default)(this, _isoLocalClientMeetingJoinTime, fallback);
2452
+ } else {
2453
+ var date = new Date(time);
2454
+
2455
+ // Check if the date is valid
2456
+ if ((0, _isNan.default)(date.getTime())) {
2457
+ _loggerProxy.default.logger.info( // @ts-ignore
2458
+ "Meeting:index#isoLocalClientMeetingJoinTime --> Invalid date provided: ".concat(time, ". Falling back to system clock."));
2459
+ (0, _classPrivateFieldSet2.default)(this, _isoLocalClientMeetingJoinTime, fallback);
2460
+ } else {
2461
+ (0, _classPrivateFieldSet2.default)(this, _isoLocalClientMeetingJoinTime, date.toISOString());
2462
+ }
2463
+ }
2464
+ }
2465
+
2335
2466
  /**
2336
2467
  * Set meeting info and trigger `MEETING_INFO_AVAILABLE` event
2337
2468
  * @param {any} info
@@ -3391,6 +3522,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3391
3522
  state: state
3392
3523
  });
3393
3524
  });
3525
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ANNOTATION_CHANGED, function (_ref27) {
3526
+ var state = _ref27.state;
3527
+ _triggerProxy.default.trigger(_this14, {
3528
+ file: 'meeting/index',
3529
+ function: 'setupLocusControlsListener'
3530
+ }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_ANNOTATION_UPDATED, {
3531
+ state: state
3532
+ });
3533
+ });
3534
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_REMOTE_DESKTOP_CONTROL_CHANGED, function (_ref28) {
3535
+ var state = _ref28.state;
3536
+ _triggerProxy.default.trigger(_this14, {
3537
+ file: 'meeting/index',
3538
+ function: 'setupLocusControlsListener'
3539
+ }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_REMOTE_DESKTOP_CONTROL_UPDATED, {
3540
+ state: state
3541
+ });
3542
+ });
3394
3543
  }
3395
3544
 
3396
3545
  /**
@@ -3430,7 +3579,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3430
3579
  var _this15 = this;
3431
3580
  // Will get triggered on local and remote share
3432
3581
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, /*#__PURE__*/function () {
3433
- var _ref27 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
3582
+ var _ref29 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
3434
3583
  var _payload$previous, _payload$previous2;
3435
3584
  var _payload$current, contentShare, whiteboardShare, previousContentShare, previousWhiteboardShare, newShareStatus, _this15$locusInfo, _this15$locusInfo$inf, _this15$webinar, oldShareStatus, sendStartedSharingRemote, _this15$mediaProperti;
3436
3585
  return _regenerator.default.wrap(function _callee8$(_context8) {
@@ -3516,6 +3665,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3516
3665
  case 26:
3517
3666
  sendStartedSharingRemote = function sendStartedSharingRemote() {
3518
3667
  _this15.remoteShareInstanceId = contentShare.shareInstanceId;
3668
+ _this15.shareCAEventSentStatus.receiveStart = false;
3669
+ _this15.shareCAEventSentStatus.receiveStop = false;
3519
3670
  _triggerProxy.default.trigger(_this15, {
3520
3671
  file: 'meetings/index',
3521
3672
  function: 'remoteShare'
@@ -3589,6 +3740,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3589
3740
  // if we got here, then some remote participant has stolen
3590
3741
  // the presentation from another remote participant
3591
3742
  _this15.remoteShareInstanceId = contentShare.shareInstanceId;
3743
+ _this15.shareCAEventSentStatus.receiveStart = false;
3744
+ _this15.shareCAEventSentStatus.receiveStop = false;
3592
3745
  _triggerProxy.default.trigger(_this15, {
3593
3746
  file: 'meetings/index',
3594
3747
  function: 'remoteShare'
@@ -3629,7 +3782,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3629
3782
  }, _callee8, null, [[27,, 31, 34]]);
3630
3783
  }));
3631
3784
  return function (_x8) {
3632
- return _ref27.apply(this, arguments);
3785
+ return _ref29.apply(this, arguments);
3633
3786
  };
3634
3787
  }());
3635
3788
  }
@@ -3743,8 +3896,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3743
3896
  });
3744
3897
  }
3745
3898
  });
3746
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (_ref28) {
3747
- var isInitializing = _ref28.isInitializing;
3899
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (_ref30) {
3900
+ var isInitializing = _ref30.isInitializing;
3748
3901
  _this19.updateMeetingActions();
3749
3902
  _this19.recordingController.setDisplayHints(_this19.userDisplayHints);
3750
3903
  _this19.recordingController.setUserPolicy(_this19.selfUserPolicies);
@@ -3882,7 +4035,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3882
4035
  _this21.updateLLMConnection();
3883
4036
  });
3884
4037
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, /*#__PURE__*/function () {
3885
- var _ref29 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(payload) {
4038
+ var _ref31 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(payload) {
3886
4039
  var _this21$rtcMetrics;
3887
4040
  return _regenerator.default.wrap(function _callee9$(_context9) {
3888
4041
  while (1) switch (_context9.prev = _context9.next) {
@@ -3916,7 +4069,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3916
4069
  }, _callee9);
3917
4070
  }));
3918
4071
  return function (_x9) {
3919
- return _ref29.apply(this, arguments);
4072
+ return _ref31.apply(this, arguments);
3920
4073
  };
3921
4074
  }());
3922
4075
 
@@ -4035,7 +4188,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4035
4188
  }
4036
4189
  });
4037
4190
  this.locusInfo.on(_constants.EVENTS.DESTROY_MEETING, /*#__PURE__*/function () {
4038
- var _ref30 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(payload) {
4191
+ var _ref32 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(payload) {
4039
4192
  return _regenerator.default.wrap(function _callee10$(_context10) {
4040
4193
  while (1) switch (_context10.prev = _context10.next) {
4041
4194
  case 0:
@@ -4095,7 +4248,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4095
4248
  }, _callee10, null, [[8, 14]]);
4096
4249
  }));
4097
4250
  return function (_x10) {
4098
- return _ref30.apply(this, arguments);
4251
+ return _ref32.apply(this, arguments);
4099
4252
  };
4100
4253
  }());
4101
4254
  }
@@ -4197,6 +4350,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4197
4350
  key: "beRightBack",
4198
4351
  value: (function () {
4199
4352
  var _beRightBack = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(enabled) {
4353
+ var _this24 = this;
4200
4354
  var errorMessage, error, _errorMessage, _error;
4201
4355
  return _regenerator.default.wrap(function _callee11$(_context11) {
4202
4356
  while (1) switch (_context11.prev = _context11.next) {
@@ -4219,7 +4373,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4219
4373
  _loggerProxy.default.logger.error(_error);
4220
4374
  return _context11.abrupt("return", _promise.default.reject(_error));
4221
4375
  case 10:
4222
- return _context11.abrupt("return", this.brbState.enable(enabled, this.sendSlotManager));
4376
+ return _context11.abrupt("return", this.brbState.enable(enabled, this.sendSlotManager).then(function () {
4377
+ if (_this24.audio && enabled) {
4378
+ // locus mutes the participant with brb enabled request,
4379
+ // so we need to explicitly update remote mute for correct logic flow
4380
+ _this24.audio.handleServerRemoteMuteUpdate(_this24, enabled);
4381
+ }
4382
+ }));
4223
4383
  case 11:
4224
4384
  case "end":
4225
4385
  return _context11.stop();
@@ -4405,7 +4565,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4405
4565
  canAdmitParticipant: _util2.default.canAdmitParticipant(this.userDisplayHints),
4406
4566
  canLock: _util2.default.canUserLock(this.userDisplayHints),
4407
4567
  canUnlock: _util2.default.canUserUnlock(this.userDisplayHints),
4408
- canShareWhiteBoard: _util2.default.canShareWhiteBoard(this.userDisplayHints),
4568
+ canShareWhiteBoard: _util2.default.canShareWhiteBoard(this.userDisplayHints, this.selfUserPolicies),
4409
4569
  canSetDisallowUnmute: _util5.default.canSetDisallowUnmute(this.userDisplayHints),
4410
4570
  canUnsetDisallowUnmute: _util5.default.canUnsetDisallowUnmute(this.userDisplayHints),
4411
4571
  canSetMuteOnEntry: _util5.default.canSetMuteOnEntry(this.userDisplayHints),
@@ -4435,6 +4595,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4435
4595
  canSelectSpokenLanguages: _util2.default.canSelectSpokenLanguages(this.userDisplayHints),
4436
4596
  waitingForOthersToJoin: _util2.default.waitingForOthersToJoin(this.userDisplayHints),
4437
4597
  canSendReactions: _util2.default.canSendReactions(this.inMeetingActions.canSendReactions, this.userDisplayHints),
4598
+ requiresPostMeetingDataConsentPrompt: _util2.default.requiresPostMeetingDataConsentPrompt(this.userDisplayHints),
4438
4599
  canManageBreakout: _util2.default.canManageBreakout(this.userDisplayHints),
4439
4600
  canStartBreakout: _util2.default.canStartBreakout(this.userDisplayHints),
4440
4601
  canBroadcastMessageToBreakout: _util2.default.canBroadcastMessageToBreakout(this.userDisplayHints, this.selfUserPolicies),
@@ -4610,6 +4771,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4610
4771
  canAnnotate: _util5.default.hasPolicies({
4611
4772
  requiredPolicies: [_constants.SELF_POLICY.SUPPORT_ANNOTATION],
4612
4773
  policies: this.selfUserPolicies
4774
+ }),
4775
+ canEnableAnnotation: _util5.default.hasHints({
4776
+ requiredHints: [_constants.DISPLAY_HINTS.ENABLE_ANNOTATION_MEETING_OPTION],
4777
+ displayHints: this.userDisplayHints
4778
+ }),
4779
+ canDisableAnnotation: _util5.default.hasHints({
4780
+ requiredHints: [_constants.DISPLAY_HINTS.DISABLE_ANNOTATION_MEETING_OPTION],
4781
+ displayHints: this.userDisplayHints
4782
+ }),
4783
+ canEnableRemoteDesktopControl: _util5.default.hasHints({
4784
+ requiredHints: [_constants.DISPLAY_HINTS.ENABLE_RDC_MEETING_OPTION],
4785
+ displayHints: this.userDisplayHints
4786
+ }),
4787
+ canDisableRemoteDesktopControl: _util5.default.hasHints({
4788
+ requiredHints: [_constants.DISPLAY_HINTS.DISABLE_RDC_MEETING_OPTION],
4789
+ displayHints: this.userDisplayHints
4613
4790
  })
4614
4791
  }) || changed;
4615
4792
  }
@@ -4714,7 +4891,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4714
4891
  }, {
4715
4892
  key: "setLogUploadTimer",
4716
4893
  value: function setLogUploadTimer() {
4717
- var _this24 = this;
4894
+ var _this25 = this;
4718
4895
  // start with short timeouts and increase them later on so in case users have very long multi-hour meetings we don't get too fragmented logs
4719
4896
  var LOG_UPLOAD_INTERVALS = [0.1, 15, 30, 60]; // in minutes
4720
4897
 
@@ -4725,15 +4902,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4725
4902
  this.logUploadIntervalIndex += 1;
4726
4903
  }
4727
4904
  this.uploadLogsTimer = (0, _commonTimers.safeSetTimeout)(function () {
4728
- _this24.uploadLogsTimer = undefined;
4729
- _this24.uploadLogs();
4905
+ _this25.uploadLogsTimer = undefined;
4906
+ _this25.uploadLogs();
4730
4907
 
4731
4908
  // just as an extra precaution, to avoid uploading logs forever in case something goes wrong
4732
4909
  // and the page remains opened, we stop it if there is no media connection
4733
- if (!_this24.mediaProperties.webrtcMediaConnection) {
4910
+ if (!_this25.mediaProperties.webrtcMediaConnection) {
4734
4911
  return;
4735
4912
  }
4736
- _this24.setLogUploadTimer();
4913
+ _this25.setLogUploadTimer();
4737
4914
  }, delay);
4738
4915
  }
4739
4916
 
@@ -4800,7 +4977,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4800
4977
  }, {
4801
4978
  key: "closeRemoteStreams",
4802
4979
  value: function closeRemoteStreams() {
4803
- var _this25 = this;
4980
+ var _this26 = this;
4804
4981
  var _this$mediaProperties6 = this.mediaProperties,
4805
4982
  remoteAudioStream = _this$mediaProperties6.remoteAudioStream,
4806
4983
  remoteVideoStream = _this$mediaProperties6.remoteVideoStream,
@@ -4814,7 +4991,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4814
4991
  */
4815
4992
  // eslint-disable-next-line @typescript-eslint/no-shadow
4816
4993
  var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
4817
- _triggerProxy.default.trigger(_this25, {
4994
+ _triggerProxy.default.trigger(_this26, {
4818
4995
  file: 'meeting/index',
4819
4996
  function: 'closeRemoteStreams'
4820
4997
  }, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
@@ -5122,7 +5299,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5122
5299
  }, {
5123
5300
  key: "setMercuryListener",
5124
5301
  value: function setMercuryListener() {
5125
- var _this26 = this;
5302
+ var _this27 = this;
5126
5303
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
5127
5304
  // if the meeting has active peer connections, it should try to reconnect.
5128
5305
  // @ts-ignore
@@ -5130,33 +5307,33 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5130
5307
  _loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online');
5131
5308
 
5132
5309
  // Only send restore event when it was disconnected before and for connected later
5133
- if (!_this26.hasWebsocketConnected) {
5310
+ if (!_this27.hasWebsocketConnected) {
5134
5311
  // @ts-ignore
5135
- _this26.webex.internal.newMetrics.submitClientEvent({
5312
+ _this27.webex.internal.newMetrics.submitClientEvent({
5136
5313
  name: 'client.mercury.connection.restored',
5137
5314
  options: {
5138
- meetingId: _this26.id
5315
+ meetingId: _this27.id
5139
5316
  }
5140
5317
  });
5141
5318
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
5142
- correlation_id: _this26.correlationId
5319
+ correlation_id: _this27.correlationId
5143
5320
  });
5144
5321
  }
5145
- _this26.hasWebsocketConnected = true;
5322
+ _this27.hasWebsocketConnected = true;
5146
5323
  });
5147
5324
 
5148
5325
  // @ts-ignore
5149
5326
  this.webex.internal.mercury.on(_constants.OFFLINE, function () {
5150
5327
  _loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
5151
5328
  // @ts-ignore
5152
- _this26.webex.internal.newMetrics.submitClientEvent({
5329
+ _this27.webex.internal.newMetrics.submitClientEvent({
5153
5330
  name: 'client.mercury.connection.lost',
5154
5331
  options: {
5155
- meetingId: _this26.id
5332
+ meetingId: _this27.id
5156
5333
  }
5157
5334
  });
5158
5335
  _metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
5159
- correlation_id: _this26.correlationId
5336
+ correlation_id: _this27.correlationId
5160
5337
  });
5161
5338
  });
5162
5339
  }
@@ -5263,7 +5440,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5263
5440
  }, {
5264
5441
  key: "muteAudio",
5265
5442
  value: function muteAudio() {
5266
- var _this27 = this;
5443
+ var _this28 = this;
5267
5444
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5268
5445
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5269
5446
  }
@@ -5279,22 +5456,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5279
5456
 
5280
5457
  // First, stop sending the local audio media
5281
5458
  return logRequest(this.audio.handleClientRequest(this, true).then(function () {
5282
- _util2.default.handleAudioLogging(_this27.mediaProperties.audioStream);
5459
+ _util2.default.handleAudioLogging(_this28.mediaProperties.audioStream);
5283
5460
  // @ts-ignore
5284
- _this27.webex.internal.newMetrics.submitClientEvent({
5461
+ _this28.webex.internal.newMetrics.submitClientEvent({
5285
5462
  name: 'client.muted',
5286
5463
  payload: {
5287
5464
  trigger: 'user-interaction',
5288
5465
  mediaType: 'audio'
5289
5466
  },
5290
5467
  options: {
5291
- meetingId: _this27.id
5468
+ meetingId: _this28.id
5292
5469
  }
5293
5470
  });
5294
5471
  }).catch(function (error) {
5295
5472
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
5296
- correlation_id: _this27.correlationId,
5297
- locus_id: _this27.locusUrl.split('/').pop(),
5473
+ correlation_id: _this28.correlationId,
5474
+ locus_id: _this28.locusUrl.split('/').pop(),
5298
5475
  reason: error.message,
5299
5476
  stack: error.stack
5300
5477
  });
@@ -5313,7 +5490,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5313
5490
  }, {
5314
5491
  key: "unmuteAudio",
5315
5492
  value: function unmuteAudio() {
5316
- var _this28 = this;
5493
+ var _this29 = this;
5317
5494
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5318
5495
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5319
5496
  }
@@ -5329,22 +5506,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5329
5506
 
5330
5507
  // First, send the control to unmute the participant on the server
5331
5508
  return logRequest(this.audio.handleClientRequest(this, false).then(function () {
5332
- _util2.default.handleAudioLogging(_this28.mediaProperties.audioStream);
5509
+ _util2.default.handleAudioLogging(_this29.mediaProperties.audioStream);
5333
5510
  // @ts-ignore
5334
- _this28.webex.internal.newMetrics.submitClientEvent({
5511
+ _this29.webex.internal.newMetrics.submitClientEvent({
5335
5512
  name: 'client.unmuted',
5336
5513
  payload: {
5337
5514
  trigger: 'user-interaction',
5338
5515
  mediaType: 'audio'
5339
5516
  },
5340
5517
  options: {
5341
- meetingId: _this28.id
5518
+ meetingId: _this29.id
5342
5519
  }
5343
5520
  });
5344
5521
  }).catch(function (error) {
5345
5522
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_AUDIO_FAILURE, {
5346
- correlation_id: _this28.correlationId,
5347
- locus_id: _this28.locusUrl.split('/').pop(),
5523
+ correlation_id: _this29.correlationId,
5524
+ locus_id: _this29.locusUrl.split('/').pop(),
5348
5525
  reason: error.message,
5349
5526
  stack: error.stack
5350
5527
  });
@@ -5363,7 +5540,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5363
5540
  }, {
5364
5541
  key: "muteVideo",
5365
5542
  value: function muteVideo() {
5366
- var _this29 = this;
5543
+ var _this30 = this;
5367
5544
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5368
5545
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5369
5546
  }
@@ -5377,22 +5554,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5377
5554
  return _promise.default.reject(new _parameter.default('no video control associated to the meeting'));
5378
5555
  }
5379
5556
  return logRequest(this.video.handleClientRequest(this, true).then(function () {
5380
- _util2.default.handleVideoLogging(_this29.mediaProperties.videoStream);
5557
+ _util2.default.handleVideoLogging(_this30.mediaProperties.videoStream);
5381
5558
  // @ts-ignore
5382
- _this29.webex.internal.newMetrics.submitClientEvent({
5559
+ _this30.webex.internal.newMetrics.submitClientEvent({
5383
5560
  name: 'client.muted',
5384
5561
  payload: {
5385
5562
  trigger: 'user-interaction',
5386
5563
  mediaType: 'video'
5387
5564
  },
5388
5565
  options: {
5389
- meetingId: _this29.id
5566
+ meetingId: _this30.id
5390
5567
  }
5391
5568
  });
5392
5569
  }).catch(function (error) {
5393
5570
  _metrics.default.sendBehavioralMetric(_constants2.default.MUTE_VIDEO_FAILURE, {
5394
- correlation_id: _this29.correlationId,
5395
- locus_id: _this29.locusUrl.split('/').pop(),
5571
+ correlation_id: _this30.correlationId,
5572
+ locus_id: _this30.locusUrl.split('/').pop(),
5396
5573
  reason: error.message,
5397
5574
  stack: error.stack
5398
5575
  });
@@ -5411,7 +5588,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5411
5588
  }, {
5412
5589
  key: "unmuteVideo",
5413
5590
  value: function unmuteVideo() {
5414
- var _this30 = this;
5591
+ var _this31 = this;
5415
5592
  if (!_util2.default.isUserInJoinedState(this.locusInfo)) {
5416
5593
  return _promise.default.reject(new _webexErrors.UserNotJoinedError());
5417
5594
  }
@@ -5425,22 +5602,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5425
5602
  return _promise.default.reject(new _parameter.default('no audio control associated to the meeting'));
5426
5603
  }
5427
5604
  return logRequest(this.video.handleClientRequest(this, false).then(function () {
5428
- _util2.default.handleVideoLogging(_this30.mediaProperties.videoStream);
5605
+ _util2.default.handleVideoLogging(_this31.mediaProperties.videoStream);
5429
5606
  // @ts-ignore
5430
- _this30.webex.internal.newMetrics.submitClientEvent({
5607
+ _this31.webex.internal.newMetrics.submitClientEvent({
5431
5608
  name: 'client.unmuted',
5432
5609
  payload: {
5433
5610
  trigger: 'user-interaction',
5434
5611
  mediaType: 'video'
5435
5612
  },
5436
5613
  options: {
5437
- meetingId: _this30.id
5614
+ meetingId: _this31.id
5438
5615
  }
5439
5616
  });
5440
5617
  }).catch(function (error) {
5441
5618
  _metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_VIDEO_FAILURE, {
5442
- correlation_id: _this30.correlationId,
5443
- locus_id: _this30.locusUrl.split('/').pop(),
5619
+ correlation_id: _this31.correlationId,
5620
+ locus_id: _this31.locusUrl.split('/').pop(),
5444
5621
  reason: error.message,
5445
5622
  stack: error.stack
5446
5623
  });
@@ -5470,7 +5647,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5470
5647
  key: "joinWithMedia",
5471
5648
  value: (function () {
5472
5649
  var _joinWithMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5473
- var _this31 = this;
5650
+ var _this32 = this;
5474
5651
  var options,
5475
5652
  mediaOptions,
5476
5653
  _options$joinOptions,
@@ -5553,7 +5730,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5553
5730
  case 35:
5554
5731
  _context16.next = 37;
5555
5732
  return this.addMediaInternal(function () {
5556
- return _this31.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
5733
+ return _this32.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
5557
5734
  }, turnServerInfo, forceTurnDiscovery, mediaOptions);
5558
5735
  case 37:
5559
5736
  mediaResponse = _context16.sent;
@@ -5648,7 +5825,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5648
5825
  }, {
5649
5826
  key: "reconnect",
5650
5827
  value: function reconnect(options) {
5651
- var _this32 = this;
5828
+ var _this33 = this;
5652
5829
  _loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
5653
5830
  if (!this.reconnectionManager || !this.reconnectionManager.reconnect) {
5654
5831
  return _promise.default.reject(new _parameter.default('Cannot reconnect, ReconnectionManager must first be defined.'));
@@ -5664,10 +5841,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5664
5841
  while (1) switch (_context17.prev = _context17.next) {
5665
5842
  case 0:
5666
5843
  _context17.next = 2;
5667
- return _this32.waitForRemoteSDPAnswer();
5844
+ return _this33.waitForRemoteSDPAnswer();
5668
5845
  case 2:
5669
5846
  _context17.next = 4;
5670
- return _this32.waitForMediaConnectionConnected();
5847
+ return _this33.waitForMediaConnectionConnected();
5671
5848
  case 4:
5672
5849
  case "end":
5673
5850
  return _context17.stop();
@@ -5681,7 +5858,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5681
5858
  return _promise.default.resolve();
5682
5859
  }
5683
5860
  _loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
5684
- _this32.uploadLogs({
5861
+ _this33.uploadLogs({
5685
5862
  file: 'meeting/index',
5686
5863
  function: 'reconnect'
5687
5864
  });
@@ -5728,19 +5905,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5728
5905
  }, {
5729
5906
  key: "setCaptionLanguage",
5730
5907
  value: function setCaptionLanguage(language) {
5731
- var _this33 = this;
5908
+ var _this34 = this;
5732
5909
  return new _promise.default(function (resolve, reject) {
5733
- if (!_this33.isTranscriptionSupported()) {
5910
+ if (!_this34.isTranscriptionSupported()) {
5734
5911
  _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
5735
5912
  reject(new Error('Webex Assistant is not enabled/supported'));
5736
5913
  }
5737
5914
  try {
5738
5915
  var voiceaListenerCaptionUpdate = function voiceaListenerCaptionUpdate(payload) {
5739
5916
  // @ts-ignore
5740
- _this33.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5917
+ _this34.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5741
5918
  var statusCode = payload.statusCode;
5742
5919
  if (statusCode === 200) {
5743
- _this33.transcription.languageOptions = _objectSpread(_objectSpread({}, _this33.transcription.languageOptions), {}, {
5920
+ _this34.transcription.languageOptions = _objectSpread(_objectSpread({}, _this34.transcription.languageOptions), {}, {
5744
5921
  currentCaptionLanguage: language
5745
5922
  });
5746
5923
  resolve(language);
@@ -5749,9 +5926,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5749
5926
  }
5750
5927
  };
5751
5928
  // @ts-ignore
5752
- _this33.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5929
+ _this34.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
5753
5930
  // @ts-ignore
5754
- _this33.webex.internal.voicea.requestLanguage(language);
5931
+ _this34.webex.internal.voicea.requestLanguage(language);
5755
5932
  } catch (error) {
5756
5933
  _loggerProxy.default.logger.error("Meeting:index#setCaptionLanguage --> ".concat(error));
5757
5934
  reject(error);
@@ -5767,23 +5944,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5767
5944
  }, {
5768
5945
  key: "setSpokenLanguage",
5769
5946
  value: function setSpokenLanguage(language) {
5770
- var _this34 = this;
5947
+ var _this35 = this;
5771
5948
  return new _promise.default(function (resolve, reject) {
5772
- if (!_this34.isTranscriptionSupported()) {
5949
+ if (!_this35.isTranscriptionSupported()) {
5773
5950
  _loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
5774
5951
  reject(new Error('Webex Assistant is not enabled/supported'));
5775
5952
  }
5776
- if (_this34.getCurUserType() !== 'host') {
5953
+ if (_this35.getCurUserType() !== 'host') {
5777
5954
  _loggerProxy.default.logger.error('Meeting:index#setSpokenLanguage --> Only host can set spoken language');
5778
5955
  reject(new Error('Only host can set spoken language'));
5779
5956
  }
5780
5957
  try {
5781
5958
  var voiceaListenerLanguageUpdate = function voiceaListenerLanguageUpdate(payload) {
5782
5959
  // @ts-ignore
5783
- _this34.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5960
+ _this35.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5784
5961
  var languageCode = payload.languageCode;
5785
5962
  if (languageCode) {
5786
- _this34.transcription.languageOptions = _objectSpread(_objectSpread({}, _this34.transcription.languageOptions), {}, {
5963
+ _this35.transcription.languageOptions = _objectSpread(_objectSpread({}, _this35.transcription.languageOptions), {}, {
5787
5964
  currentSpokenLanguage: languageCode
5788
5965
  });
5789
5966
  resolve(languageCode);
@@ -5793,10 +5970,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5793
5970
  };
5794
5971
 
5795
5972
  // @ts-ignore
5796
- _this34.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5973
+ _this35.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
5797
5974
 
5798
5975
  // @ts-ignore
5799
- _this34.webex.internal.voicea.setSpokenLanguage(language);
5976
+ _this35.webex.internal.voicea.setSpokenLanguage(language);
5800
5977
  } catch (error) {
5801
5978
  _loggerProxy.default.logger.error("Meeting:index#setSpokenLanguage --> ".concat(error));
5802
5979
  reject(error);
@@ -5919,7 +6096,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5919
6096
  */
5920
6097
  function () {
5921
6098
  var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
5922
- var _this35 = this;
6099
+ var _this36 = this;
5923
6100
  var options,
5924
6101
  errorMessage,
5925
6102
  error,
@@ -6068,62 +6245,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6068
6245
  return _context19.abrupt("return", _promise.default.reject(_context19.t0));
6069
6246
  case 51:
6070
6247
  return _context19.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
6071
- _this35.meetingFiniteStateMachine.join();
6072
- _this35.setupLocusMediaRequest();
6248
+ _this36.meetingFiniteStateMachine.join();
6249
+ _this36.setupLocusMediaRequest();
6073
6250
 
6074
6251
  // @ts-ignore
6075
- _this35.webex.internal.device.meetingStarted();
6076
- (0, _classPrivateFieldSet2.default)(_this35, _isoLocalClientMeetingJoinTime, new Date().toISOString());
6252
+ _this36.webex.internal.device.meetingStarted();
6077
6253
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
6078
6254
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
6079
- correlation_id: _this35.correlationId
6255
+ correlation_id: _this36.correlationId
6080
6256
  });
6081
6257
  joinSuccess(join);
6082
- _this35.deferJoin = undefined;
6258
+ _this36.deferJoin = undefined;
6083
6259
  return join;
6084
6260
  }).catch(function (error) {
6085
- var _this35$meetingInfo, _error$error;
6086
- _this35.meetingFiniteStateMachine.fail(error);
6261
+ var _this36$meetingInfo, _error$error;
6262
+ _this36.meetingFiniteStateMachine.fail(error);
6087
6263
  _loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
6088
6264
 
6089
6265
  // @ts-ignore
6090
- _this35.webex.internal.newMetrics.submitClientEvent({
6266
+ _this36.webex.internal.newMetrics.submitClientEvent({
6091
6267
  name: 'client.locus.join.response',
6092
6268
  payload: {
6093
6269
  identifiers: {
6094
- meetingLookupUrl: (_this35$meetingInfo = _this35.meetingInfo) === null || _this35$meetingInfo === void 0 ? void 0 : _this35$meetingInfo.meetingLookupUrl
6270
+ meetingLookupUrl: (_this36$meetingInfo = _this36.meetingInfo) === null || _this36$meetingInfo === void 0 ? void 0 : _this36$meetingInfo.meetingLookupUrl
6095
6271
  }
6096
6272
  },
6097
6273
  options: {
6098
- meetingId: _this35.id,
6274
+ meetingId: _this36.id,
6099
6275
  rawError: error
6100
6276
  }
6101
6277
  });
6102
6278
 
6103
6279
  // TODO: change this to error codes and pre defined dictionary
6104
6280
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
6105
- correlation_id: _this35.correlationId,
6281
+ correlation_id: _this36.correlationId,
6106
6282
  reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
6107
6283
  stack: error.stack
6108
6284
  });
6109
6285
 
6110
6286
  // Upload logs on join Failure
6111
- _triggerProxy.default.trigger(_this35, {
6287
+ _triggerProxy.default.trigger(_this36, {
6112
6288
  file: 'meeting/index',
6113
6289
  function: 'join'
6114
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this35);
6115
- joinFailed(error);
6116
- _this35.deferJoin = undefined;
6117
- return _promise.default.reject(error);
6290
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this36);
6291
+ var proxyError = _util2.default.markErrorAsHandledBySdk(error);
6292
+ joinFailed(proxyError);
6293
+ _this36.deferJoin = undefined;
6294
+ return _promise.default.reject(proxyError);
6118
6295
  }).then(function (join) {
6119
6296
  // @ts-ignore - config coming from registerPlugin
6120
- if (_this35.config.enableAutomaticLLM) {
6297
+ if (_this36.config.enableAutomaticLLM) {
6121
6298
  // @ts-ignore
6122
- _this35.webex.internal.llm.on('online', _this35.handleLLMOnline);
6123
- _this35.updateLLMConnection().catch(function (error) {
6299
+ _this36.webex.internal.llm.on('online', _this36.handleLLMOnline);
6300
+ _this36.updateLLMConnection().catch(function (error) {
6124
6301
  _loggerProxy.default.logger.error('Meeting:index#join --> Transcription Socket Connection Failed', error);
6125
6302
  _metrics.default.sendBehavioralMetric(_constants2.default.LLM_CONNECTION_AFTER_JOIN_FAILURE, {
6126
- correlation_id: _this35.correlationId,
6303
+ correlation_id: _this36.correlationId,
6127
6304
  reason: error === null || error === void 0 ? void 0 : error.message,
6128
6305
  stack: error.stack
6129
6306
  });
@@ -6155,7 +6332,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6155
6332
  key: "updateLLMConnection",
6156
6333
  value: (function () {
6157
6334
  var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
6158
- var _this36 = this;
6335
+ var _this37 = this;
6159
6336
  var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, practiceSessionDatachannelUrl, isJoined, dataChannelUrl;
6160
6337
  return _regenerator.default.wrap(function _callee20$(_context20) {
6161
6338
  while (1) switch (_context20.prev = _context20.next) {
@@ -6195,9 +6372,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6195
6372
  case 11:
6196
6373
  return _context20.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl).then(function (registerAndConnectResult) {
6197
6374
  // @ts-ignore - Fix type
6198
- _this36.webex.internal.llm.off('event:relay.event', _this36.processRelayEvent);
6375
+ _this37.webex.internal.llm.off('event:relay.event', _this37.processRelayEvent);
6199
6376
  // @ts-ignore - Fix type
6200
- _this36.webex.internal.llm.on('event:relay.event', _this36.processRelayEvent);
6377
+ _this37.webex.internal.llm.on('event:relay.event', _this37.processRelayEvent);
6201
6378
  _loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
6202
6379
  return _promise.default.resolve(registerAndConnectResult);
6203
6380
  }));
@@ -6251,7 +6428,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6251
6428
  }, {
6252
6429
  key: "dialInPstn",
6253
6430
  value: function dialInPstn() {
6254
- var _this37 = this;
6431
+ var _this38 = this;
6255
6432
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
6256
6433
 
6257
6434
  var correlationId = this.correlationId,
@@ -6267,10 +6444,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6267
6444
  }).catch(function (error) {
6268
6445
  var _error$error2;
6269
6446
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
6270
- correlation_id: _this37.correlationId,
6271
- dial_in_url: _this37.dialInUrl,
6447
+ correlation_id: _this38.correlationId,
6448
+ dial_in_url: _this38.dialInUrl,
6272
6449
  locus_id: locusUrl.split('/').pop(),
6273
- client_url: _this37.deviceUrl,
6450
+ client_url: _this38.deviceUrl,
6274
6451
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
6275
6452
  stack: error.stack
6276
6453
  });
@@ -6288,7 +6465,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6288
6465
  }, {
6289
6466
  key: "dialOutPstn",
6290
6467
  value: function dialOutPstn(phoneNumber) {
6291
- var _this38 = this;
6468
+ var _this39 = this;
6292
6469
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
6293
6470
 
6294
6471
  var correlationId = this.correlationId,
@@ -6305,10 +6482,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6305
6482
  }).catch(function (error) {
6306
6483
  var _error$error3;
6307
6484
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
6308
- correlation_id: _this38.correlationId,
6309
- dial_out_url: _this38.dialOutUrl,
6485
+ correlation_id: _this39.correlationId,
6486
+ dial_out_url: _this39.dialOutUrl,
6310
6487
  locus_id: locusUrl.split('/').pop(),
6311
- client_url: _this38.deviceUrl,
6488
+ client_url: _this39.deviceUrl,
6312
6489
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
6313
6490
  stack: error.stack
6314
6491
  });
@@ -6339,7 +6516,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6339
6516
  }, {
6340
6517
  key: "moveTo",
6341
6518
  value: function moveTo(resourceId) {
6342
- var _this39 = this;
6519
+ var _this40 = this;
6343
6520
  if (!resourceId) {
6344
6521
  throw new _parameter.default('Cannot move call without a resourceId.');
6345
6522
  }
@@ -6383,12 +6560,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6383
6560
  while (1) switch (_context21.prev = _context21.next) {
6384
6561
  case 0:
6385
6562
  _context21.prev = 0;
6386
- if (!(_this39.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6563
+ if (!(_this40.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6387
6564
  _context21.next = 4;
6388
6565
  break;
6389
6566
  }
6390
6567
  _context21.next = 4;
6391
- return _this39.releaseScreenShareFloor();
6568
+ return _this40.releaseScreenShareFloor();
6392
6569
  case 4:
6393
6570
  mediaSettings = {
6394
6571
  mediaDirection: {
@@ -6400,37 +6577,37 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6400
6577
  receiveShare: true
6401
6578
  }
6402
6579
  };
6403
- _this39.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6404
- _this39.mediaProperties.unsetRemoteMedia();
6580
+ _this40.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
6581
+ _this40.mediaProperties.unsetRemoteMedia();
6405
6582
 
6406
6583
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the device answers the meeting
6407
6584
  // once the device answers we close the old connection and create new media server connection with only share enabled
6408
- if (!_this39.statsAnalyzer) {
6585
+ if (!_this40.statsAnalyzer) {
6409
6586
  _context21.next = 10;
6410
6587
  break;
6411
6588
  }
6412
6589
  _context21.next = 10;
6413
- return _this39.statsAnalyzer.stopAnalyzer();
6590
+ return _this40.statsAnalyzer.stopAnalyzer();
6414
6591
  case 10:
6415
6592
  _context21.next = 12;
6416
- return _this39.closeRemoteStreams();
6593
+ return _this40.closeRemoteStreams();
6417
6594
  case 12:
6418
6595
  _context21.next = 14;
6419
- return _this39.closePeerConnections();
6596
+ return _this40.closePeerConnections();
6420
6597
  case 14:
6421
- _this39.cleanupLocalStreams();
6422
- _this39.unsetRemoteStreams();
6423
- _this39.unsetPeerConnections();
6424
- _this39.reconnectionManager.cleanUp();
6598
+ _this40.cleanupLocalStreams();
6599
+ _this40.unsetRemoteStreams();
6600
+ _this40.unsetPeerConnections();
6601
+ _this40.reconnectionManager.cleanUp();
6425
6602
  _context21.next = 20;
6426
- return _this39.addMedia({
6603
+ return _this40.addMedia({
6427
6604
  audioEnabled: false,
6428
6605
  videoEnabled: false,
6429
6606
  shareVideoEnabled: true
6430
6607
  });
6431
6608
  case 20:
6432
6609
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
6433
- _this39.isMoveToInProgress = false;
6610
+ _this40.isMoveToInProgress = false;
6434
6611
  _context21.next = 29;
6435
6612
  break;
6436
6613
  case 24:
@@ -6438,12 +6615,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6438
6615
  _context21.t0 = _context21["catch"](0);
6439
6616
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context21.t0);
6440
6617
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6441
- correlation_id: _this39.correlationId,
6442
- locus_id: _this39.locusUrl.split('/').pop(),
6618
+ correlation_id: _this40.correlationId,
6619
+ locus_id: _this40.locusUrl.split('/').pop(),
6443
6620
  reason: _context21.t0.message,
6444
6621
  stack: _context21.t0.stack
6445
6622
  });
6446
- _this39.isMoveToInProgress = false;
6623
+ _this40.isMoveToInProgress = false;
6447
6624
  case 29:
6448
6625
  case "end":
6449
6626
  return _context21.stop();
@@ -6459,17 +6636,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6459
6636
  resourceId: resourceId,
6460
6637
  moveToResource: true
6461
6638
  }).then(function () {
6462
- _this39.meetingFiniteStateMachine.join();
6639
+ _this40.meetingFiniteStateMachine.join();
6463
6640
  }).catch(function (error) {
6464
- _this39.meetingFiniteStateMachine.fail(error);
6641
+ _this40.meetingFiniteStateMachine.fail(error);
6465
6642
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6466
- correlation_id: _this39.correlationId,
6467
- locus_id: _this39.locusUrl.split('/').pop(),
6643
+ correlation_id: _this40.correlationId,
6644
+ locus_id: _this40.locusUrl.split('/').pop(),
6468
6645
  reason: error.message,
6469
6646
  stack: error.stack
6470
6647
  });
6471
6648
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', error);
6472
- _this39.isMoveToInProgress = false;
6649
+ _this40.isMoveToInProgress = false;
6473
6650
  return _promise.default.reject(error);
6474
6651
  });
6475
6652
  }
@@ -6484,7 +6661,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6484
6661
  }, {
6485
6662
  key: "moveFrom",
6486
6663
  value: function moveFrom(resourceId) {
6487
- var _this40 = this;
6664
+ var _this41 = this;
6488
6665
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
6489
6666
  if (!resourceId) {
6490
6667
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -6499,19 +6676,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6499
6676
  }
6500
6677
  });
6501
6678
  return _util2.default.joinMeetingOptions(this).then(function () {
6502
- return _util2.default.leaveMeeting(_this40, {
6679
+ return _util2.default.leaveMeeting(_this41, {
6503
6680
  resourceId: resourceId,
6504
6681
  correlationId: oldCorrelationId,
6505
6682
  moveMeeting: true
6506
6683
  }).then(function () {
6507
- _this40.resourceId = '';
6684
+ _this41.resourceId = '';
6508
6685
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
6509
6686
  });
6510
6687
  }).catch(function (error) {
6511
- _this40.meetingFiniteStateMachine.fail(error);
6688
+ _this41.meetingFiniteStateMachine.fail(error);
6512
6689
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
6513
- correlation_id: _this40.correlationId,
6514
- locus_id: _this40.locusUrl.split('/').pop(),
6690
+ correlation_id: _this41.correlationId,
6691
+ locus_id: _this41.locusUrl.split('/').pop(),
6515
6692
  reason: error.message,
6516
6693
  stack: error.stack
6517
6694
  });
@@ -6627,9 +6804,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6627
6804
  }, {
6628
6805
  key: "forwardEvent",
6629
6806
  value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
6630
- var _this41 = this;
6807
+ var _this42 = this;
6631
6808
  eventEmitter.on(eventTypeToForward, function (data) {
6632
- return _triggerProxy.default.trigger(_this41, {
6809
+ return _triggerProxy.default.trigger(_this42, {
6633
6810
  file: 'meetings',
6634
6811
  function: 'addMedia'
6635
6812
  }, meetingEventType, data);
@@ -6699,7 +6876,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6699
6876
  key: "waitForMediaConnectionConnected",
6700
6877
  value: (function () {
6701
6878
  var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
6702
- var iceConnected, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, _this$mediaProperties14;
6879
+ var iceConnected, handledBySdk, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, _this$mediaProperties14, caError, timedOutError;
6703
6880
  return _regenerator.default.wrap(function _callee24$(_context24) {
6704
6881
  while (1) switch (_context24.prev = _context24.next) {
6705
6882
  case 0:
@@ -6707,59 +6884,61 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6707
6884
  _context24.next = 3;
6708
6885
  return this.mediaProperties.waitForMediaConnectionConnected();
6709
6886
  case 3:
6710
- _context24.next = 30;
6887
+ _context24.next = 27;
6711
6888
  break;
6712
6889
  case 5:
6713
6890
  _context24.prev = 5;
6714
6891
  _context24.t0 = _context24["catch"](0);
6715
6892
  iceConnected = _context24.t0.iceConnected;
6893
+ handledBySdk = false;
6716
6894
  if (this.hasMediaConnectionConnectedAtLeastOnce) {
6717
- _context24.next = 29;
6895
+ _context24.next = 24;
6718
6896
  break;
6719
6897
  }
6720
- _context24.t1 = this.webex.internal.newMetrics;
6721
- _context24.t2 = !this.turnServerUsed;
6722
- _context24.t3 = this.addMediaData.icePhaseCallback();
6723
- _context24.t4 = this.webex.internal.newMetrics.callDiagnosticMetrics;
6724
- _context24.t5 = _internalPluginMetrics.CallDiagnosticUtils;
6725
- _context24.t6 = ((_this$mediaProperties8 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties8 === void 0 ? void 0 : (_this$mediaProperties9 = _this$mediaProperties8.multistreamConnection) === null || _this$mediaProperties9 === void 0 ? void 0 : (_this$mediaProperties10 = _this$mediaProperties9.pc) === null || _this$mediaProperties10 === void 0 ? void 0 : (_this$mediaProperties11 = _this$mediaProperties10.pc) === null || _this$mediaProperties11 === void 0 ? void 0 : _this$mediaProperties11.signalingState) || ((_this$mediaProperties12 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties12 === void 0 ? void 0 : (_this$mediaProperties13 = _this$mediaProperties12.mediaConnection) === null || _this$mediaProperties13 === void 0 ? void 0 : (_this$mediaProperties14 = _this$mediaProperties13.pc) === null || _this$mediaProperties14 === void 0 ? void 0 : _this$mediaProperties14.signalingState) || 'unknown';
6726
- _context24.t7 = iceConnected;
6727
- _context24.t8 = this.turnServerUsed;
6728
- _context24.next = 19;
6898
+ _context24.t1 = this.webex.internal.newMetrics.callDiagnosticMetrics;
6899
+ _context24.t2 = _internalPluginMetrics.CallDiagnosticUtils;
6900
+ _context24.t3 = ((_this$mediaProperties8 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties8 === void 0 ? void 0 : (_this$mediaProperties9 = _this$mediaProperties8.multistreamConnection) === null || _this$mediaProperties9 === void 0 ? void 0 : (_this$mediaProperties10 = _this$mediaProperties9.pc) === null || _this$mediaProperties10 === void 0 ? void 0 : (_this$mediaProperties11 = _this$mediaProperties10.pc) === null || _this$mediaProperties11 === void 0 ? void 0 : _this$mediaProperties11.signalingState) || ((_this$mediaProperties12 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties12 === void 0 ? void 0 : (_this$mediaProperties13 = _this$mediaProperties12.mediaConnection) === null || _this$mediaProperties13 === void 0 ? void 0 : (_this$mediaProperties14 = _this$mediaProperties13.pc) === null || _this$mediaProperties14 === void 0 ? void 0 : _this$mediaProperties14.signalingState) || 'unknown';
6901
+ _context24.t4 = iceConnected;
6902
+ _context24.t5 = this.turnServerUsed;
6903
+ _context24.next = 17;
6729
6904
  return this.webex.meetings.reachability.isWebexMediaBackendUnreachable().catch(function () {
6730
6905
  return false;
6731
6906
  });
6732
- case 19:
6733
- _context24.t9 = _context24.sent;
6734
- _context24.t10 = {
6735
- signalingState: _context24.t6,
6736
- iceConnected: _context24.t7,
6737
- turnServerUsed: _context24.t8,
6738
- unreachable: _context24.t9
6739
- };
6740
- _context24.t11 = _context24.t5.generateClientErrorCodeForIceFailure.call(_context24.t5, _context24.t10);
6741
- _context24.t12 = {
6742
- clientErrorCode: _context24.t11
6907
+ case 17:
6908
+ _context24.t6 = _context24.sent;
6909
+ _context24.t7 = {
6910
+ signalingState: _context24.t3,
6911
+ iceConnected: _context24.t4,
6912
+ turnServerUsed: _context24.t5,
6913
+ unreachable: _context24.t6
6743
6914
  };
6744
- _context24.t13 = _context24.t4.getErrorPayloadForClientErrorCode.call(_context24.t4, _context24.t12);
6745
- _context24.t14 = [_context24.t13];
6746
- _context24.t15 = {
6747
- canProceed: _context24.t2,
6748
- icePhase: _context24.t3,
6749
- errors: _context24.t14
6915
+ _context24.t8 = _context24.t2.generateClientErrorCodeForIceFailure.call(_context24.t2, _context24.t7);
6916
+ _context24.t9 = {
6917
+ clientErrorCode: _context24.t8
6750
6918
  };
6751
- _context24.t16 = {
6752
- meetingId: this.id
6753
- };
6754
- _context24.t17 = {
6919
+ caError = _context24.t1.getErrorPayloadForClientErrorCode.call(_context24.t1, _context24.t9);
6920
+ // Only send CA event for join flow if we haven't successfully connected media yet
6921
+ // @ts-ignore
6922
+ this.webex.internal.newMetrics.submitClientEvent({
6755
6923
  name: 'client.ice.end',
6756
- payload: _context24.t15,
6757
- options: _context24.t16
6758
- };
6759
- _context24.t1.submitClientEvent.call(_context24.t1, _context24.t17);
6760
- case 29:
6761
- throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
6762
- case 30:
6924
+ payload: {
6925
+ canProceed: !this.turnServerUsed,
6926
+ // If we haven't done turn tls retry yet we will proceed with join attempt
6927
+ icePhase: this.addMediaData.icePhaseCallback(),
6928
+ errors: [caError]
6929
+ },
6930
+ options: {
6931
+ meetingId: this.id
6932
+ }
6933
+ });
6934
+ handledBySdk = true;
6935
+ case 24:
6936
+ timedOutError = new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
6937
+ if (handledBySdk) {
6938
+ timedOutError = _util2.default.markErrorAsHandledBySdk(timedOutError);
6939
+ }
6940
+ throw timedOutError;
6941
+ case 27:
6763
6942
  case "end":
6764
6943
  return _context24.stop();
6765
6944
  }
@@ -6790,6 +6969,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6790
6969
  networkQualityMonitor: this.networkQualityMonitor,
6791
6970
  isMultistream: this.isMultistream
6792
6971
  });
6972
+ this.shareCAEventSentStatus = {
6973
+ transmitStart: false,
6974
+ transmitStop: false,
6975
+ receiveStart: false,
6976
+ receiveStop: false
6977
+ };
6793
6978
  this.setupStatsAnalyzerEventHandlers();
6794
6979
  this.networkQualityMonitor.on(_internalMediaCore.NetworkQualityEventNames.NETWORK_QUALITY, this.sendNetworkQualityEvent.bind(this));
6795
6980
  }
@@ -6806,7 +6991,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6806
6991
  key: "waitForRemoteSDPAnswer",
6807
6992
  value: (function () {
6808
6993
  var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
6809
- var _this42 = this;
6994
+ var _this43 = this;
6810
6995
  var LOG_HEADER, deferSDPAnswer;
6811
6996
  return _regenerator.default.wrap(function _callee25$(_context25) {
6812
6997
  while (1) switch (_context25.prev = _context25.next) {
@@ -6822,20 +7007,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6822
7007
  deferSDPAnswer = this.deferSDPAnswer;
6823
7008
  this.sdpResponseTimer = setTimeout(function () {
6824
7009
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " timeout! no REMOTE SDP ANSWER received within ").concat(_constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT / 1000, " seconds"));
7010
+ var timeoutError = new Error('Timeout waiting for SDP answer');
7011
+ var timeoutErrorProxy = _util2.default.markErrorAsHandledBySdk(timeoutError);
7012
+
6825
7013
  // @ts-ignore
6826
- _this42.webex.internal.newMetrics.submitClientEvent({
7014
+ _this43.webex.internal.newMetrics.submitClientEvent({
6827
7015
  name: 'client.media-engine.remote-sdp-received',
6828
7016
  payload: {
6829
7017
  canProceed: false,
6830
7018
  errors: [
6831
7019
  // @ts-ignore
6832
- _this42.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
7020
+ _this43.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
6833
7021
  clientErrorCode: _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MISSING_ROAP_ANSWER_CLIENT_CODE
6834
7022
  })]
6835
7023
  },
6836
7024
  options: {
6837
- meetingId: _this42.id,
6838
- rawError: new Error('Timeout waiting for SDP answer')
7025
+ meetingId: _this43.id,
7026
+ rawError: timeoutErrorProxy
6839
7027
  }
6840
7028
  });
6841
7029
  deferSDPAnswer.reject(new Error('Timed out waiting for REMOTE SDP ANSWER'));
@@ -6961,7 +7149,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6961
7149
  key: "handleWaitForMediaConnectionConnectedError",
6962
7150
  value: (function () {
6963
7151
  var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(error, remoteMediaManagerConfig, bundlePolicy) {
6964
- var LOG_HEADER;
7152
+ var LOG_HEADER, addMediaFailedError;
6965
7153
  return _regenerator.default.wrap(function _callee28$(_context28) {
6966
7154
  while (1) switch (_context28.prev = _context28.next) {
6967
7155
  case 0:
@@ -6974,12 +7162,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6974
7162
  _context28.next = 5;
6975
7163
  return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
6976
7164
  case 5:
6977
- _context28.next = 9;
7165
+ _context28.next = 11;
6978
7166
  break;
6979
7167
  case 7:
6980
7168
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
6981
- throw new _webexErrors.AddMediaFailed();
6982
- case 9:
7169
+ addMediaFailedError = new _webexErrors.AddMediaFailed(); // @ts-ignore - handledBySdk is added by a proxy
7170
+ if (error.handledBySdk) {
7171
+ addMediaFailedError = _util2.default.markErrorAsHandledBySdk(addMediaFailedError);
7172
+ }
7173
+ throw addMediaFailedError;
7174
+ case 11:
6983
7175
  case "end":
6984
7176
  return _context28.stop();
6985
7177
  }
@@ -7341,10 +7533,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7341
7533
  }, {
7342
7534
  key: "addMedia",
7343
7535
  value: function addMedia() {
7344
- var _this43 = this;
7536
+ var _this44 = this;
7345
7537
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7346
7538
  return this.addMediaInternal(function () {
7347
- return _this43.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7539
+ return _this44.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
7348
7540
  }, undefined, false, options);
7349
7541
  }
7350
7542
 
@@ -7384,6 +7576,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7384
7576
  numTransports,
7385
7577
  reachabilityStats,
7386
7578
  iceCandidateErrors,
7579
+ isSubnetReachable,
7387
7580
  _this$mediaProperties15,
7388
7581
  _this$mediaProperties16,
7389
7582
  _this$mediaProperties17,
@@ -7410,6 +7603,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7410
7603
  _selectedCandidatePairChanges,
7411
7604
  _numTransports,
7412
7605
  _iceCandidateErrors,
7606
+ _isSubnetReachable,
7413
7607
  _args35 = arguments;
7414
7608
  return _regenerator.default.wrap(function _callee35$(_context35) {
7415
7609
  while (1) switch (_context35.prev = _context35.next) {
@@ -7532,7 +7726,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7532
7726
  return this.webex.meetings.reachability.getReachabilityMetrics();
7533
7727
  case 52:
7534
7728
  reachabilityStats = _context35.sent;
7535
- iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7729
+ iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors); // @ts-ignore
7730
+ isSubnetReachable = this.webex.meetings.reachability.isSubnetReachable(this.mediaServerIp);
7536
7731
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
7537
7732
  correlation_id: this.correlationId,
7538
7733
  locus_id: this.locusUrl.split('/').pop(),
@@ -7541,7 +7736,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7541
7736
  numTransports: numTransports,
7542
7737
  isMultistream: this.isMultistream,
7543
7738
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer,
7544
- isJoinWithMediaRetry: this.joinWithMediaRetryInfo.isRetry
7739
+ isJoinWithMediaRetry: this.joinWithMediaRetryInfo.isRetry,
7740
+ isSubnetReachable: isSubnetReachable
7545
7741
  }, reachabilityStats), iceCandidateErrors), {}, {
7546
7742
  iceCandidatesCount: this.iceCandidatesCount
7547
7743
  }));
@@ -7557,25 +7753,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7557
7753
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
7558
7754
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
7559
7755
  this.startPeriodicLogUpload();
7560
- _context35.next = 79;
7756
+ _context35.next = 81;
7561
7757
  break;
7562
- case 61:
7563
- _context35.prev = 61;
7758
+ case 62:
7759
+ _context35.prev = 62;
7564
7760
  _context35.t1 = _context35["catch"](19);
7565
7761
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context35.t1);
7566
7762
 
7567
7763
  // @ts-ignore
7568
- _context35.next = 66;
7764
+ _context35.next = 67;
7569
7765
  return this.webex.meetings.reachability.getReachabilityMetrics();
7570
- case 66:
7766
+ case 67:
7571
7767
  reachabilityMetrics = _context35.sent;
7572
- _context35.next = 69;
7768
+ _context35.next = 70;
7573
7769
  return this.mediaProperties.getCurrentConnectionInfo();
7574
- case 69:
7770
+ case 70:
7575
7771
  _yield$this$mediaProp2 = _context35.sent;
7576
7772
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
7577
7773
  _numTransports = _yield$this$mediaProp2.numTransports;
7578
- _iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7774
+ _iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors); // @ts-ignore
7775
+ _isSubnetReachable = this.webex.meetings.reachability.isSubnetReachable(this.mediaServerIp);
7579
7776
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread(_objectSpread(_objectSpread({
7580
7777
  correlation_id: this.correlationId,
7581
7778
  locus_id: this.locusUrl.split('/').pop(),
@@ -7592,12 +7789,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7592
7789
  signalingState: ((_this$mediaProperties15 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties15 === void 0 ? void 0 : (_this$mediaProperties16 = _this$mediaProperties15.multistreamConnection) === null || _this$mediaProperties16 === void 0 ? void 0 : (_this$mediaProperties17 = _this$mediaProperties16.pc) === null || _this$mediaProperties17 === void 0 ? void 0 : (_this$mediaProperties18 = _this$mediaProperties17.pc) === null || _this$mediaProperties18 === void 0 ? void 0 : _this$mediaProperties18.signalingState) || ((_this$mediaProperties19 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties19 === void 0 ? void 0 : (_this$mediaProperties20 = _this$mediaProperties19.mediaConnection) === null || _this$mediaProperties20 === void 0 ? void 0 : (_this$mediaProperties21 = _this$mediaProperties20.pc) === null || _this$mediaProperties21 === void 0 ? void 0 : _this$mediaProperties21.signalingState) || 'unknown',
7593
7790
  connectionState: ((_this$mediaProperties22 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties22 === void 0 ? void 0 : (_this$mediaProperties23 = _this$mediaProperties22.multistreamConnection) === null || _this$mediaProperties23 === void 0 ? void 0 : (_this$mediaProperties24 = _this$mediaProperties23.pc) === null || _this$mediaProperties24 === void 0 ? void 0 : (_this$mediaProperties25 = _this$mediaProperties24.pc) === null || _this$mediaProperties25 === void 0 ? void 0 : _this$mediaProperties25.connectionState) || ((_this$mediaProperties26 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties26 === void 0 ? void 0 : (_this$mediaProperties27 = _this$mediaProperties26.mediaConnection) === null || _this$mediaProperties27 === void 0 ? void 0 : (_this$mediaProperties28 = _this$mediaProperties27.pc) === null || _this$mediaProperties28 === void 0 ? void 0 : _this$mediaProperties28.connectionState) || 'unknown',
7594
7791
  iceConnectionState: ((_this$mediaProperties29 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties29 === void 0 ? void 0 : (_this$mediaProperties30 = _this$mediaProperties29.multistreamConnection) === null || _this$mediaProperties30 === void 0 ? void 0 : (_this$mediaProperties31 = _this$mediaProperties30.pc) === null || _this$mediaProperties31 === void 0 ? void 0 : (_this$mediaProperties32 = _this$mediaProperties31.pc) === null || _this$mediaProperties32 === void 0 ? void 0 : _this$mediaProperties32.iceConnectionState) || ((_this$mediaProperties33 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties33 === void 0 ? void 0 : (_this$mediaProperties34 = _this$mediaProperties33.mediaConnection) === null || _this$mediaProperties34 === void 0 ? void 0 : (_this$mediaProperties35 = _this$mediaProperties34.pc) === null || _this$mediaProperties35 === void 0 ? void 0 : _this$mediaProperties35.iceConnectionState) || 'unknown'
7595
- }, reachabilityMetrics), _iceCandidateErrors), {}, {
7792
+ }, reachabilityMetrics), {}, {
7793
+ isSubnetReachable: _isSubnetReachable
7794
+ }, _iceCandidateErrors), {}, {
7596
7795
  iceCandidatesCount: this.iceCandidatesCount
7597
7796
  }));
7598
- _context35.next = 76;
7797
+ _context35.next = 78;
7599
7798
  return this.cleanUpOnAddMediaFailure();
7600
- case 76:
7799
+ case 78:
7601
7800
  // Upload logs on error while adding media
7602
7801
  _triggerProxy.default.trigger(this, {
7603
7802
  file: 'meeting/index',
@@ -7609,15 +7808,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7609
7808
  });
7610
7809
  }
7611
7810
  throw _context35.t1;
7612
- case 79:
7613
- _context35.prev = 79;
7811
+ case 81:
7812
+ _context35.prev = 81;
7614
7813
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
7615
- return _context35.finish(79);
7616
- case 82:
7814
+ return _context35.finish(81);
7815
+ case 84:
7617
7816
  case "end":
7618
7817
  return _context35.stop();
7619
7818
  }
7620
- }, _callee35, this, [[19, 61, 79, 82], [24, 29]]);
7819
+ }, _callee35, this, [[19, 62, 81, 84], [24, 29]]);
7621
7820
  }));
7622
7821
  function addMediaInternal(_x33, _x34, _x35) {
7623
7822
  return _addMediaInternal.apply(this, arguments);
@@ -7649,7 +7848,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7649
7848
  * @memberof Meeting
7650
7849
  */
7651
7850
  function enqueueMediaUpdate(mediaUpdateType) {
7652
- var _this44 = this;
7851
+ var _this45 = this;
7653
7852
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7654
7853
  var canUpdateMediaNow = this.canUpdateMedia();
7655
7854
  return new _promise.default(function (resolve, reject) {
@@ -7660,9 +7859,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7660
7859
  options: options
7661
7860
  };
7662
7861
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
7663
- _this44.queuedMediaUpdates.push(queueItem);
7862
+ _this45.queuedMediaUpdates.push(queueItem);
7664
7863
  if (canUpdateMediaNow) {
7665
- _this44.processNextQueuedMediaUpdate();
7864
+ _this45.processNextQueuedMediaUpdate();
7666
7865
  }
7667
7866
  });
7668
7867
  }
@@ -7767,7 +7966,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7767
7966
  }, {
7768
7967
  key: "acknowledge",
7769
7968
  value: function acknowledge(type) {
7770
- var _this45 = this;
7969
+ var _this46 = this;
7771
7970
  if (!type) {
7772
7971
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
7773
7972
  }
@@ -7779,12 +7978,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7779
7978
  }).then(function (response) {
7780
7979
  return _promise.default.resolve(response);
7781
7980
  }).then(function (response) {
7782
- _this45.meetingFiniteStateMachine.ring(type);
7981
+ _this46.meetingFiniteStateMachine.ring(type);
7783
7982
  // @ts-ignore
7784
- _this45.webex.internal.newMetrics.submitClientEvent({
7983
+ _this46.webex.internal.newMetrics.submitClientEvent({
7785
7984
  name: 'client.alert.displayed',
7786
7985
  options: {
7787
- meetingId: _this45.id
7986
+ meetingId: _this46.id
7788
7987
  }
7789
7988
  });
7790
7989
  return _promise.default.resolve({
@@ -7809,12 +8008,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7809
8008
  }, {
7810
8009
  key: "decline",
7811
8010
  value: function decline(reason) {
7812
- var _this46 = this;
8011
+ var _this47 = this;
7813
8012
  return _util2.default.declineMeeting(this, reason).then(function (decline) {
7814
- _this46.meetingFiniteStateMachine.decline();
8013
+ _this47.meetingFiniteStateMachine.decline();
7815
8014
  return _promise.default.resolve(decline);
7816
8015
  }).catch(function (error) {
7817
- _this46.meetingFiniteStateMachine.fail(error);
8016
+ _this47.meetingFiniteStateMachine.fail(error);
7818
8017
  return _promise.default.reject(error);
7819
8018
  });
7820
8019
  }
@@ -7865,7 +8064,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7865
8064
  }, {
7866
8065
  key: "leave",
7867
8066
  value: function leave() {
7868
- var _this47 = this;
8067
+ var _this48 = this;
7869
8068
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7870
8069
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
7871
8070
 
@@ -7877,7 +8076,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7877
8076
  var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7878
8077
  return (
7879
8078
  // @ts-ignore
7880
- _this47.webex.internal.newMetrics.submitClientEvent({
8079
+ _this48.webex.internal.newMetrics.submitClientEvent({
7881
8080
  name: 'client.call.leave',
7882
8081
  payload: _objectSpread({
7883
8082
  trigger: 'user-interaction',
@@ -7885,7 +8084,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7885
8084
  leaveReason: options.clientEventLeaveReason
7886
8085
  }, payload),
7887
8086
  options: {
7888
- meetingId: _this47.id
8087
+ meetingId: _this48.id
7889
8088
  }
7890
8089
  })
7891
8090
  );
@@ -7894,24 +8093,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7894
8093
  return _util2.default.leaveMeeting(this, options).then(function (leave) {
7895
8094
  // CA team recommends submitting this *after* locus /leave
7896
8095
  submitLeaveMetric();
7897
- _this47.meetingFiniteStateMachine.leave();
7898
- _this47.clearMeetingData();
8096
+ _this48.meetingFiniteStateMachine.leave();
8097
+ _this48.clearMeetingData();
7899
8098
 
7900
8099
  // upload logs on leave irrespective of meeting delete
7901
- _triggerProxy.default.trigger(_this47, {
8100
+ _triggerProxy.default.trigger(_this48, {
7902
8101
  file: 'meeting/index',
7903
8102
  function: 'leave'
7904
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
8103
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this48);
7905
8104
 
7906
8105
  // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
7907
- if (_this47.wirelessShare || _this47.guest) {
8106
+ if (_this48.wirelessShare || _this48.guest) {
7908
8107
  // If screen sharing clean the meeting object
7909
- _triggerProxy.default.trigger(_this47, {
8108
+ _triggerProxy.default.trigger(_this48, {
7910
8109
  file: 'meeting/index',
7911
8110
  function: 'leave'
7912
8111
  }, _constants.EVENTS.DESTROY_MEETING, {
7913
8112
  reason: options.reason,
7914
- meetingId: _this47.id
8113
+ meetingId: _this48.id
7915
8114
  });
7916
8115
  }
7917
8116
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
@@ -7928,16 +8127,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7928
8127
  shownToUser: false
7929
8128
  }]
7930
8129
  });
7931
- _this47.meetingFiniteStateMachine.fail(error);
8130
+ _this48.meetingFiniteStateMachine.fail(error);
7932
8131
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
7933
8132
  // upload logs on leave irrespective of meeting delete
7934
- _triggerProxy.default.trigger(_this47, {
8133
+ _triggerProxy.default.trigger(_this48, {
7935
8134
  file: 'meeting/index',
7936
8135
  function: 'leave'
7937
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
8136
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this48);
7938
8137
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
7939
- correlation_id: _this47.correlationId,
7940
- locus_id: _this47.locusUrl.split('/').pop(),
8138
+ correlation_id: _this48.correlationId,
8139
+ locus_id: _this48.locusUrl.split('/').pop(),
7941
8140
  reason: error.message,
7942
8141
  stack: error.stack,
7943
8142
  code: error.code
@@ -7957,7 +8156,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7957
8156
  }, {
7958
8157
  key: "startWhiteboardShare",
7959
8158
  value: function startWhiteboardShare(channelUrl, resourceToken) {
7960
- var _this48 = this;
8159
+ var _this49 = this;
7961
8160
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
7962
8161
  return element.name === 'whiteboard';
7963
8162
  });
@@ -7986,13 +8185,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7986
8185
  body.resourceToken = resourceToken;
7987
8186
  }
7988
8187
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
7989
- _this48.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8188
+ _this49.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
7990
8189
  return _promise.default.resolve();
7991
8190
  }).catch(function (error) {
7992
8191
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
7993
8192
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
7994
- correlation_id: _this48.correlationId,
7995
- locus_id: _this48.locusUrl.split('/').pop(),
8193
+ correlation_id: _this49.correlationId,
8194
+ locus_id: _this49.locusUrl.split('/').pop(),
7996
8195
  reason: error.message,
7997
8196
  stack: error.stack,
7998
8197
  board: {
@@ -8015,7 +8214,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8015
8214
  }, {
8016
8215
  key: "stopWhiteboardShare",
8017
8216
  value: function stopWhiteboardShare(channelUrl) {
8018
- var _this49 = this;
8217
+ var _this50 = this;
8019
8218
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
8020
8219
  return element.name === 'whiteboard';
8021
8220
  });
@@ -8038,8 +8237,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8038
8237
  }).catch(function (error) {
8039
8238
  _loggerProxy.default.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
8040
8239
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_STOP_WHITEBOARD_SHARE_FAILURE, {
8041
- correlation_id: _this49.correlationId,
8042
- locus_id: _this49.locusUrl.split('/').pop(),
8240
+ correlation_id: _this50.correlationId,
8241
+ locus_id: _this50.locusUrl.split('/').pop(),
8043
8242
  reason: error.message,
8044
8243
  stack: error.stack,
8045
8244
  board: {
@@ -8061,7 +8260,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8061
8260
  }, {
8062
8261
  key: "requestScreenShareFloor",
8063
8262
  value: function requestScreenShareFloor() {
8064
- var _this50 = this;
8263
+ var _this51 = this;
8065
8264
  if (!this.mediaProperties.hasLocalShareStream() || !this.mediaProperties.mediaDirection.sendShare) {
8066
8265
  _loggerProxy.default.logger.log("Meeting:index#requestScreenShareFloor --> NOT requesting floor, because we don't have the share stream anymore (shareStream=".concat(this.mediaProperties.shareVideoStream ? 'yes' : 'no', ", sendShare=").concat(this.mediaProperties.mediaDirection.sendShare, ")"));
8067
8266
  this.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
@@ -8092,34 +8291,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8092
8291
  resourceUrl: this.resourceUrl,
8093
8292
  shareInstanceId: this.localShareInstanceId
8094
8293
  }).then(function () {
8095
- _this50.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
8294
+ _this51.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
8096
8295
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_SUCCESS, {
8097
- correlation_id: _this50.correlationId,
8098
- locus_id: _this50.locusUrl.split('/').pop()
8296
+ correlation_id: _this51.correlationId,
8297
+ locus_id: _this51.locusUrl.split('/').pop()
8099
8298
  });
8100
8299
  return _promise.default.resolve();
8101
8300
  }).catch(function (error) {
8102
8301
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
8103
8302
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
8104
- correlation_id: _this50.correlationId,
8105
- locus_id: _this50.locusUrl.split('/').pop(),
8303
+ correlation_id: _this51.correlationId,
8304
+ locus_id: _this51.locusUrl.split('/').pop(),
8106
8305
  reason: error.message,
8107
8306
  stack: error.stack
8108
8307
  });
8109
8308
 
8110
8309
  // @ts-ignore
8111
- _this50.webex.internal.newMetrics.submitClientEvent({
8310
+ _this51.webex.internal.newMetrics.submitClientEvent({
8112
8311
  name: 'client.share.floor-granted.local',
8113
8312
  payload: {
8114
8313
  mediaType: 'share',
8115
8314
  errors: _util2.default.getChangeMeetingFloorErrorPayload(error.message),
8116
- shareInstanceId: _this50.localShareInstanceId
8315
+ shareInstanceId: _this51.localShareInstanceId
8117
8316
  },
8118
8317
  options: {
8119
- meetingId: _this50.id
8318
+ meetingId: _this51.id
8120
8319
  }
8121
8320
  });
8122
- _this50.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8321
+ _this51.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
8123
8322
  return _promise.default.reject(error);
8124
8323
  });
8125
8324
  }
@@ -8142,10 +8341,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8142
8341
  }, {
8143
8342
  key: "requestScreenShareFloorIfPending",
8144
8343
  value: function requestScreenShareFloorIfPending() {
8145
- var _this51 = this;
8344
+ var _this52 = this;
8146
8345
  if (this.floorGrantPending && this.state === _constants.MEETING_STATE.STATES.JOINED) {
8147
8346
  this.requestScreenShareFloor().then(function () {
8148
- _this51.floorGrantPending = false;
8347
+ _this52.floorGrantPending = false;
8149
8348
  });
8150
8349
  }
8151
8350
  }
@@ -8159,7 +8358,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8159
8358
  }, {
8160
8359
  key: "releaseScreenShareFloor",
8161
8360
  value: function releaseScreenShareFloor() {
8162
- var _this52 = this;
8361
+ var _this53 = this;
8163
8362
  var content = this.locusInfo.mediaShares.find(function (element) {
8164
8363
  return element.name === _constants.CONTENT;
8165
8364
  });
@@ -8194,8 +8393,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8194
8393
  }).catch(function (error) {
8195
8394
  _loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
8196
8395
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
8197
- correlation_id: _this52.correlationId,
8198
- locus_id: _this52.locusUrl.split('/').pop(),
8396
+ correlation_id: _this53.correlationId,
8397
+ locus_id: _this53.locusUrl.split('/').pop(),
8199
8398
  reason: error.message,
8200
8399
  stack: error.stack
8201
8400
  });
@@ -8375,7 +8574,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8375
8574
  }, {
8376
8575
  key: "changeVideoLayout",
8377
8576
  value: function changeVideoLayout(layoutType) {
8378
- var _this53 = this;
8577
+ var _this54 = this;
8379
8578
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8380
8579
  var main = renderInfo.main,
8381
8580
  content = renderInfo.content;
@@ -8429,7 +8628,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8429
8628
  }
8430
8629
  this.lastVideoLayoutInfo = (0, _lodash.cloneDeep)(layoutInfo);
8431
8630
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
8432
- _triggerProxy.default.trigger(_this53, {
8631
+ _triggerProxy.default.trigger(_this54, {
8433
8632
  file: 'meeting/index',
8434
8633
  function: 'changeVideoLayout'
8435
8634
  }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
@@ -8545,7 +8744,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8545
8744
  }, {
8546
8745
  key: "endMeetingForAll",
8547
8746
  value: function endMeetingForAll() {
8548
- var _this54 = this;
8747
+ var _this55 = this;
8549
8748
  // @ts-ignore
8550
8749
  this.webex.internal.newMetrics.submitClientEvent({
8551
8750
  name: 'client.call.leave',
@@ -8563,25 +8762,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8563
8762
  locus_id: this.locusId
8564
8763
  });
8565
8764
  return _util2.default.endMeetingForAll(this).then(function (end) {
8566
- _this54.meetingFiniteStateMachine.end();
8567
- _this54.clearMeetingData();
8765
+ _this55.meetingFiniteStateMachine.end();
8766
+ _this55.clearMeetingData();
8568
8767
  // upload logs on leave irrespective of meeting delete
8569
- _triggerProxy.default.trigger(_this54, {
8768
+ _triggerProxy.default.trigger(_this55, {
8570
8769
  file: 'meeting/index',
8571
8770
  function: 'endMeetingForAll'
8572
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
8771
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this55);
8573
8772
  return end;
8574
8773
  }).catch(function (error) {
8575
- _this54.meetingFiniteStateMachine.fail(error);
8774
+ _this55.meetingFiniteStateMachine.fail(error);
8576
8775
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
8577
8776
  // upload logs on leave irrespective of meeting delete
8578
- _triggerProxy.default.trigger(_this54, {
8777
+ _triggerProxy.default.trigger(_this55, {
8579
8778
  file: 'meeting/index',
8580
8779
  function: 'endMeetingForAll'
8581
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
8780
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this55);
8582
8781
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
8583
- correlation_id: _this54.correlationId,
8584
- locus_id: _this54.locusUrl.split('/').pop(),
8782
+ correlation_id: _this55.correlationId,
8783
+ locus_id: _this55.locusUrl.split('/').pop(),
8585
8784
  reason: error.message,
8586
8785
  stack: error.stack,
8587
8786
  code: error.code
@@ -8646,6 +8845,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8646
8845
  });
8647
8846
  }
8648
8847
 
8848
+ /**
8849
+ * Method to set post meeting data consent.
8850
+ *
8851
+ * @param {boolean} accept - whether consent accepted or declined
8852
+ * @returns {Promise}
8853
+ * @public
8854
+ * @memberof Meeting
8855
+ */
8856
+ }, {
8857
+ key: "setPostMeetingDataConsent",
8858
+ value: function setPostMeetingDataConsent(accept) {
8859
+ return this.meetingRequest.setPostMeetingDataConsent({
8860
+ postMeetingDataConsent: accept,
8861
+ locusUrl: this.locusUrl,
8862
+ deviceUrl: this.deviceUrl,
8863
+ selfId: this.members.selfId
8864
+ });
8865
+ }
8866
+
8649
8867
  /**
8650
8868
  * Throws if we don't have a media connection created
8651
8869
  *
@@ -8723,7 +8941,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8723
8941
  _this$mediaProperties43,
8724
8942
  _this$mediaProperties44,
8725
8943
  _this$mediaProperties45,
8726
- _this55 = this;
8944
+ _this56 = this;
8727
8945
  var LOG_HEADER = 'Meeting:index#updateTranscodedMediaConnection -->';
8728
8946
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " starting"));
8729
8947
  if (!this.canUpdateMedia()) {
@@ -8748,8 +8966,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8748
8966
  }).catch(function (error) {
8749
8967
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error: "), error);
8750
8968
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
8751
- correlation_id: _this55.correlationId,
8752
- locus_id: _this55.locusUrl.split('/').pop(),
8969
+ correlation_id: _this56.correlationId,
8970
+ locus_id: _this56.locusUrl.split('/').pop(),
8753
8971
  reason: error.message,
8754
8972
  stack: error.stack
8755
8973
  });
@@ -8971,10 +9189,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8971
9189
  return this.updateTranscodedMediaConnection();
8972
9190
  case 31:
8973
9191
  if (!floorRequestNeeded) {
8974
- _context40.next = 37;
9192
+ _context40.next = 39;
8975
9193
  break;
8976
9194
  }
8977
9195
  this.localShareInstanceId = _uuid.default.v4();
9196
+ this.shareCAEventSentStatus.transmitStart = false;
9197
+ this.shareCAEventSentStatus.transmitStop = false;
8978
9198
 
8979
9199
  // @ts-ignore
8980
9200
  this.webex.internal.newMetrics.submitClientEvent({
@@ -8995,9 +9215,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8995
9215
  // we're sending the http request to Locus to request the screen share floor
8996
9216
  // only after the SDP update, because that's how it's always been done for transcoded meetings
8997
9217
  // and also if sharing from the start, we need confluence to have been created
8998
- _context40.next = 37;
9218
+ _context40.next = 39;
8999
9219
  return this.enqueueScreenShareFloorRequest();
9000
- case 37:
9220
+ case 39:
9001
9221
  case "end":
9002
9222
  return _context40.stop();
9003
9223
  }