@webex/plugin-meetings 3.11.0 → 3.12.0-mobius-socket.1

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 (175) hide show
  1. package/dist/aiEnableRequest/index.js +184 -0
  2. package/dist/aiEnableRequest/index.js.map +1 -0
  3. package/dist/aiEnableRequest/utils.js +36 -0
  4. package/dist/aiEnableRequest/utils.js.map +1 -0
  5. package/dist/annotation/index.js +14 -5
  6. package/dist/annotation/index.js.map +1 -1
  7. package/dist/breakouts/breakout.js +1 -1
  8. package/dist/breakouts/index.js +1 -1
  9. package/dist/config.js +7 -2
  10. package/dist/config.js.map +1 -1
  11. package/dist/constants.js +28 -6
  12. package/dist/constants.js.map +1 -1
  13. package/dist/hashTree/constants.js +3 -1
  14. package/dist/hashTree/constants.js.map +1 -1
  15. package/dist/hashTree/hashTree.js +18 -0
  16. package/dist/hashTree/hashTree.js.map +1 -1
  17. package/dist/hashTree/hashTreeParser.js +868 -419
  18. package/dist/hashTree/hashTreeParser.js.map +1 -1
  19. package/dist/hashTree/types.js +4 -2
  20. package/dist/hashTree/types.js.map +1 -1
  21. package/dist/hashTree/utils.js +10 -0
  22. package/dist/hashTree/utils.js.map +1 -1
  23. package/dist/index.js +11 -2
  24. package/dist/index.js.map +1 -1
  25. package/dist/interceptors/constant.js +12 -0
  26. package/dist/interceptors/constant.js.map +1 -0
  27. package/dist/interceptors/dataChannelAuthToken.js +290 -0
  28. package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
  29. package/dist/interceptors/index.js +7 -0
  30. package/dist/interceptors/index.js.map +1 -1
  31. package/dist/interceptors/utils.js +27 -0
  32. package/dist/interceptors/utils.js.map +1 -0
  33. package/dist/interpretation/index.js +2 -2
  34. package/dist/interpretation/index.js.map +1 -1
  35. package/dist/interpretation/siLanguage.js +1 -1
  36. package/dist/locus-info/controlsUtils.js +5 -3
  37. package/dist/locus-info/controlsUtils.js.map +1 -1
  38. package/dist/locus-info/index.js +522 -131
  39. package/dist/locus-info/index.js.map +1 -1
  40. package/dist/locus-info/selfUtils.js +1 -0
  41. package/dist/locus-info/selfUtils.js.map +1 -1
  42. package/dist/locus-info/types.js.map +1 -1
  43. package/dist/media/MediaConnectionAwaiter.js +57 -1
  44. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  45. package/dist/media/properties.js +4 -2
  46. package/dist/media/properties.js.map +1 -1
  47. package/dist/meeting/in-meeting-actions.js +7 -1
  48. package/dist/meeting/in-meeting-actions.js.map +1 -1
  49. package/dist/meeting/index.js +1304 -928
  50. package/dist/meeting/index.js.map +1 -1
  51. package/dist/meeting/request.js +50 -0
  52. package/dist/meeting/request.js.map +1 -1
  53. package/dist/meeting/request.type.js.map +1 -1
  54. package/dist/meeting/util.js +133 -3
  55. package/dist/meeting/util.js.map +1 -1
  56. package/dist/meetings/index.js +117 -48
  57. package/dist/meetings/index.js.map +1 -1
  58. package/dist/member/index.js +10 -0
  59. package/dist/member/index.js.map +1 -1
  60. package/dist/member/util.js +10 -0
  61. package/dist/member/util.js.map +1 -1
  62. package/dist/metrics/constants.js +6 -1
  63. package/dist/metrics/constants.js.map +1 -1
  64. package/dist/multistream/mediaRequestManager.js +9 -60
  65. package/dist/multistream/mediaRequestManager.js.map +1 -1
  66. package/dist/multistream/remoteMediaManager.js +11 -0
  67. package/dist/multistream/remoteMediaManager.js.map +1 -1
  68. package/dist/multistream/sendSlotManager.js +116 -2
  69. package/dist/multistream/sendSlotManager.js.map +1 -1
  70. package/dist/reachability/index.js +18 -10
  71. package/dist/reachability/index.js.map +1 -1
  72. package/dist/reactions/reactions.type.js.map +1 -1
  73. package/dist/reconnection-manager/index.js +0 -1
  74. package/dist/reconnection-manager/index.js.map +1 -1
  75. package/dist/types/aiEnableRequest/index.d.ts +5 -0
  76. package/dist/types/aiEnableRequest/utils.d.ts +2 -0
  77. package/dist/types/config.d.ts +4 -0
  78. package/dist/types/constants.d.ts +23 -1
  79. package/dist/types/hashTree/constants.d.ts +1 -0
  80. package/dist/types/hashTree/hashTree.d.ts +7 -0
  81. package/dist/types/hashTree/hashTreeParser.d.ts +122 -14
  82. package/dist/types/hashTree/types.d.ts +3 -0
  83. package/dist/types/hashTree/utils.d.ts +6 -0
  84. package/dist/types/index.d.ts +1 -0
  85. package/dist/types/interceptors/constant.d.ts +5 -0
  86. package/dist/types/interceptors/dataChannelAuthToken.d.ts +43 -0
  87. package/dist/types/interceptors/index.d.ts +2 -1
  88. package/dist/types/interceptors/utils.d.ts +1 -0
  89. package/dist/types/locus-info/index.d.ts +60 -8
  90. package/dist/types/locus-info/types.d.ts +7 -0
  91. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  92. package/dist/types/media/properties.d.ts +2 -1
  93. package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
  94. package/dist/types/meeting/index.d.ts +72 -7
  95. package/dist/types/meeting/request.d.ts +16 -1
  96. package/dist/types/meeting/request.type.d.ts +5 -0
  97. package/dist/types/meeting/util.d.ts +31 -0
  98. package/dist/types/meetings/index.d.ts +4 -2
  99. package/dist/types/member/index.d.ts +1 -0
  100. package/dist/types/member/util.d.ts +5 -0
  101. package/dist/types/metrics/constants.d.ts +5 -0
  102. package/dist/types/multistream/mediaRequestManager.d.ts +0 -23
  103. package/dist/types/multistream/sendSlotManager.d.ts +23 -1
  104. package/dist/types/reactions/reactions.type.d.ts +1 -0
  105. package/dist/types/webinar/utils.d.ts +6 -0
  106. package/dist/webinar/index.js +438 -163
  107. package/dist/webinar/index.js.map +1 -1
  108. package/dist/webinar/utils.js +25 -0
  109. package/dist/webinar/utils.js.map +1 -0
  110. package/package.json +24 -23
  111. package/src/aiEnableRequest/README.md +84 -0
  112. package/src/aiEnableRequest/index.ts +170 -0
  113. package/src/aiEnableRequest/utils.ts +25 -0
  114. package/src/annotation/index.ts +27 -7
  115. package/src/config.ts +4 -0
  116. package/src/constants.ts +29 -1
  117. package/src/hashTree/constants.ts +1 -0
  118. package/src/hashTree/hashTree.ts +17 -0
  119. package/src/hashTree/hashTreeParser.ts +761 -260
  120. package/src/hashTree/types.ts +4 -0
  121. package/src/hashTree/utils.ts +9 -0
  122. package/src/index.ts +8 -1
  123. package/src/interceptors/constant.ts +6 -0
  124. package/src/interceptors/dataChannelAuthToken.ts +170 -0
  125. package/src/interceptors/index.ts +2 -1
  126. package/src/interceptors/utils.ts +16 -0
  127. package/src/interpretation/index.ts +2 -2
  128. package/src/locus-info/controlsUtils.ts +11 -0
  129. package/src/locus-info/index.ts +579 -113
  130. package/src/locus-info/selfUtils.ts +1 -0
  131. package/src/locus-info/types.ts +8 -0
  132. package/src/media/MediaConnectionAwaiter.ts +41 -1
  133. package/src/media/properties.ts +3 -1
  134. package/src/meeting/in-meeting-actions.ts +12 -0
  135. package/src/meeting/index.ts +389 -87
  136. package/src/meeting/request.ts +42 -0
  137. package/src/meeting/request.type.ts +6 -0
  138. package/src/meeting/util.ts +160 -2
  139. package/src/meetings/index.ts +157 -44
  140. package/src/member/index.ts +10 -0
  141. package/src/member/util.ts +12 -0
  142. package/src/metrics/constants.ts +6 -0
  143. package/src/multistream/mediaRequestManager.ts +4 -54
  144. package/src/multistream/remoteMediaManager.ts +13 -0
  145. package/src/multistream/sendSlotManager.ts +97 -3
  146. package/src/reachability/index.ts +9 -0
  147. package/src/reactions/reactions.type.ts +1 -0
  148. package/src/reconnection-manager/index.ts +0 -1
  149. package/src/webinar/index.ts +265 -6
  150. package/src/webinar/utils.ts +16 -0
  151. package/test/unit/spec/aiEnableRequest/index.ts +981 -0
  152. package/test/unit/spec/aiEnableRequest/utils.ts +130 -0
  153. package/test/unit/spec/annotation/index.ts +69 -7
  154. package/test/unit/spec/hashTree/hashTree.ts +66 -0
  155. package/test/unit/spec/hashTree/hashTreeParser.ts +2321 -175
  156. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +210 -0
  157. package/test/unit/spec/interceptors/utils.ts +75 -0
  158. package/test/unit/spec/locus-info/controlsUtils.js +29 -0
  159. package/test/unit/spec/locus-info/index.js +1134 -55
  160. package/test/unit/spec/media/MediaConnectionAwaiter.ts +41 -1
  161. package/test/unit/spec/media/properties.ts +12 -3
  162. package/test/unit/spec/meeting/in-meeting-actions.ts +8 -2
  163. package/test/unit/spec/meeting/index.js +884 -152
  164. package/test/unit/spec/meeting/request.js +70 -0
  165. package/test/unit/spec/meeting/utils.js +438 -26
  166. package/test/unit/spec/meetings/index.js +653 -32
  167. package/test/unit/spec/member/index.js +28 -4
  168. package/test/unit/spec/member/util.js +65 -27
  169. package/test/unit/spec/multistream/mediaRequestManager.ts +2 -85
  170. package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
  171. package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
  172. package/test/unit/spec/reachability/index.ts +23 -0
  173. package/test/unit/spec/reconnection-manager/index.js +4 -8
  174. package/test/unit/spec/webinar/index.ts +534 -37
  175. package/test/unit/spec/webinar/utils.ts +39 -0
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
4
3
  var _Object$keys2 = require("@babel/runtime-corejs2/core-js/object/keys");
5
4
  var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
6
5
  var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
7
6
  var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
8
7
  var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
9
8
  var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
9
+ var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
10
10
  var _Array$from = require("@babel/runtime-corejs2/core-js/array/from");
11
11
  var _Symbol = require("@babel/runtime-corejs2/core-js/symbol");
12
12
  var _Symbol$iterator = require("@babel/runtime-corejs2/core-js/symbol/iterator");
@@ -16,7 +16,7 @@ _Object$defineProperty(exports, "__esModule", {
16
16
  value: true
17
17
  });
18
18
  exports.default = exports.ScreenShareFloorStatus = exports.MEDIA_UPDATE_TYPE = void 0;
19
- var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
19
+ exports.storeEventForDebugging = storeEventForDebugging;
20
20
  var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
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"));
@@ -24,6 +24,7 @@ var _map = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/map"))
24
24
  var _isNan = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/number/is-nan"));
25
25
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
26
26
  var _weakMap = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/weak-map"));
27
+ var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
27
28
  var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/typeof"));
28
29
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
29
30
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
@@ -40,8 +41,10 @@ var _common = require("@webex/common");
40
41
  var _commonTimers = require("@webex/common-timers");
41
42
  var _internalPluginMetrics = require("@webex/internal-plugin-metrics");
42
43
  var _internalMediaCore = require("@webex/internal-media-core");
44
+ var _internalPluginLlm = require("@webex/internal-plugin-llm");
43
45
  var _mediaHelpers = require("@webex/media-helpers");
44
46
  var _internalPluginVoicea = require("@webex/internal-plugin-voicea");
47
+ var _webCapabilities = require("@webex/web-capabilities");
45
48
  var _voiceaMeeting = require("./voicea-meeting");
46
49
  var _webexErrors = require("../common/errors/webex-errors");
47
50
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
@@ -89,18 +92,19 @@ var _joinWebinarError = _interopRequireDefault(require("../common/errors/join-we
89
92
  var _brbState = require("./brbState");
90
93
  var _multistreamNotSupportedError = _interopRequireDefault(require("../common/errors/multistream-not-supported-error"));
91
94
  var _joinForbiddenError = _interopRequireDefault(require("../common/errors/join-forbidden-error"));
95
+ var _aiEnableRequest = _interopRequireDefault(require("../aiEnableRequest"));
92
96
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && r[_Symbol$iterator] || r["@@iterator"]; if (!t) { if (_Array$isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
93
97
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
94
98
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
95
- function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
96
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty3.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
97
99
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
98
100
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
99
101
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
100
102
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
101
103
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
102
104
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
103
- function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } // @ts-ignore - Fix this
105
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
106
+ function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
107
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty3.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } // @ts-ignore - Fix this
104
108
  // @ts-ignore - Types not available for @webex/common
105
109
  // default callback so we don't call an undefined function, but in practice it should never be used
106
110
  var DEFAULT_ICE_PHASE_CALLBACK = function DEFAULT_ICE_PHASE_CALLBACK() {
@@ -130,7 +134,6 @@ var ScreenShareFloorStatus = exports.ScreenShareFloorStatus = /*#__PURE__*/funct
130
134
  ScreenShareFloorStatus["RELEASED"] = "floor_released";
131
135
  return ScreenShareFloorStatus;
132
136
  }({});
133
- var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
134
137
  /**
135
138
  * MediaDirection
136
139
  * @typedef {Object} MediaDirection
@@ -142,12 +145,14 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
142
145
  * @property {boolean} receiveShare
143
146
  * @property {boolean} isSharing
144
147
  */
148
+
145
149
  /**
146
150
  * SharePreferences
147
151
  * @typedef {Object} SharePreferences
148
152
  * @property {Object} [shareConstraints]
149
153
  * @property {Boolean} [highFrameRate]
150
154
  */
155
+
151
156
  /**
152
157
  * JoinOptions
153
158
  * @typedef {Object} JoinOptions
@@ -159,12 +164,14 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
159
164
  * @property {Boolean} [rejoin]
160
165
  * @property {Boolean} [enableMultistream]
161
166
  */
167
+
162
168
  /**
163
169
  * Recording
164
170
  * @typedef {Object} Recording
165
171
  * @property {Object} state
166
172
  * @property {String} modifiedBy
167
173
  */
174
+
168
175
  /**
169
176
  * Meeting State Change Event
170
177
  * Emitted when ever there is a meeting state change
@@ -175,6 +182,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
175
182
  * @property {String} previousState previous state of the meeting
176
183
  * @memberof Meeting
177
184
  */
185
+
178
186
  /**
179
187
  * Media Ready Event
180
188
  * Emitted when a stream is ready to be rendered
@@ -185,6 +193,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
185
193
  * @property {String} type what type of stream, remote, local
186
194
  * @memberof Meeting
187
195
  */
196
+
188
197
  /**
189
198
  * Media Stopped Event
190
199
  * Emitted when a stream has stopped sending
@@ -194,6 +203,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
194
203
  * @property {String} type what type of stream, remote, local
195
204
  * @memberof Meeting
196
205
  */
206
+
197
207
  /**
198
208
  * Meeting Ringing Event
199
209
  * Emitted when this client should play a ringing sound, because this member is getting an incoming meeting
@@ -205,6 +215,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
205
215
  * @property {String} id
206
216
  * @memberof Meeting
207
217
  */
218
+
208
219
  /**
209
220
  * Meeting Ringing Stop Event
210
221
  * Emitted when this client should stop playing a ringing sound
@@ -217,6 +228,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
217
228
  * @property {String} id
218
229
  * @memberof Meeting
219
230
  */
231
+
220
232
  /**
221
233
  * Meeting Started Sharing Local Event
222
234
  * Emitted when this member starts sharing
@@ -225,6 +237,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
225
237
  * @type {Object}
226
238
  * @memberof Meeting
227
239
  */
240
+
228
241
  /**
229
242
  * Meeting Stopped Sharing Local Event
230
243
  * Emitted when this member stops sharing
@@ -233,6 +246,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
233
246
  * @type {Object}
234
247
  * @memberof Meeting
235
248
  */
249
+
236
250
  /**
237
251
  * Meeting Started Sharing Remote Event
238
252
  * Emitted when remote sharing starts
@@ -246,6 +260,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
246
260
  * @memberof Meeting
247
261
  *
248
262
  */
263
+
249
264
  /**
250
265
  * Meeting Stopped Sharing Remote Event
251
266
  * Emitted when remote screen sharing ends
@@ -254,6 +269,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
254
269
  * @type {Object}
255
270
  * @memberof Meeting
256
271
  */
272
+
257
273
  /**
258
274
  * Meeting Locked Event
259
275
  * Emitted when a meeting is locked
@@ -263,6 +279,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
263
279
  * @property {Object} info
264
280
  * @memberof Meeting
265
281
  */
282
+
266
283
  /**
267
284
  * Meeting Unlocked Event
268
285
  * Emitted when a meeting is unlocked
@@ -272,6 +289,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
272
289
  * @property {Object} info
273
290
  * @memberof Meeting
274
291
  */
292
+
275
293
  /**
276
294
  * Meeting Actions Update Event
277
295
  * Emitted when a user can take actions on a meeting such as lock, unlock, assign host
@@ -283,6 +301,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
283
301
  * @property {Boolean} canAssignHost
284
302
  * @memberof Meeting
285
303
  */
304
+
286
305
  /**
287
306
  * Meeting Unmuted By Others Event
288
307
  * Emitted when a member is unmuted by another member
@@ -292,6 +311,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
292
311
  * @property {Object} payload
293
312
  * @memberof Meeting
294
313
  */
314
+
295
315
  /**
296
316
  * Meeting Muted By Others Event
297
317
  * Emitted when a member is muted by another member
@@ -302,6 +322,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
302
322
  * @property {Boolean} payload.unmuteAllowed - whether the user is allowed to unmute self
303
323
  * @memberof Meeting
304
324
  */
325
+
305
326
  /**
306
327
  * Meeting Muted By Others Event
307
328
  * Emitted when the host(moderator)/co-host requests a user to unmute
@@ -311,6 +332,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
311
332
  * @property {Object} payload
312
333
  * @memberof Meeting
313
334
  */
335
+
314
336
  /**
315
337
  * Meeting Self Guest Admitted Event
316
338
  * Emitted when a joined user get admitted to the meeting by another member or host
@@ -320,6 +342,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
320
342
  * @property {Object} payload
321
343
  * @memberof Meeting
322
344
  */
345
+
323
346
  /**
324
347
  * Meeting Self Lobby Waiting Event
325
348
  * Emitted when joined user enters the lobby and is waiting for the webex meeting to begin
@@ -329,6 +352,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
329
352
  * @property {Object} reason Reason why user left the meeting
330
353
  * @memberof Meeting
331
354
  */
355
+
332
356
  /**
333
357
  * Meeting Self Left State
334
358
  * Emitted when user is inactive for more then 40 seconds, User can rejoin the meeting again
@@ -338,6 +362,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
338
362
  * @property {Object} payload
339
363
  * @memberof Meeting
340
364
  */
365
+
341
366
  /**
342
367
  * Reconnection Starting Event
343
368
  * Emitted when reconnection of media to the active meeting was successful
@@ -345,6 +370,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
345
370
  * @instance
346
371
  * @memberof Meeting
347
372
  */
373
+
348
374
  /**
349
375
  * Reconnection Success Event
350
376
  * Emitted when reconnection of media to the active meeting was successful
@@ -354,6 +380,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
354
380
  * @property {Object} reconnect
355
381
  * @memberof Meeting
356
382
  */
383
+
357
384
  /**
358
385
  * Reconnection Failure Event
359
386
  * Emitted when reconnection of media to the active meeting was successful
@@ -363,6 +390,7 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
363
390
  * @property {Error} error
364
391
  * @memberof Meeting
365
392
  */
393
+
366
394
  /**
367
395
  * Meeting network quality event
368
396
  * Emitted on each interval of retrieving stats Analyzer data
@@ -372,11 +400,33 @@ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
372
400
  * @property {number} networkQualityScore - {1|0} 1 indicates acceptable uplink 0 indicates unacceptable uplink based on threshold
373
401
  * @memberof Meeting
374
402
  */
403
+
404
+ /**
405
+ * Stores an event so all events can be later retrieved via a console command for debugging.
406
+ * @param {string} type
407
+ * @param {Object} data
408
+ * @returns {void}
409
+ */
410
+ function storeEventForDebugging(type, data) {
411
+ var _window;
412
+ if ((_window = window) !== null && _window !== void 0 && _window.locusEvents) {
413
+ var _data$stateElementsMe;
414
+ // only store non-heartbeat hash tree messages
415
+ if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED && (_data$stateElementsMe = data.stateElementsMessage) !== null && _data$stateElementsMe !== void 0 && _data$stateElementsMe.locusStateElements) {
416
+ window.locusEvents.push(_objectSpread(_objectSpread({}, data), {}, {
417
+ timestamp: new Date().toLocaleString(),
418
+ type: type
419
+ }));
420
+ }
421
+ }
422
+ }
423
+
375
424
  /**
376
425
  * @description Meeting is the crux of the plugin
377
426
  * @export
378
427
  * @class Meeting
379
428
  */
429
+ var _isoLocalClientMeetingJoinTime = /*#__PURE__*/new _weakMap.default();
380
430
  var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
381
431
  /**
382
432
  * @param {Object} attrs
@@ -386,7 +436,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
386
436
  * @memberof Meeting
387
437
  */
388
438
  function Meeting(attrs, _options, callback) {
389
- var _attrs$callStateForMe, _attrs$callStateForMe2, _this$locusInfo, _this$locusInfo$links, _this$locusInfo$links2, _this$locusInfo$links3, _this$locusInfo2, _this$locusInfo2$full, _this$locusInfo3, _this$locusInfo4;
439
+ var _attrs$callStateForMe, _attrs$callStateForMe2, _this$locusInfo2, _this$locusInfo2$link, _this$locusInfo2$link2, _this$locusInfo2$link3, _this$locusInfo3, _this$locusInfo3$full, _this$locusInfo4, _this$locusInfo5;
390
440
  var _this;
391
441
  (0, _classCallCheck2.default)(this, Meeting);
392
442
  _this = _callSuper(this, Meeting, [{}, _options]);
@@ -402,6 +452,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
402
452
  (0, _defineProperty3.default)(_this, "breakouts", void 0);
403
453
  (0, _defineProperty3.default)(_this, "simultaneousInterpretation", void 0);
404
454
  (0, _defineProperty3.default)(_this, "annotation", void 0);
455
+ (0, _defineProperty3.default)(_this, "aiEnableRequest", void 0);
405
456
  (0, _defineProperty3.default)(_this, "webinar", void 0);
406
457
  (0, _defineProperty3.default)(_this, "conversationUrl", void 0);
407
458
  (0, _defineProperty3.default)(_this, "callStateForMetrics", void 0);
@@ -451,6 +502,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
451
502
  (0, _defineProperty3.default)(_this, "keepAliveTimerId", void 0);
452
503
  (0, _defineProperty3.default)(_this, "lastVideoLayoutInfo", void 0);
453
504
  (0, _defineProperty3.default)(_this, "locusInfo", void 0);
505
+ // this group of properties is populated via updateMeetingObject() that's registered as a callback with LocusInfo
506
+ (0, _defineProperty3.default)(_this, "isUserUnadmitted", void 0);
507
+ (0, _defineProperty3.default)(_this, "joinedWith", void 0);
508
+ (0, _defineProperty3.default)(_this, "selfId", void 0);
509
+ (0, _defineProperty3.default)(_this, "roles", void 0);
510
+ // ... there is more ... see SelfUtils.parse()
511
+ // end of the group
454
512
  (0, _defineProperty3.default)(_this, "locusMediaRequest", void 0);
455
513
  (0, _defineProperty3.default)(_this, "mediaProperties", void 0);
456
514
  (0, _defineProperty3.default)(_this, "mediaRequestManagers", void 0);
@@ -479,7 +537,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
479
537
  (0, _defineProperty3.default)(_this, "endCallInitJoinReq", void 0);
480
538
  (0, _defineProperty3.default)(_this, "endJoinReqResp", void 0);
481
539
  (0, _defineProperty3.default)(_this, "endLocalSDPGenRemoteSDPRecvDelay", void 0);
482
- (0, _defineProperty3.default)(_this, "joinedWith", void 0);
483
540
  (0, _defineProperty3.default)(_this, "locusId", void 0);
484
541
  (0, _defineProperty3.default)(_this, "startCallInitJoinReq", void 0);
485
542
  (0, _defineProperty3.default)(_this, "startJoinReqResp", void 0);
@@ -494,12 +551,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
494
551
  (0, _defineProperty3.default)(_this, "permissionTokenReceivedLocalTime", void 0);
495
552
  (0, _defineProperty3.default)(_this, "resourceId", void 0);
496
553
  (0, _defineProperty3.default)(_this, "resourceUrl", void 0);
497
- (0, _defineProperty3.default)(_this, "selfId", void 0);
498
554
  (0, _defineProperty3.default)(_this, "state", void 0);
499
555
  (0, _defineProperty3.default)(_this, "localAudioStreamMuteStateHandler", void 0);
500
556
  (0, _defineProperty3.default)(_this, "localVideoStreamMuteStateHandler", void 0);
501
557
  (0, _defineProperty3.default)(_this, "localOutputTrackChangeHandler", void 0);
502
- (0, _defineProperty3.default)(_this, "roles", void 0);
558
+ (0, _defineProperty3.default)(_this, "localConstraintsChangeHandler", void 0);
503
559
  (0, _defineProperty3.default)(_this, "environment", void 0);
504
560
  (0, _defineProperty3.default)(_this, "namespace", _constants.MEETINGS);
505
561
  (0, _defineProperty3.default)(_this, "allowMediaInLobby", void 0);
@@ -569,6 +625,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
569
625
  */
570
626
  (0, _defineProperty3.default)(_this, "processLocusLLMEvent", function (event) {
571
627
  if (event.data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
628
+ // @ts-ignore
629
+ if (_this.config.experimental.storeLocusHashTreeEventsForDebugging) {
630
+ storeEventForDebugging('llm', event.data);
631
+ }
572
632
  _this.locusInfo.parse(_this, event.data);
573
633
  } else {
574
634
  _loggerProxy.default.logger.warn("Meeting:index#processLocusLLMEvent --> Unknown event type: ".concat(event.data.eventType));
@@ -586,13 +646,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
586
646
  if (
587
647
  // @ts-ignore - config coming from registerPlugin
588
648
  (_this.config.receiveReactions || options.receiveReactions) && _this.isReactionsSupported()) {
649
+ var _this$locusInfo, _this$locusInfo$info;
589
650
  var member = _this.members.membersCollection.get(e.data.sender.participantId);
590
- if (!member) {
651
+ if (!member && !((_this$locusInfo = _this.locusInfo) !== null && _this$locusInfo !== void 0 && (_this$locusInfo$info = _this$locusInfo.info) !== null && _this$locusInfo$info !== void 0 && _this$locusInfo$info.isWebinar)) {
591
652
  // @ts-ignore -- fix type
592
653
  _loggerProxy.default.logger.warn("Meeting:index#processRelayEvent --> Skipping handling of ".concat(_constants3.REACTION_RELAY_TYPES.REACTION, " for ").concat(_this.id, ". participantId ").concat(e.data.sender.participantId, " does not exist in membersCollection."));
593
654
  break;
594
655
  }
595
- var name = member.name;
656
+ var name = member && member.name || e.data.sender.displayName;
596
657
  var processedReaction = {
597
658
  reaction: e.data.reaction,
598
659
  sender: {
@@ -618,13 +679,67 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
618
679
  * @returns {null}
619
680
  */
620
681
  (0, _defineProperty3.default)(_this, "handleLLMOnline", function () {
621
- // @ts-ignore
622
- _this.webex.internal.llm.off('online', _this.handleLLMOnline);
682
+ _this.restoreLLMSubscriptionsIfNeeded();
623
683
  _triggerProxy.default.trigger(_this, {
624
684
  file: 'meeting/index',
625
685
  function: 'handleLLMOnline'
626
686
  }, _constants.EVENT_TRIGGERS.MEETING_TRANSCRIPTION_CONNECTED, undefined);
627
687
  });
688
+ /**
689
+ * Disconnects and cleans up the default LLM session listeners/timers.
690
+ * @param {Object} options
691
+ * @param {boolean} [options.removeOnlineListener=true] removes the one-time online listener
692
+ * @param {boolean} [options.throwOnError=true] rethrows disconnect errors when true
693
+ * @returns {Promise<void>}
694
+ */
695
+ (0, _defineProperty3.default)(_this, "cleanupLLMConneciton", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
696
+ var _ref3,
697
+ _ref3$removeOnlineLis,
698
+ removeOnlineListener,
699
+ _ref3$throwOnError,
700
+ throwOnError,
701
+ _args = arguments,
702
+ _t;
703
+ return _regenerator.default.wrap(function (_context) {
704
+ while (1) switch (_context.prev = _context.next) {
705
+ case 0:
706
+ _ref3 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref3$removeOnlineLis = _ref3.removeOnlineListener, removeOnlineListener = _ref3$removeOnlineLis === void 0 ? true : _ref3$removeOnlineLis, _ref3$throwOnError = _ref3.throwOnError, throwOnError = _ref3$throwOnError === void 0 ? true : _ref3$throwOnError;
707
+ _context.prev = 1;
708
+ _context.next = 2;
709
+ return _this.webex.internal.llm.disconnectLLM({
710
+ code: 3050,
711
+ reason: 'done (permanent)'
712
+ });
713
+ case 2:
714
+ _context.next = 4;
715
+ break;
716
+ case 3:
717
+ _context.prev = 3;
718
+ _t = _context["catch"](1);
719
+ _loggerProxy.default.logger.error('Meeting:index#cleanupLLMConneciton --> Failed to disconnect default LLM session', _t);
720
+ if (!throwOnError) {
721
+ _context.next = 4;
722
+ break;
723
+ }
724
+ throw _t;
725
+ case 4:
726
+ _context.prev = 4;
727
+ if (removeOnlineListener) {
728
+ // @ts-ignore - Fix type
729
+ _this.webex.internal.llm.off('online', _this.handleLLMOnline);
730
+ }
731
+ // @ts-ignore - fix types
732
+ _this.webex.internal.llm.off('event:relay.event', _this.processRelayEvent);
733
+ // @ts-ignore - Fix type
734
+ _this.webex.internal.llm.off(_constants.LOCUS_LLM_EVENT, _this.processLocusLLMEvent);
735
+ _this.clearLLMHealthCheckTimer();
736
+ return _context.finish(4);
737
+ case 5:
738
+ case "end":
739
+ return _context.stop();
740
+ }
741
+ }, _callee, null, [[1, 3, 4, 5]]);
742
+ })));
628
743
  /**
629
744
  * Handles ROAP_FAILURE event from the webrtc media connection
630
745
  *
@@ -810,8 +925,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
810
925
  seq: event.roapMessage.seq,
811
926
  tieBreaker: event.roapMessage.tieBreaker,
812
927
  meeting: _this // or can pass meeting ID
813
- }).then(function (_ref2) {
814
- var roapAnswer = _ref2.roapAnswer;
928
+ }).then(function (_ref4) {
929
+ var roapAnswer = _ref4.roapAnswer;
815
930
  if (roapAnswer) {
816
931
  _loggerProxy.default.logger.log("".concat(LOG_HEADER, " received Roap ANSWER in http response"));
817
932
  _this.roapMessageReceived(roapAnswer);
@@ -1214,32 +1329,32 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1214
1329
  * @returns {Promise<void>}
1215
1330
  */
1216
1331
  (0, _defineProperty3.default)(_this, "forceSendStatsReport", /*#__PURE__*/function () {
1217
- var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(_ref3) {
1218
- var callFrom, LOG_HEADER, _this$mediaProperties, _this$mediaProperties2, _t;
1219
- return _regenerator.default.wrap(function (_context) {
1220
- while (1) switch (_context.prev = _context.next) {
1332
+ var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(_ref5) {
1333
+ var callFrom, LOG_HEADER, _this$mediaProperties, _this$mediaProperties2, _t2;
1334
+ return _regenerator.default.wrap(function (_context2) {
1335
+ while (1) switch (_context2.prev = _context2.next) {
1221
1336
  case 0:
1222
- callFrom = _ref3.callFrom;
1337
+ callFrom = _ref5.callFrom;
1223
1338
  LOG_HEADER = "Meeting:index#forceSendStatsReport --> called from ".concat(callFrom, " : ");
1224
- _context.prev = 1;
1225
- _context.next = 2;
1339
+ _context2.prev = 1;
1340
+ _context2.next = 2;
1226
1341
  return (_this$mediaProperties = _this.mediaProperties) === null || _this$mediaProperties === void 0 ? void 0 : (_this$mediaProperties2 = _this$mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties2 === void 0 ? void 0 : _this$mediaProperties2.forceRtcMetricsSend();
1227
1342
  case 2:
1228
1343
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " successfully uploaded available webrtc telemetry statistics"));
1229
- _context.next = 4;
1344
+ _context2.next = 4;
1230
1345
  break;
1231
1346
  case 3:
1232
- _context.prev = 3;
1233
- _t = _context["catch"](1);
1234
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to upload webrtc telemetry statistics: "), _t);
1347
+ _context2.prev = 3;
1348
+ _t2 = _context2["catch"](1);
1349
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to upload webrtc telemetry statistics: "), _t2);
1235
1350
  case 4:
1236
1351
  case "end":
1237
- return _context.stop();
1352
+ return _context2.stop();
1238
1353
  }
1239
- }, _callee, null, [[1, 3]]);
1354
+ }, _callee2, null, [[1, 3]]);
1240
1355
  }));
1241
1356
  return function (_x) {
1242
- return _ref4.apply(this, arguments);
1357
+ return _ref6.apply(this, arguments);
1243
1358
  };
1244
1359
  }());
1245
1360
  /**
@@ -1299,40 +1414,40 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1299
1414
  * @memberof Meeting
1300
1415
  * @returns {undefined}
1301
1416
  */
1302
- (0, _defineProperty3.default)(_this, "handleShareAudioStreamEnded", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
1303
- var _t2;
1304
- return _regenerator.default.wrap(function (_context2) {
1305
- while (1) switch (_context2.prev = _context2.next) {
1417
+ (0, _defineProperty3.default)(_this, "handleShareAudioStreamEnded", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
1418
+ var _t3;
1419
+ return _regenerator.default.wrap(function (_context3) {
1420
+ while (1) switch (_context3.prev = _context3.next) {
1306
1421
  case 0:
1307
1422
  _loggerProxy.default.logger.info("Meeting:index#handleShareAudioStreamEnded --> audio share stream ended");
1308
1423
  // current share audio stream has ended, but there might be an active
1309
1424
  // share video stream. we only leave from wireless share if share has
1310
1425
  // completely ended, which means no share audio or video streams active
1311
1426
  if (!(_this.wirelessShare && !_this.mediaProperties.shareVideoStream)) {
1312
- _context2.next = 1;
1427
+ _context3.next = 1;
1313
1428
  break;
1314
1429
  }
1315
1430
  _this.leave({
1316
1431
  reason: _constants.MEETING_REMOVED_REASON.USER_ENDED_SHARE_STREAMS
1317
1432
  });
1318
- _context2.next = 4;
1433
+ _context3.next = 4;
1319
1434
  break;
1320
1435
  case 1:
1321
- _context2.prev = 1;
1322
- _context2.next = 2;
1436
+ _context3.prev = 1;
1437
+ _context3.next = 2;
1323
1438
  return _this.unpublishStreams([_this.mediaProperties.shareAudioStream]);
1324
1439
  case 2:
1325
- _context2.next = 4;
1440
+ _context3.next = 4;
1326
1441
  break;
1327
1442
  case 3:
1328
- _context2.prev = 3;
1329
- _t2 = _context2["catch"](1);
1330
- _loggerProxy.default.logger.log('Meeting:index#handleShareAudioStreamEnded --> Error stopping share: ', _t2);
1443
+ _context3.prev = 3;
1444
+ _t3 = _context3["catch"](1);
1445
+ _loggerProxy.default.logger.log('Meeting:index#handleShareAudioStreamEnded --> Error stopping share: ', _t3);
1331
1446
  case 4:
1332
1447
  case "end":
1333
- return _context2.stop();
1448
+ return _context3.stop();
1334
1449
  }
1335
- }, _callee2, null, [[1, 3]]);
1450
+ }, _callee3, null, [[1, 3]]);
1336
1451
  })));
1337
1452
  /**
1338
1453
  * Functionality for when a share video is muted or unmuted.
@@ -1364,42 +1479,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1364
1479
  * @memberof Meeting
1365
1480
  * @returns {undefined}
1366
1481
  */
1367
- (0, _defineProperty3.default)(_this, "handleShareVideoStreamEnded", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
1368
- var _t3;
1369
- return _regenerator.default.wrap(function (_context3) {
1370
- while (1) switch (_context3.prev = _context3.next) {
1482
+ (0, _defineProperty3.default)(_this, "handleShareVideoStreamEnded", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
1483
+ var _t4;
1484
+ return _regenerator.default.wrap(function (_context4) {
1485
+ while (1) switch (_context4.prev = _context4.next) {
1371
1486
  case 0:
1372
1487
  _loggerProxy.default.logger.info("Meeting:index#handleShareVideoStreamEnded --> video share stream ended");
1373
1488
  // current share video stream has ended, but there might be an active
1374
1489
  // share audio stream. we only leave from wireless share if share has
1375
1490
  // completely ended, which means no share audio or video streams active
1376
1491
  if (!(_this.wirelessShare && !_this.mediaProperties.shareAudioStream)) {
1377
- _context3.next = 1;
1492
+ _context4.next = 1;
1378
1493
  break;
1379
1494
  }
1380
1495
  _this.leave({
1381
1496
  reason: _constants.MEETING_REMOVED_REASON.USER_ENDED_SHARE_STREAMS
1382
1497
  });
1383
- _context3.next = 4;
1498
+ _context4.next = 4;
1384
1499
  break;
1385
1500
  case 1:
1386
- _context3.prev = 1;
1387
- _context3.next = 2;
1501
+ _context4.prev = 1;
1502
+ _context4.next = 2;
1388
1503
  return _this.unpublishStreams([_this.mediaProperties.shareVideoStream]);
1389
1504
  case 2:
1390
- _context3.next = 4;
1505
+ _context4.next = 4;
1391
1506
  break;
1392
1507
  case 3:
1393
- _context3.prev = 3;
1394
- _t3 = _context3["catch"](1);
1395
- _loggerProxy.default.logger.log('Meeting:index#handleShareVideoStreamEnded --> Error stopping share: ', _t3);
1508
+ _context4.prev = 3;
1509
+ _t4 = _context4["catch"](1);
1510
+ _loggerProxy.default.logger.log('Meeting:index#handleShareVideoStreamEnded --> Error stopping share: ', _t4);
1396
1511
  case 4:
1397
1512
  _this.triggerStoppedSharing();
1398
1513
  case 5:
1399
1514
  case "end":
1400
- return _context3.stop();
1515
+ return _context4.stop();
1401
1516
  }
1402
- }, _callee3, null, [[1, 3]]);
1517
+ }, _callee4, null, [[1, 3]]);
1403
1518
  })));
1404
1519
  /**
1405
1520
  * Emits meeting:stoppedSharingLocal
@@ -1423,26 +1538,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1423
1538
  * @public
1424
1539
  * @memberof Meeting
1425
1540
  */
1426
- (0, _defineProperty3.default)(_this, "clearMeetingData", function () {
1427
- _this.audio = null;
1428
- _this.video = null;
1429
- _this.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
1430
- if (_this.shareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
1431
- _this.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
1432
- }
1433
- _this.queuedMediaUpdates = [];
1434
- if (_this.transcription) {
1435
- _this.stopTranscription();
1436
- _this.transcription = undefined;
1437
- }
1438
- _this.annotation.deregisterEvents();
1439
-
1440
- // @ts-ignore - fix types
1441
- _this.webex.internal.llm.off('event:relay.event', _this.processRelayEvent);
1442
- // @ts-ignore - Fix type
1443
- _this.webex.internal.llm.off(_constants.LOCUS_LLM_EVENT, _this.processLocusLLMEvent);
1444
- _this.clearLLMHealthCheckTimer();
1445
- });
1541
+ (0, _defineProperty3.default)(_this, "clearMeetingData", /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
1542
+ return _regenerator.default.wrap(function (_context5) {
1543
+ while (1) switch (_context5.prev = _context5.next) {
1544
+ case 0:
1545
+ _this.audio = null;
1546
+ _this.video = null;
1547
+ _this.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
1548
+ if (_this.shareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
1549
+ _this.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
1550
+ }
1551
+ _this.queuedMediaUpdates = [];
1552
+ _this.stopTranscription();
1553
+ _this.transcription = undefined;
1554
+ _this.annotation.deregisterEvents();
1555
+ _this.clearDataChannelToken();
1556
+ _context5.next = 1;
1557
+ return _this.cleanupLLMConneciton({
1558
+ throwOnError: false
1559
+ });
1560
+ case 1:
1561
+ case "end":
1562
+ return _context5.stop();
1563
+ }
1564
+ }, _callee5);
1565
+ })));
1446
1566
  /**
1447
1567
  * starts keepAlives being sent
1448
1568
  * @returns {void}
@@ -1605,6 +1725,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1605
1725
  _this.simultaneousInterpretation = new _interpretation.default({}, {
1606
1726
  parent: _this.webex
1607
1727
  });
1728
+
1729
+ // @ts-ignore
1730
+ _this.aiEnableRequest = new _aiEnableRequest.default({}, {
1731
+ parent: _this.webex
1732
+ });
1733
+
1608
1734
  /**
1609
1735
  * @instance
1610
1736
  * @type {Annotation}
@@ -2184,9 +2310,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2184
2310
  * @memberof Meeting
2185
2311
  */
2186
2312
  _this.recordingController = new _recordingController.default(_this.meetingRequest, {
2187
- serviceUrl: (_this$locusInfo = _this.locusInfo) === null || _this$locusInfo === void 0 ? void 0 : (_this$locusInfo$links = _this$locusInfo.links) === null || _this$locusInfo$links === void 0 ? void 0 : (_this$locusInfo$links2 = _this$locusInfo$links.services) === null || _this$locusInfo$links2 === void 0 ? void 0 : (_this$locusInfo$links3 = _this$locusInfo$links2.record) === null || _this$locusInfo$links3 === void 0 ? void 0 : _this$locusInfo$links3.url,
2188
- sessionId: (_this$locusInfo2 = _this.locusInfo) === null || _this$locusInfo2 === void 0 ? void 0 : (_this$locusInfo2$full = _this$locusInfo2.fullState) === null || _this$locusInfo2$full === void 0 ? void 0 : _this$locusInfo2$full.sessionId,
2189
- locusUrl: (_this$locusInfo3 = _this.locusInfo) === null || _this$locusInfo3 === void 0 ? void 0 : _this$locusInfo3.url,
2313
+ serviceUrl: (_this$locusInfo2 = _this.locusInfo) === null || _this$locusInfo2 === void 0 ? void 0 : (_this$locusInfo2$link = _this$locusInfo2.links) === null || _this$locusInfo2$link === void 0 ? void 0 : (_this$locusInfo2$link2 = _this$locusInfo2$link.services) === null || _this$locusInfo2$link2 === void 0 ? void 0 : (_this$locusInfo2$link3 = _this$locusInfo2$link2.record) === null || _this$locusInfo2$link3 === void 0 ? void 0 : _this$locusInfo2$link3.url,
2314
+ sessionId: (_this$locusInfo3 = _this.locusInfo) === null || _this$locusInfo3 === void 0 ? void 0 : (_this$locusInfo3$full = _this$locusInfo3.fullState) === null || _this$locusInfo3$full === void 0 ? void 0 : _this$locusInfo3$full.sessionId,
2315
+ locusUrl: (_this$locusInfo4 = _this.locusInfo) === null || _this$locusInfo4 === void 0 ? void 0 : _this$locusInfo4.url,
2190
2316
  displayHints: []
2191
2317
  });
2192
2318
 
@@ -2198,7 +2324,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2198
2324
  * @memberof Meeting
2199
2325
  */
2200
2326
  _this.controlsOptionsManager = new _controlsOptionsManager.default(_this.meetingRequest, {
2201
- locusUrl: (_this$locusInfo4 = _this.locusInfo) === null || _this$locusInfo4 === void 0 ? void 0 : _this$locusInfo4.url,
2327
+ locusUrl: (_this$locusInfo5 = _this.locusInfo) === null || _this$locusInfo5 === void 0 ? void 0 : _this$locusInfo5.url,
2202
2328
  displayHints: []
2203
2329
  });
2204
2330
  _this.setUpLocusInfoListeners();
@@ -2227,6 +2353,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2227
2353
  _this.updateTranscodedMediaConnection();
2228
2354
  }
2229
2355
  };
2356
+ _this.localConstraintsChangeHandler = function () {
2357
+ if (!_this.isMultistream) {
2358
+ var _this$mediaProperties6;
2359
+ (_this$mediaProperties6 = _this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties6 === void 0 ? void 0 : _this$mediaProperties6.updatePreferredBitrateKbps();
2360
+ }
2361
+ };
2230
2362
 
2231
2363
  /**
2232
2364
  * Promise that exists if SDP offer has been generated, and resolves once sdp answer is received.
@@ -2563,20 +2695,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2563
2695
  }, {
2564
2696
  key: "injectMeetingInfo",
2565
2697
  value: (function () {
2566
- var _injectMeetingInfo = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4(meetingInfo, fetchParams, meetingLookupUrl) {
2567
- return _regenerator.default.wrap(function (_context4) {
2568
- while (1) switch (_context4.prev = _context4.next) {
2698
+ var _injectMeetingInfo = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6(meetingInfo, fetchParams, meetingLookupUrl) {
2699
+ return _regenerator.default.wrap(function (_context6) {
2700
+ while (1) switch (_context6.prev = _context6.next) {
2569
2701
  case 0:
2570
- _context4.next = 1;
2702
+ _context6.next = 1;
2571
2703
  return this.prepForFetchMeetingInfo(fetchParams, 'injectMeetingInfo');
2572
2704
  case 1:
2573
2705
  this.parseMeetingInfo(meetingInfo, this.destination);
2574
2706
  this.setMeetingInfo(meetingInfo, meetingLookupUrl);
2575
2707
  case 2:
2576
2708
  case "end":
2577
- return _context4.stop();
2709
+ return _context6.stop();
2578
2710
  }
2579
- }, _callee4, this);
2711
+ }, _callee6, this);
2580
2712
  }));
2581
2713
  function injectMeetingInfo(_x2, _x3, _x4) {
2582
2714
  return _injectMeetingInfo.apply(this, arguments);
@@ -2595,15 +2727,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2595
2727
  )
2596
2728
  }, {
2597
2729
  key: "prepForFetchMeetingInfo",
2598
- value: function prepForFetchMeetingInfo(_ref7, caller) {
2599
- var _ref7$password = _ref7.password,
2600
- password = _ref7$password === void 0 ? null : _ref7$password,
2601
- _ref7$registrationId = _ref7.registrationId,
2602
- registrationId = _ref7$registrationId === void 0 ? null : _ref7$registrationId,
2603
- _ref7$captchaCode = _ref7.captchaCode,
2604
- captchaCode = _ref7$captchaCode === void 0 ? null : _ref7$captchaCode,
2605
- _ref7$extraParams = _ref7.extraParams,
2606
- extraParams = _ref7$extraParams === void 0 ? {} : _ref7$extraParams;
2730
+ value: function prepForFetchMeetingInfo(_ref0, caller) {
2731
+ var _ref0$password = _ref0.password,
2732
+ password = _ref0$password === void 0 ? null : _ref0$password,
2733
+ _ref0$registrationId = _ref0.registrationId,
2734
+ registrationId = _ref0$registrationId === void 0 ? null : _ref0$registrationId,
2735
+ _ref0$captchaCode = _ref0.captchaCode,
2736
+ captchaCode = _ref0$captchaCode === void 0 ? null : _ref0$captchaCode,
2737
+ _ref0$extraParams = _ref0.extraParams,
2738
+ extraParams = _ref0$extraParams === void 0 ? {} : _ref0$extraParams;
2607
2739
  // when fetch meeting info is called directly by the client, we want to clear out the random timer for sdk to do it
2608
2740
  if (this.fetchMeetingInfoTimeoutId) {
2609
2741
  clearTimeout(this.fetchMeetingInfoTimeoutId);
@@ -2627,18 +2759,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2627
2759
  }, {
2628
2760
  key: "fetchMeetingInfoInternal",
2629
2761
  value: (function () {
2630
- var _fetchMeetingInfoInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5(_ref8) {
2631
- var destination, destinationType, _ref8$password, password, _ref8$captchaCode, captchaCode, _ref8$extraParams, extraParams, _ref8$sendCAevents, sendCAevents, _ref8$registrationId, registrationId, _ref8$classificationI, classificationId, captchaInfo, info, _err$body, _err$body2, _t4;
2632
- return _regenerator.default.wrap(function (_context5) {
2633
- while (1) switch (_context5.prev = _context5.next) {
2762
+ var _fetchMeetingInfoInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7(_ref1) {
2763
+ var destination, destinationType, _ref1$password, password, _ref1$captchaCode, captchaCode, _ref1$extraParams, extraParams, _ref1$sendCAevents, sendCAevents, _ref1$registrationId, registrationId, _ref1$classificationI, classificationId, captchaInfo, info, _err$body, _err$body2, _t5;
2764
+ return _regenerator.default.wrap(function (_context7) {
2765
+ while (1) switch (_context7.prev = _context7.next) {
2634
2766
  case 0:
2635
- destination = _ref8.destination, destinationType = _ref8.destinationType, _ref8$password = _ref8.password, password = _ref8$password === void 0 ? null : _ref8$password, _ref8$captchaCode = _ref8.captchaCode, captchaCode = _ref8$captchaCode === void 0 ? null : _ref8$captchaCode, _ref8$extraParams = _ref8.extraParams, extraParams = _ref8$extraParams === void 0 ? {} : _ref8$extraParams, _ref8$sendCAevents = _ref8.sendCAevents, sendCAevents = _ref8$sendCAevents === void 0 ? false : _ref8$sendCAevents, _ref8$registrationId = _ref8.registrationId, registrationId = _ref8$registrationId === void 0 ? null : _ref8$registrationId, _ref8$classificationI = _ref8.classificationId, classificationId = _ref8$classificationI === void 0 ? null : _ref8$classificationI;
2636
- _context5.prev = 1;
2767
+ destination = _ref1.destination, destinationType = _ref1.destinationType, _ref1$password = _ref1.password, password = _ref1$password === void 0 ? null : _ref1$password, _ref1$captchaCode = _ref1.captchaCode, captchaCode = _ref1$captchaCode === void 0 ? null : _ref1$captchaCode, _ref1$extraParams = _ref1.extraParams, extraParams = _ref1$extraParams === void 0 ? {} : _ref1$extraParams, _ref1$sendCAevents = _ref1.sendCAevents, sendCAevents = _ref1$sendCAevents === void 0 ? false : _ref1$sendCAevents, _ref1$registrationId = _ref1.registrationId, registrationId = _ref1$registrationId === void 0 ? null : _ref1$registrationId, _ref1$classificationI = _ref1.classificationId, classificationId = _ref1$classificationI === void 0 ? null : _ref1$classificationI;
2768
+ _context7.prev = 1;
2637
2769
  captchaInfo = captchaCode ? {
2638
2770
  code: captchaCode,
2639
2771
  id: this.requiredCaptcha.captchaId
2640
2772
  } : null;
2641
- _context5.next = 2;
2773
+ _context7.next = 2;
2642
2774
  return this.attrs.meetingInfoProvider.fetchMeetingInfo(destination, destinationType, password, captchaInfo,
2643
2775
  // @ts-ignore - config coming from registerPlugin
2644
2776
  this.config.installedOrgID, this.locusId, extraParams, {
@@ -2646,112 +2778,112 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2646
2778
  sendCAevents: sendCAevents
2647
2779
  }, registrationId, null, classificationId);
2648
2780
  case 2:
2649
- info = _context5.sent;
2781
+ info = _context7.sent;
2650
2782
  this.parseMeetingInfo(info === null || info === void 0 ? void 0 : info.body, this.destination, info === null || info === void 0 ? void 0 : info.errors);
2651
2783
  this.setMeetingInfo(info === null || info === void 0 ? void 0 : info.body, info === null || info === void 0 ? void 0 : info.url);
2652
- return _context5.abrupt("return", _promise.default.resolve());
2784
+ return _context7.abrupt("return", _promise.default.resolve());
2653
2785
  case 3:
2654
- _context5.prev = 3;
2655
- _t4 = _context5["catch"](1);
2786
+ _context7.prev = 3;
2787
+ _t5 = _context7["catch"](1);
2656
2788
  this.updateMeetingActions();
2657
- if (!(_t4 instanceof _meetingInfoV.MeetingInfoV2PolicyError)) {
2658
- _context5.next = 4;
2789
+ if (!(_t5 instanceof _meetingInfoV.MeetingInfoV2PolicyError)) {
2790
+ _context7.next = 4;
2659
2791
  break;
2660
2792
  }
2661
2793
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.POLICY;
2662
- this.meetingInfoFailureCode = _t4.wbxAppApiCode;
2663
- if (_t4.meetingInfo) {
2664
- this.meetingInfo = _t4.meetingInfo;
2794
+ this.meetingInfoFailureCode = _t5.wbxAppApiCode;
2795
+ if (_t5.meetingInfo) {
2796
+ this.meetingInfo = _t5.meetingInfo;
2665
2797
  }
2666
2798
  throw new _permission.default();
2667
2799
  case 4:
2668
- if (!(_t4 instanceof _meetingInfoV.MeetingInfoV2JoinWebinarError)) {
2669
- _context5.next = 5;
2800
+ if (!(_t5 instanceof _meetingInfoV.MeetingInfoV2JoinWebinarError)) {
2801
+ _context7.next = 5;
2670
2802
  break;
2671
2803
  }
2672
2804
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WEBINAR_REGISTRATION;
2673
- if (_constants.WEBINAR_ERROR_WEBCAST.includes(_t4.wbxAppApiCode)) {
2805
+ if (_constants.WEBINAR_ERROR_WEBCAST.includes(_t5.wbxAppApiCode)) {
2674
2806
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.NEED_JOIN_WITH_WEBCAST;
2675
- } else if (_constants.WEBINAR_ERROR_REGISTRATION_ID.includes(_t4.wbxAppApiCode)) {
2807
+ } else if (_constants.WEBINAR_ERROR_REGISTRATION_ID.includes(_t5.wbxAppApiCode)) {
2676
2808
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WEBINAR_NEED_REGISTRATION_ID;
2677
2809
  }
2678
- this.meetingInfoFailureCode = _t4.wbxAppApiCode;
2679
- if (_t4.meetingInfo) {
2680
- this.meetingInfo = _t4.meetingInfo;
2810
+ this.meetingInfoFailureCode = _t5.wbxAppApiCode;
2811
+ if (_t5.meetingInfo) {
2812
+ this.meetingInfo = _t5.meetingInfo;
2681
2813
  }
2682
2814
  this.requiredCaptcha = null;
2683
2815
  throw new _joinWebinarError.default();
2684
2816
  case 5:
2685
- if (!(_t4 instanceof _meetingInfoV.MeetingInfoV2JoinForbiddenError)) {
2686
- _context5.next = 6;
2817
+ if (!(_t5 instanceof _meetingInfoV.MeetingInfoV2JoinForbiddenError)) {
2818
+ _context7.next = 6;
2687
2819
  break;
2688
2820
  }
2689
2821
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.JOIN_FORBIDDEN;
2690
- this.meetingInfoFailureCode = _t4.wbxAppApiCode;
2691
- if (_t4.meetingInfo) {
2692
- this.meetingInfo = _t4.meetingInfo;
2822
+ this.meetingInfoFailureCode = _t5.wbxAppApiCode;
2823
+ if (_t5.meetingInfo) {
2824
+ this.meetingInfo = _t5.meetingInfo;
2693
2825
  }
2694
2826
 
2695
2827
  // Handle the case where user hasn't reached Join Before Host (JBH) time (error code 403003)
2696
- if (_constants.JOIN_BEFORE_HOST === _t4.wbxAppApiCode) {
2828
+ if (_constants.JOIN_BEFORE_HOST === _t5.wbxAppApiCode) {
2697
2829
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.NOT_REACH_JBH;
2698
2830
  }
2699
- throw new _joinForbiddenError.default(this.meetingInfoFailureReason, _t4);
2831
+ throw new _joinForbiddenError.default(this.meetingInfoFailureReason, _t5);
2700
2832
  case 6:
2701
- if (!(_t4 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
2702
- _context5.next = 8;
2833
+ if (!(_t5 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
2834
+ _context7.next = 8;
2703
2835
  break;
2704
2836
  }
2705
2837
  _loggerProxy.default.logger.info(// @ts-ignore
2706
- "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - password required (code=").concat(_t4 === null || _t4 === void 0 ? void 0 : (_err$body = _t4.body) === null || _err$body === void 0 ? void 0 : _err$body.code, ")."));
2838
+ "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - password required (code=").concat(_t5 === null || _t5 === void 0 ? void 0 : (_err$body = _t5.body) === null || _err$body === void 0 ? void 0 : _err$body.code, ")."));
2707
2839
 
2708
2840
  // when wbxappapi requires password it still populates partial meeting info in the response
2709
- if (_t4.meetingInfo) {
2710
- this.meetingInfo = _t4.meetingInfo;
2711
- this.meetingNumber = _t4.meetingInfo.meetingNumber;
2841
+ if (_t5.meetingInfo) {
2842
+ this.meetingInfo = _t5.meetingInfo;
2843
+ this.meetingNumber = _t5.meetingInfo.meetingNumber;
2712
2844
  }
2713
- this.meetingInfoFailureCode = _t4.wbxAppApiCode;
2845
+ this.meetingInfoFailureCode = _t5.wbxAppApiCode;
2714
2846
  this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
2715
2847
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
2716
2848
  if (!this.requiredCaptcha) {
2717
- _context5.next = 7;
2849
+ _context7.next = 7;
2718
2850
  break;
2719
2851
  }
2720
- _context5.next = 7;
2852
+ _context7.next = 7;
2721
2853
  return this.refreshCaptcha();
2722
2854
  case 7:
2723
2855
  throw new _passwordError.default();
2724
2856
  case 8:
2725
- if (!(_t4 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
2726
- _context5.next = 9;
2857
+ if (!(_t5 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
2858
+ _context7.next = 9;
2727
2859
  break;
2728
2860
  }
2729
2861
  _loggerProxy.default.logger.info(// @ts-ignore
2730
- "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - captcha required (code=").concat(_t4 === null || _t4 === void 0 ? void 0 : (_err$body2 = _t4.body) === null || _err$body2 === void 0 ? void 0 : _err$body2.code, ")."));
2862
+ "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - captcha required (code=").concat(_t5 === null || _t5 === void 0 ? void 0 : (_err$body2 = _t5.body) === null || _err$body2 === void 0 ? void 0 : _err$body2.code, ")."));
2731
2863
  if (this.requiredCaptcha) {
2732
2864
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WRONG_CAPTCHA;
2733
- } else if (_t4.isRegistrationIdRequired) {
2865
+ } else if (_t5.isRegistrationIdRequired) {
2734
2866
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WRONG_REGISTRATION_ID;
2735
2867
  } else {
2736
2868
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
2737
2869
  }
2738
- this.meetingInfoFailureCode = _t4.wbxAppApiCode;
2739
- if (_t4.isPasswordRequired) {
2870
+ this.meetingInfoFailureCode = _t5.wbxAppApiCode;
2871
+ if (_t5.isPasswordRequired) {
2740
2872
  this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
2741
2873
  }
2742
- if (_t4.isRegistrationIdRequired) {
2874
+ if (_t5.isRegistrationIdRequired) {
2743
2875
  this.registrationIdStatus = _constants.REGISTRATION_ID_STATUS.REQUIRED;
2744
2876
  }
2745
- this.requiredCaptcha = _t4.captchaInfo;
2877
+ this.requiredCaptcha = _t5.captchaInfo;
2746
2878
  throw new _captchaError.default();
2747
2879
  case 9:
2748
2880
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.OTHER;
2749
- throw _t4;
2881
+ throw _t5;
2750
2882
  case 10:
2751
2883
  case "end":
2752
- return _context5.stop();
2884
+ return _context7.stop();
2753
2885
  }
2754
- }, _callee5, this, [[1, 3]]);
2886
+ }, _callee7, this, [[1, 3]]);
2755
2887
  }));
2756
2888
  function fetchMeetingInfoInternal(_x5) {
2757
2889
  return _fetchMeetingInfoInternal.apply(this, arguments);
@@ -2768,18 +2900,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2768
2900
  }, {
2769
2901
  key: "refreshPermissionToken",
2770
2902
  value: (function () {
2771
- var _refreshPermissionToken = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6(reason) {
2903
+ var _refreshPermissionToken = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8(reason) {
2772
2904
  var _this$meetingInfo;
2773
- var isStartingSpaceInstantV2Meeting, destination, destinationType, permissionTokenExpiryInfo, timeLeft, expiryTime, currentTime, _t5;
2774
- return _regenerator.default.wrap(function (_context6) {
2775
- while (1) switch (_context6.prev = _context6.next) {
2905
+ var isStartingSpaceInstantV2Meeting, destination, destinationType, permissionTokenExpiryInfo, timeLeft, expiryTime, currentTime, _t6;
2906
+ return _regenerator.default.wrap(function (_context8) {
2907
+ while (1) switch (_context8.prev = _context8.next) {
2776
2908
  case 0:
2777
2909
  if ((_this$meetingInfo = this.meetingInfo) !== null && _this$meetingInfo !== void 0 && _this$meetingInfo.permissionToken) {
2778
- _context6.next = 1;
2910
+ _context8.next = 1;
2779
2911
  break;
2780
2912
  }
2781
2913
  _loggerProxy.default.logger.info("Meeting:index#refreshPermissionToken --> cannot refresh the permission token, because we don't have it (reason=".concat(reason, ")"));
2782
- return _context6.abrupt("return");
2914
+ return _context8.abrupt("return");
2783
2915
  case 1:
2784
2916
  isStartingSpaceInstantV2Meeting = this.destinationType === _constants.DESTINATION_TYPE.CONVERSATION_URL &&
2785
2917
  // @ts-ignore - config coming from registerPlugin
@@ -2801,8 +2933,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2801
2933
  reason: reason,
2802
2934
  destinationType: destinationType
2803
2935
  });
2804
- _context6.prev = 2;
2805
- _context6.next = 3;
2936
+ _context8.prev = 2;
2937
+ _context8.next = 3;
2806
2938
  return this.fetchMeetingInfoInternal({
2807
2939
  destination: destination,
2808
2940
  destinationType: destinationType,
@@ -2812,23 +2944,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2812
2944
  sendCAevents: true // because if we're refreshing the permissionToken, it means that user is intending to join that meeting, so we want CA events
2813
2945
  });
2814
2946
  case 3:
2815
- _context6.next = 5;
2947
+ _context8.next = 5;
2816
2948
  break;
2817
2949
  case 4:
2818
- _context6.prev = 4;
2819
- _t5 = _context6["catch"](2);
2820
- _loggerProxy.default.logger.info('Meeting:index#refreshPermissionToken --> failed to refresh the permission token:', _t5);
2950
+ _context8.prev = 4;
2951
+ _t6 = _context8["catch"](2);
2952
+ _loggerProxy.default.logger.info('Meeting:index#refreshPermissionToken --> failed to refresh the permission token:', _t6);
2821
2953
  _metrics.default.sendBehavioralMetric(_constants2.default.PERMISSION_TOKEN_REFRESH_ERROR, {
2822
2954
  correlationId: this.correlationId,
2823
- reason: _t5.message,
2824
- stack: _t5.stack
2955
+ reason: _t6.message,
2956
+ stack: _t6.stack
2825
2957
  });
2826
- throw _t5;
2958
+ throw _t6;
2827
2959
  case 5:
2828
2960
  case "end":
2829
- return _context6.stop();
2961
+ return _context8.stop();
2830
2962
  }
2831
- }, _callee6, this, [[2, 4]]);
2963
+ }, _callee8, this, [[2, 4]]);
2832
2964
  }));
2833
2965
  function refreshPermissionToken(_x6) {
2834
2966
  return _refreshPermissionToken.apply(this, arguments);
@@ -2849,22 +2981,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2849
2981
  }, {
2850
2982
  key: "fetchMeetingInfo",
2851
2983
  value: (function () {
2852
- var _fetchMeetingInfo = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7(options) {
2853
- return _regenerator.default.wrap(function (_context7) {
2854
- while (1) switch (_context7.prev = _context7.next) {
2984
+ var _fetchMeetingInfo = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9(options) {
2985
+ return _regenerator.default.wrap(function (_context9) {
2986
+ while (1) switch (_context9.prev = _context9.next) {
2855
2987
  case 0:
2856
- _context7.next = 1;
2988
+ _context9.next = 1;
2857
2989
  return this.prepForFetchMeetingInfo(options, 'fetchMeetingInfo');
2858
2990
  case 1:
2859
- return _context7.abrupt("return", this.fetchMeetingInfoInternal(_objectSpread({
2991
+ return _context9.abrupt("return", this.fetchMeetingInfoInternal(_objectSpread({
2860
2992
  destination: this.destination,
2861
2993
  destinationType: this.destinationType
2862
2994
  }, options)));
2863
2995
  case 2:
2864
2996
  case "end":
2865
- return _context7.stop();
2997
+ return _context9.stop();
2866
2998
  }
2867
- }, _callee7, this);
2999
+ }, _callee9, this);
2868
3000
  }));
2869
3001
  function fetchMeetingInfo(_x7) {
2870
3002
  return _fetchMeetingInfo.apply(this, arguments);
@@ -3390,10 +3522,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3390
3522
  key: "setupLocusControlsListener",
3391
3523
  value: function setupLocusControlsListener() {
3392
3524
  var _this12 = this;
3393
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED, function (_ref9) {
3394
- var state = _ref9.state,
3395
- modifiedBy = _ref9.modifiedBy,
3396
- lastModified = _ref9.lastModified;
3525
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED, function (_ref10) {
3526
+ var state = _ref10.state,
3527
+ modifiedBy = _ref10.modifiedBy,
3528
+ lastModified = _ref10.lastModified;
3397
3529
  var event;
3398
3530
  switch (state) {
3399
3531
  case _constants.RECORDING_STATE.RECORDING:
@@ -3424,8 +3556,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3424
3556
  function: 'setupLocusControlsListener'
3425
3557
  }, event, _this12.recording);
3426
3558
  });
3427
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_CONTAINER_UPDATED, function (_ref0) {
3428
- var meetingContainerUrl = _ref0.meetingContainerUrl;
3559
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_CONTAINER_UPDATED, function (_ref11) {
3560
+ var meetingContainerUrl = _ref11.meetingContainerUrl;
3429
3561
  _triggerProxy.default.trigger(_this12, {
3430
3562
  file: 'meeting/index',
3431
3563
  function: 'setupLocusControlsListener'
@@ -3433,9 +3565,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3433
3565
  meetingContainerUrl: meetingContainerUrl
3434
3566
  });
3435
3567
  });
3436
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIBE_UPDATED, function (_ref1) {
3437
- var caption = _ref1.caption,
3438
- transcribing = _ref1.transcribing;
3568
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIBE_UPDATED, function (_ref12) {
3569
+ var caption = _ref12.caption,
3570
+ transcribing = _ref12.transcribing;
3439
3571
  // user need to be joined to start the llm and receive transcription
3440
3572
  if (_this12.isJoined()) {
3441
3573
  // @ts-ignore - config coming from registerPlugin
@@ -3452,8 +3584,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3452
3584
  }
3453
3585
  }
3454
3586
  });
3455
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED, function (_ref10) {
3456
- var spokenLanguage = _ref10.spokenLanguage;
3587
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED, function (_ref13) {
3588
+ var spokenLanguage = _ref13.spokenLanguage;
3457
3589
  if (spokenLanguage) {
3458
3590
  var _this12$transcription;
3459
3591
  if ((_this12$transcription = _this12.transcription) !== null && _this12$transcription !== void 0 && _this12$transcription.languageOptions) {
@@ -3470,8 +3602,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3470
3602
  });
3471
3603
  }
3472
3604
  });
3473
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_MANUAL_CAPTION_UPDATED, function (_ref11) {
3474
- var enable = _ref11.enable;
3605
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_MANUAL_CAPTION_UPDATED, function (_ref14) {
3606
+ var enable = _ref14.enable;
3475
3607
  _triggerProxy.default.trigger(_this12, {
3476
3608
  file: 'meeting/index',
3477
3609
  function: 'setupLocusControlsListener'
@@ -3479,31 +3611,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3479
3611
  enable: enable
3480
3612
  });
3481
3613
  });
3482
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_HESIOD_LLM_ID_UPDATED, function (_ref12) {
3483
- var hesiodLlmId = _ref12.hesiodLlmId;
3614
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_HESIOD_LLM_ID_UPDATED, function (_ref15) {
3615
+ var hesiodLlmId = _ref15.hesiodLlmId;
3484
3616
  if (hesiodLlmId) {
3485
3617
  // @ts-ignore
3486
3618
  _this12.webex.internal.voicea.onCaptionServiceIdUpdate(hesiodLlmId);
3487
3619
  }
3488
3620
  });
3489
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED, function (_ref13) {
3490
- var breakout = _ref13.breakout;
3621
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED, function (_ref16) {
3622
+ var breakout = _ref16.breakout;
3491
3623
  _this12.breakouts.updateBreakout(breakout);
3492
3624
  _triggerProxy.default.trigger(_this12, {
3493
3625
  file: 'meeting/index',
3494
3626
  function: 'setupLocusControlsListener'
3495
3627
  }, _constants.EVENT_TRIGGERS.MEETING_BREAKOUTS_UPDATE);
3496
3628
  });
3497
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_INTERPRETATION_UPDATED, function (_ref14) {
3498
- var interpretation = _ref14.interpretation;
3629
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_INTERPRETATION_UPDATED, function (_ref17) {
3630
+ var interpretation = _ref17.interpretation;
3499
3631
  _this12.simultaneousInterpretation.updateInterpretation(interpretation);
3500
3632
  _triggerProxy.default.trigger(_this12, {
3501
3633
  file: 'meeting/index',
3502
3634
  function: 'setupLocusControlsListener'
3503
3635
  }, _constants.EVENT_TRIGGERS.MEETING_INTERPRETATION_UPDATE);
3504
3636
  });
3505
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED, function (_ref15) {
3506
- var entryExitTone = _ref15.entryExitTone;
3637
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED, function (_ref18) {
3638
+ var entryExitTone = _ref18.entryExitTone;
3507
3639
  _triggerProxy.default.trigger(_this12, {
3508
3640
  file: 'meeting/index',
3509
3641
  function: 'setupLocusControlsListener'
@@ -3511,8 +3643,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3511
3643
  entryExitTone: entryExitTone
3512
3644
  });
3513
3645
  });
3514
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MUTE_ON_ENTRY_CHANGED, function (_ref16) {
3515
- var state = _ref16.state;
3646
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MUTE_ON_ENTRY_CHANGED, function (_ref19) {
3647
+ var state = _ref19.state;
3516
3648
  _triggerProxy.default.trigger(_this12, {
3517
3649
  file: 'meeting/index',
3518
3650
  function: 'setupLocusControlsListener'
@@ -3520,8 +3652,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3520
3652
  state: state
3521
3653
  });
3522
3654
  });
3523
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_SHARE_CONTROL_CHANGED, function (_ref17) {
3524
- var state = _ref17.state;
3655
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_SHARE_CONTROL_CHANGED, function (_ref20) {
3656
+ var state = _ref20.state;
3525
3657
  _triggerProxy.default.trigger(_this12, {
3526
3658
  file: 'meeting/index',
3527
3659
  function: 'setupLocusControlsListener'
@@ -3529,8 +3661,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3529
3661
  state: state
3530
3662
  });
3531
3663
  });
3532
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_DISALLOW_UNMUTE_CHANGED, function (_ref18) {
3533
- var state = _ref18.state;
3664
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_DISALLOW_UNMUTE_CHANGED, function (_ref21) {
3665
+ var state = _ref21.state;
3534
3666
  _triggerProxy.default.trigger(_this12, {
3535
3667
  file: 'meeting/index',
3536
3668
  function: 'setupLocusControlsListener'
@@ -3538,8 +3670,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3538
3670
  state: state
3539
3671
  });
3540
3672
  });
3541
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_REACTIONS_CHANGED, function (_ref19) {
3542
- var state = _ref19.state;
3673
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_REACTIONS_CHANGED, function (_ref22) {
3674
+ var state = _ref22.state;
3543
3675
  _triggerProxy.default.trigger(_this12, {
3544
3676
  file: 'meeting/index',
3545
3677
  function: 'setupLocusControlsListener'
@@ -3547,8 +3679,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3547
3679
  state: state
3548
3680
  });
3549
3681
  });
3550
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_VIEW_THE_PARTICIPANTS_LIST_CHANGED, function (_ref20) {
3551
- var state = _ref20.state;
3682
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_VIEW_THE_PARTICIPANTS_LIST_CHANGED, function (_ref23) {
3683
+ var state = _ref23.state;
3552
3684
  _triggerProxy.default.trigger(_this12, {
3553
3685
  file: 'meeting/index',
3554
3686
  function: 'setupLocusControlsListener'
@@ -3556,8 +3688,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3556
3688
  state: state
3557
3689
  });
3558
3690
  });
3559
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RAISE_HAND_CHANGED, function (_ref21) {
3560
- var state = _ref21.state;
3691
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RAISE_HAND_CHANGED, function (_ref24) {
3692
+ var state = _ref24.state;
3561
3693
  _triggerProxy.default.trigger(_this12, {
3562
3694
  file: 'meeting/index',
3563
3695
  function: 'setupLocusControlsListener'
@@ -3565,8 +3697,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3565
3697
  state: state
3566
3698
  });
3567
3699
  });
3568
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_WEBCAST_CHANGED, function (_ref22) {
3569
- var state = _ref22.state;
3700
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_AI_SUMMARY_NOTIFICATION_UPDATED, function (_ref25) {
3701
+ var aiSummaryNotification = _ref25.aiSummaryNotification;
3702
+ _triggerProxy.default.trigger(_this12, {
3703
+ file: 'meeting/index',
3704
+ function: 'setupLocusControlsListener'
3705
+ }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_AI_SUMMARY_NOTIFICATION_UPDATED, {
3706
+ aiSummaryNotification: aiSummaryNotification
3707
+ });
3708
+ });
3709
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_WEBCAST_CHANGED, function (_ref26) {
3710
+ var state = _ref26.state;
3570
3711
  _triggerProxy.default.trigger(_this12, {
3571
3712
  file: 'meeting/index',
3572
3713
  function: 'setupLocusControlsListener'
@@ -3574,8 +3715,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3574
3715
  state: state
3575
3716
  });
3576
3717
  });
3577
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_FULL_CHANGED, function (_ref23) {
3578
- var state = _ref23.state;
3718
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_FULL_CHANGED, function (_ref27) {
3719
+ var state = _ref27.state;
3579
3720
  _triggerProxy.default.trigger(_this12, {
3580
3721
  file: 'meeting/index',
3581
3722
  function: 'setupLocusControlsListener'
@@ -3583,8 +3724,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3583
3724
  state: state
3584
3725
  });
3585
3726
  });
3586
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_PRACTICE_SESSION_STATUS_UPDATED, function (_ref24) {
3587
- var state = _ref24.state;
3727
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_PRACTICE_SESSION_STATUS_UPDATED, function (_ref28) {
3728
+ var state = _ref28.state;
3588
3729
  _this12.webinar.updatePracticeSessionStatus(state);
3589
3730
  _triggerProxy.default.trigger(_this12, {
3590
3731
  file: 'meeting/index',
@@ -3593,8 +3734,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3593
3734
  state: state
3594
3735
  });
3595
3736
  });
3596
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_STAGE_VIEW_UPDATED, function (_ref25) {
3597
- var state = _ref25.state;
3737
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_STAGE_VIEW_UPDATED, function (_ref29) {
3738
+ var state = _ref29.state;
3598
3739
  _triggerProxy.default.trigger(_this12, {
3599
3740
  file: 'meeting/index',
3600
3741
  function: 'setupLocusControlsListener'
@@ -3602,8 +3743,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3602
3743
  state: state
3603
3744
  });
3604
3745
  });
3605
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_VIDEO_CHANGED, function (_ref26) {
3606
- var state = _ref26.state;
3746
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_VIDEO_CHANGED, function (_ref30) {
3747
+ var state = _ref30.state;
3607
3748
  _triggerProxy.default.trigger(_this12, {
3608
3749
  file: 'meeting/index',
3609
3750
  function: 'setupLocusControlsListener'
@@ -3611,8 +3752,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3611
3752
  state: state
3612
3753
  });
3613
3754
  });
3614
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_AUTO_END_MEETING_WARNING_CHANGED, function (_ref27) {
3615
- var state = _ref27.state;
3755
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_AUTO_END_MEETING_WARNING_CHANGED, function (_ref31) {
3756
+ var state = _ref31.state;
3616
3757
  _triggerProxy.default.trigger(_this12, {
3617
3758
  file: 'meeting/index',
3618
3759
  function: 'setupLocusControlsListener'
@@ -3620,8 +3761,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3620
3761
  state: state
3621
3762
  });
3622
3763
  });
3623
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ANNOTATION_CHANGED, function (_ref28) {
3624
- var state = _ref28.state;
3764
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ANNOTATION_CHANGED, function (_ref32) {
3765
+ var state = _ref32.state;
3625
3766
  _triggerProxy.default.trigger(_this12, {
3626
3767
  file: 'meeting/index',
3627
3768
  function: 'setupLocusControlsListener'
@@ -3629,8 +3770,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3629
3770
  state: state
3630
3771
  });
3631
3772
  });
3632
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_REMOTE_DESKTOP_CONTROL_CHANGED, function (_ref29) {
3633
- var state = _ref29.state;
3773
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_REMOTE_DESKTOP_CONTROL_CHANGED, function (_ref33) {
3774
+ var state = _ref33.state;
3634
3775
  _triggerProxy.default.trigger(_this12, {
3635
3776
  file: 'meeting/index',
3636
3777
  function: 'setupLocusControlsListener'
@@ -3638,8 +3779,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3638
3779
  state: state
3639
3780
  });
3640
3781
  });
3641
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_POLLING_QA_CHANGED, function (_ref30) {
3642
- var state = _ref30.state;
3782
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_POLLING_QA_CHANGED, function (_ref34) {
3783
+ var state = _ref34.state;
3643
3784
  _triggerProxy.default.trigger(_this12, {
3644
3785
  file: 'meeting/index',
3645
3786
  function: 'setupLocusControlsListener'
@@ -3686,21 +3827,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3686
3827
  var _this13 = this;
3687
3828
  // Will get triggered on local and remote share
3688
3829
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, /*#__PURE__*/function () {
3689
- var _ref31 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
3830
+ var _ref35 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0(payload) {
3690
3831
  var _payload$previous, _payload$previous2;
3691
- var _payload$current, contentShare, whiteboardShare, previousContentShare, previousWhiteboardShare, newShareStatus, _this13$locusInfo, _this13$locusInfo$inf, _this13$webinar, oldShareStatus, sendStartedSharingRemote, _this13$mediaProperti, _t6, _t7;
3692
- return _regenerator.default.wrap(function (_context8) {
3693
- while (1) switch (_context8.prev = _context8.next) {
3832
+ var _payload$current, contentShare, whiteboardShare, previousContentShare, previousWhiteboardShare, newShareStatus, _this13$locusInfo, _this13$locusInfo$inf, _this13$webinar, oldShareStatus, sendStartedSharingRemote, _this13$mediaProperti, _t7, _t8;
3833
+ return _regenerator.default.wrap(function (_context0) {
3834
+ while (1) switch (_context0.prev = _context0.next) {
3694
3835
  case 0:
3695
3836
  _payload$current = payload.current, contentShare = _payload$current.content, whiteboardShare = _payload$current.whiteboard;
3696
3837
  previousContentShare = (_payload$previous = payload.previous) === null || _payload$previous === void 0 ? void 0 : _payload$previous.content;
3697
3838
  previousWhiteboardShare = (_payload$previous2 = payload.previous) === null || _payload$previous2 === void 0 ? void 0 : _payload$previous2.whiteboard;
3698
3839
  _this13.triggerAnnotationInfoEvent(contentShare, previousContentShare);
3699
3840
  if (!(!payload.forceUpdate && contentShare.beneficiaryId === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.beneficiaryId) && contentShare.disposition === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.disposition) && contentShare.deviceUrlSharing === previousContentShare.deviceUrlSharing && whiteboardShare.beneficiaryId === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.beneficiaryId) && whiteboardShare.disposition === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.disposition) && whiteboardShare.resourceUrl === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.resourceUrl) && contentShare.resourceType === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.resourceType))) {
3700
- _context8.next = 1;
3841
+ _context0.next = 1;
3701
3842
  break;
3702
3843
  }
3703
- return _context8.abrupt("return");
3844
+ return _context0.abrupt("return");
3704
3845
  case 1:
3705
3846
  newShareStatus = _this13.shareStatus; // REMOTE - check if remote started sharing
3706
3847
  if (_this13.selfId !== contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
@@ -3738,22 +3879,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3738
3879
  }
3739
3880
  _loggerProxy.default.logger.info("Meeting:index#setUpLocusInfoMediaInactiveListener --> this.shareStatus=".concat(_this13.shareStatus, " newShareStatus=").concat(newShareStatus));
3740
3881
  if (!(newShareStatus !== _this13.shareStatus)) {
3741
- _context8.next = 17;
3882
+ _context0.next = 17;
3742
3883
  break;
3743
3884
  }
3744
3885
  oldShareStatus = _this13.shareStatus; // update our state before we send out any notifications
3745
3886
  _this13.shareStatus = newShareStatus;
3746
3887
 
3747
3888
  // send out "stop" notifications for the old state
3748
- _t6 = oldShareStatus;
3749
- _context8.next = _t6 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 2 : _t6 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 3 : _t6 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 4 : _t6 === _constants.SHARE_STATUS.NO_SHARE ? 5 : 6;
3889
+ _t7 = oldShareStatus;
3890
+ _context0.next = _t7 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 2 : _t7 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 3 : _t7 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 4 : _t7 === _constants.SHARE_STATUS.NO_SHARE ? 5 : 6;
3750
3891
  break;
3751
3892
  case 2:
3752
3893
  _triggerProxy.default.trigger(_this13, {
3753
3894
  file: 'meetings/index',
3754
3895
  function: 'remoteShare'
3755
3896
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_REMOTE);
3756
- return _context8.abrupt("continue", 7);
3897
+ return _context0.abrupt("continue", 7);
3757
3898
  case 3:
3758
3899
  _triggerProxy.default.trigger(_this13, {
3759
3900
  file: 'meeting/index',
@@ -3761,7 +3902,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3761
3902
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL, {
3762
3903
  reason: _constants.SHARE_STOPPED_REASON.SELF_STOPPED
3763
3904
  });
3764
- return _context8.abrupt("continue", 7);
3905
+ return _context0.abrupt("continue", 7);
3765
3906
  case 4:
3766
3907
  _triggerProxy.default.trigger(_this13, {
3767
3908
  file: 'meeting/index',
@@ -3784,14 +3925,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3784
3925
  meetingId: _this13.id
3785
3926
  }
3786
3927
  });
3787
- return _context8.abrupt("continue", 7);
3928
+ return _context0.abrupt("continue", 7);
3788
3929
  case 5:
3789
- return _context8.abrupt("continue", 7);
3930
+ return _context0.abrupt("continue", 7);
3790
3931
  case 6:
3791
- return _context8.abrupt("continue", 7);
3932
+ return _context0.abrupt("continue", 7);
3792
3933
  case 7:
3793
- _t7 = newShareStatus;
3794
- _context8.next = _t7 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 8 : _t7 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 12 : _t7 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 13 : _t7 === _constants.SHARE_STATUS.NO_SHARE ? 14 : 15;
3934
+ _t8 = newShareStatus;
3935
+ _context0.next = _t8 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 8 : _t8 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 12 : _t8 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 13 : _t8 === _constants.SHARE_STATUS.NO_SHARE ? 14 : 15;
3795
3936
  break;
3796
3937
  case 8:
3797
3938
  sendStartedSharingRemote = function sendStartedSharingRemote() {
@@ -3817,19 +3958,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3817
3958
  resourceType: contentShare.resourceType
3818
3959
  });
3819
3960
  };
3820
- _context8.prev = 9;
3961
+ _context0.prev = 9;
3821
3962
  if (!((_this13$mediaProperti = _this13.mediaProperties.mediaDirection) !== null && _this13$mediaProperti !== void 0 && _this13$mediaProperti.sendShare && oldShareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE)) {
3822
- _context8.next = 10;
3963
+ _context0.next = 10;
3823
3964
  break;
3824
3965
  }
3825
- _context8.next = 10;
3966
+ _context0.next = 10;
3826
3967
  return _this13.unpublishStreams([_this13.mediaProperties.shareVideoStream, _this13.mediaProperties.shareAudioStream]);
3827
3968
  case 10:
3828
- _context8.prev = 10;
3969
+ _context0.prev = 10;
3829
3970
  sendStartedSharingRemote();
3830
- return _context8.finish(10);
3971
+ return _context0.finish(10);
3831
3972
  case 11:
3832
- return _context8.abrupt("continue", 16);
3973
+ return _context0.abrupt("continue", 16);
3833
3974
  case 12:
3834
3975
  _triggerProxy.default.trigger(_this13, {
3835
3976
  file: 'meeting/index',
@@ -3846,7 +3987,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3846
3987
  meetingId: _this13.id
3847
3988
  }
3848
3989
  });
3849
- return _context8.abrupt("continue", 16);
3990
+ return _context0.abrupt("continue", 16);
3850
3991
  case 13:
3851
3992
  _triggerProxy.default.trigger(_this13, {
3852
3993
  file: 'meeting/index',
@@ -3865,14 +4006,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3865
4006
  meetingId: _this13.id
3866
4007
  }
3867
4008
  });
3868
- return _context8.abrupt("continue", 16);
4009
+ return _context0.abrupt("continue", 16);
3869
4010
  case 14:
3870
- return _context8.abrupt("continue", 16);
4011
+ return _context0.abrupt("continue", 16);
3871
4012
  case 15:
3872
- return _context8.abrupt("continue", 16);
4013
+ return _context0.abrupt("continue", 16);
3873
4014
  case 16:
3874
4015
  _this13.members.locusMediaSharesUpdate(payload);
3875
- _context8.next = 18;
4016
+ _context0.next = 18;
3876
4017
  break;
3877
4018
  case 17:
3878
4019
  if (newShareStatus === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE) {
@@ -3916,12 +4057,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3916
4057
  }
3917
4058
  case 18:
3918
4059
  case "end":
3919
- return _context8.stop();
4060
+ return _context0.stop();
3920
4061
  }
3921
- }, _callee8, null, [[9,, 10, 11]]);
4062
+ }, _callee0, null, [[9,, 10, 11]]);
3922
4063
  }));
3923
4064
  return function (_x8) {
3924
- return _ref31.apply(this, arguments);
4065
+ return _ref35.apply(this, arguments);
3925
4066
  };
3926
4067
  }());
3927
4068
  }
@@ -3950,6 +4091,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3950
4091
  _this14.recordingController.setLocusUrl(_this14.locusUrl);
3951
4092
  _this14.controlsOptionsManager.setLocusUrl(_this14.locusUrl, !!isMainLocus);
3952
4093
  _this14.webinar.locusUrlUpdate(url);
4094
+ // @ts-ignore
4095
+ _this14.webex.internal.llm.setRefreshHandler(function () {
4096
+ return _this14.refreshDataChannelToken();
4097
+ });
3953
4098
  _triggerProxy.default.trigger(_this14, {
3954
4099
  file: 'meeting/index',
3955
4100
  function: 'setUpLocusSelfListener'
@@ -3973,12 +4118,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3973
4118
  value: function setUpLocusServicesListener() {
3974
4119
  var _this15 = this;
3975
4120
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LINKS_SERVICES, function (payload) {
3976
- var _payload$services, _payload$services$rec, _this15$locusInfo, _this15$locusInfo$ful, _payload$services2, _payload$services2$br, _payload$services3, _payload$services3$ap, _payload$services4, _payload$services4$ap;
4121
+ var _payload$services, _payload$services$rec, _this15$locusInfo, _this15$locusInfo$ful, _payload$services2, _payload$services2$br, _payload$services3, _payload$services3$ap, _payload$services4, _payload$services4$ap, _payload$services5, _payload$services5$ap;
3977
4122
  _this15.recordingController.setServiceUrl(payload === null || payload === void 0 ? void 0 : (_payload$services = payload.services) === null || _payload$services === void 0 ? void 0 : (_payload$services$rec = _payload$services.record) === null || _payload$services$rec === void 0 ? void 0 : _payload$services$rec.url);
3978
4123
  _this15.recordingController.setSessionId((_this15$locusInfo = _this15.locusInfo) === null || _this15$locusInfo === void 0 ? void 0 : (_this15$locusInfo$ful = _this15$locusInfo.fullState) === null || _this15$locusInfo$ful === void 0 ? void 0 : _this15$locusInfo$ful.sessionId);
3979
4124
  _this15.breakouts.breakoutServiceUrlUpdate(payload === null || payload === void 0 ? void 0 : (_payload$services2 = payload.services) === null || _payload$services2 === void 0 ? void 0 : (_payload$services2$br = _payload$services2.breakout) === null || _payload$services2$br === void 0 ? void 0 : _payload$services2$br.url);
3980
4125
  _this15.annotation.approvalUrlUpdate(payload === null || payload === void 0 ? void 0 : (_payload$services3 = payload.services) === null || _payload$services3 === void 0 ? void 0 : (_payload$services3$ap = _payload$services3.approval) === null || _payload$services3$ap === void 0 ? void 0 : _payload$services3$ap.url);
3981
4126
  _this15.simultaneousInterpretation.approvalUrlUpdate(payload === null || payload === void 0 ? void 0 : (_payload$services4 = payload.services) === null || _payload$services4 === void 0 ? void 0 : (_payload$services4$ap = _payload$services4.approval) === null || _payload$services4$ap === void 0 ? void 0 : _payload$services4$ap.url);
4127
+ _this15.aiEnableRequest.approvalUrlUpdate(payload === null || payload === void 0 ? void 0 : (_payload$services5 = payload.services) === null || _payload$services5 === void 0 ? void 0 : (_payload$services5$ap = _payload$services5.approval) === null || _payload$services5$ap === void 0 ? void 0 : _payload$services5$ap.url);
3982
4128
  });
3983
4129
  }
3984
4130
 
@@ -4037,8 +4183,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4037
4183
  });
4038
4184
  }
4039
4185
  });
4040
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (_ref32) {
4041
- var isInitializing = _ref32.isInitializing;
4186
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (_ref36) {
4187
+ var isInitializing = _ref36.isInitializing;
4042
4188
  _this17.updateMeetingActions();
4043
4189
  _this17.recordingController.setDisplayHints(_this17.userDisplayHints);
4044
4190
  _this17.recordingController.setUserPolicy(_this17.selfUserPolicies);
@@ -4065,6 +4211,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4065
4211
  // @ts-ignore - config coming from registerPlugin
4066
4212
  if (datachannelUrl && this.config.enableAutomaticLLM) {
4067
4213
  this.updateLLMConnection();
4214
+ if (this.webinar.isJoinPracticeSessionDataChannel()) {
4215
+ this.webinar.updatePSDataChannel();
4216
+ }
4068
4217
  }
4069
4218
  }
4070
4219
 
@@ -4175,44 +4324,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4175
4324
  });
4176
4325
  _this19.updateLLMConnection();
4177
4326
  });
4178
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, /*#__PURE__*/function () {
4179
- var _ref33 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9(payload) {
4180
- var _this19$rtcMetrics;
4181
- return _regenerator.default.wrap(function (_context9) {
4182
- while (1) switch (_context9.prev = _context9.next) {
4183
- case 0:
4184
- _this19.stopKeepAlive();
4185
- if (payload) {
4186
- _triggerProxy.default.trigger(_this19, {
4187
- file: 'meeting/index',
4188
- function: 'setUpLocusInfoSelfListener'
4189
- }, _constants.EVENT_TRIGGERS.MEETING_SELF_GUEST_ADMITTED, {
4190
- payload: payload
4191
- });
4327
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, function (payload) {
4328
+ var _this19$rtcMetrics;
4329
+ _this19.stopKeepAlive();
4330
+ if (payload) {
4331
+ _triggerProxy.default.trigger(_this19, {
4332
+ file: 'meeting/index',
4333
+ function: 'setUpLocusInfoSelfListener'
4334
+ }, _constants.EVENT_TRIGGERS.MEETING_SELF_GUEST_ADMITTED, {
4335
+ payload: payload
4336
+ });
4192
4337
 
4193
- // @ts-ignore
4194
- _this19.webex.internal.newMetrics.submitClientEvent({
4195
- name: 'client.lobby.exited',
4196
- options: {
4197
- meetingId: _this19.id
4198
- }
4199
- });
4200
- _metrics.default.sendBehavioralMetric(_constants2.default.GUEST_EXITED_LOBBY, {
4201
- correlation_id: _this19.correlationId
4202
- });
4203
- }
4204
- (_this19$rtcMetrics = _this19.rtcMetrics) === null || _this19$rtcMetrics === void 0 ? void 0 : _this19$rtcMetrics.sendNextMetrics();
4205
- _this19.updateLLMConnection();
4206
- case 1:
4207
- case "end":
4208
- return _context9.stop();
4338
+ // @ts-ignore
4339
+ _this19.webex.internal.newMetrics.submitClientEvent({
4340
+ name: 'client.lobby.exited',
4341
+ options: {
4342
+ meetingId: _this19.id
4209
4343
  }
4210
- }, _callee9);
4211
- }));
4212
- return function (_x9) {
4213
- return _ref33.apply(this, arguments);
4214
- };
4215
- }());
4344
+ });
4345
+ _metrics.default.sendBehavioralMetric(_constants2.default.GUEST_EXITED_LOBBY, {
4346
+ correlation_id: _this19.correlationId
4347
+ });
4348
+ }
4349
+ (_this19$rtcMetrics = _this19.rtcMetrics) === null || _this19$rtcMetrics === void 0 ? void 0 : _this19$rtcMetrics.sendNextMetrics();
4350
+ _this19.ensureDefaultDatachannelTokenAfterAdmit().catch(function (error) {
4351
+ _loggerProxy.default.logger.warn("Meeting:index#setUpLocusInfoSelfListener --> failed post-admit token prefetch flow: ".concat((error === null || error === void 0 ? void 0 : error.message) || String(error)));
4352
+ });
4353
+ _this19.updateLLMConnection();
4354
+ });
4216
4355
 
4217
4356
  // @ts-ignore - check if MEDIA_INACTIVITY exists
4218
4357
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, function () {
@@ -4262,6 +4401,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4262
4401
  function: 'setUpLocusInfoSelfListener'
4263
4402
  }, _constants.EVENT_TRIGGERS.MEETING_BREAKOUTS_UPDATE);
4264
4403
  });
4404
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ID_CHANGED, function (payload) {
4405
+ _this19.aiEnableRequest.selfParticipantIdUpdate(payload.selfId);
4406
+ });
4265
4407
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_MEETING_INTERPRETATION_CHANGED, function (payload) {
4266
4408
  var targetChanged = _this19.simultaneousInterpretation.updateSelfInterpretation(payload);
4267
4409
  _triggerProxy.default.trigger(_this19, {
@@ -4329,49 +4471,49 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4329
4471
  }
4330
4472
  });
4331
4473
  this.locusInfo.on(_constants.EVENTS.DESTROY_MEETING, /*#__PURE__*/function () {
4332
- var _ref34 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0(payload) {
4333
- var _t8;
4334
- return _regenerator.default.wrap(function (_context0) {
4335
- while (1) switch (_context0.prev = _context0.next) {
4474
+ var _ref37 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1(payload) {
4475
+ var _t9;
4476
+ return _regenerator.default.wrap(function (_context1) {
4477
+ while (1) switch (_context1.prev = _context1.next) {
4336
4478
  case 0:
4337
4479
  if (!_this20.wirelessShare) {
4338
- _context0.next = 2;
4480
+ _context1.next = 2;
4339
4481
  break;
4340
4482
  }
4341
4483
  if (!_this20.mediaProperties.shareVideoStream) {
4342
- _context0.next = 1;
4484
+ _context1.next = 1;
4343
4485
  break;
4344
4486
  }
4345
- _context0.next = 1;
4487
+ _context1.next = 1;
4346
4488
  return _this20.setLocalShareVideoStream(undefined);
4347
4489
  case 1:
4348
4490
  if (!_this20.mediaProperties.shareAudioStream) {
4349
- _context0.next = 2;
4491
+ _context1.next = 2;
4350
4492
  break;
4351
4493
  }
4352
- _context0.next = 2;
4494
+ _context1.next = 2;
4353
4495
  return _this20.setLocalShareAudioStream(undefined);
4354
4496
  case 2:
4355
4497
  if (!payload.shouldLeave) {
4356
- _context0.next = 7;
4498
+ _context1.next = 7;
4357
4499
  break;
4358
4500
  }
4359
- _context0.prev = 3;
4360
- _context0.next = 4;
4501
+ _context1.prev = 3;
4502
+ _context1.next = 4;
4361
4503
  return _this20.leave({
4362
4504
  reason: payload.reason
4363
4505
  });
4364
4506
  case 4:
4365
4507
  _loggerProxy.default.logger.warn('Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. The meeting has been left, but has not been destroyed, you should see a later event for leave.');
4366
- _context0.next = 6;
4508
+ _context1.next = 6;
4367
4509
  break;
4368
4510
  case 5:
4369
- _context0.prev = 5;
4370
- _t8 = _context0["catch"](3);
4511
+ _context1.prev = 5;
4512
+ _t9 = _context1["catch"](3);
4371
4513
  // @ts-ignore
4372
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_t8));
4514
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_t9));
4373
4515
  case 6:
4374
- _context0.next = 8;
4516
+ _context1.next = 8;
4375
4517
  break;
4376
4518
  case 7:
4377
4519
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> MEETING_REMOVED_REASON', payload.reason);
@@ -4385,12 +4527,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4385
4527
  });
4386
4528
  case 8:
4387
4529
  case "end":
4388
- return _context0.stop();
4530
+ return _context1.stop();
4389
4531
  }
4390
- }, _callee0, null, [[3, 5]]);
4532
+ }, _callee1, null, [[3, 5]]);
4391
4533
  }));
4392
- return function (_x0) {
4393
- return _ref34.apply(this, arguments);
4534
+ return function (_x9) {
4535
+ return _ref37.apply(this, arguments);
4394
4536
  };
4395
4537
  }());
4396
4538
  }
@@ -4508,31 +4650,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4508
4650
  }, {
4509
4651
  key: "beRightBack",
4510
4652
  value: (function () {
4511
- var _beRightBack = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1(enabled) {
4653
+ var _beRightBack = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10(enabled) {
4512
4654
  var _this22 = this;
4513
4655
  var errorMessage, error, _errorMessage, _error;
4514
- return _regenerator.default.wrap(function (_context1) {
4515
- while (1) switch (_context1.prev = _context1.next) {
4656
+ return _regenerator.default.wrap(function (_context10) {
4657
+ while (1) switch (_context10.prev = _context10.next) {
4516
4658
  case 0:
4517
4659
  if (this.isMultistream) {
4518
- _context1.next = 1;
4660
+ _context10.next = 1;
4519
4661
  break;
4520
4662
  }
4521
4663
  errorMessage = 'Meeting:index#beRightBack --> Not a multistream meeting';
4522
4664
  error = new Error(errorMessage);
4523
4665
  _loggerProxy.default.logger.error(error);
4524
- return _context1.abrupt("return", _promise.default.reject(error));
4666
+ return _context10.abrupt("return", _promise.default.reject(error));
4525
4667
  case 1:
4526
4668
  if (this.mediaProperties.webrtcMediaConnection) {
4527
- _context1.next = 2;
4669
+ _context10.next = 2;
4528
4670
  break;
4529
4671
  }
4530
4672
  _errorMessage = 'Meeting:index#beRightBack --> WebRTC media connection is not defined';
4531
4673
  _error = new Error(_errorMessage);
4532
4674
  _loggerProxy.default.logger.error(_error);
4533
- return _context1.abrupt("return", _promise.default.reject(_error));
4675
+ return _context10.abrupt("return", _promise.default.reject(_error));
4534
4676
  case 2:
4535
- return _context1.abrupt("return", this.brbState.enable(enabled, this.sendSlotManager).then(function () {
4677
+ return _context10.abrupt("return", this.brbState.enable(enabled, this.sendSlotManager).then(function () {
4536
4678
  if (_this22.audio && enabled) {
4537
4679
  // locus mutes the participant with brb enabled request,
4538
4680
  // so we need to explicitly update remote mute for correct logic flow
@@ -4543,11 +4685,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4543
4685
  }));
4544
4686
  case 3:
4545
4687
  case "end":
4546
- return _context1.stop();
4688
+ return _context10.stop();
4547
4689
  }
4548
- }, _callee1, this);
4690
+ }, _callee10, this);
4549
4691
  }));
4550
- function beRightBack(_x1) {
4692
+ function beRightBack(_x0) {
4551
4693
  return _beRightBack.apply(this, arguments);
4552
4694
  }
4553
4695
  return beRightBack;
@@ -4743,6 +4885,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4743
4885
  canLowerAllHands: _util2.default.canUserLowerAllHands(this.userDisplayHints),
4744
4886
  canLowerSomeoneElsesHand: _util2.default.canUserLowerSomeoneElsesHand(this.userDisplayHints),
4745
4887
  bothLeaveAndEndMeetingAvailable: _util2.default.bothLeaveAndEndMeetingAvailable(this.userDisplayHints),
4888
+ requireHostEndMeetingBeforeLeave: _util2.default.requireHostEndMeetingBeforeLeave(this.userDisplayHints),
4746
4889
  canEnableClosedCaption: _util2.default.canEnableClosedCaption(this.userDisplayHints),
4747
4890
  canStartTranscribing: _util2.default.canStartTranscribing(this.userDisplayHints),
4748
4891
  canStopTranscribing: _util2.default.canStopTranscribing(this.userDisplayHints),
@@ -4972,7 +5115,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4972
5115
  canDisablePollingQA: _util5.default.hasHints({
4973
5116
  requiredHints: [_constants.DISPLAY_HINTS.DISABLE_ATTENDEE_START_POLLING_QA],
4974
5117
  displayHints: this.userDisplayHints
4975
- })
5118
+ }),
5119
+ canAttendeeRequestAiAssistantEnabled: _util2.default.canAttendeeRequestAiAssistantEnabled(this.userDisplayHints, this.roles),
5120
+ isAttendeeRequestAiAssistantDeclinedAll: _util2.default.attendeeRequestAiAssistantDeclinedAll(this.userDisplayHints)
4976
5121
  }) || changed;
4977
5122
  }
4978
5123
  if (changed) {
@@ -5054,7 +5199,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5054
5199
  this.locusInfo.initialSetup({
5055
5200
  trigger: 'join-response',
5056
5201
  locus: mtgLocus,
5057
- dataSets: data.dataSets
5202
+ dataSets: data.dataSets,
5203
+ metadata: data.metadata
5058
5204
  });
5059
5205
  }
5060
5206
 
@@ -5169,10 +5315,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5169
5315
  key: "closeRemoteStreams",
5170
5316
  value: function closeRemoteStreams() {
5171
5317
  var _this24 = this;
5172
- var _this$mediaProperties6 = this.mediaProperties,
5173
- remoteAudioStream = _this$mediaProperties6.remoteAudioStream,
5174
- remoteVideoStream = _this$mediaProperties6.remoteVideoStream,
5175
- remoteShareStream = _this$mediaProperties6.remoteShareStream;
5318
+ var _this$mediaProperties7 = this.mediaProperties,
5319
+ remoteAudioStream = _this$mediaProperties7.remoteAudioStream,
5320
+ remoteVideoStream = _this$mediaProperties7.remoteVideoStream,
5321
+ remoteShareStream = _this$mediaProperties7.remoteShareStream;
5176
5322
 
5177
5323
  /**
5178
5324
  * Triggers an event to the developer
@@ -5216,11 +5362,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5216
5362
  }, {
5217
5363
  key: "setLocalAudioStream",
5218
5364
  value: (function () {
5219
- var _setLocalAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10(localStream) {
5365
+ var _setLocalAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11(localStream) {
5220
5366
  var _this$audio2;
5221
5367
  var oldStream;
5222
- return _regenerator.default.wrap(function (_context10) {
5223
- while (1) switch (_context10.prev = _context10.next) {
5368
+ return _regenerator.default.wrap(function (_context11) {
5369
+ while (1) switch (_context11.prev = _context11.next) {
5224
5370
  case 0:
5225
5371
  oldStream = this.mediaProperties.audioStream;
5226
5372
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localAudioStreamMuteStateHandler);
@@ -5234,21 +5380,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5234
5380
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localAudioStreamMuteStateHandler);
5235
5381
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5236
5382
  if (!(!this.isMultistream || !localStream)) {
5237
- _context10.next = 1;
5383
+ _context11.next = 1;
5238
5384
  break;
5239
5385
  }
5240
- _context10.next = 1;
5386
+ _context11.next = 1;
5241
5387
  return this.unpublishStream(_internalMediaCore.MediaType.AudioMain, oldStream);
5242
5388
  case 1:
5243
- _context10.next = 2;
5389
+ _context11.next = 2;
5244
5390
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
5245
5391
  case 2:
5246
5392
  case "end":
5247
- return _context10.stop();
5393
+ return _context11.stop();
5248
5394
  }
5249
- }, _callee10, this);
5395
+ }, _callee11, this);
5250
5396
  }));
5251
- function setLocalAudioStream(_x10) {
5397
+ function setLocalAudioStream(_x1) {
5252
5398
  return _setLocalAudioStream.apply(this, arguments);
5253
5399
  }
5254
5400
  return setLocalAudioStream;
@@ -5264,16 +5410,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5264
5410
  }, {
5265
5411
  key: "setLocalVideoStream",
5266
5412
  value: (function () {
5267
- var _setLocalVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11(localStream) {
5413
+ var _setLocalVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(localStream) {
5268
5414
  var _this$video2;
5269
5415
  var oldStream;
5270
- return _regenerator.default.wrap(function (_context11) {
5271
- while (1) switch (_context11.prev = _context11.next) {
5416
+ return _regenerator.default.wrap(function (_context12) {
5417
+ while (1) switch (_context12.prev = _context12.next) {
5272
5418
  case 0:
5273
5419
  oldStream = this.mediaProperties.videoStream;
5274
5420
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localVideoStreamMuteStateHandler);
5275
5421
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localVideoStreamMuteStateHandler);
5276
5422
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5423
+ oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.ConstraintsChange, this.localConstraintsChangeHandler);
5277
5424
 
5278
5425
  // we don't update this.mediaProperties.mediaDirection.sendVideo, because we always keep it as true to avoid extra SDP exchanges
5279
5426
  this.mediaProperties.setLocalVideoStream(localStream);
@@ -5281,22 +5428,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5281
5428
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localVideoStreamMuteStateHandler);
5282
5429
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localVideoStreamMuteStateHandler);
5283
5430
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5431
+ localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.ConstraintsChange, this.localConstraintsChangeHandler);
5284
5432
  if (!(!this.isMultistream || !localStream)) {
5285
- _context11.next = 1;
5433
+ _context12.next = 1;
5286
5434
  break;
5287
5435
  }
5288
- _context11.next = 1;
5436
+ _context12.next = 1;
5289
5437
  return this.unpublishStream(_internalMediaCore.MediaType.VideoMain, oldStream);
5290
5438
  case 1:
5291
- _context11.next = 2;
5439
+ _context12.next = 2;
5292
5440
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
5293
5441
  case 2:
5294
5442
  case "end":
5295
- return _context11.stop();
5443
+ return _context12.stop();
5296
5444
  }
5297
- }, _callee11, this);
5445
+ }, _callee12, this);
5298
5446
  }));
5299
- function setLocalVideoStream(_x11) {
5447
+ function setLocalVideoStream(_x10) {
5300
5448
  return _setLocalVideoStream.apply(this, arguments);
5301
5449
  }
5302
5450
  return setLocalVideoStream;
@@ -5313,10 +5461,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5313
5461
  }, {
5314
5462
  key: "setLocalShareVideoStream",
5315
5463
  value: (function () {
5316
- var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(localDisplayStream) {
5464
+ var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13(localDisplayStream) {
5317
5465
  var oldStream;
5318
- return _regenerator.default.wrap(function (_context12) {
5319
- while (1) switch (_context12.prev = _context12.next) {
5466
+ return _regenerator.default.wrap(function (_context13) {
5467
+ while (1) switch (_context13.prev = _context13.next) {
5320
5468
  case 0:
5321
5469
  oldStream = this.mediaProperties.shareVideoStream;
5322
5470
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.handleShareVideoStreamMuteStateChange);
@@ -5328,21 +5476,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5328
5476
  localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5329
5477
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
5330
5478
  if (!(!this.isMultistream || !localDisplayStream)) {
5331
- _context12.next = 1;
5479
+ _context13.next = 1;
5332
5480
  break;
5333
5481
  }
5334
- _context12.next = 1;
5482
+ _context13.next = 1;
5335
5483
  return this.unpublishStream(_internalMediaCore.MediaType.VideoSlides, oldStream);
5336
5484
  case 1:
5337
- _context12.next = 2;
5485
+ _context13.next = 2;
5338
5486
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
5339
5487
  case 2:
5340
5488
  case "end":
5341
- return _context12.stop();
5489
+ return _context13.stop();
5342
5490
  }
5343
- }, _callee12, this);
5491
+ }, _callee13, this);
5344
5492
  }));
5345
- function setLocalShareVideoStream(_x12) {
5493
+ function setLocalShareVideoStream(_x11) {
5346
5494
  return _setLocalShareVideoStream.apply(this, arguments);
5347
5495
  }
5348
5496
  return setLocalShareVideoStream;
@@ -5358,11 +5506,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5358
5506
  }, {
5359
5507
  key: "setLocalShareAudioStream",
5360
5508
  value: (function () {
5361
- var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13(localSystemAudioStream) {
5509
+ var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14(localSystemAudioStream) {
5362
5510
  var oldStream;
5363
- return _regenerator.default.wrap(function (_context13) {
5364
- while (1) switch (_context13.prev = _context13.next) {
5365
- case 0:
5511
+ return _regenerator.default.wrap(function (_context14) {
5512
+ while (1) switch (_context14.prev = _context14.next) {
5513
+ case 0:
5366
5514
  oldStream = this.mediaProperties.shareAudioStream;
5367
5515
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareAudioStreamEnded);
5368
5516
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
@@ -5371,21 +5519,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5371
5519
  localSystemAudioStream === null || localSystemAudioStream === void 0 ? void 0 : localSystemAudioStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5372
5520
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
5373
5521
  if (!(!this.isMultistream || !localSystemAudioStream)) {
5374
- _context13.next = 1;
5522
+ _context14.next = 1;
5375
5523
  break;
5376
5524
  }
5377
- _context13.next = 1;
5525
+ _context14.next = 1;
5378
5526
  return this.unpublishStream(_internalMediaCore.MediaType.AudioSlides, oldStream);
5379
5527
  case 1:
5380
- _context13.next = 2;
5528
+ _context14.next = 2;
5381
5529
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
5382
5530
  case 2:
5383
5531
  case "end":
5384
- return _context13.stop();
5532
+ return _context14.stop();
5385
5533
  }
5386
- }, _callee13, this);
5534
+ }, _callee14, this);
5387
5535
  }));
5388
- function setLocalShareAudioStream(_x13) {
5536
+ function setLocalShareAudioStream(_x12) {
5389
5537
  return _setLocalShareAudioStream.apply(this, arguments);
5390
5538
  }
5391
5539
  return setLocalShareAudioStream;
@@ -5424,17 +5572,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5424
5572
  }, {
5425
5573
  key: "cleanupLocalStreams",
5426
5574
  value: function cleanupLocalStreams() {
5427
- var _this$mediaProperties7 = this.mediaProperties,
5428
- audioStream = _this$mediaProperties7.audioStream,
5429
- videoStream = _this$mediaProperties7.videoStream,
5430
- shareAudioStream = _this$mediaProperties7.shareAudioStream,
5431
- shareVideoStream = _this$mediaProperties7.shareVideoStream;
5575
+ var _this$mediaProperties8 = this.mediaProperties,
5576
+ audioStream = _this$mediaProperties8.audioStream,
5577
+ videoStream = _this$mediaProperties8.videoStream,
5578
+ shareAudioStream = _this$mediaProperties8.shareAudioStream,
5579
+ shareVideoStream = _this$mediaProperties8.shareVideoStream;
5432
5580
  audioStream === null || audioStream === void 0 ? void 0 : audioStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localAudioStreamMuteStateHandler);
5433
5581
  audioStream === null || audioStream === void 0 ? void 0 : audioStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localAudioStreamMuteStateHandler);
5434
5582
  audioStream === null || audioStream === void 0 ? void 0 : audioStream.off(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5435
5583
  videoStream === null || videoStream === void 0 ? void 0 : videoStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localVideoStreamMuteStateHandler);
5436
5584
  videoStream === null || videoStream === void 0 ? void 0 : videoStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localVideoStreamMuteStateHandler);
5437
5585
  videoStream === null || videoStream === void 0 ? void 0 : videoStream.off(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5586
+ videoStream === null || videoStream === void 0 ? void 0 : videoStream.off(_mediaHelpers.LocalStreamEventNames.ConstraintsChange, this.localConstraintsChangeHandler);
5438
5587
  shareAudioStream === null || shareAudioStream === void 0 ? void 0 : shareAudioStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareAudioStreamEnded);
5439
5588
  shareAudioStream === null || shareAudioStream === void 0 ? void 0 : shareAudioStream.off(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
5440
5589
  shareVideoStream === null || shareVideoStream === void 0 ? void 0 : shareVideoStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.handleShareVideoStreamMuteStateChange);
@@ -5823,7 +5972,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5823
5972
  }, {
5824
5973
  key: "joinWithMedia",
5825
5974
  value: (function () {
5826
- var _joinWithMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14() {
5975
+ var _joinWithMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15() {
5827
5976
  var _this30 = this;
5828
5977
  var options,
5829
5978
  mediaOptions,
@@ -5846,53 +5995,64 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5846
5995
  shouldRetry,
5847
5996
  _error2,
5848
5997
  _error3,
5849
- _args14 = arguments,
5850
- _t9,
5851
- _t0;
5852
- return _regenerator.default.wrap(function (_context14) {
5853
- while (1) switch (_context14.prev = _context14.next) {
5998
+ _args15 = arguments,
5999
+ _t0,
6000
+ _t1;
6001
+ return _regenerator.default.wrap(function (_context15) {
6002
+ while (1) switch (_context15.prev = _context15.next) {
5854
6003
  case 0:
5855
- options = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
6004
+ options = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
5856
6005
  mediaOptions = options.mediaOptions, _options$joinOptions = options.joinOptions, joinOptions = _options$joinOptions === void 0 ? {} : _options$joinOptions;
5857
6006
  _this$joinWithMediaRe = this.joinWithMediaRetryInfo, isRetry = _this$joinWithMediaRe.isRetry, prevJoinResponse = _this$joinWithMediaRe.prevJoinResponse;
5858
6007
  if (mediaOptions !== null && mediaOptions !== void 0 && mediaOptions.allowMediaInLobby) {
5859
- _context14.next = 1;
6008
+ _context15.next = 1;
5860
6009
  break;
5861
6010
  }
5862
- return _context14.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
6011
+ return _context15.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
5863
6012
  case 1:
5864
6013
  this.allowMediaInLobby = true;
5865
6014
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia called');
5866
6015
  joined = false;
5867
6016
  joinResponse = prevJoinResponse;
5868
- _context14.prev = 2;
6017
+ /* Before we do anything, check if RTCPeerConnection is available. Normally this is checked
6018
+ by addMediaInternal() itself when creating the media connection, but since joinWithMedia()
6019
+ is a convenience method that does both join() and addMedia(), we want to fail fast here
6020
+ in case WebRTC is not available at all.
6021
+ */
6022
+ if (!(_webCapabilities.WebCapabilities.supportsRTCPeerConnection() === _webCapabilities.CapabilityState.NOT_CAPABLE)) {
6023
+ _context15.next = 2;
6024
+ break;
6025
+ }
6026
+ throw new _internalMediaCore.Errors.WebrtcApiNotAvailableError('RTCPeerConnection API is not available in this environment');
6027
+ case 2:
6028
+ _context15.prev = 2;
5869
6029
  forceTurnDiscovery = false;
5870
6030
  if (joinResponse) {
5871
- _context14.next = 7;
6031
+ _context15.next = 7;
5872
6032
  break;
5873
6033
  }
5874
- _context14.next = 3;
6034
+ _context15.next = 3;
5875
6035
  return this.roap.generateTurnDiscoveryRequestMessage(this, true);
5876
6036
  case 3:
5877
- turnDiscoveryRequest = _context14.sent;
6037
+ turnDiscoveryRequest = _context15.sent;
5878
6038
  turnDiscoverySkippedReason = turnDiscoveryRequest.turnDiscoverySkippedReason;
5879
6039
  joinOptions.roapMessage = turnDiscoveryRequest.roapMessage;
5880
6040
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia ---> calling join with joinOptions, ', joinOptions);
5881
- _context14.next = 4;
6041
+ _context15.next = 4;
5882
6042
  return this.join(joinOptions);
5883
6043
  case 4:
5884
- joinResponse = _context14.sent;
6044
+ joinResponse = _context15.sent;
5885
6045
  joined = true;
5886
6046
 
5887
6047
  // if we sent out TURN discovery Roap message with join, process the TURN discovery response
5888
6048
  if (!joinOptions.roapMessage) {
5889
- _context14.next = 6;
6049
+ _context15.next = 6;
5890
6050
  break;
5891
6051
  }
5892
- _context14.next = 5;
6052
+ _context15.next = 5;
5893
6053
  return this.roap.handleTurnDiscoveryHttpResponse(this, joinResponse);
5894
6054
  case 5:
5895
- _yield$this$roap$hand = _context14.sent;
6055
+ _yield$this$roap$hand = _context15.sent;
5896
6056
  turnServerInfo = _yield$this$roap$hand.turnServerInfo;
5897
6057
  turnDiscoverySkippedReason = _yield$this$roap$hand.turnDiscoverySkippedReason;
5898
6058
  this.turnDiscoverySkippedReason = turnDiscoverySkippedReason;
@@ -5901,7 +6061,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5901
6061
  this.roap.abortTurnDiscovery();
5902
6062
  }
5903
6063
  case 6:
5904
- _context14.next = 8;
6064
+ _context15.next = 8;
5905
6065
  break;
5906
6066
  case 7:
5907
6067
  // This is a retry, when join succeeded but addMedia failed, so we'll just call addMedia() again,
@@ -5909,43 +6069,43 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5909
6069
  forceTurnDiscovery = true;
5910
6070
  joined = true;
5911
6071
  case 8:
5912
- _context14.next = 9;
6072
+ _context15.next = 9;
5913
6073
  return this.addMediaInternal(function () {
5914
6074
  return _this30.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
5915
6075
  }, turnServerInfo, forceTurnDiscovery, mediaOptions);
5916
6076
  case 9:
5917
- mediaResponse = _context14.sent;
6077
+ mediaResponse = _context15.sent;
5918
6078
  this.joinWithMediaRetryInfo = {
5919
6079
  isRetry: false,
5920
6080
  prevJoinResponse: undefined
5921
6081
  };
5922
- return _context14.abrupt("return", {
6082
+ return _context15.abrupt("return", {
5923
6083
  join: joinResponse,
5924
6084
  media: mediaResponse,
5925
6085
  multistreamEnabled: this.isMultistream
5926
6086
  });
5927
6087
  case 10:
5928
- _context14.prev = 10;
5929
- _t9 = _context14["catch"](2);
5930
- _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _t9);
6088
+ _context15.prev = 10;
6089
+ _t0 = _context15["catch"](2);
6090
+ _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _t0);
5931
6091
  this.roap.abortTurnDiscovery();
5932
6092
 
5933
6093
  // if this was the first attempt, let's do a retry
5934
6094
  shouldRetry = !isRetry;
5935
- if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_t9)) {
6095
+ if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_t0) || _internalPluginMetrics.CallDiagnosticUtils.isWebrtcApiNotAvailableError(_t0)) {
5936
6096
  // errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
5937
6097
  // so there is no point doing a retry
5938
6098
  shouldRetry = false;
5939
6099
  }
5940
- if (_internalPluginMetrics.CallDiagnosticUtils.isBrowserMediaError(_t9)) {
6100
+ if (_internalPluginMetrics.CallDiagnosticUtils.isBrowserMediaError(_t0)) {
5941
6101
  shouldRetry = false;
5942
6102
  // eslint-disable-next-line no-ex-assign
5943
- _t9 = (0, _lodash.merge)({
6103
+ _t0 = (0, _lodash.merge)({
5944
6104
  error: {
5945
6105
  body: {
5946
- errorCode: _internalPluginMetrics.CallDiagnosticUtils.getBrowserMediaErrorCode(_t9),
5947
- message: (_error2 = _t9) === null || _error2 === void 0 ? void 0 : _error2.message,
5948
- name: (_error3 = _t9) === null || _error3 === void 0 ? void 0 : _error3.name
6106
+ errorCode: _internalPluginMetrics.CallDiagnosticUtils.getBrowserMediaErrorCode(_t0),
6107
+ message: (_error2 = _t0) === null || _error2 === void 0 ? void 0 : _error2.message,
6108
+ name: (_error3 = _t0) === null || _error3 === void 0 ? void 0 : _error3.name
5949
6109
  }
5950
6110
  }
5951
6111
  });
@@ -5953,54 +6113,54 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5953
6113
 
5954
6114
  // we only want to call leave if join was successful and this was a retry or we won't be doing any more retries
5955
6115
  if (!(joined && (isRetry || !shouldRetry))) {
5956
- _context14.next = 14;
6116
+ _context15.next = 14;
5957
6117
  break;
5958
6118
  }
5959
- _context14.prev = 11;
5960
- _context14.next = 12;
6119
+ _context15.prev = 11;
6120
+ _context15.next = 12;
5961
6121
  return this.leave({
5962
6122
  resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
5963
6123
  reason: 'joinWithMedia failure'
5964
6124
  });
5965
6125
  case 12:
5966
- _context14.next = 14;
6126
+ _context15.next = 14;
5967
6127
  break;
5968
6128
  case 13:
5969
- _context14.prev = 13;
5970
- _t0 = _context14["catch"](11);
5971
- _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _t0);
5972
- leaveError = _t0;
6129
+ _context15.prev = 13;
6130
+ _t1 = _context15["catch"](11);
6131
+ _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _t1);
6132
+ leaveError = _t1;
5973
6133
  case 14:
5974
6134
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
5975
6135
  correlation_id: this.correlationId,
5976
6136
  locus_id: (_this$locusUrl = this.locusUrl) === null || _this$locusUrl === void 0 ? void 0 : _this$locusUrl.split('/').pop(),
5977
6137
  // if join fails, we may end up with no locusUrl
5978
- reason: _t9.message,
5979
- stack: _t9.stack,
6138
+ reason: _t0.message,
6139
+ stack: _t0.stack,
5980
6140
  leaveErrorReason: (_leaveError = leaveError) === null || _leaveError === void 0 ? void 0 : _leaveError.message,
5981
6141
  isRetry: isRetry
5982
6142
  }, {
5983
- type: _t9.name
6143
+ type: _t0.name
5984
6144
  });
5985
6145
  if (!shouldRetry) {
5986
- _context14.next = 15;
6146
+ _context15.next = 15;
5987
6147
  break;
5988
6148
  }
5989
6149
  _loggerProxy.default.logger.warn('Meeting:index#joinWithMedia --> retrying call to joinWithMedia');
5990
6150
  this.joinWithMediaRetryInfo.isRetry = true;
5991
6151
  this.joinWithMediaRetryInfo.prevJoinResponse = joinResponse;
5992
- return _context14.abrupt("return", this.joinWithMedia(options));
6152
+ return _context15.abrupt("return", this.joinWithMedia(options));
5993
6153
  case 15:
5994
6154
  this.joinWithMediaRetryInfo = {
5995
6155
  isRetry: false,
5996
6156
  prevJoinResponse: undefined
5997
6157
  };
5998
- throw _t9;
6158
+ throw _t0;
5999
6159
  case 16:
6000
6160
  case "end":
6001
- return _context14.stop();
6161
+ return _context15.stop();
6002
6162
  }
6003
- }, _callee14, this, [[2, 10], [11, 13]]);
6163
+ }, _callee15, this, [[2, 10], [11, 13]]);
6004
6164
  }));
6005
6165
  function joinWithMedia() {
6006
6166
  return _joinWithMedia.apply(this, arguments);
@@ -6030,20 +6190,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6030
6190
  return _promise.default.reject(new _parameter.default('Cannot reconnect, Media has not established to reconnect'));
6031
6191
  }
6032
6192
  this.cleanUpBeforeReconnection();
6033
- return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15() {
6034
- return _regenerator.default.wrap(function (_context15) {
6035
- while (1) switch (_context15.prev = _context15.next) {
6193
+ return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16() {
6194
+ return _regenerator.default.wrap(function (_context16) {
6195
+ while (1) switch (_context16.prev = _context16.next) {
6036
6196
  case 0:
6037
- _context15.next = 1;
6197
+ _context16.next = 1;
6038
6198
  return _this31.waitForRemoteSDPAnswer();
6039
6199
  case 1:
6040
- _context15.next = 2;
6200
+ _context16.next = 2;
6041
6201
  return _this31.waitForMediaConnectionConnected();
6042
6202
  case 2:
6043
6203
  case "end":
6044
- return _context15.stop();
6204
+ return _context16.stop();
6045
6205
  }
6046
- }, _callee15);
6206
+ }, _callee16);
6047
6207
  }))).then(function () {
6048
6208
  _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
6049
6209
  }).catch(function (error) {
@@ -6083,8 +6243,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6083
6243
  }, {
6084
6244
  key: "isReactionsSupported",
6085
6245
  value: function isReactionsSupported() {
6086
- var _this$locusInfo5, _this$locusInfo5$cont;
6087
- if ((_this$locusInfo5 = this.locusInfo) !== null && _this$locusInfo5 !== void 0 && (_this$locusInfo5$cont = _this$locusInfo5.controls) !== null && _this$locusInfo5$cont !== void 0 && _this$locusInfo5$cont.reactions.enabled) {
6246
+ var _this$locusInfo6, _this$locusInfo6$cont;
6247
+ if ((_this$locusInfo6 = this.locusInfo) !== null && _this$locusInfo6 !== void 0 && (_this$locusInfo6$cont = _this$locusInfo6.controls) !== null && _this$locusInfo6$cont !== void 0 && _this$locusInfo6$cont.reactions.enabled) {
6088
6248
  return true;
6089
6249
  }
6090
6250
  _loggerProxy.default.logger.error('Meeting:index#isReactionsSupported --> Reactions is not supported');
@@ -6184,49 +6344,49 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6184
6344
  }, {
6185
6345
  key: "startTranscription",
6186
6346
  value: (function () {
6187
- var _startTranscription = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16(options) {
6188
- var _t1;
6189
- return _regenerator.default.wrap(function (_context16) {
6190
- while (1) switch (_context16.prev = _context16.next) {
6347
+ var _startTranscription = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17(options) {
6348
+ var _t10;
6349
+ return _regenerator.default.wrap(function (_context17) {
6350
+ while (1) switch (_context17.prev = _context17.next) {
6191
6351
  case 0:
6192
6352
  if (!this.isJoined()) {
6193
- _context16.next = 5;
6353
+ _context17.next = 5;
6194
6354
  break;
6195
6355
  }
6196
6356
  _loggerProxy.default.logger.info('Meeting:index#startTranscription --> Attempting to enable transcription!');
6197
- _context16.prev = 1;
6357
+ _context17.prev = 1;
6198
6358
  if (!this.areVoiceaEventsSetup) {
6199
6359
  this.setUpVoiceaListeners();
6200
6360
  }
6201
6361
 
6202
6362
  // @ts-ignore
6203
- _context16.next = 2;
6363
+ _context17.next = 2;
6204
6364
  return this.webex.internal.voicea.turnOnCaptions(options === null || options === void 0 ? void 0 : options.spokenLanguage);
6205
6365
  case 2:
6206
- _context16.next = 4;
6366
+ _context17.next = 4;
6207
6367
  break;
6208
6368
  case 3:
6209
- _context16.prev = 3;
6210
- _t1 = _context16["catch"](1);
6211
- _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_t1));
6369
+ _context17.prev = 3;
6370
+ _t10 = _context17["catch"](1);
6371
+ _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_t10));
6212
6372
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
6213
6373
  correlation_id: this.correlationId,
6214
- reason: _t1.message,
6215
- stack: _t1.stack
6374
+ reason: _t10.message,
6375
+ stack: _t10.stack
6216
6376
  });
6217
6377
  case 4:
6218
- _context16.next = 6;
6378
+ _context17.next = 6;
6219
6379
  break;
6220
6380
  case 5:
6221
6381
  _loggerProxy.default.logger.error("Meeting:index#startTranscription --> meeting joined : ".concat(this.isJoined()));
6222
6382
  throw new Error('Meeting is not joined');
6223
6383
  case 6:
6224
6384
  case "end":
6225
- return _context16.stop();
6385
+ return _context17.stop();
6226
6386
  }
6227
- }, _callee16, this, [[1, 3]]);
6387
+ }, _callee17, this, [[1, 3]]);
6228
6388
  }));
6229
- function startTranscription(_x14) {
6389
+ function startTranscription(_x13) {
6230
6390
  return _startTranscription.apply(this, arguments);
6231
6391
  }
6232
6392
  return startTranscription;
@@ -6239,24 +6399,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6239
6399
  * @returns {void}
6240
6400
  */
6241
6401
  function stopTranscription() {
6242
- if (this.transcription) {
6243
- // @ts-ignore
6244
- this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT]);
6402
+ // @ts-ignore
6403
+ this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.VOICEA_ANNOUNCEMENT]);
6245
6404
 
6246
- // @ts-ignore
6247
- this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON]);
6405
+ // @ts-ignore
6406
+ this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.CAPTIONS_TURNED_ON]);
6248
6407
 
6249
- // @ts-ignore
6250
- this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND]);
6408
+ // @ts-ignore
6409
+ this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.EVA_COMMAND]);
6251
6410
 
6252
- // @ts-ignore
6253
- this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
6411
+ // @ts-ignore
6412
+ this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
6254
6413
 
6255
- // @ts-ignore
6256
- this.webex.internal.voicea.deregisterEvents();
6257
- this.areVoiceaEventsSetup = false;
6258
- this.triggerStopReceivingTranscriptionEvent();
6259
- }
6414
+ // @ts-ignore
6415
+ this.webex.internal.voicea.deregisterEvents();
6416
+ this.areVoiceaEventsSetup = false;
6417
+ this.triggerStopReceivingTranscriptionEvent();
6260
6418
  }
6261
6419
 
6262
6420
  /**
@@ -6274,6 +6432,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6274
6432
  function: 'triggerStopReceivingTranscriptionEvent'
6275
6433
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_RECEIVING_TRANSCRIPTION);
6276
6434
  }
6435
+
6436
+ /**
6437
+ * Restores LLM subchannel subscriptions after reconnect when captions are active.
6438
+ * @returns {void}
6439
+ */
6440
+ }, {
6441
+ key: "restoreLLMSubscriptionsIfNeeded",
6442
+ value: function restoreLLMSubscriptionsIfNeeded() {
6443
+ try {
6444
+ var _this$webex$internal$, _this$webex$internal$2;
6445
+ // @ts-ignore
6446
+ var isCaptionBoxOn = (_this$webex$internal$ = this.webex.internal.voicea) === null || _this$webex$internal$ === void 0 ? void 0 : (_this$webex$internal$2 = _this$webex$internal$.getIsCaptionBoxOn) === null || _this$webex$internal$2 === void 0 ? void 0 : _this$webex$internal$2.call(_this$webex$internal$);
6447
+ if (!isCaptionBoxOn) {
6448
+ return;
6449
+ }
6450
+
6451
+ // @ts-ignore
6452
+ this.webex.internal.voicea.updateSubchannelSubscriptions({
6453
+ subscribe: ['transcription']
6454
+ });
6455
+ } catch (error) {
6456
+ var msg = (error === null || error === void 0 ? void 0 : error.message) || String(error);
6457
+ _loggerProxy.default.logger.warn("Meeting:index#restoreLLMSubscriptionsIfNeeded --> failed to restore subscriptions after LLM online: ".concat(msg));
6458
+ }
6459
+ }
6277
6460
  }, {
6278
6461
  key: "join",
6279
6462
  value: (
@@ -6290,7 +6473,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6290
6473
  * Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId)
6291
6474
  */
6292
6475
  function () {
6293
- var _join = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
6476
+ var _join = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
6294
6477
  var _this34 = this;
6295
6478
  var options,
6296
6479
  errorMessage,
@@ -6301,26 +6484,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6301
6484
  _error4,
6302
6485
  _errorMessage3,
6303
6486
  _error5,
6304
- _args17 = arguments,
6305
- _t10;
6306
- return _regenerator.default.wrap(function (_context17) {
6307
- while (1) switch (_context17.prev = _context17.next) {
6487
+ _args18 = arguments,
6488
+ _t11;
6489
+ return _regenerator.default.wrap(function (_context18) {
6490
+ while (1) switch (_context18.prev = _context18.next) {
6308
6491
  case 0:
6309
- options = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
6492
+ options = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
6310
6493
  if (this.webex.meetings.registered) {
6311
- _context17.next = 1;
6494
+ _context18.next = 1;
6312
6495
  break;
6313
6496
  }
6314
6497
  errorMessage = 'Meeting:index#join --> Device not registered';
6315
6498
  error = new Error(errorMessage);
6316
6499
  _loggerProxy.default.logger.error(errorMessage);
6317
- return _context17.abrupt("return", _promise.default.reject(error));
6500
+ return _context18.abrupt("return", _promise.default.reject(error));
6318
6501
  case 1:
6319
6502
  if (!this.deferJoin) {
6320
- _context17.next = 2;
6503
+ _context18.next = 2;
6321
6504
  break;
6322
6505
  }
6323
- return _context17.abrupt("return", this.deferJoin);
6506
+ return _context18.abrupt("return", this.deferJoin);
6324
6507
  case 2:
6325
6508
  // Create a deferred promise for a consistent resolve value from utils.
6326
6509
  // This also prevents redundant API calls.
@@ -6372,15 +6555,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6372
6555
  this.wirelessShare = true;
6373
6556
  }
6374
6557
  if (!options.meetingQuality) {
6375
- _context17.next = 6;
6558
+ _context18.next = 6;
6376
6559
  break;
6377
6560
  }
6378
6561
  if (!(typeof options.meetingQuality === 'string')) {
6379
- _context17.next = 4;
6562
+ _context18.next = 4;
6380
6563
  break;
6381
6564
  }
6382
6565
  if (_constants.QUALITY_LEVELS[options.meetingQuality]) {
6383
- _context17.next = 3;
6566
+ _context18.next = 3;
6384
6567
  break;
6385
6568
  }
6386
6569
  _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
@@ -6388,16 +6571,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6388
6571
  _loggerProxy.default.logger.error(_errorMessage2);
6389
6572
  joinFailed(_error4);
6390
6573
  this.deferJoin = undefined;
6391
- return _context17.abrupt("return", _promise.default.reject(_error4));
6574
+ return _context18.abrupt("return", _promise.default.reject(_error4));
6392
6575
  case 3:
6393
6576
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
6394
6577
  case 4:
6395
6578
  if (!((0, _typeof2.default)(options.meetingQuality) === 'object')) {
6396
- _context17.next = 6;
6579
+ _context18.next = 6;
6397
6580
  break;
6398
6581
  }
6399
6582
  if (_constants.QUALITY_LEVELS[options.meetingQuality.remote]) {
6400
- _context17.next = 5;
6583
+ _context18.next = 5;
6401
6584
  break;
6402
6585
  }
6403
6586
  _errorMessage3 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
@@ -6405,42 +6588,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6405
6588
  _error5 = new Error(_errorMessage3);
6406
6589
  joinFailed(_error5);
6407
6590
  this.deferJoin = undefined;
6408
- return _context17.abrupt("return", _promise.default.reject(new Error(_errorMessage3)));
6591
+ return _context18.abrupt("return", _promise.default.reject(new Error(_errorMessage3)));
6409
6592
  case 5:
6410
6593
  if (options.meetingQuality.remote) {
6411
6594
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality.remote);
6412
6595
  }
6413
6596
  case 6:
6414
6597
  this.isMultistream = !!options.enableMultistream;
6415
- _context17.prev = 7;
6416
- _context17.next = 8;
6598
+ _context18.prev = 7;
6599
+ _context18.next = 8;
6417
6600
  return this.checkAndRefreshPermissionToken(_constants.MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC, _constants.MEETING_PERMISSION_TOKEN_REFRESH_REASON);
6418
6601
  case 8:
6419
- _context17.next = 10;
6602
+ _context18.next = 10;
6420
6603
  break;
6421
6604
  case 9:
6422
- _context17.prev = 9;
6423
- _t10 = _context17["catch"](7);
6424
- _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _t10);
6425
- if (!(_t10 instanceof _captchaError.default || _t10 instanceof _passwordError.default || _t10 instanceof _permission.default)) {
6426
- _context17.next = 10;
6605
+ _context18.prev = 9;
6606
+ _t11 = _context18["catch"](7);
6607
+ _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _t11);
6608
+ if (!(_t11 instanceof _captchaError.default || _t11 instanceof _passwordError.default || _t11 instanceof _permission.default)) {
6609
+ _context18.next = 10;
6427
6610
  break;
6428
6611
  }
6429
- this.meetingFiniteStateMachine.fail(_t10);
6612
+ this.meetingFiniteStateMachine.fail(_t11);
6430
6613
 
6431
6614
  // Upload logs on refreshpermissionToken refresh Failure
6432
6615
  _triggerProxy.default.trigger(this, {
6433
6616
  file: 'meeting/index',
6434
6617
  function: 'join'
6435
6618
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
6436
- joinFailed(_t10);
6619
+ joinFailed(_t11);
6437
6620
  this.deferJoin = undefined;
6438
6621
 
6439
6622
  // if refresh permission token requires captcha, password or permission, we are throwing the errors
6440
6623
  // and bubble it up to client
6441
- return _context17.abrupt("return", _promise.default.reject(_t10));
6624
+ return _context18.abrupt("return", _promise.default.reject(_t11));
6442
6625
  case 10:
6443
- return _context17.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
6626
+ return _context18.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
6444
6627
  _this34.meetingFiniteStateMachine.join();
6445
6628
  _this34.setupLocusMediaRequest();
6446
6629
 
@@ -6474,8 +6657,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6474
6657
  _this34.deferJoin = undefined;
6475
6658
  return _promise.default.reject(error);
6476
6659
  }).then(function (join) {
6660
+ _this34.saveDataChannelToken(join);
6477
6661
  // @ts-ignore - config coming from registerPlugin
6478
6662
  if (_this34.config.enableAutomaticLLM) {
6663
+ // @ts-ignore
6664
+ _this34.webex.internal.llm.off('online', _this34.handleLLMOnline);
6479
6665
  // @ts-ignore
6480
6666
  _this34.webex.internal.llm.on('online', _this34.handleLLMOnline);
6481
6667
  _this34.updateLLMConnection().catch(function (error) {
@@ -6493,9 +6679,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6493
6679
  }));
6494
6680
  case 11:
6495
6681
  case "end":
6496
- return _context17.stop();
6682
+ return _context18.stop();
6497
6683
  }
6498
- }, _callee17, this, [[7, 9]]);
6684
+ }, _callee18, this, [[7, 9]]);
6499
6685
  }));
6500
6686
  function join() {
6501
6687
  return _join.apply(this, arguments);
@@ -6544,28 +6730,126 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6544
6730
  this.llmHealthCheckTimer = undefined;
6545
6731
  }
6546
6732
  }
6733
+ }, {
6734
+ key: "clearDataChannelToken",
6735
+ value:
6736
+ /**
6737
+ * Clears all data channel tokens stored in LLM.
6738
+ * Called during meeting cleanup to ensure stale tokens are not reused.
6739
+ * @returns {void}
6740
+ */
6741
+ function clearDataChannelToken() {
6742
+ // @ts-ignore
6743
+ this.webex.internal.llm.resetDatachannelTokens();
6744
+ }
6745
+
6746
+ /**
6747
+ * Saves the data channel tokens from the join response into LLM so that
6748
+ * updateLLMConnection / updatePSDataChannel don't need to fetch them from locusInfo.
6749
+ * @param {Object} join - The parsed join response (from MeetingUtil.parseLocusJoin)
6750
+ * @returns {void}
6751
+ */
6752
+ }, {
6753
+ key: "saveDataChannelToken",
6754
+ value: function saveDataChannelToken(join) {
6755
+ var _join$locus, _join$locus$self, _join$locus2, _join$locus2$self;
6756
+ var datachannelToken = join === null || join === void 0 ? void 0 : (_join$locus = join.locus) === null || _join$locus === void 0 ? void 0 : (_join$locus$self = _join$locus.self) === null || _join$locus$self === void 0 ? void 0 : _join$locus$self.datachannelToken;
6757
+ var practiceSessionDatachannelToken = join === null || join === void 0 ? void 0 : (_join$locus2 = join.locus) === null || _join$locus2 === void 0 ? void 0 : (_join$locus2$self = _join$locus2.self) === null || _join$locus2$self === void 0 ? void 0 : _join$locus2$self.practiceSessionDatachannelToken;
6758
+ if (datachannelToken) {
6759
+ // @ts-ignore
6760
+ this.webex.internal.llm.setDatachannelToken(datachannelToken, _internalPluginLlm.DataChannelTokenType.Default);
6761
+ }
6762
+ if (practiceSessionDatachannelToken) {
6763
+ // @ts-ignore
6764
+ this.webex.internal.llm.setDatachannelToken(practiceSessionDatachannelToken, _internalPluginLlm.DataChannelTokenType.PracticeSession);
6765
+ }
6766
+ }
6547
6767
 
6768
+ /**
6769
+ * Ensures default-session data channel token exists after lobby admission.
6770
+ * Some lobby users do not receive a token until they are admitted.
6771
+ * @returns {Promise<boolean>} true when a new token is fetched and cached
6772
+ */
6773
+ }, {
6774
+ key: "ensureDefaultDatachannelTokenAfterAdmit",
6775
+ value: (function () {
6776
+ var _ensureDefaultDatachannelTokenAfterAdmit = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
6777
+ var _response$body, datachannelToken, isDataChannelTokenEnabled, response, fetchedDatachannelToken, msg, _t12;
6778
+ return _regenerator.default.wrap(function (_context19) {
6779
+ while (1) switch (_context19.prev = _context19.next) {
6780
+ case 0:
6781
+ _context19.prev = 0;
6782
+ // @ts-ignore
6783
+ datachannelToken = this.webex.internal.llm.getDatachannelToken(); // @ts-ignore
6784
+ _context19.next = 1;
6785
+ return this.webex.internal.llm.isDataChannelTokenEnabled();
6786
+ case 1:
6787
+ isDataChannelTokenEnabled = _context19.sent;
6788
+ if (!(!isDataChannelTokenEnabled || datachannelToken)) {
6789
+ _context19.next = 2;
6790
+ break;
6791
+ }
6792
+ return _context19.abrupt("return", false);
6793
+ case 2:
6794
+ _context19.next = 3;
6795
+ return this.meetingRequest.fetchDatachannelToken({
6796
+ locusUrl: this.locusUrl,
6797
+ requestingParticipantId: this.members.selfId,
6798
+ isPracticeSession: false
6799
+ });
6800
+ case 3:
6801
+ response = _context19.sent;
6802
+ fetchedDatachannelToken = response === null || response === void 0 ? void 0 : (_response$body = response.body) === null || _response$body === void 0 ? void 0 : _response$body.datachannelToken;
6803
+ if (fetchedDatachannelToken) {
6804
+ _context19.next = 4;
6805
+ break;
6806
+ }
6807
+ return _context19.abrupt("return", false);
6808
+ case 4:
6809
+ // @ts-ignore
6810
+ this.webex.internal.llm.setDatachannelToken(fetchedDatachannelToken, _internalPluginLlm.DataChannelTokenType.Default);
6811
+ return _context19.abrupt("return", true);
6812
+ case 5:
6813
+ _context19.prev = 5;
6814
+ _t12 = _context19["catch"](0);
6815
+ msg = (_t12 === null || _t12 === void 0 ? void 0 : _t12.message) || String(_t12);
6816
+ _loggerProxy.default.logger.warn("Meeting:index#ensureDefaultDatachannelTokenAfterAdmit --> failed to proactively fetch default data channel token after admit: ".concat(msg), {
6817
+ statusCode: _t12 === null || _t12 === void 0 ? void 0 : _t12.statusCode
6818
+ });
6819
+ return _context19.abrupt("return", false);
6820
+ case 6:
6821
+ case "end":
6822
+ return _context19.stop();
6823
+ }
6824
+ }, _callee19, this, [[0, 5]]);
6825
+ }));
6826
+ function ensureDefaultDatachannelTokenAfterAdmit() {
6827
+ return _ensureDefaultDatachannelTokenAfterAdmit.apply(this, arguments);
6828
+ }
6829
+ return ensureDefaultDatachannelTokenAfterAdmit;
6830
+ }()
6548
6831
  /**
6549
6832
  * Connects to low latency mercury and reconnects if the address has changed
6550
6833
  * It will also disconnect if called when the meeting has ended
6551
- * @param {String} datachannelUrl
6552
6834
  * @returns {Promise}
6553
6835
  */
6836
+ )
6554
6837
  }, {
6555
6838
  key: "updateLLMConnection",
6556
6839
  value: (function () {
6557
- var _updateLLMConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
6840
+ var _updateLLMConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
6558
6841
  var _this36 = this;
6559
- var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, practiceSessionDatachannelUrl, isJoined, dataChannelUrl;
6560
- return _regenerator.default.wrap(function (_context18) {
6561
- while (1) switch (_context18.prev = _context18.next) {
6842
+ var _ref39, _ref39$url, url, _ref39$info, _ref39$info2, _ref39$info2$datachan, datachannelUrl, isJoined, datachannelToken, dataChannelUrl;
6843
+ return _regenerator.default.wrap(function (_context20) {
6844
+ while (1) switch (_context20.prev = _context20.next) {
6562
6845
  case 0:
6563
6846
  // @ts-ignore - Fix type
6564
- _this$locusInfo6 = this.locusInfo, url = _this$locusInfo6.url, _this$locusInfo6$info = _this$locusInfo6.info, _this$locusInfo6$info2 = _this$locusInfo6$info === void 0 ? {} : _this$locusInfo6$info, datachannelUrl = _this$locusInfo6$info2.datachannelUrl, practiceSessionDatachannelUrl = _this$locusInfo6$info2.practiceSessionDatachannelUrl;
6565
- isJoined = this.isJoined(); // webinar panelist should use new data channel in practice session
6566
- dataChannelUrl = this.webinar.isJoinPracticeSessionDataChannel() && practiceSessionDatachannelUrl ? practiceSessionDatachannelUrl : datachannelUrl; // @ts-ignore - Fix type
6847
+ _ref39 = this.locusInfo || {}, _ref39$url = _ref39.url, url = _ref39$url === void 0 ? undefined : _ref39$url, _ref39$info = _ref39.info, _ref39$info2 = _ref39$info === void 0 ? {} : _ref39$info, _ref39$info2$datachan = _ref39$info2.datachannelUrl, datachannelUrl = _ref39$info2$datachan === void 0 ? undefined : _ref39$info2$datachan;
6848
+ isJoined = this.isJoined(); // @ts-ignore
6849
+ datachannelToken = this.webex.internal.llm.getDatachannelToken(_internalPluginLlm.DataChannelTokenType.Default);
6850
+ dataChannelUrl = datachannelUrl; // @ts-ignore - Fix type
6567
6851
  if (!this.webex.internal.llm.isConnected()) {
6568
- _context18.next = 3;
6852
+ _context20.next = 2;
6569
6853
  break;
6570
6854
  }
6571
6855
  if (!(
@@ -6573,30 +6857,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6573
6857
  url === this.webex.internal.llm.getLocusUrl() &&
6574
6858
  // @ts-ignore - Fix type
6575
6859
  dataChannelUrl === this.webex.internal.llm.getDatachannelUrl() && isJoined)) {
6576
- _context18.next = 1;
6860
+ _context20.next = 1;
6577
6861
  break;
6578
6862
  }
6579
- return _context18.abrupt("return", undefined);
6863
+ return _context20.abrupt("return", undefined);
6580
6864
  case 1:
6581
- _context18.next = 2;
6582
- return this.webex.internal.llm.disconnectLLM(isJoined ? {
6583
- code: 3050,
6584
- reason: 'done (permanent)'
6585
- } : undefined);
6865
+ _context20.next = 2;
6866
+ return this.cleanupLLMConneciton({
6867
+ removeOnlineListener: false
6868
+ });
6586
6869
  case 2:
6587
- // @ts-ignore - Fix type
6588
- this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
6589
- // @ts-ignore - Fix type
6590
- this.webex.internal.llm.off(_constants.LOCUS_LLM_EVENT, this.processLocusLLMEvent);
6591
- this.clearLLMHealthCheckTimer();
6592
- case 3:
6593
6870
  if (isJoined) {
6594
- _context18.next = 4;
6871
+ _context20.next = 3;
6595
6872
  break;
6596
6873
  }
6597
- return _context18.abrupt("return", undefined);
6598
- case 4:
6599
- return _context18.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl).then(function (registerAndConnectResult) {
6874
+ return _context20.abrupt("return", undefined);
6875
+ case 3:
6876
+ return _context20.abrupt("return", this.webex.internal.llm.registerAndConnect(url, dataChannelUrl, datachannelToken).then(function (registerAndConnectResult) {
6600
6877
  // @ts-ignore - Fix type
6601
6878
  _this36.webex.internal.llm.off('event:relay.event', _this36.processRelayEvent);
6602
6879
  // @ts-ignore - Fix type
@@ -6609,11 +6886,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6609
6886
  _this36.startLLMHealthCheckTimer();
6610
6887
  return _promise.default.resolve(registerAndConnectResult);
6611
6888
  }));
6612
- case 5:
6889
+ case 4:
6613
6890
  case "end":
6614
- return _context18.stop();
6891
+ return _context20.stop();
6615
6892
  }
6616
- }, _callee18, this);
6893
+ }, _callee20, this);
6617
6894
  }));
6618
6895
  function updateLLMConnection() {
6619
6896
  return _updateLLMConnection.apply(this, arguments);
@@ -6799,17 +7076,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6799
7076
  meetingId: this.id
6800
7077
  }
6801
7078
  });
6802
- this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
6803
- var mediaSettings, _t11;
6804
- return _regenerator.default.wrap(function (_context19) {
6805
- while (1) switch (_context19.prev = _context19.next) {
7079
+ this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
7080
+ var mediaSettings, _t13;
7081
+ return _regenerator.default.wrap(function (_context21) {
7082
+ while (1) switch (_context21.prev = _context21.next) {
6806
7083
  case 0:
6807
- _context19.prev = 0;
7084
+ _context21.prev = 0;
6808
7085
  if (!(_this40.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
6809
- _context19.next = 1;
7086
+ _context21.next = 1;
6810
7087
  break;
6811
7088
  }
6812
- _context19.next = 1;
7089
+ _context21.next = 1;
6813
7090
  return _this40.releaseScreenShareFloor();
6814
7091
  case 1:
6815
7092
  mediaSettings = {
@@ -6828,23 +7105,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6828
7105
  // 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
6829
7106
  // once the device answers we close the old connection and create new media server connection with only share enabled
6830
7107
  if (!_this40.statsAnalyzer) {
6831
- _context19.next = 2;
7108
+ _context21.next = 2;
6832
7109
  break;
6833
7110
  }
6834
- _context19.next = 2;
7111
+ _context21.next = 2;
6835
7112
  return _this40.statsAnalyzer.stopAnalyzer();
6836
7113
  case 2:
6837
- _context19.next = 3;
7114
+ _context21.next = 3;
6838
7115
  return _this40.closeRemoteStreams();
6839
7116
  case 3:
6840
- _context19.next = 4;
7117
+ _context21.next = 4;
6841
7118
  return _this40.closePeerConnections();
6842
7119
  case 4:
6843
7120
  _this40.cleanupLocalStreams();
6844
7121
  _this40.unsetRemoteStreams();
6845
7122
  _this40.unsetPeerConnections();
6846
7123
  _this40.reconnectionManager.cleanUp();
6847
- _context19.next = 5;
7124
+ _context21.next = 5;
6848
7125
  return _this40.addMedia({
6849
7126
  audioEnabled: false,
6850
7127
  videoEnabled: false,
@@ -6853,24 +7130,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6853
7130
  case 5:
6854
7131
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
6855
7132
  _this40.isMoveToInProgress = false;
6856
- _context19.next = 7;
7133
+ _context21.next = 7;
6857
7134
  break;
6858
7135
  case 6:
6859
- _context19.prev = 6;
6860
- _t11 = _context19["catch"](0);
6861
- _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _t11);
7136
+ _context21.prev = 6;
7137
+ _t13 = _context21["catch"](0);
7138
+ _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _t13);
6862
7139
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
6863
7140
  correlation_id: _this40.correlationId,
6864
7141
  locus_id: _this40.locusUrl.split('/').pop(),
6865
- reason: _t11.message,
6866
- stack: _t11.stack
7142
+ reason: _t13.message,
7143
+ stack: _t13.stack
6867
7144
  });
6868
7145
  _this40.isMoveToInProgress = false;
6869
7146
  case 7:
6870
7147
  case "end":
6871
- return _context19.stop();
7148
+ return _context21.stop();
6872
7149
  }
6873
- }, _callee19, null, [[0, 6]]);
7150
+ }, _callee21, null, [[0, 6]]);
6874
7151
  })));
6875
7152
  _loggerProxy.default.logger.info('Meeting:index#moveTo --> Initated moved to using resourceId', resourceId);
6876
7153
 
@@ -6958,10 +7235,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6958
7235
  }, {
6959
7236
  key: "createMediaConnection",
6960
7237
  value: (function () {
6961
- var _createMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20(turnServerInfo, bundlePolicy) {
7238
+ var _createMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22(turnServerInfo, bundlePolicy) {
6962
7239
  var mc, audioEnabled, videoEnabled, shareEnabled;
6963
- return _regenerator.default.wrap(function (_context20) {
6964
- while (1) switch (_context20.prev = _context20.next) {
7240
+ return _regenerator.default.wrap(function (_context22) {
7241
+ while (1) switch (_context22.prev = _context22.next) {
6965
7242
  case 0:
6966
7243
  this.rtcMetrics = this.isMultistream ?
6967
7244
  // @ts-ignore
@@ -7003,42 +7280,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7003
7280
 
7004
7281
  // publish the streams
7005
7282
  if (!this.mediaProperties.audioStream) {
7006
- _context20.next = 1;
7283
+ _context22.next = 1;
7007
7284
  break;
7008
7285
  }
7009
7286
  this.setSendNamedMediaGroup(_internalMediaCore.MediaType.AudioMain);
7010
- _context20.next = 1;
7287
+ _context22.next = 1;
7011
7288
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
7012
7289
  case 1:
7013
7290
  if (!this.mediaProperties.videoStream) {
7014
- _context20.next = 2;
7291
+ _context22.next = 2;
7015
7292
  break;
7016
7293
  }
7017
- _context20.next = 2;
7294
+ _context22.next = 2;
7018
7295
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
7019
7296
  case 2:
7020
7297
  if (!this.mediaProperties.shareVideoStream) {
7021
- _context20.next = 3;
7298
+ _context22.next = 3;
7022
7299
  break;
7023
7300
  }
7024
- _context20.next = 3;
7301
+ _context22.next = 3;
7025
7302
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
7026
7303
  case 3:
7027
7304
  if (!(this.isMultistream && this.mediaProperties.shareAudioStream)) {
7028
- _context20.next = 4;
7305
+ _context22.next = 4;
7029
7306
  break;
7030
7307
  }
7031
- _context20.next = 4;
7308
+ _context22.next = 4;
7032
7309
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
7033
7310
  case 4:
7034
- return _context20.abrupt("return", mc);
7311
+ return _context22.abrupt("return", mc);
7035
7312
  case 5:
7036
7313
  case "end":
7037
- return _context20.stop();
7314
+ return _context22.stop();
7038
7315
  }
7039
- }, _callee20, this);
7316
+ }, _callee22, this);
7040
7317
  }));
7041
- function createMediaConnection(_x15, _x16) {
7318
+ function createMediaConnection(_x14, _x15) {
7042
7319
  return _createMediaConnection.apply(this, arguments);
7043
7320
  }
7044
7321
  return createMediaConnection;
@@ -7076,11 +7353,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7076
7353
  }, {
7077
7354
  key: "setUpLocalStreamReferences",
7078
7355
  value: (function () {
7079
- var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21(localStreams) {
7356
+ var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23(localStreams) {
7080
7357
  var _localStreams$microph, _localStreams$camera, _localStreams$screenS, _localStreams$screenS2, _localStreams$screenS3, _localStreams$screenS4, _localStreams$screenS5, _localStreams$screenS6;
7081
- var setUpStreamPromises, _t12;
7082
- return _regenerator.default.wrap(function (_context21) {
7083
- while (1) switch (_context21.prev = _context21.next) {
7358
+ var setUpStreamPromises, _t14;
7359
+ return _regenerator.default.wrap(function (_context23) {
7360
+ while (1) switch (_context23.prev = _context23.next) {
7084
7361
  case 0:
7085
7362
  setUpStreamPromises = [];
7086
7363
  if (localStreams !== null && localStreams !== void 0 && localStreams.microphone && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$microph = localStreams.microphone) === null || _localStreams$microph === void 0 ? void 0 : _localStreams$microph.readyState) !== 'ended') {
@@ -7095,24 +7372,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7095
7372
  if (localStreams !== null && localStreams !== void 0 && (_localStreams$screenS4 = localStreams.screenShare) !== null && _localStreams$screenS4 !== void 0 && _localStreams$screenS4.audio && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$screenS5 = localStreams.screenShare) === null || _localStreams$screenS5 === void 0 ? void 0 : (_localStreams$screenS6 = _localStreams$screenS5.audio) === null || _localStreams$screenS6 === void 0 ? void 0 : _localStreams$screenS6.readyState) !== 'ended') {
7096
7373
  setUpStreamPromises.push(this.setLocalShareAudioStream(localStreams.screenShare.audio));
7097
7374
  }
7098
- _context21.prev = 1;
7099
- _context21.next = 2;
7375
+ _context23.prev = 1;
7376
+ _context23.next = 2;
7100
7377
  return _promise.default.all(setUpStreamPromises);
7101
7378
  case 2:
7102
- _context21.next = 4;
7379
+ _context23.next = 4;
7103
7380
  break;
7104
7381
  case 3:
7105
- _context21.prev = 3;
7106
- _t12 = _context21["catch"](1);
7107
- _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _t12);
7108
- throw _t12;
7382
+ _context23.prev = 3;
7383
+ _t14 = _context23["catch"](1);
7384
+ _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _t14);
7385
+ throw _t14;
7109
7386
  case 4:
7110
7387
  case "end":
7111
- return _context21.stop();
7388
+ return _context23.stop();
7112
7389
  }
7113
- }, _callee21, this, [[1, 3]]);
7390
+ }, _callee23, this, [[1, 3]]);
7114
7391
  }));
7115
- function setUpLocalStreamReferences(_x17) {
7392
+ function setUpLocalStreamReferences(_x16) {
7116
7393
  return _setUpLocalStreamReferences.apply(this, arguments);
7117
7394
  }
7118
7395
  return setUpLocalStreamReferences;
@@ -7127,72 +7404,72 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7127
7404
  }, {
7128
7405
  key: "waitForMediaConnectionConnected",
7129
7406
  value: (function () {
7130
- var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
7131
- var iceConnected, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties0, _this$mediaProperties1, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, timedOutError, _t13, _t14, _t15, _t16, _t17, _t18, _t19, _t20, _t21, _t22, _t23, _t24, _t25, _t26, _t27;
7132
- return _regenerator.default.wrap(function (_context22) {
7133
- while (1) switch (_context22.prev = _context22.next) {
7407
+ var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24() {
7408
+ var iceConnected, _this$mediaProperties9, _this$mediaProperties0, _this$mediaProperties1, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, timedOutError, _t15, _t16, _t17, _t18, _t19, _t20, _t21, _t22, _t23, _t24, _t25, _t26, _t27, _t28, _t29;
7409
+ return _regenerator.default.wrap(function (_context24) {
7410
+ while (1) switch (_context24.prev = _context24.next) {
7134
7411
  case 0:
7135
- _context22.prev = 0;
7136
- _context22.next = 1;
7137
- return this.mediaProperties.waitForMediaConnectionConnected();
7412
+ _context24.prev = 0;
7413
+ _context24.next = 1;
7414
+ return this.mediaProperties.waitForMediaConnectionConnected(this.correlationId);
7138
7415
  case 1:
7139
- _context22.next = 5;
7416
+ _context24.next = 5;
7140
7417
  break;
7141
7418
  case 2:
7142
- _context22.prev = 2;
7143
- _t13 = _context22["catch"](0);
7144
- iceConnected = _t13.iceConnected;
7419
+ _context24.prev = 2;
7420
+ _t15 = _context24["catch"](0);
7421
+ iceConnected = _t15.iceConnected;
7145
7422
  if (this.hasMediaConnectionConnectedAtLeastOnce) {
7146
- _context22.next = 4;
7423
+ _context24.next = 4;
7147
7424
  break;
7148
7425
  }
7149
- _t14 = this.webex.internal.newMetrics;
7150
- _t15 = !this.turnServerUsed;
7151
- _t16 = this.addMediaData.icePhaseCallback();
7152
- _t17 = this.webex.internal.newMetrics.callDiagnosticMetrics;
7153
- _t18 = _internalPluginMetrics.CallDiagnosticUtils;
7154
- _t19 = ((_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$mediaProperties0 = _this$mediaProperties9.pc) === null || _this$mediaProperties0 === void 0 ? void 0 : (_this$mediaProperties1 = _this$mediaProperties0.pc) === null || _this$mediaProperties1 === void 0 ? void 0 : _this$mediaProperties1.signalingState) || ((_this$mediaProperties10 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties10 === void 0 ? void 0 : (_this$mediaProperties11 = _this$mediaProperties10.mediaConnection) === null || _this$mediaProperties11 === void 0 ? void 0 : (_this$mediaProperties12 = _this$mediaProperties11.pc) === null || _this$mediaProperties12 === void 0 ? void 0 : _this$mediaProperties12.signalingState) || 'unknown';
7155
- _t20 = iceConnected;
7156
- _t21 = this.turnServerUsed;
7157
- _context22.next = 3;
7426
+ _t16 = this.webex.internal.newMetrics;
7427
+ _t17 = !this.turnServerUsed;
7428
+ _t18 = this.addMediaData.icePhaseCallback();
7429
+ _t19 = this.webex.internal.newMetrics.callDiagnosticMetrics;
7430
+ _t20 = _internalPluginMetrics.CallDiagnosticUtils;
7431
+ _t21 = ((_this$mediaProperties9 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties9 === void 0 ? void 0 : (_this$mediaProperties0 = _this$mediaProperties9.multistreamConnection) === null || _this$mediaProperties0 === void 0 ? void 0 : (_this$mediaProperties1 = _this$mediaProperties0.pc) === null || _this$mediaProperties1 === void 0 ? void 0 : (_this$mediaProperties10 = _this$mediaProperties1.pc) === null || _this$mediaProperties10 === void 0 ? void 0 : _this$mediaProperties10.signalingState) || ((_this$mediaProperties11 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties11 === void 0 ? void 0 : (_this$mediaProperties12 = _this$mediaProperties11.mediaConnection) === null || _this$mediaProperties12 === void 0 ? void 0 : (_this$mediaProperties13 = _this$mediaProperties12.pc) === null || _this$mediaProperties13 === void 0 ? void 0 : _this$mediaProperties13.signalingState) || 'unknown';
7432
+ _t22 = iceConnected;
7433
+ _t23 = this.turnServerUsed;
7434
+ _context24.next = 3;
7158
7435
  return this.webex.meetings.reachability.isWebexMediaBackendUnreachable().catch(function () {
7159
7436
  return false;
7160
7437
  });
7161
7438
  case 3:
7162
- _t22 = _context22.sent;
7163
- _t23 = _t18.generateClientErrorCodeForIceFailure.call(_t18, {
7164
- signalingState: _t19,
7165
- iceConnected: _t20,
7166
- turnServerUsed: _t21,
7167
- unreachable: _t22
7439
+ _t24 = _context24.sent;
7440
+ _t25 = _t20.generateClientErrorCodeForIceFailure.call(_t20, {
7441
+ signalingState: _t21,
7442
+ iceConnected: _t22,
7443
+ turnServerUsed: _t23,
7444
+ unreachable: _t24
7168
7445
  });
7169
- _t24 = _t17.getErrorPayloadForClientErrorCode.call(_t17, {
7170
- clientErrorCode: _t23
7446
+ _t26 = _t19.getErrorPayloadForClientErrorCode.call(_t19, {
7447
+ clientErrorCode: _t25
7171
7448
  });
7172
- _t25 = [_t24];
7173
- _t26 = {
7174
- canProceed: _t15,
7175
- icePhase: _t16,
7176
- errors: _t25
7449
+ _t27 = [_t26];
7450
+ _t28 = {
7451
+ canProceed: _t17,
7452
+ icePhase: _t18,
7453
+ errors: _t27
7177
7454
  };
7178
- _t27 = {
7455
+ _t29 = {
7179
7456
  meetingId: this.id,
7180
- rawError: _t13
7457
+ rawError: _t15
7181
7458
  };
7182
- _t14.submitClientEvent.call(_t14, {
7459
+ _t16.submitClientEvent.call(_t16, {
7183
7460
  name: 'client.ice.end',
7184
- payload: _t26,
7185
- options: _t27
7461
+ payload: _t28,
7462
+ options: _t29
7186
7463
  });
7187
7464
  case 4:
7188
7465
  timedOutError = new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
7189
- timedOutError.cause = _t13;
7466
+ timedOutError.cause = _t15;
7190
7467
  throw timedOutError;
7191
7468
  case 5:
7192
7469
  case "end":
7193
- return _context22.stop();
7470
+ return _context24.stop();
7194
7471
  }
7195
- }, _callee22, this, [[0, 2]]);
7472
+ }, _callee24, this, [[0, 2]]);
7196
7473
  }));
7197
7474
  function waitForMediaConnectionConnected() {
7198
7475
  return _waitForMediaConnectionConnected.apply(this, arguments);
@@ -7259,19 +7536,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7259
7536
  }, {
7260
7537
  key: "waitForRemoteSDPAnswer",
7261
7538
  value: (function () {
7262
- var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23() {
7539
+ var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25() {
7263
7540
  var _this44 = this;
7264
7541
  var LOG_HEADER, deferSDPAnswer;
7265
- return _regenerator.default.wrap(function (_context23) {
7266
- while (1) switch (_context23.prev = _context23.next) {
7542
+ return _regenerator.default.wrap(function (_context25) {
7543
+ while (1) switch (_context25.prev = _context25.next) {
7267
7544
  case 0:
7268
7545
  LOG_HEADER = 'Meeting:index#addMedia():waitForRemoteSDPAnswer -->';
7269
7546
  if (this.deferSDPAnswer) {
7270
- _context23.next = 1;
7547
+ _context25.next = 1;
7271
7548
  break;
7272
7549
  }
7273
7550
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " offer not created yet"));
7274
- return _context23.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
7551
+ return _context25.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
7275
7552
  case 1:
7276
7553
  deferSDPAnswer = this.deferSDPAnswer;
7277
7554
  this.sdpResponseTimer = setTimeout(function () {
@@ -7297,12 +7574,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7297
7574
  deferSDPAnswer.reject(error);
7298
7575
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
7299
7576
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
7300
- return _context23.abrupt("return", deferSDPAnswer.promise);
7577
+ return _context25.abrupt("return", deferSDPAnswer.promise);
7301
7578
  case 2:
7302
7579
  case "end":
7303
- return _context23.stop();
7580
+ return _context25.stop();
7304
7581
  }
7305
- }, _callee23, this);
7582
+ }, _callee25, this);
7306
7583
  }));
7307
7584
  function waitForRemoteSDPAnswer() {
7308
7585
  return _waitForRemoteSDPAnswer.apply(this, arguments);
@@ -7321,30 +7598,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7321
7598
  }, {
7322
7599
  key: "retryEstablishMediaConnectionWithForcedTurnDiscovery",
7323
7600
  value: (function () {
7324
- var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24(remoteMediaManagerConfig, bundlePolicy) {
7325
- var LOG_HEADER, _t28;
7326
- return _regenerator.default.wrap(function (_context24) {
7327
- while (1) switch (_context24.prev = _context24.next) {
7601
+ var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26(remoteMediaManagerConfig, bundlePolicy) {
7602
+ var LOG_HEADER, _t30;
7603
+ return _regenerator.default.wrap(function (_context26) {
7604
+ while (1) switch (_context26.prev = _context26.next) {
7328
7605
  case 0:
7329
7606
  LOG_HEADER = 'Meeting:index#addMedia():retryEstablishMediaConnectionWithForcedTurnDiscovery -->';
7330
- _context24.prev = 1;
7331
- _context24.next = 2;
7607
+ _context26.prev = 1;
7608
+ _context26.next = 2;
7332
7609
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
7333
7610
  case 2:
7334
- _context24.next = 4;
7611
+ _context26.next = 4;
7335
7612
  break;
7336
7613
  case 3:
7337
- _context24.prev = 3;
7338
- _t28 = _context24["catch"](1);
7339
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _t28);
7340
- throw _t28;
7614
+ _context26.prev = 3;
7615
+ _t30 = _context26["catch"](1);
7616
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _t30);
7617
+ throw _t30;
7341
7618
  case 4:
7342
7619
  case "end":
7343
- return _context24.stop();
7620
+ return _context26.stop();
7344
7621
  }
7345
- }, _callee24, this, [[1, 3]]);
7622
+ }, _callee26, this, [[1, 3]]);
7346
7623
  }));
7347
- function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x18, _x19) {
7624
+ function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x17, _x18) {
7348
7625
  return _retryEstablishMediaConnectionWithForcedTurnDiscovery.apply(this, arguments);
7349
7626
  }
7350
7627
  return retryEstablishMediaConnectionWithForcedTurnDiscovery;
@@ -7362,14 +7639,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7362
7639
  }, {
7363
7640
  key: "retryWithForcedTurnDiscovery",
7364
7641
  value: (function () {
7365
- var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25(remoteMediaManagerConfig, bundlePolicy) {
7642
+ var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27(remoteMediaManagerConfig, bundlePolicy) {
7366
7643
  var LOG_HEADER;
7367
- return _regenerator.default.wrap(function (_context25) {
7368
- while (1) switch (_context25.prev = _context25.next) {
7644
+ return _regenerator.default.wrap(function (_context27) {
7645
+ while (1) switch (_context27.prev = _context27.next) {
7369
7646
  case 0:
7370
7647
  this.addMediaData.retriedWithTurnServer = true;
7371
7648
  LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
7372
- _context25.next = 1;
7649
+ _context27.next = 1;
7373
7650
  return this.cleanUpBeforeRetryWithTurnServer();
7374
7651
  case 1:
7375
7652
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_RETRY, {
@@ -7379,24 +7656,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7379
7656
  reason: 'forcingTurnTls'
7380
7657
  });
7381
7658
  if (!(this.state === _constants.MEETING_STATE.STATES.LEFT)) {
7382
- _context25.next = 2;
7659
+ _context27.next = 2;
7383
7660
  break;
7384
7661
  }
7385
7662
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. "));
7386
- _context25.next = 2;
7663
+ _context27.next = 2;
7387
7664
  return this.join({
7388
7665
  rejoin: true
7389
7666
  });
7390
7667
  case 2:
7391
- _context25.next = 3;
7668
+ _context27.next = 3;
7392
7669
  return this.retryEstablishMediaConnectionWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
7393
7670
  case 3:
7394
7671
  case "end":
7395
- return _context25.stop();
7672
+ return _context27.stop();
7396
7673
  }
7397
- }, _callee25, this);
7674
+ }, _callee27, this);
7398
7675
  }));
7399
- function retryWithForcedTurnDiscovery(_x20, _x21) {
7676
+ function retryWithForcedTurnDiscovery(_x19, _x20) {
7400
7677
  return _retryWithForcedTurnDiscovery.apply(this, arguments);
7401
7678
  }
7402
7679
  return retryWithForcedTurnDiscovery;
@@ -7416,32 +7693,32 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7416
7693
  }, {
7417
7694
  key: "handleWaitForMediaConnectionConnectedError",
7418
7695
  value: (function () {
7419
- var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26(error, remoteMediaManagerConfig, bundlePolicy) {
7696
+ var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28(error, remoteMediaManagerConfig, bundlePolicy) {
7420
7697
  var LOG_HEADER;
7421
- return _regenerator.default.wrap(function (_context26) {
7422
- while (1) switch (_context26.prev = _context26.next) {
7698
+ return _regenerator.default.wrap(function (_context28) {
7699
+ while (1) switch (_context28.prev = _context28.next) {
7423
7700
  case 0:
7424
7701
  LOG_HEADER = 'Meeting:index#addMedia():handleWaitForMediaConnectionConnectedError -->'; // @ts-ignore - config coming from registerPlugin
7425
7702
  if (this.turnServerUsed) {
7426
- _context26.next = 2;
7703
+ _context28.next = 2;
7427
7704
  break;
7428
7705
  }
7429
7706
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " error waiting for media to connect on UDP, TCP, retrying using TURN-TLS, "), error);
7430
- _context26.next = 1;
7707
+ _context28.next = 1;
7431
7708
  return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
7432
7709
  case 1:
7433
- _context26.next = 3;
7710
+ _context28.next = 3;
7434
7711
  break;
7435
7712
  case 2:
7436
7713
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
7437
7714
  throw new _webexErrors.AddMediaFailed(error);
7438
7715
  case 3:
7439
7716
  case "end":
7440
- return _context26.stop();
7717
+ return _context28.stop();
7441
7718
  }
7442
- }, _callee26, this);
7719
+ }, _callee28, this);
7443
7720
  }));
7444
- function handleWaitForMediaConnectionConnectedError(_x22, _x23, _x24) {
7721
+ function handleWaitForMediaConnectionConnectedError(_x21, _x22, _x23) {
7445
7722
  return _handleWaitForMediaConnectionConnectedError.apply(this, arguments);
7446
7723
  }
7447
7724
  return handleWaitForMediaConnectionConnectedError;
@@ -7457,20 +7734,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7457
7734
  }, {
7458
7735
  key: "doTurnDiscovery",
7459
7736
  value: (function () {
7460
- var _doTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27(isReconnecting, isForced) {
7737
+ var _doTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29(isReconnecting, isForced) {
7461
7738
  var cdl, turnDiscoveryResult;
7462
- return _regenerator.default.wrap(function (_context27) {
7463
- while (1) switch (_context27.prev = _context27.next) {
7739
+ return _regenerator.default.wrap(function (_context29) {
7740
+ while (1) switch (_context29.prev = _context29.next) {
7464
7741
  case 0:
7465
7742
  // @ts-ignore
7466
7743
  cdl = this.webex.internal.newMetrics.callDiagnosticLatencies; // @ts-ignore
7467
7744
  this.webex.internal.newMetrics.submitInternalEvent({
7468
7745
  name: 'internal.client.add-media.turn-discovery.start'
7469
7746
  });
7470
- _context27.next = 1;
7747
+ _context29.next = 1;
7471
7748
  return this.roap.doTurnDiscovery(this, isReconnecting, isForced);
7472
7749
  case 1:
7473
- turnDiscoveryResult = _context27.sent;
7750
+ turnDiscoveryResult = _context29.sent;
7474
7751
  this.turnDiscoverySkippedReason = turnDiscoveryResult === null || turnDiscoveryResult === void 0 ? void 0 : turnDiscoveryResult.turnDiscoverySkippedReason;
7475
7752
  this.turnServerUsed = !this.turnDiscoverySkippedReason;
7476
7753
 
@@ -7486,14 +7763,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7486
7763
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer
7487
7764
  });
7488
7765
  }
7489
- return _context27.abrupt("return", turnDiscoveryResult);
7766
+ return _context29.abrupt("return", turnDiscoveryResult);
7490
7767
  case 2:
7491
7768
  case "end":
7492
- return _context27.stop();
7769
+ return _context29.stop();
7493
7770
  }
7494
- }, _callee27, this);
7771
+ }, _callee29, this);
7495
7772
  }));
7496
- function doTurnDiscovery(_x25, _x26) {
7773
+ function doTurnDiscovery(_x24, _x25) {
7497
7774
  return _doTurnDiscovery.apply(this, arguments);
7498
7775
  }
7499
7776
  return doTurnDiscovery;
@@ -7512,35 +7789,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7512
7789
  }, {
7513
7790
  key: "establishMediaConnection",
7514
7791
  value: (function () {
7515
- var _establishMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
7792
+ var _establishMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
7516
7793
  var _this$locusMediaReque;
7517
- var LOG_HEADER, isReconnecting, _yield$this$doTurnDis, mc, _t29, _t30;
7518
- return _regenerator.default.wrap(function (_context28) {
7519
- while (1) switch (_context28.prev = _context28.next) {
7794
+ var LOG_HEADER, isReconnecting, _yield$this$doTurnDis, mc, _t31, _t32;
7795
+ return _regenerator.default.wrap(function (_context30) {
7796
+ while (1) switch (_context30.prev = _context30.next) {
7520
7797
  case 0:
7521
7798
  LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->';
7522
7799
  isReconnecting = this.isMoveToInProgress || !!((_this$locusMediaReque = this.locusMediaRequest) !== null && _this$locusMediaReque !== void 0 && _this$locusMediaReque.isConfluenceCreated()); // We are forcing turn discovery if the case is moveTo and a turn server was used already
7523
7800
  if (this.isMoveToInProgress && this.turnServerUsed) {
7524
7801
  isForced = true;
7525
7802
  }
7526
- _context28.prev = 1;
7803
+ _context30.prev = 1;
7527
7804
  if (turnServerInfo) {
7528
- _context28.next = 3;
7805
+ _context30.next = 3;
7529
7806
  break;
7530
7807
  }
7531
- _context28.next = 2;
7808
+ _context30.next = 2;
7532
7809
  return this.doTurnDiscovery(isReconnecting, isForced);
7533
7810
  case 2:
7534
- _yield$this$doTurnDis = _context28.sent;
7811
+ _yield$this$doTurnDis = _context30.sent;
7535
7812
  turnServerInfo = _yield$this$doTurnDis.turnServerInfo;
7536
7813
  case 3:
7537
- _context28.next = 4;
7814
+ _context30.next = 4;
7538
7815
  return this.createMediaConnection(turnServerInfo, bundlePolicy);
7539
7816
  case 4:
7540
- mc = _context28.sent;
7817
+ mc = _context30.sent;
7541
7818
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created this.isMultistream=").concat(this.isMultistream));
7542
7819
  if (!this.isMultistream) {
7543
- _context28.next = 5;
7820
+ _context30.next = 5;
7544
7821
  break;
7545
7822
  }
7546
7823
  this.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(this.receiveSlotManager, this.mediaRequestManagers, remoteMediaManagerConfig);
@@ -7548,42 +7825,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7548
7825
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.InterpretationAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_INTERPRETATION_AUDIO_CREATED);
7549
7826
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
7550
7827
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
7551
- _context28.next = 5;
7828
+ _context30.next = 5;
7552
7829
  return this.remoteMediaManager.start();
7553
7830
  case 5:
7554
- _context28.next = 6;
7831
+ _context30.next = 6;
7555
7832
  return mc.initiateOffer();
7556
7833
  case 6:
7557
- _context28.next = 7;
7834
+ _context30.next = 7;
7558
7835
  return this.waitForRemoteSDPAnswer();
7559
7836
  case 7:
7560
7837
  this.handleMediaLogging(this.mediaProperties);
7561
- _context28.next = 9;
7838
+ _context30.next = 9;
7562
7839
  break;
7563
7840
  case 8:
7564
- _context28.prev = 8;
7565
- _t29 = _context28["catch"](1);
7566
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _t29);
7567
- throw _t29;
7841
+ _context30.prev = 8;
7842
+ _t31 = _context30["catch"](1);
7843
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _t31);
7844
+ throw _t31;
7568
7845
  case 9:
7569
- _context28.prev = 9;
7570
- _context28.next = 10;
7846
+ _context30.prev = 9;
7847
+ _context30.next = 10;
7571
7848
  return this.waitForMediaConnectionConnected();
7572
7849
  case 10:
7573
- _context28.next = 12;
7850
+ _context30.next = 12;
7574
7851
  break;
7575
7852
  case 11:
7576
- _context28.prev = 11;
7577
- _t30 = _context28["catch"](9);
7578
- _context28.next = 12;
7579
- return this.handleWaitForMediaConnectionConnectedError(_t30, remoteMediaManagerConfig, bundlePolicy);
7853
+ _context30.prev = 11;
7854
+ _t32 = _context30["catch"](9);
7855
+ _context30.next = 12;
7856
+ return this.handleWaitForMediaConnectionConnectedError(_t32, remoteMediaManagerConfig, bundlePolicy);
7580
7857
  case 12:
7581
7858
  case "end":
7582
- return _context28.stop();
7859
+ return _context30.stop();
7583
7860
  }
7584
- }, _callee28, this, [[1, 8], [9, 11]]);
7861
+ }, _callee30, this, [[1, 8], [9, 11]]);
7585
7862
  }));
7586
- function establishMediaConnection(_x27, _x28, _x29, _x30) {
7863
+ function establishMediaConnection(_x26, _x27, _x28, _x29) {
7587
7864
  return _establishMediaConnection.apply(this, arguments);
7588
7865
  }
7589
7866
  return establishMediaConnection;
@@ -7598,16 +7875,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7598
7875
  }, {
7599
7876
  key: "cleanUpOnAddMediaFailure",
7600
7877
  value: (function () {
7601
- var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29() {
7878
+ var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31() {
7602
7879
  var _this$networkQualityM, _this$statsMonitor;
7603
- return _regenerator.default.wrap(function (_context29) {
7604
- while (1) switch (_context29.prev = _context29.next) {
7880
+ return _regenerator.default.wrap(function (_context31) {
7881
+ while (1) switch (_context31.prev = _context31.next) {
7605
7882
  case 0:
7606
7883
  if (!this.statsAnalyzer) {
7607
- _context29.next = 1;
7884
+ _context31.next = 1;
7608
7885
  break;
7609
7886
  }
7610
- _context29.next = 1;
7887
+ _context31.next = 1;
7611
7888
  return this.statsAnalyzer.stopAnalyzer();
7612
7889
  case 1:
7613
7890
  this.statsAnalyzer = null;
@@ -7618,7 +7895,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7618
7895
 
7619
7896
  // when media fails, we want to upload a webrtc dump to see whats going on
7620
7897
  // this function is async, but returns once the stats have been gathered
7621
- _context29.next = 2;
7898
+ _context31.next = 2;
7622
7899
  return this.forceSendStatsReport({
7623
7900
  callFrom: 'addMedia'
7624
7901
  });
@@ -7629,9 +7906,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7629
7906
  }
7630
7907
  case 3:
7631
7908
  case "end":
7632
- return _context29.stop();
7909
+ return _context31.stop();
7633
7910
  }
7634
- }, _callee29, this);
7911
+ }, _callee31, this);
7635
7912
  }));
7636
7913
  function cleanUpOnAddMediaFailure() {
7637
7914
  return _cleanUpOnAddMediaFailure.apply(this, arguments);
@@ -7649,16 +7926,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7649
7926
  }, {
7650
7927
  key: "downgradeFromMultistreamToTranscoded",
7651
7928
  value: (function () {
7652
- var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30() {
7929
+ var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32() {
7653
7930
  var _this$networkQualityM2, _this$statsMonitor2, _this$locusMediaReque2;
7654
- return _regenerator.default.wrap(function (_context30) {
7655
- while (1) switch (_context30.prev = _context30.next) {
7931
+ return _regenerator.default.wrap(function (_context32) {
7932
+ while (1) switch (_context32.prev = _context32.next) {
7656
7933
  case 0:
7657
7934
  if (!this.statsAnalyzer) {
7658
- _context30.next = 1;
7935
+ _context32.next = 1;
7659
7936
  break;
7660
7937
  }
7661
- _context30.next = 1;
7938
+ _context32.next = 1;
7662
7939
  return this.statsAnalyzer.stopAnalyzer();
7663
7940
  case 1:
7664
7941
  this.statsAnalyzer = null;
@@ -7676,9 +7953,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7676
7953
  this.createStatsAnalyzer();
7677
7954
  case 2:
7678
7955
  case "end":
7679
- return _context30.stop();
7956
+ return _context32.stop();
7680
7957
  }
7681
- }, _callee30, this);
7958
+ }, _callee32, this);
7682
7959
  }));
7683
7960
  function downgradeFromMultistreamToTranscoded() {
7684
7961
  return _downgradeFromMultistreamToTranscoded.apply(this, arguments);
@@ -7696,11 +7973,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7696
7973
  }, {
7697
7974
  key: "cleanUpBeforeRetryWithTurnServer",
7698
7975
  value: (function () {
7699
- var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31() {
7700
- return _regenerator.default.wrap(function (_context31) {
7701
- while (1) switch (_context31.prev = _context31.next) {
7976
+ var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
7977
+ return _regenerator.default.wrap(function (_context33) {
7978
+ while (1) switch (_context33.prev = _context33.next) {
7702
7979
  case 0:
7703
- _context31.next = 1;
7980
+ _context33.next = 1;
7704
7981
  return this.forceSendStatsReport({
7705
7982
  callFrom: 'cleanUpBeforeRetryWithTurnServer'
7706
7983
  });
@@ -7720,9 +7997,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7720
7997
  }
7721
7998
  case 2:
7722
7999
  case "end":
7723
- return _context31.stop();
8000
+ return _context33.stop();
7724
8001
  }
7725
- }, _callee31, this);
8002
+ }, _callee33, this);
7726
8003
  }));
7727
8004
  function cleanUpBeforeRetryWithTurnServer() {
7728
8005
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
@@ -7732,35 +8009,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7732
8009
  }, {
7733
8010
  key: "cleanUpBeforeReconnection",
7734
8011
  value: function () {
7735
- var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32() {
7736
- var _t31;
7737
- return _regenerator.default.wrap(function (_context32) {
7738
- while (1) switch (_context32.prev = _context32.next) {
8012
+ var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
8013
+ var _t33;
8014
+ return _regenerator.default.wrap(function (_context34) {
8015
+ while (1) switch (_context34.prev = _context34.next) {
7739
8016
  case 0:
7740
- _context32.prev = 0;
7741
- _context32.next = 1;
8017
+ _context34.prev = 0;
8018
+ _context34.next = 1;
7742
8019
  return this.forceSendStatsReport({
7743
8020
  callFrom: 'cleanUpBeforeReconnection'
7744
8021
  });
7745
8022
  case 1:
7746
8023
  if (!this.statsAnalyzer) {
7747
- _context32.next = 2;
8024
+ _context34.next = 2;
7748
8025
  break;
7749
8026
  }
7750
- _context32.next = 2;
8027
+ _context34.next = 2;
7751
8028
  return this.statsAnalyzer.stopAnalyzer();
7752
8029
  case 2:
7753
- _context32.next = 4;
8030
+ _context34.next = 4;
7754
8031
  break;
7755
8032
  case 3:
7756
- _context32.prev = 3;
7757
- _t31 = _context32["catch"](0);
7758
- _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _t31);
8033
+ _context34.prev = 3;
8034
+ _t33 = _context34["catch"](0);
8035
+ _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _t33);
7759
8036
  case 4:
7760
8037
  case "end":
7761
- return _context32.stop();
8038
+ return _context34.stop();
7762
8039
  }
7763
- }, _callee32, this, [[0, 3]]);
8040
+ }, _callee34, this, [[0, 3]]);
7764
8041
  }));
7765
8042
  function cleanUpBeforeReconnection() {
7766
8043
  return _cleanUpBeforeReconnection.apply(this, arguments);
@@ -7828,7 +8105,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7828
8105
  }, {
7829
8106
  key: "addMediaInternal",
7830
8107
  value: (function () {
7831
- var _addMediaInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
8108
+ var _addMediaInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
7832
8109
  var options,
7833
8110
  LOG_HEADER,
7834
8111
  localStreams,
@@ -7845,6 +8122,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7845
8122
  bundlePolicy,
7846
8123
  _options$additionalMe,
7847
8124
  additionalMediaOptions,
8125
+ _options$allowPublish,
8126
+ allowPublishMediaInLobby,
7848
8127
  rawSendVideo,
7849
8128
  rawReceiveVideo,
7850
8129
  rawSendAudio,
@@ -7862,7 +8141,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7862
8141
  numTransports,
7863
8142
  iceCandidateErrors,
7864
8143
  reachabilityMetrics,
7865
- _this$mediaProperties13,
7866
8144
  _this$mediaProperties14,
7867
8145
  _this$mediaProperties15,
7868
8146
  _this$mediaProperties16,
@@ -7883,36 +8161,37 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7883
8161
  _this$mediaProperties31,
7884
8162
  _this$mediaProperties32,
7885
8163
  _this$mediaProperties33,
8164
+ _this$mediaProperties34,
7886
8165
  _reachabilityMetrics,
7887
8166
  _yield$this$mediaProp2,
7888
8167
  _selectedCandidatePairChanges,
7889
8168
  _numTransports,
7890
8169
  _iceCandidateErrors,
7891
- _args33 = arguments,
7892
- _t32,
7893
- _t33;
7894
- return _regenerator.default.wrap(function (_context33) {
7895
- while (1) switch (_context33.prev = _context33.next) {
8170
+ _args35 = arguments,
8171
+ _t34,
8172
+ _t35;
8173
+ return _regenerator.default.wrap(function (_context35) {
8174
+ while (1) switch (_context35.prev = _context35.next) {
7896
8175
  case 0:
7897
- options = _args33.length > 3 && _args33[3] !== undefined ? _args33[3] : {};
8176
+ options = _args35.length > 3 && _args35[3] !== undefined ? _args35[3] : {};
7898
8177
  this.addMediaData.retriedWithTurnServer = false;
7899
8178
  this.addMediaData.icePhaseCallback = icePhaseCallback;
7900
8179
  this.hasMediaConnectionConnectedAtLeastOnce = false;
7901
8180
  LOG_HEADER = 'Meeting:index#addMedia -->';
7902
8181
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: options=").concat((0, _stringify.default)(options), ", turnServerInfo=").concat((0, _stringify.default)(turnServerInfo), ", forceTurnDiscovery=").concat(forceTurnDiscovery));
7903
8182
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
7904
- _context33.next = 1;
8183
+ _context35.next = 1;
7905
8184
  break;
7906
8185
  }
7907
8186
  throw new _webexErrors.MeetingNotActiveError();
7908
8187
  case 1:
7909
8188
  if (!_util2.default.isUserInLeftState(this.locusInfo)) {
7910
- _context33.next = 2;
8189
+ _context35.next = 2;
7911
8190
  break;
7912
8191
  }
7913
8192
  throw new _webexErrors.UserNotJoinedError();
7914
8193
  case 2:
7915
- localStreams = options.localStreams, _options$audioEnabled = options.audioEnabled, audioEnabled = _options$audioEnabled === void 0 ? true : _options$audioEnabled, _options$videoEnabled = options.videoEnabled, videoEnabled = _options$videoEnabled === void 0 ? true : _options$videoEnabled, _options$shareAudioEn = options.shareAudioEnabled, shareAudioEnabled = _options$shareAudioEn === void 0 ? true : _options$shareAudioEn, _options$shareVideoEn = options.shareVideoEnabled, shareVideoEnabled = _options$shareVideoEn === void 0 ? true : _options$shareVideoEn, remoteMediaManagerConfig = options.remoteMediaManagerConfig, _options$bundlePolicy = options.bundlePolicy, bundlePolicy = _options$bundlePolicy === void 0 ? 'max-bundle' : _options$bundlePolicy, _options$additionalMe = options.additionalMediaOptions, additionalMediaOptions = _options$additionalMe === void 0 ? {} : _options$additionalMe;
8194
+ localStreams = options.localStreams, _options$audioEnabled = options.audioEnabled, audioEnabled = _options$audioEnabled === void 0 ? true : _options$audioEnabled, _options$videoEnabled = options.videoEnabled, videoEnabled = _options$videoEnabled === void 0 ? true : _options$videoEnabled, _options$shareAudioEn = options.shareAudioEnabled, shareAudioEnabled = _options$shareAudioEn === void 0 ? true : _options$shareAudioEn, _options$shareVideoEn = options.shareVideoEnabled, shareVideoEnabled = _options$shareVideoEn === void 0 ? true : _options$shareVideoEn, remoteMediaManagerConfig = options.remoteMediaManagerConfig, _options$bundlePolicy = options.bundlePolicy, bundlePolicy = _options$bundlePolicy === void 0 ? 'max-bundle' : _options$bundlePolicy, _options$additionalMe = options.additionalMediaOptions, additionalMediaOptions = _options$additionalMe === void 0 ? {} : _options$additionalMe, _options$allowPublish = options.allowPublishMediaInLobby, allowPublishMediaInLobby = _options$allowPublish === void 0 ? false : _options$allowPublish;
7916
8195
  rawSendVideo = additionalMediaOptions.sendVideo, rawReceiveVideo = additionalMediaOptions.receiveVideo, rawSendAudio = additionalMediaOptions.sendAudio, rawReceiveAudio = additionalMediaOptions.receiveAudio;
7917
8196
  sendVideo = videoEnabled && (rawSendVideo !== null && rawSendVideo !== void 0 ? rawSendVideo : true);
7918
8197
  receiveVideo = videoEnabled && (rawReceiveVideo !== null && rawReceiveVideo !== void 0 ? rawReceiveVideo : true);
@@ -7923,9 +8202,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7923
8202
  // @ts-ignore
7924
8203
  ipver = _util2.default.getIpVersion(this.webex); // used just for metrics
7925
8204
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
7926
- // @ts-ignore - isUserUnadmitted coming from SelfUtil
7927
8205
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
7928
- _context33.next = 3;
8206
+ _context35.next = 3;
7929
8207
  break;
7930
8208
  }
7931
8209
  throw new _webexErrors.UserInLobbyError();
@@ -7969,58 +8247,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7969
8247
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
7970
8248
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
7971
8249
  this.brbState = (0, _brbState.createBrbState)(this, false);
7972
- _context33.prev = 4;
7973
- _context33.next = 5;
8250
+ _context35.prev = 4;
8251
+ if (!(allowPublishMediaInLobby || !this.isUserUnadmitted)) {
8252
+ _context35.next = 5;
8253
+ break;
8254
+ }
8255
+ _context35.next = 5;
7974
8256
  return this.setUpLocalStreamReferences(localStreams);
7975
8257
  case 5:
7976
8258
  this.setMercuryListener();
7977
8259
  this.createStatsAnalyzer();
7978
- _context33.prev = 6;
7979
- _context33.next = 7;
8260
+ _context35.prev = 6;
8261
+ _context35.next = 7;
7980
8262
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
7981
8263
  case 7:
7982
- _context33.next = 12;
8264
+ _context35.next = 12;
7983
8265
  break;
7984
8266
  case 8:
7985
- _context33.prev = 8;
7986
- _t32 = _context33["catch"](6);
7987
- if (!(_t32 instanceof _multistreamNotSupportedError.default)) {
7988
- _context33.next = 11;
8267
+ _context35.prev = 8;
8268
+ _t34 = _context35["catch"](6);
8269
+ if (!(_t34 instanceof _multistreamNotSupportedError.default)) {
8270
+ _context35.next = 11;
7989
8271
  break;
7990
8272
  }
7991
8273
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
7992
- _context33.next = 9;
8274
+ _context35.next = 9;
7993
8275
  return this.downgradeFromMultistreamToTranscoded();
7994
8276
  case 9:
7995
- _context33.next = 10;
8277
+ _context35.next = 10;
7996
8278
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
7997
8279
  case 10:
7998
- _context33.next = 12;
8280
+ _context35.next = 12;
7999
8281
  break;
8000
8282
  case 11:
8001
- throw _t32;
8283
+ throw _t34;
8002
8284
  case 12:
8003
8285
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connected, finalizing..."));
8004
8286
  if (!this.mediaProperties.hasLocalShareStream()) {
8005
- _context33.next = 13;
8287
+ _context35.next = 13;
8006
8288
  break;
8007
8289
  }
8008
- _context33.next = 13;
8290
+ _context35.next = 13;
8009
8291
  return this.enqueueScreenShareFloorRequest();
8010
8292
  case 13:
8011
- _context33.next = 14;
8293
+ _context35.next = 14;
8012
8294
  return this.mediaProperties.getCurrentConnectionInfo();
8013
8295
  case 14:
8014
- _yield$this$mediaProp = _context33.sent;
8296
+ _yield$this$mediaProp = _context35.sent;
8015
8297
  connectionType = _yield$this$mediaProp.connectionType;
8016
8298
  ipVersion = _yield$this$mediaProp.ipVersion;
8017
8299
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
8018
8300
  numTransports = _yield$this$mediaProp.numTransports;
8019
8301
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
8020
- _context33.next = 15;
8302
+ _context35.next = 15;
8021
8303
  return this.getMediaReachabilityMetricFields();
8022
8304
  case 15:
8023
- reachabilityMetrics = _context33.sent;
8305
+ reachabilityMetrics = _context35.sent;
8024
8306
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
8025
8307
  correlation_id: this.correlationId,
8026
8308
  locus_id: this.locusUrl.split('/').pop(),
@@ -8050,31 +8332,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8050
8332
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
8051
8333
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
8052
8334
  this.startPeriodicLogUpload();
8053
- _context33.next = 20;
8335
+ _context35.next = 20;
8054
8336
  break;
8055
8337
  case 16:
8056
- _context33.prev = 16;
8057
- _t33 = _context33["catch"](4);
8058
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _t33);
8338
+ _context35.prev = 16;
8339
+ _t35 = _context35["catch"](4);
8340
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _t35);
8059
8341
 
8060
8342
  // @ts-ignore
8061
- _context33.next = 17;
8343
+ _context35.next = 17;
8062
8344
  return this.getMediaReachabilityMetricFields();
8063
8345
  case 17:
8064
- _reachabilityMetrics = _context33.sent;
8065
- _context33.next = 18;
8346
+ _reachabilityMetrics = _context35.sent;
8347
+ _context35.next = 18;
8066
8348
  return this.mediaProperties.getCurrentConnectionInfo();
8067
8349
  case 18:
8068
- _yield$this$mediaProp2 = _context33.sent;
8350
+ _yield$this$mediaProp2 = _context35.sent;
8069
8351
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
8070
8352
  _numTransports = _yield$this$mediaProp2.numTransports;
8071
8353
  _iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
8072
8354
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread(_objectSpread(_objectSpread({
8073
8355
  correlation_id: this.correlationId,
8074
8356
  locus_id: this.locusUrl.split('/').pop(),
8075
- reason: _t33.message,
8076
- stack: _t33.stack,
8077
- code: _t33.code,
8357
+ reason: _t35.message,
8358
+ stack: _t35.stack,
8359
+ code: _t35.code,
8078
8360
  selectedCandidatePairChanges: _selectedCandidatePairChanges,
8079
8361
  numTransports: _numTransports,
8080
8362
  turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
@@ -8082,14 +8364,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8082
8364
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer,
8083
8365
  isMultistream: this.isMultistream,
8084
8366
  isJoinWithMediaRetry: this.joinWithMediaRetryInfo.isRetry,
8085
- signalingState: ((_this$mediaProperties13 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties13 === void 0 ? void 0 : (_this$mediaProperties14 = _this$mediaProperties13.multistreamConnection) === null || _this$mediaProperties14 === void 0 ? void 0 : (_this$mediaProperties15 = _this$mediaProperties14.pc) === null || _this$mediaProperties15 === void 0 ? void 0 : (_this$mediaProperties16 = _this$mediaProperties15.pc) === null || _this$mediaProperties16 === void 0 ? void 0 : _this$mediaProperties16.signalingState) || ((_this$mediaProperties17 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties17 === void 0 ? void 0 : (_this$mediaProperties18 = _this$mediaProperties17.mediaConnection) === null || _this$mediaProperties18 === void 0 ? void 0 : (_this$mediaProperties19 = _this$mediaProperties18.pc) === null || _this$mediaProperties19 === void 0 ? void 0 : _this$mediaProperties19.signalingState) || 'unknown',
8086
- connectionState: ((_this$mediaProperties20 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties20 === void 0 ? void 0 : (_this$mediaProperties21 = _this$mediaProperties20.multistreamConnection) === null || _this$mediaProperties21 === void 0 ? void 0 : (_this$mediaProperties22 = _this$mediaProperties21.pc) === null || _this$mediaProperties22 === void 0 ? void 0 : (_this$mediaProperties23 = _this$mediaProperties22.pc) === null || _this$mediaProperties23 === void 0 ? void 0 : _this$mediaProperties23.connectionState) || ((_this$mediaProperties24 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties24 === void 0 ? void 0 : (_this$mediaProperties25 = _this$mediaProperties24.mediaConnection) === null || _this$mediaProperties25 === void 0 ? void 0 : (_this$mediaProperties26 = _this$mediaProperties25.pc) === null || _this$mediaProperties26 === void 0 ? void 0 : _this$mediaProperties26.connectionState) || 'unknown',
8087
- iceConnectionState: ((_this$mediaProperties27 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties27 === void 0 ? void 0 : (_this$mediaProperties28 = _this$mediaProperties27.multistreamConnection) === null || _this$mediaProperties28 === void 0 ? void 0 : (_this$mediaProperties29 = _this$mediaProperties28.pc) === null || _this$mediaProperties29 === void 0 ? void 0 : (_this$mediaProperties30 = _this$mediaProperties29.pc) === null || _this$mediaProperties30 === void 0 ? void 0 : _this$mediaProperties30.iceConnectionState) || ((_this$mediaProperties31 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties31 === void 0 ? void 0 : (_this$mediaProperties32 = _this$mediaProperties31.mediaConnection) === null || _this$mediaProperties32 === void 0 ? void 0 : (_this$mediaProperties33 = _this$mediaProperties32.pc) === null || _this$mediaProperties33 === void 0 ? void 0 : _this$mediaProperties33.iceConnectionState) || 'unknown'
8367
+ signalingState: ((_this$mediaProperties14 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties14 === void 0 ? void 0 : (_this$mediaProperties15 = _this$mediaProperties14.multistreamConnection) === null || _this$mediaProperties15 === void 0 ? void 0 : (_this$mediaProperties16 = _this$mediaProperties15.pc) === null || _this$mediaProperties16 === void 0 ? void 0 : (_this$mediaProperties17 = _this$mediaProperties16.pc) === null || _this$mediaProperties17 === void 0 ? void 0 : _this$mediaProperties17.signalingState) || ((_this$mediaProperties18 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties18 === void 0 ? void 0 : (_this$mediaProperties19 = _this$mediaProperties18.mediaConnection) === null || _this$mediaProperties19 === void 0 ? void 0 : (_this$mediaProperties20 = _this$mediaProperties19.pc) === null || _this$mediaProperties20 === void 0 ? void 0 : _this$mediaProperties20.signalingState) || 'unknown',
8368
+ connectionState: ((_this$mediaProperties21 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties21 === void 0 ? void 0 : (_this$mediaProperties22 = _this$mediaProperties21.multistreamConnection) === null || _this$mediaProperties22 === void 0 ? void 0 : (_this$mediaProperties23 = _this$mediaProperties22.pc) === null || _this$mediaProperties23 === void 0 ? void 0 : (_this$mediaProperties24 = _this$mediaProperties23.pc) === null || _this$mediaProperties24 === void 0 ? void 0 : _this$mediaProperties24.connectionState) || ((_this$mediaProperties25 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties25 === void 0 ? void 0 : (_this$mediaProperties26 = _this$mediaProperties25.mediaConnection) === null || _this$mediaProperties26 === void 0 ? void 0 : (_this$mediaProperties27 = _this$mediaProperties26.pc) === null || _this$mediaProperties27 === void 0 ? void 0 : _this$mediaProperties27.connectionState) || 'unknown',
8369
+ iceConnectionState: ((_this$mediaProperties28 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties28 === void 0 ? void 0 : (_this$mediaProperties29 = _this$mediaProperties28.multistreamConnection) === null || _this$mediaProperties29 === void 0 ? void 0 : (_this$mediaProperties30 = _this$mediaProperties29.pc) === null || _this$mediaProperties30 === void 0 ? void 0 : (_this$mediaProperties31 = _this$mediaProperties30.pc) === null || _this$mediaProperties31 === void 0 ? void 0 : _this$mediaProperties31.iceConnectionState) || ((_this$mediaProperties32 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties32 === void 0 ? void 0 : (_this$mediaProperties33 = _this$mediaProperties32.mediaConnection) === null || _this$mediaProperties33 === void 0 ? void 0 : (_this$mediaProperties34 = _this$mediaProperties33.pc) === null || _this$mediaProperties34 === void 0 ? void 0 : _this$mediaProperties34.iceConnectionState) || 'unknown'
8088
8370
  }, _reachabilityMetrics), _iceCandidateErrors), {}, {
8089
8371
  iceCandidatesCount: this.iceCandidatesCount,
8090
8372
  ipver: ipver
8091
8373
  }));
8092
- _context33.next = 19;
8374
+ _context35.next = 19;
8093
8375
  return this.cleanUpOnAddMediaFailure();
8094
8376
  case 19:
8095
8377
  // Upload logs on error while adding media
@@ -8097,23 +8379,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8097
8379
  file: 'meeting/index',
8098
8380
  function: 'addMedia'
8099
8381
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
8100
- if (_t33 instanceof _internalMediaCore.Errors.SdpError) {
8382
+ if (_t35 instanceof _internalMediaCore.Errors.SdpError) {
8101
8383
  this.leave({
8102
8384
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
8103
8385
  });
8104
8386
  }
8105
- throw _t33;
8387
+ throw _t35;
8106
8388
  case 20:
8107
- _context33.prev = 20;
8389
+ _context35.prev = 20;
8108
8390
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
8109
- return _context33.finish(20);
8391
+ return _context35.finish(20);
8110
8392
  case 21:
8111
8393
  case "end":
8112
- return _context33.stop();
8394
+ return _context35.stop();
8113
8395
  }
8114
- }, _callee33, this, [[4, 16, 20, 21], [6, 8]]);
8396
+ }, _callee35, this, [[4, 16, 20, 21], [6, 8]]);
8115
8397
  }));
8116
- function addMediaInternal(_x31, _x32, _x33) {
8398
+ function addMediaInternal(_x30, _x31, _x32) {
8117
8399
  return _addMediaInternal.apply(this, arguments);
8118
8400
  }
8119
8401
  return addMediaInternal;
@@ -8179,35 +8461,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8179
8461
  * @memberof Meeting
8180
8462
  */
8181
8463
  function () {
8182
- var _updateMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34(options) {
8464
+ var _updateMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36(options) {
8183
8465
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled, _this$audio3, _this$video3;
8184
- return _regenerator.default.wrap(function (_context34) {
8185
- while (1) switch (_context34.prev = _context34.next) {
8466
+ return _regenerator.default.wrap(function (_context36) {
8467
+ while (1) switch (_context36.prev = _context36.next) {
8186
8468
  case 0:
8187
8469
  this.checkMediaConnection();
8188
8470
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
8189
8471
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
8190
8472
  if (this.canUpdateMedia()) {
8191
- _context34.next = 1;
8473
+ _context36.next = 1;
8192
8474
  break;
8193
8475
  }
8194
- return _context34.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
8476
+ return _context36.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
8195
8477
  case 1:
8196
8478
  if (!this.isMultistream) {
8197
- _context34.next = 3;
8479
+ _context36.next = 3;
8198
8480
  break;
8199
8481
  }
8200
8482
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
8201
- _context34.next = 2;
8483
+ _context36.next = 2;
8202
8484
  break;
8203
8485
  }
8204
8486
  throw new Error('toggling shareAudioEnabled or shareVideoEnabled in a multistream meeting is not supported, to control receiving screen share call meeting.remoteMediaManager.setLayout() with appropriate layout');
8205
8487
  case 2:
8206
- _context34.next = 4;
8488
+ _context36.next = 4;
8207
8489
  break;
8208
8490
  case 3:
8209
8491
  if (!(shareAudioEnabled !== undefined)) {
8210
- _context34.next = 4;
8492
+ _context36.next = 4;
8211
8493
  break;
8212
8494
  }
8213
8495
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -8232,20 +8514,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8232
8514
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
8233
8515
  }
8234
8516
  if (this.isMultistream) {
8235
- _context34.next = 5;
8517
+ _context36.next = 5;
8236
8518
  break;
8237
8519
  }
8238
- _context34.next = 5;
8520
+ _context36.next = 5;
8239
8521
  return this.updateTranscodedMediaConnection();
8240
8522
  case 5:
8241
- return _context34.abrupt("return", undefined);
8523
+ return _context36.abrupt("return", undefined);
8242
8524
  case 6:
8243
8525
  case "end":
8244
- return _context34.stop();
8526
+ return _context36.stop();
8245
8527
  }
8246
- }, _callee34, this);
8528
+ }, _callee36, this);
8247
8529
  }));
8248
- function updateMedia(_x34) {
8530
+ function updateMedia(_x33) {
8249
8531
  return _updateMedia.apply(this, arguments);
8250
8532
  }
8251
8533
  return updateMedia;
@@ -8385,32 +8667,46 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8385
8667
  );
8386
8668
  };
8387
8669
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
8388
- return _util2.default.leaveMeeting(this, options).then(function (leave) {
8389
- // CA team recommends submitting this *after* locus /leave
8390
- submitLeaveMetric();
8391
- _this49.meetingFiniteStateMachine.leave();
8392
- _this49.clearMeetingData();
8393
-
8394
- // upload logs on leave irrespective of meeting delete
8395
- _triggerProxy.default.trigger(_this49, {
8396
- file: 'meeting/index',
8397
- function: 'leave'
8398
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this49);
8670
+ return _util2.default.leaveMeeting(this, options).then(/*#__PURE__*/function () {
8671
+ var _ref41 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37(leave) {
8672
+ return _regenerator.default.wrap(function (_context37) {
8673
+ while (1) switch (_context37.prev = _context37.next) {
8674
+ case 0:
8675
+ // CA team recommends submitting this *after* locus /leave
8676
+ submitLeaveMetric();
8677
+ _this49.meetingFiniteStateMachine.leave();
8678
+ _context37.next = 1;
8679
+ return _this49.clearMeetingData();
8680
+ case 1:
8681
+ // upload logs on leave irrespective of meeting delete
8682
+ _triggerProxy.default.trigger(_this49, {
8683
+ file: 'meeting/index',
8684
+ function: 'leave'
8685
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this49);
8399
8686
 
8400
- // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
8401
- if (_this49.wirelessShare || _this49.guest) {
8402
- // If screen sharing clean the meeting object
8403
- _triggerProxy.default.trigger(_this49, {
8404
- file: 'meeting/index',
8405
- function: 'leave'
8406
- }, _constants.EVENTS.DESTROY_MEETING, {
8407
- reason: options.reason,
8408
- meetingId: _this49.id
8409
- });
8410
- }
8411
- _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
8412
- return leave;
8413
- }).catch(function (error) {
8687
+ // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
8688
+ if (_this49.wirelessShare || _this49.guest) {
8689
+ // If screen sharing clean the meeting object
8690
+ _triggerProxy.default.trigger(_this49, {
8691
+ file: 'meeting/index',
8692
+ function: 'leave'
8693
+ }, _constants.EVENTS.DESTROY_MEETING, {
8694
+ reason: options.reason,
8695
+ meetingId: _this49.id
8696
+ });
8697
+ }
8698
+ _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
8699
+ return _context37.abrupt("return", leave);
8700
+ case 2:
8701
+ case "end":
8702
+ return _context37.stop();
8703
+ }
8704
+ }, _callee37);
8705
+ }));
8706
+ return function (_x34) {
8707
+ return _ref41.apply(this, arguments);
8708
+ };
8709
+ }()).catch(function (error) {
8414
8710
  // CA team recommends submitting this *after* locus /leave
8415
8711
  submitLeaveMetric({
8416
8712
  errors: [{
@@ -8889,10 +9185,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8889
9185
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8890
9186
  var main = renderInfo.main,
8891
9187
  content = renderInfo.content;
8892
- var _this$mediaProperties34 = this.mediaProperties,
8893
- mediaDirection = _this$mediaProperties34.mediaDirection,
8894
- remoteShareStream = _this$mediaProperties34.remoteShareStream,
8895
- remoteVideoStream = _this$mediaProperties34.remoteVideoStream;
9188
+ var _this$mediaProperties35 = this.mediaProperties,
9189
+ mediaDirection = _this$mediaProperties35.mediaDirection,
9190
+ remoteShareStream = _this$mediaProperties35.remoteShareStream,
9191
+ remoteVideoStream = _this$mediaProperties35.remoteVideoStream;
8896
9192
  var layoutInfo = (0, _lodash.cloneDeep)(this.lastVideoLayoutInfo);
8897
9193
 
8898
9194
  // TODO: We need a real time value for Audio, Video and Share send indicator
@@ -9072,16 +9368,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9072
9368
  correlation_id: this.correlationId,
9073
9369
  locus_id: this.locusId
9074
9370
  });
9075
- return _util2.default.endMeetingForAll(this).then(function (end) {
9076
- _this56.meetingFiniteStateMachine.end();
9077
- _this56.clearMeetingData();
9078
- // upload logs on leave irrespective of meeting delete
9079
- _triggerProxy.default.trigger(_this56, {
9080
- file: 'meeting/index',
9081
- function: 'endMeetingForAll'
9082
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
9083
- return end;
9084
- }).catch(function (error) {
9371
+ return _util2.default.endMeetingForAll(this).then(/*#__PURE__*/function () {
9372
+ var _ref42 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38(end) {
9373
+ return _regenerator.default.wrap(function (_context38) {
9374
+ while (1) switch (_context38.prev = _context38.next) {
9375
+ case 0:
9376
+ _this56.meetingFiniteStateMachine.end();
9377
+ _context38.next = 1;
9378
+ return _this56.clearMeetingData();
9379
+ case 1:
9380
+ // upload logs on leave irrespective of meeting delete
9381
+ _triggerProxy.default.trigger(_this56, {
9382
+ file: 'meeting/index',
9383
+ function: 'endMeetingForAll'
9384
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
9385
+ return _context38.abrupt("return", end);
9386
+ case 2:
9387
+ case "end":
9388
+ return _context38.stop();
9389
+ }
9390
+ }, _callee38);
9391
+ }));
9392
+ return function (_x35) {
9393
+ return _ref42.apply(this, arguments);
9394
+ };
9395
+ }()).catch(function (error) {
9085
9396
  _this56.meetingFiniteStateMachine.fail(error);
9086
9397
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
9087
9398
  // upload logs on leave irrespective of meeting delete
@@ -9143,12 +9454,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9143
9454
  */
9144
9455
  }, {
9145
9456
  key: "extendMeeting",
9146
- value: function extendMeeting(_ref37) {
9147
- var meetingPolicyUrl = _ref37.meetingPolicyUrl,
9148
- meetingInstanceId = _ref37.meetingInstanceId,
9149
- participantId = _ref37.participantId,
9150
- _ref37$extensionMinut = _ref37.extensionMinutes,
9151
- extensionMinutes = _ref37$extensionMinut === void 0 ? 30 : _ref37$extensionMinut;
9457
+ value: function extendMeeting(_ref43) {
9458
+ var meetingPolicyUrl = _ref43.meetingPolicyUrl,
9459
+ meetingInstanceId = _ref43.meetingInstanceId,
9460
+ participantId = _ref43.participantId,
9461
+ _ref43$extensionMinut = _ref43.extensionMinutes,
9462
+ extensionMinutes = _ref43$extensionMinut === void 0 ? 30 : _ref43$extensionMinut;
9152
9463
  if (!meetingInstanceId || !participantId) {
9153
9464
  return _promise.default.reject(new Error('Missing meetingInstanceId or participantId'));
9154
9465
  }
@@ -9213,8 +9524,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9213
9524
  }, {
9214
9525
  key: "checkMediaConnection",
9215
9526
  value: function checkMediaConnection() {
9216
- var _this$mediaProperties35;
9217
- if ((_this$mediaProperties35 = this.mediaProperties) !== null && _this$mediaProperties35 !== void 0 && _this$mediaProperties35.webrtcMediaConnection) {
9527
+ var _this$mediaProperties36;
9528
+ if ((_this$mediaProperties36 = this.mediaProperties) !== null && _this$mediaProperties36 !== void 0 && _this$mediaProperties36.webrtcMediaConnection) {
9218
9529
  return;
9219
9530
  }
9220
9531
  throw new _webexErrors.NoMediaEstablishedYetError();
@@ -9229,39 +9540,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9229
9540
  }, {
9230
9541
  key: "enableMusicMode",
9231
9542
  value: (function () {
9232
- var _enableMusicMode = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35(shouldEnableMusicMode) {
9233
- return _regenerator.default.wrap(function (_context35) {
9234
- while (1) switch (_context35.prev = _context35.next) {
9543
+ var _enableMusicMode = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(shouldEnableMusicMode) {
9544
+ return _regenerator.default.wrap(function (_context39) {
9545
+ while (1) switch (_context39.prev = _context39.next) {
9235
9546
  case 0:
9236
9547
  this.checkMediaConnection();
9237
9548
  if (this.isMultistream) {
9238
- _context35.next = 1;
9549
+ _context39.next = 1;
9239
9550
  break;
9240
9551
  }
9241
9552
  throw new Error('enableMusicMode() only supported with multistream');
9242
9553
  case 1:
9243
9554
  if (!shouldEnableMusicMode) {
9244
- _context35.next = 3;
9555
+ _context39.next = 3;
9245
9556
  break;
9246
9557
  }
9247
- _context35.next = 2;
9248
- return this.sendSlotManager.setCodecParameters(_internalMediaCore.MediaType.AudioMain, {
9558
+ _context39.next = 2;
9559
+ return this.sendSlotManager.setCustomCodecParameters(_internalMediaCore.MediaType.AudioMain, _internalMediaCore.MediaCodecMimeType.OPUS, {
9249
9560
  maxaveragebitrate: '64000',
9250
9561
  maxplaybackrate: '48000'
9251
9562
  });
9252
9563
  case 2:
9253
- _context35.next = 4;
9564
+ _context39.next = 4;
9254
9565
  break;
9255
9566
  case 3:
9256
- _context35.next = 4;
9257
- return this.sendSlotManager.deleteCodecParameters(_internalMediaCore.MediaType.AudioMain, ['maxaveragebitrate', 'maxplaybackrate']);
9567
+ _context39.next = 4;
9568
+ return this.sendSlotManager.markCustomCodecParametersForDeletion(_internalMediaCore.MediaType.AudioMain, _internalMediaCore.MediaCodecMimeType.OPUS, ['maxaveragebitrate', 'maxplaybackrate']);
9258
9569
  case 4:
9259
9570
  case "end":
9260
- return _context35.stop();
9571
+ return _context39.stop();
9261
9572
  }
9262
- }, _callee35, this);
9573
+ }, _callee39, this);
9263
9574
  }));
9264
- function enableMusicMode(_x35) {
9575
+ function enableMusicMode(_x36) {
9265
9576
  return _enableMusicMode.apply(this, arguments);
9266
9577
  }
9267
9578
  return enableMusicMode;
@@ -9274,14 +9585,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9274
9585
  }, {
9275
9586
  key: "updateTranscodedMediaConnection",
9276
9587
  value: function updateTranscodedMediaConnection() {
9277
- var _this$mediaProperties36,
9278
- _this$mediaProperties37,
9588
+ var _this$mediaProperties37,
9279
9589
  _this$mediaProperties38,
9280
9590
  _this$mediaProperties39,
9281
9591
  _this$mediaProperties40,
9282
9592
  _this$mediaProperties41,
9283
9593
  _this$mediaProperties42,
9284
9594
  _this$mediaProperties43,
9595
+ _this$mediaProperties44,
9285
9596
  _this57 = this;
9286
9597
  var LOG_HEADER = 'Meeting:index#updateTranscodedMediaConnection -->';
9287
9598
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " starting"));
@@ -9291,10 +9602,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9291
9602
  return this.mediaProperties.webrtcMediaConnection.update({
9292
9603
  // TODO: RoapMediaConnection is not ready to use stream classes yet, so we pass the raw MediaStreamTrack for now
9293
9604
  localTracks: {
9294
- audio: ((_this$mediaProperties36 = this.mediaProperties.audioStream) === null || _this$mediaProperties36 === void 0 ? void 0 : (_this$mediaProperties37 = _this$mediaProperties36.outputStream) === null || _this$mediaProperties37 === void 0 ? void 0 : _this$mediaProperties37.getTracks()[0]) || null,
9295
- video: ((_this$mediaProperties38 = this.mediaProperties.videoStream) === null || _this$mediaProperties38 === void 0 ? void 0 : (_this$mediaProperties39 = _this$mediaProperties38.outputStream) === null || _this$mediaProperties39 === void 0 ? void 0 : _this$mediaProperties39.getTracks()[0]) || null,
9296
- screenShareVideo: ((_this$mediaProperties40 = this.mediaProperties.shareVideoStream) === null || _this$mediaProperties40 === void 0 ? void 0 : (_this$mediaProperties41 = _this$mediaProperties40.outputStream) === null || _this$mediaProperties41 === void 0 ? void 0 : _this$mediaProperties41.getTracks()[0]) || null,
9297
- screenShareAudio: ((_this$mediaProperties42 = this.mediaProperties.shareAudioStream) === null || _this$mediaProperties42 === void 0 ? void 0 : (_this$mediaProperties43 = _this$mediaProperties42.outputStream) === null || _this$mediaProperties43 === void 0 ? void 0 : _this$mediaProperties43.getTracks()[0]) || null
9605
+ audio: ((_this$mediaProperties37 = this.mediaProperties.audioStream) === null || _this$mediaProperties37 === void 0 ? void 0 : (_this$mediaProperties38 = _this$mediaProperties37.outputStream) === null || _this$mediaProperties38 === void 0 ? void 0 : _this$mediaProperties38.getTracks()[0]) || null,
9606
+ video: ((_this$mediaProperties39 = this.mediaProperties.videoStream) === null || _this$mediaProperties39 === void 0 ? void 0 : (_this$mediaProperties40 = _this$mediaProperties39.outputStream) === null || _this$mediaProperties40 === void 0 ? void 0 : _this$mediaProperties40.getTracks()[0]) || null,
9607
+ screenShareVideo: ((_this$mediaProperties41 = this.mediaProperties.shareVideoStream) === null || _this$mediaProperties41 === void 0 ? void 0 : (_this$mediaProperties42 = _this$mediaProperties41.outputStream) === null || _this$mediaProperties42 === void 0 ? void 0 : _this$mediaProperties42.getTracks()[0]) || null,
9608
+ screenShareAudio: ((_this$mediaProperties43 = this.mediaProperties.shareAudioStream) === null || _this$mediaProperties43 === void 0 ? void 0 : (_this$mediaProperties44 = _this$mediaProperties43.outputStream) === null || _this$mediaProperties44 === void 0 ? void 0 : _this$mediaProperties44.getTracks()[0]) || null
9298
9609
  },
9299
9610
  direction: {
9300
9611
  audio: _media.default.getDirection(true, this.mediaProperties.mediaDirection.receiveAudio, this.mediaProperties.mediaDirection.sendAudio),
@@ -9352,25 +9663,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9352
9663
  }, {
9353
9664
  key: "publishStream",
9354
9665
  value: (function () {
9355
- var _publishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36(mediaType, stream) {
9356
- return _regenerator.default.wrap(function (_context36) {
9357
- while (1) switch (_context36.prev = _context36.next) {
9666
+ var _publishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40(mediaType, stream) {
9667
+ return _regenerator.default.wrap(function (_context40) {
9668
+ while (1) switch (_context40.prev = _context40.next) {
9358
9669
  case 0:
9359
9670
  if (stream) {
9360
- _context36.next = 1;
9671
+ _context40.next = 1;
9361
9672
  break;
9362
9673
  }
9363
- return _context36.abrupt("return");
9674
+ return _context40.abrupt("return");
9364
9675
  case 1:
9365
9676
  if (!this.mediaProperties.webrtcMediaConnection) {
9366
- _context36.next = 3;
9677
+ _context40.next = 3;
9367
9678
  break;
9368
9679
  }
9369
9680
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
9370
- _context36.next = 2;
9681
+ _context40.next = 2;
9371
9682
  break;
9372
9683
  }
9373
- _context36.next = 2;
9684
+ _context40.next = 2;
9374
9685
  return this.sendSlotManager.publishStream(mediaType, stream);
9375
9686
  case 2:
9376
9687
  this.emitPublishStateChangeEvent({
@@ -9381,11 +9692,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9381
9692
  });
9382
9693
  case 3:
9383
9694
  case "end":
9384
- return _context36.stop();
9695
+ return _context40.stop();
9385
9696
  }
9386
- }, _callee36, this);
9697
+ }, _callee40, this);
9387
9698
  }));
9388
- function publishStream(_x36, _x37) {
9699
+ function publishStream(_x37, _x38) {
9389
9700
  return _publishStream.apply(this, arguments);
9390
9701
  }
9391
9702
  return publishStream;
@@ -9401,21 +9712,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9401
9712
  }, {
9402
9713
  key: "unpublishStream",
9403
9714
  value: (function () {
9404
- var _unpublishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37(mediaType, stream) {
9405
- return _regenerator.default.wrap(function (_context37) {
9406
- while (1) switch (_context37.prev = _context37.next) {
9715
+ var _unpublishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41(mediaType, stream) {
9716
+ return _regenerator.default.wrap(function (_context41) {
9717
+ while (1) switch (_context41.prev = _context41.next) {
9407
9718
  case 0:
9408
9719
  if (stream) {
9409
- _context37.next = 1;
9720
+ _context41.next = 1;
9410
9721
  break;
9411
9722
  }
9412
- return _context37.abrupt("return");
9723
+ return _context41.abrupt("return");
9413
9724
  case 1:
9414
9725
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
9415
- _context37.next = 2;
9726
+ _context41.next = 2;
9416
9727
  break;
9417
9728
  }
9418
- _context37.next = 2;
9729
+ _context41.next = 2;
9419
9730
  return this.sendSlotManager.unpublishStream(mediaType);
9420
9731
  case 2:
9421
9732
  this.emitPublishStateChangeEvent({
@@ -9426,11 +9737,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9426
9737
  });
9427
9738
  case 3:
9428
9739
  case "end":
9429
- return _context37.stop();
9740
+ return _context41.stop();
9430
9741
  }
9431
- }, _callee37, this);
9742
+ }, _callee41, this);
9432
9743
  }));
9433
- function unpublishStream(_x38, _x39) {
9744
+ function unpublishStream(_x39, _x40) {
9434
9745
  return _unpublishStream.apply(this, arguments);
9435
9746
  }
9436
9747
  return unpublishStream;
@@ -9445,19 +9756,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9445
9756
  }, {
9446
9757
  key: "publishStreams",
9447
9758
  value: (function () {
9448
- var _publishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38(streams) {
9759
+ var _publishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42(streams) {
9449
9760
  var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4, _streams$screenShare5, _streams$screenShare6;
9450
9761
  var streamChecks, _i, _streamChecks, _streamChecks$_i, stream, name, floorRequestNeeded, _streams$screenShare7;
9451
- return _regenerator.default.wrap(function (_context38) {
9452
- while (1) switch (_context38.prev = _context38.next) {
9762
+ return _regenerator.default.wrap(function (_context42) {
9763
+ while (1) switch (_context42.prev = _context42.next) {
9453
9764
  case 0:
9454
9765
  _loggerProxy.default.logger.info("Meeting:index#publishStreams --> called with: ".concat((0, _stringify.default)(streams)));
9455
9766
  this.checkMediaConnection();
9456
9767
  if (!(!streams.microphone && !streams.camera && !((_streams$screenShare = streams.screenShare) !== null && _streams$screenShare !== void 0 && _streams$screenShare.audio) && !((_streams$screenShare2 = streams.screenShare) !== null && _streams$screenShare2 !== void 0 && _streams$screenShare2.video))) {
9457
- _context38.next = 1;
9768
+ _context42.next = 1;
9458
9769
  break;
9459
9770
  }
9460
- return _context38.abrupt("return");
9771
+ return _context42.abrupt("return");
9461
9772
  case 1:
9462
9773
  streamChecks = [{
9463
9774
  stream: streams === null || streams === void 0 ? void 0 : streams.microphone,
@@ -9475,62 +9786,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9475
9786
  _i = 0, _streamChecks = streamChecks;
9476
9787
  case 2:
9477
9788
  if (!(_i < _streamChecks.length)) {
9478
- _context38.next = 4;
9789
+ _context42.next = 4;
9479
9790
  break;
9480
9791
  }
9481
9792
  _streamChecks$_i = _streamChecks[_i], stream = _streamChecks$_i.stream, name = _streamChecks$_i.name;
9482
9793
  if (!((stream === null || stream === void 0 ? void 0 : stream.readyState) === 'ended')) {
9483
- _context38.next = 3;
9794
+ _context42.next = 3;
9484
9795
  break;
9485
9796
  }
9486
9797
  throw new Error("Attempted to publish ".concat(name, " stream with ended readyState, correlationId=").concat(this.correlationId));
9487
9798
  case 3:
9488
9799
  _i++;
9489
- _context38.next = 2;
9800
+ _context42.next = 2;
9490
9801
  break;
9491
9802
  case 4:
9492
9803
  floorRequestNeeded = false; // Screenshare Audio is supported only in multi stream. So we check for screenshare audio presence only if it's a multi stream meeting
9493
9804
  if (!(this.isMultistream && (_streams$screenShare5 = streams.screenShare) !== null && _streams$screenShare5 !== void 0 && _streams$screenShare5.audio)) {
9494
- _context38.next = 6;
9805
+ _context42.next = 6;
9495
9806
  break;
9496
9807
  }
9497
- _context38.next = 5;
9808
+ _context42.next = 5;
9498
9809
  return this.setLocalShareAudioStream(streams.screenShare.audio);
9499
9810
  case 5:
9500
9811
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
9501
9812
  case 6:
9502
9813
  if (!((_streams$screenShare6 = streams.screenShare) !== null && _streams$screenShare6 !== void 0 && _streams$screenShare6.video)) {
9503
- _context38.next = 8;
9814
+ _context42.next = 8;
9504
9815
  break;
9505
9816
  }
9506
- _context38.next = 7;
9817
+ _context42.next = 7;
9507
9818
  return this.setLocalShareVideoStream((_streams$screenShare7 = streams.screenShare) === null || _streams$screenShare7 === void 0 ? void 0 : _streams$screenShare7.video);
9508
9819
  case 7:
9509
9820
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
9510
9821
  case 8:
9511
9822
  if (!streams.microphone) {
9512
- _context38.next = 9;
9823
+ _context42.next = 9;
9513
9824
  break;
9514
9825
  }
9515
- _context38.next = 9;
9826
+ _context42.next = 9;
9516
9827
  return this.setLocalAudioStream(streams.microphone);
9517
9828
  case 9:
9518
9829
  if (!streams.camera) {
9519
- _context38.next = 10;
9830
+ _context42.next = 10;
9520
9831
  break;
9521
9832
  }
9522
- _context38.next = 10;
9833
+ _context42.next = 10;
9523
9834
  return this.setLocalVideoStream(streams.camera);
9524
9835
  case 10:
9525
9836
  if (this.isMultistream) {
9526
- _context38.next = 11;
9837
+ _context42.next = 11;
9527
9838
  break;
9528
9839
  }
9529
- _context38.next = 11;
9840
+ _context42.next = 11;
9530
9841
  return this.updateTranscodedMediaConnection();
9531
9842
  case 11:
9532
9843
  if (!floorRequestNeeded) {
9533
- _context38.next = 12;
9844
+ _context42.next = 12;
9534
9845
  break;
9535
9846
  }
9536
9847
  this.localShareInstanceId = _uuid.default.v4();
@@ -9561,15 +9872,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9561
9872
  // we're sending the http request to Locus to request the screen share floor
9562
9873
  // only after the SDP update, because that's how it's always been done for transcoded meetings
9563
9874
  // and also if sharing from the start, we need confluence to have been created
9564
- _context38.next = 12;
9875
+ _context42.next = 12;
9565
9876
  return this.enqueueScreenShareFloorRequest();
9566
9877
  case 12:
9567
9878
  case "end":
9568
- return _context38.stop();
9879
+ return _context42.stop();
9569
9880
  }
9570
- }, _callee38, this);
9881
+ }, _callee42, this);
9571
9882
  }));
9572
- function publishStreams(_x40) {
9883
+ function publishStreams(_x41) {
9573
9884
  return _publishStreams.apply(this, arguments);
9574
9885
  }
9575
9886
  return publishStreams;
@@ -9584,10 +9895,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9584
9895
  }, {
9585
9896
  key: "unpublishStreams",
9586
9897
  value: (function () {
9587
- var _unpublishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(streams) {
9898
+ var _unpublishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43(streams) {
9588
9899
  var promises, _iterator, _step, stream;
9589
- return _regenerator.default.wrap(function (_context39) {
9590
- while (1) switch (_context39.prev = _context39.next) {
9900
+ return _regenerator.default.wrap(function (_context43) {
9901
+ while (1) switch (_context43.prev = _context43.next) {
9591
9902
  case 0:
9592
9903
  _loggerProxy.default.logger.info("Meeting:index#unpublishStreams --> called with: ".concat((0, _stringify.default)(streams)));
9593
9904
  this.checkMediaConnection();
@@ -9619,7 +9930,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9619
9930
  if (!this.isMultistream) {
9620
9931
  promises.push(this.updateTranscodedMediaConnection());
9621
9932
  }
9622
- _context39.next = 1;
9933
+ _context43.next = 1;
9623
9934
  return _promise.default.all(promises);
9624
9935
  case 1:
9625
9936
  // we're allowing for the SDK to support just audio share as well
@@ -9640,11 +9951,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9640
9951
  }
9641
9952
  case 2:
9642
9953
  case "end":
9643
- return _context39.stop();
9954
+ return _context43.stop();
9644
9955
  }
9645
- }, _callee39, this);
9956
+ }, _callee43, this);
9646
9957
  }));
9647
- function unpublishStreams(_x41) {
9958
+ function unpublishStreams(_x42) {
9648
9959
  return _unpublishStreams.apply(this, arguments);
9649
9960
  }
9650
9961
  return unpublishStreams;
@@ -9710,16 +10021,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9710
10021
  }, {
9711
10022
  key: "getMediaReachabilityMetricFields",
9712
10023
  value: (function () {
9713
- var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40() {
10024
+ var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44() {
9714
10025
  var _this$mediaServerIp, _this$mediaConnection, _this$mediaConnection2, _this$mediaConnection3;
9715
10026
  var reachabilityMetrics, successKeys, totalSuccessCases, selectedSubnetFirstOctet, isSubnetReachable, selectedCluster;
9716
- return _regenerator.default.wrap(function (_context40) {
9717
- while (1) switch (_context40.prev = _context40.next) {
10027
+ return _regenerator.default.wrap(function (_context44) {
10028
+ while (1) switch (_context44.prev = _context44.next) {
9718
10029
  case 0:
9719
- _context40.next = 1;
10030
+ _context44.next = 1;
9720
10031
  return this.webex.meetings.reachability.getReachabilityMetrics();
9721
10032
  case 1:
9722
- reachabilityMetrics = _context40.sent;
10033
+ reachabilityMetrics = _context44.sent;
9723
10034
  successKeys = ['reachability_public_udp_success', 'reachability_public_tcp_success', 'reachability_public_xtls_success', 'reachability_vmn_udp_success', 'reachability_vmn_tcp_success', 'reachability_vmn_xtls_success'];
9724
10035
  totalSuccessCases = successKeys.reduce(function (total, key) {
9725
10036
  var value = reachabilityMetrics[key];
@@ -9736,16 +10047,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9736
10047
  this.webex.meetings.reachability.isSubnetReachable(selectedSubnetFirstOctet);
9737
10048
  }
9738
10049
  selectedCluster = (_this$mediaConnection = (_this$mediaConnection2 = this.mediaConnections) === null || _this$mediaConnection2 === void 0 ? void 0 : (_this$mediaConnection3 = _this$mediaConnection2[0]) === null || _this$mediaConnection3 === void 0 ? void 0 : _this$mediaConnection3.mediaAgentCluster) !== null && _this$mediaConnection !== void 0 ? _this$mediaConnection : null;
9739
- return _context40.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
10050
+ return _context44.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
9740
10051
  subnet_reachable: isSubnetReachable,
9741
10052
  selected_cluster: selectedCluster,
9742
10053
  selected_subnet: selectedSubnetFirstOctet ? "".concat(selectedSubnetFirstOctet, ".X.X.X") : null
9743
10054
  }));
9744
10055
  case 2:
9745
10056
  case "end":
9746
- return _context40.stop();
10057
+ return _context44.stop();
9747
10058
  }
9748
- }, _callee40, this);
10059
+ }, _callee44, this);
9749
10060
  }));
9750
10061
  function getMediaReachabilityMetricFields() {
9751
10062
  return _getMediaReachabilityMetricFields.apply(this, arguments);
@@ -9762,17 +10073,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9762
10073
  }, {
9763
10074
  key: "setStage",
9764
10075
  value: function setStage() {
9765
- var _ref38 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
9766
- _ref38$activeSpeakerP = _ref38.activeSpeakerProportion,
9767
- activeSpeakerProportion = _ref38$activeSpeakerP === void 0 ? 0.5 : _ref38$activeSpeakerP,
9768
- customBackground = _ref38.customBackground,
9769
- customLogo = _ref38.customLogo,
9770
- customNameLabel = _ref38.customNameLabel,
9771
- importantParticipants = _ref38.importantParticipants,
9772
- _ref38$lockAttendeeVi = _ref38.lockAttendeeViewOnStage,
9773
- lockAttendeeViewOnStage = _ref38$lockAttendeeVi === void 0 ? false : _ref38$lockAttendeeVi,
9774
- _ref38$showActiveSpea = _ref38.showActiveSpeaker,
9775
- showActiveSpeaker = _ref38$showActiveSpea === void 0 ? false : _ref38$showActiveSpea;
10076
+ var _ref44 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
10077
+ _ref44$activeSpeakerP = _ref44.activeSpeakerProportion,
10078
+ activeSpeakerProportion = _ref44$activeSpeakerP === void 0 ? 0.5 : _ref44$activeSpeakerP,
10079
+ customBackground = _ref44.customBackground,
10080
+ customLogo = _ref44.customLogo,
10081
+ customNameLabel = _ref44.customNameLabel,
10082
+ importantParticipants = _ref44.importantParticipants,
10083
+ _ref44$lockAttendeeVi = _ref44.lockAttendeeViewOnStage,
10084
+ lockAttendeeViewOnStage = _ref44$lockAttendeeVi === void 0 ? false : _ref44$lockAttendeeVi,
10085
+ _ref44$showActiveSpea = _ref44.showActiveSpeaker,
10086
+ showActiveSpeaker = _ref44$showActiveSpea === void 0 ? false : _ref44$showActiveSpea;
9776
10087
  var videoLayout = {
9777
10088
  overrideDefault: true,
9778
10089
  lockAttendeeViewOnStageOnly: lockAttendeeViewOnStage,
@@ -9868,6 +10179,71 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9868
10179
  value: function cancelSipCallOut(participantId) {
9869
10180
  return this.meetingRequest.cancelSipCallOut(participantId);
9870
10181
  }
10182
+
10183
+ /**
10184
+ * Method to get new data
10185
+ * @returns {Promise}
10186
+ */
10187
+ }, {
10188
+ key: "refreshDataChannelToken",
10189
+ value: (function () {
10190
+ var _refreshDataChannelToken = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45() {
10191
+ var isPracticeSession, dataChannelTokenType, res, msg, _t36;
10192
+ return _regenerator.default.wrap(function (_context45) {
10193
+ while (1) switch (_context45.prev = _context45.next) {
10194
+ case 0:
10195
+ isPracticeSession = this.webinar.isJoinPracticeSessionDataChannel();
10196
+ dataChannelTokenType = this.getDataChannelTokenType();
10197
+ _context45.prev = 1;
10198
+ _context45.next = 2;
10199
+ return this.meetingRequest.fetchDatachannelToken({
10200
+ locusUrl: this.locusUrl,
10201
+ requestingParticipantId: this.members.selfId,
10202
+ isPracticeSession: isPracticeSession
10203
+ });
10204
+ case 2:
10205
+ res = _context45.sent;
10206
+ return _context45.abrupt("return", {
10207
+ body: {
10208
+ datachannelToken: res.body.datachannelToken,
10209
+ dataChannelTokenType: dataChannelTokenType
10210
+ }
10211
+ });
10212
+ case 3:
10213
+ _context45.prev = 3;
10214
+ _t36 = _context45["catch"](1);
10215
+ msg = (_t36 === null || _t36 === void 0 ? void 0 : _t36.message) || String(_t36);
10216
+ _loggerProxy.default.logger.warn("Meeting:index#refreshDataChannelToken --> DataChannel token refresh failed (likely locus changed or participant left): ".concat(msg), {
10217
+ statusCode: _t36 === null || _t36 === void 0 ? void 0 : _t36.statusCode
10218
+ });
10219
+ return _context45.abrupt("return", null);
10220
+ case 4:
10221
+ case "end":
10222
+ return _context45.stop();
10223
+ }
10224
+ }, _callee45, this, [[1, 3]]);
10225
+ }));
10226
+ function refreshDataChannelToken() {
10227
+ return _refreshDataChannelToken.apply(this, arguments);
10228
+ }
10229
+ return refreshDataChannelToken;
10230
+ }()
10231
+ /**
10232
+ * Determines the current data channel token type based on the meeting state.
10233
+ *
10234
+ * variant should be used when connecting to the LLM data channel.
10235
+ *
10236
+ * @returns {DataChannelTokenType} The token type representing the current session mode.
10237
+ */
10238
+ )
10239
+ }, {
10240
+ key: "getDataChannelTokenType",
10241
+ value: function getDataChannelTokenType() {
10242
+ if (this.webinar.isJoinPracticeSessionDataChannel()) {
10243
+ return _internalPluginLlm.DataChannelTokenType.PracticeSession;
10244
+ }
10245
+ return _internalPluginLlm.DataChannelTokenType.Default;
10246
+ }
9871
10247
  }]);
9872
10248
  }(_webexCore.StatelessWebexPlugin);
9873
10249
  //# sourceMappingURL=index.js.map