@webex/plugin-meetings 2.60.1-next.7 → 2.60.1-next.8

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 (54) hide show
  1. package/README.md +12 -0
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/constants.d.ts +12 -2
  5. package/dist/constants.js +15 -5
  6. package/dist/constants.js.map +1 -1
  7. package/dist/interpretation/index.js +1 -1
  8. package/dist/interpretation/siLanguage.js +1 -1
  9. package/dist/locus-info/index.d.ts +1 -1
  10. package/dist/locus-info/index.js +8 -8
  11. package/dist/locus-info/index.js.map +1 -1
  12. package/dist/meeting/index.d.ts +62 -18
  13. package/dist/meeting/index.js +679 -568
  14. package/dist/meeting/index.js.map +1 -1
  15. package/dist/meeting/request.js +25 -18
  16. package/dist/meeting/request.js.map +1 -1
  17. package/dist/meeting/util.d.ts +16 -0
  18. package/dist/meeting/util.js +71 -0
  19. package/dist/meeting/util.js.map +1 -1
  20. package/dist/meetings/index.d.ts +25 -3
  21. package/dist/meetings/index.js +83 -32
  22. package/dist/meetings/index.js.map +1 -1
  23. package/dist/reachability/index.js +11 -6
  24. package/dist/reachability/index.js.map +1 -1
  25. package/dist/reconnection-manager/index.js +3 -1
  26. package/dist/reconnection-manager/index.js.map +1 -1
  27. package/dist/roap/index.js +50 -54
  28. package/dist/roap/index.js.map +1 -1
  29. package/dist/statsAnalyzer/index.js +1 -1
  30. package/dist/statsAnalyzer/index.js.map +1 -1
  31. package/dist/statsAnalyzer/mqaUtil.js +13 -10
  32. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  33. package/dist/webinar/index.js +1 -1
  34. package/package.json +22 -22
  35. package/src/constants.ts +13 -2
  36. package/src/locus-info/index.ts +13 -12
  37. package/src/meeting/index.ts +215 -116
  38. package/src/meeting/request.ts +7 -0
  39. package/src/meeting/util.ts +97 -0
  40. package/src/meetings/index.ts +59 -18
  41. package/src/reachability/index.ts +7 -4
  42. package/src/reconnection-manager/index.ts +1 -1
  43. package/src/roap/index.ts +49 -51
  44. package/src/statsAnalyzer/index.ts +2 -2
  45. package/src/statsAnalyzer/mqaUtil.ts +15 -14
  46. package/test/unit/spec/locus-info/index.js +53 -5
  47. package/test/unit/spec/meeting/index.js +1792 -1139
  48. package/test/unit/spec/meeting/request.js +22 -12
  49. package/test/unit/spec/meeting/utils.js +93 -0
  50. package/test/unit/spec/meetings/index.js +180 -21
  51. package/test/unit/spec/reachability/index.ts +2 -1
  52. package/test/unit/spec/reconnection-manager/index.js +1 -0
  53. package/test/unit/spec/roap/index.ts +28 -42
  54. package/test/unit/spec/stats-analyzer/index.js +415 -30
@@ -488,6 +488,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
488
488
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "environment", void 0);
489
489
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "namespace", _constants.MEETINGS);
490
490
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "allowMediaInLobby", void 0);
491
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "localShareInstanceId", void 0);
492
+ (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "remoteShareInstanceId", void 0);
491
493
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "turnDiscoverySkippedReason", void 0);
492
494
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "turnServerUsed", void 0);
493
495
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "areVoiceaEventsSetup", false);
@@ -717,9 +719,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
717
719
  sdp: event.roapMessage.sdp,
718
720
  seq: event.roapMessage.seq,
719
721
  tieBreaker: event.roapMessage.tieBreaker,
720
- meeting: (0, _assertThisInitialized2.default)(_this),
721
- // or can pass meeting ID
722
- reconnect: _this.reconnectionManager.isReconnectInProgress()
722
+ meeting: (0, _assertThisInitialized2.default)(_this) // or can pass meeting ID
723
723
  }).then(function (_ref2) {
724
724
  var roapAnswer = _ref2.roapAnswer;
725
725
  if (roapAnswer) {
@@ -969,7 +969,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
969
969
  _this.webex.internal.newMetrics.submitClientEvent({
970
970
  name: 'client.media.tx.start',
971
971
  payload: {
972
- mediaType: data.type
972
+ mediaType: data.type,
973
+ shareInstanceId: data.type === 'share' ? _this.localShareInstanceId : undefined
973
974
  },
974
975
  options: {
975
976
  meetingId: _this.id
@@ -981,7 +982,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
981
982
  _this.webex.internal.newMetrics.submitClientEvent({
982
983
  name: 'client.media.tx.stop',
983
984
  payload: {
984
- mediaType: data.type
985
+ mediaType: data.type,
986
+ shareInstanceId: data.type === 'share' ? _this.localShareInstanceId : undefined
985
987
  },
986
988
  options: {
987
989
  meetingId: _this.id
@@ -997,7 +999,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
997
999
  _this.webex.internal.newMetrics.submitClientEvent({
998
1000
  name: 'client.media.rx.start',
999
1001
  payload: {
1000
- mediaType: data.type
1002
+ mediaType: data.type,
1003
+ shareInstanceId: data.type === 'share' ? _this.remoteShareInstanceId : undefined
1001
1004
  },
1002
1005
  options: {
1003
1006
  meetingId: _this.id
@@ -1009,7 +1012,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1009
1012
  _this.webex.internal.newMetrics.submitClientEvent({
1010
1013
  name: 'client.media.rx.stop',
1011
1014
  payload: {
1012
- mediaType: data.type
1015
+ mediaType: data.type,
1016
+ shareInstanceId: data.type === 'share' ? _this.remoteShareInstanceId : undefined
1013
1017
  },
1014
1018
  options: {
1015
1019
  meetingId: _this.id
@@ -1892,6 +1896,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1892
1896
  */
1893
1897
  _this.keepAliveTimerId = null;
1894
1898
 
1899
+ /**
1900
+ * id for tracking Local Share instances in Call Analyzer
1901
+ * @instance
1902
+ * @type {String}
1903
+ * @private
1904
+ * @memberof Meeting
1905
+ */
1906
+ _this.localShareInstanceId = null;
1907
+
1908
+ /**
1909
+ * id for tracking Remote Share instances in Call Analyzer
1910
+ * @instance
1911
+ * @type {String}
1912
+ * @private
1913
+ * @memberof Meeting
1914
+ */
1915
+ _this.remoteShareInstanceId = null;
1916
+
1895
1917
  /**
1896
1918
  * The class that helps to control recording functions: start, stop, pause, resume, etc
1897
1919
  * @instance
@@ -2053,6 +2075,99 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2053
2075
  this.callStateForMetrics.correlationId = correlationId;
2054
2076
  }
2055
2077
 
2078
+ /**
2079
+ * Set meeting info and trigger `MEETING_INFO_AVAILABLE` event
2080
+ * @param {any} info
2081
+ * @param {string} [meetingLookupUrl] Lookup url, defined when the meeting info fetched
2082
+ * @returns {void}
2083
+ */
2084
+ }, {
2085
+ key: "setMeetingInfo",
2086
+ value: function setMeetingInfo(info, meetingLookupUrl) {
2087
+ this.meetingInfo = info ? _objectSpread(_objectSpread({}, info), {}, {
2088
+ meetingLookupUrl: meetingLookupUrl
2089
+ }) : null;
2090
+ this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.NONE;
2091
+ this.requiredCaptcha = null;
2092
+ if (this.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED || this.passwordStatus === _constants.PASSWORD_STATUS.VERIFIED) {
2093
+ this.passwordStatus = _constants.PASSWORD_STATUS.VERIFIED;
2094
+ } else {
2095
+ this.passwordStatus = _constants.PASSWORD_STATUS.NOT_REQUIRED;
2096
+ }
2097
+ _triggerProxy.default.trigger(this, {
2098
+ file: 'meetings',
2099
+ function: 'fetchMeetingInfo'
2100
+ }, _constants.EVENT_TRIGGERS.MEETING_INFO_AVAILABLE);
2101
+ this.updateMeetingActions();
2102
+ }
2103
+
2104
+ /**
2105
+ * Add pre-fetched meeting info
2106
+ *
2107
+ * The passed meeting info should be be complete, e.g.: fetched after password or captcha provided
2108
+ *
2109
+ * @param {Object} meetingInfo - Complete meeting info
2110
+ * @param {FetchMeetingInfoParams} fetchParams - Fetch parameters for validation
2111
+ * @param {String|undefined} meetingLookupUrl - Lookup url, defined when the meeting info fetched
2112
+ * @returns {Promise<void>}
2113
+ */
2114
+ }, {
2115
+ key: "injectMeetingInfo",
2116
+ value: (function () {
2117
+ var _injectMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(meetingInfo, fetchParams, meetingLookupUrl) {
2118
+ return _regenerator.default.wrap(function _callee4$(_context4) {
2119
+ while (1) switch (_context4.prev = _context4.next) {
2120
+ case 0:
2121
+ _context4.next = 2;
2122
+ return this.prepForFetchMeetingInfo(fetchParams, 'injectMeetingInfo');
2123
+ case 2:
2124
+ this.parseMeetingInfo(meetingInfo, this.destination);
2125
+ this.setMeetingInfo(meetingInfo, meetingLookupUrl);
2126
+ case 4:
2127
+ case "end":
2128
+ return _context4.stop();
2129
+ }
2130
+ }, _callee4, this);
2131
+ }));
2132
+ function injectMeetingInfo(_x2, _x3, _x4) {
2133
+ return _injectMeetingInfo.apply(this, arguments);
2134
+ }
2135
+ return injectMeetingInfo;
2136
+ }()
2137
+ /**
2138
+ * Validate fetch parameters and clear the fetchMeetingInfoTimeout timeout
2139
+ *
2140
+ * @param {FetchMeetingInfoParams} fetchParams - fetch parameters for validation
2141
+ * @param {String} caller - Name of the caller for logging
2142
+ *
2143
+ * @returns {Promise<void>}
2144
+ * @private
2145
+ */
2146
+ )
2147
+ }, {
2148
+ key: "prepForFetchMeetingInfo",
2149
+ value: function prepForFetchMeetingInfo(_ref7, caller) {
2150
+ var _ref7$password = _ref7.password,
2151
+ password = _ref7$password === void 0 ? null : _ref7$password,
2152
+ _ref7$captchaCode = _ref7.captchaCode,
2153
+ captchaCode = _ref7$captchaCode === void 0 ? null : _ref7$captchaCode,
2154
+ _ref7$extraParams = _ref7.extraParams,
2155
+ extraParams = _ref7$extraParams === void 0 ? {} : _ref7$extraParams;
2156
+ // when fetch meeting info is called directly by the client, we want to clear out the random timer for sdk to do it
2157
+ if (this.fetchMeetingInfoTimeoutId) {
2158
+ clearTimeout(this.fetchMeetingInfoTimeoutId);
2159
+ this.fetchMeetingInfoTimeoutId = undefined;
2160
+ }
2161
+ if (captchaCode && !this.requiredCaptcha) {
2162
+ return _promise.default.reject(new Error("".concat(caller, "() called with captchaCode when captcha was not required")));
2163
+ }
2164
+ if (password && this.passwordStatus !== _constants.PASSWORD_STATUS.REQUIRED && this.passwordStatus !== _constants.PASSWORD_STATUS.UNKNOWN) {
2165
+ return _promise.default.reject(new Error("".concat(caller, "() called with password when password was not required")));
2166
+ }
2167
+ this.meetingInfoExtraParams = (0, _lodash.cloneDeep)(extraParams);
2168
+ return _promise.default.resolve();
2169
+ }
2170
+
2056
2171
  /**
2057
2172
  * Internal method for fetching meeting info
2058
2173
  *
@@ -2061,18 +2176,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2061
2176
  }, {
2062
2177
  key: "fetchMeetingInfoInternal",
2063
2178
  value: (function () {
2064
- var _fetchMeetingInfoInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref7) {
2065
- var destination, destinationType, _ref7$password, password, _ref7$captchaCode, captchaCode, _ref7$extraParams, extraParams, _ref7$sendCAevents, sendCAevents, captchaInfo, info, _err$body, _err$body2;
2066
- return _regenerator.default.wrap(function _callee4$(_context4) {
2067
- while (1) switch (_context4.prev = _context4.next) {
2179
+ var _fetchMeetingInfoInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(_ref8) {
2180
+ var destination, destinationType, _ref8$password, password, _ref8$captchaCode, captchaCode, _ref8$extraParams, extraParams, _ref8$sendCAevents, sendCAevents, captchaInfo, info, _err$body, _err$body2;
2181
+ return _regenerator.default.wrap(function _callee5$(_context5) {
2182
+ while (1) switch (_context5.prev = _context5.next) {
2068
2183
  case 0:
2069
- destination = _ref7.destination, destinationType = _ref7.destinationType, _ref7$password = _ref7.password, password = _ref7$password === void 0 ? null : _ref7$password, _ref7$captchaCode = _ref7.captchaCode, captchaCode = _ref7$captchaCode === void 0 ? null : _ref7$captchaCode, _ref7$extraParams = _ref7.extraParams, extraParams = _ref7$extraParams === void 0 ? {} : _ref7$extraParams, _ref7$sendCAevents = _ref7.sendCAevents, sendCAevents = _ref7$sendCAevents === void 0 ? false : _ref7$sendCAevents;
2070
- _context4.prev = 1;
2184
+ 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;
2185
+ _context5.prev = 1;
2071
2186
  captchaInfo = captchaCode ? {
2072
2187
  code: captchaCode,
2073
2188
  id: this.requiredCaptcha.captchaId
2074
2189
  } : null;
2075
- _context4.next = 5;
2190
+ _context5.next = 5;
2076
2191
  return this.attrs.meetingInfoProvider.fetchMeetingInfo(destination, destinationType, password, captchaInfo,
2077
2192
  // @ts-ignore - config coming from registerPlugin
2078
2193
  this.config.installedOrgID, this.locusId, extraParams, {
@@ -2080,86 +2195,72 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2080
2195
  sendCAevents: sendCAevents
2081
2196
  });
2082
2197
  case 5:
2083
- info = _context4.sent;
2084
- this.parseMeetingInfo(info, this.destination);
2085
- this.meetingInfo = info ? _objectSpread(_objectSpread({}, info.body), {}, {
2086
- meetingLookupUrl: info === null || info === void 0 ? void 0 : info.url
2087
- }) : null;
2088
- this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.NONE;
2089
- this.requiredCaptcha = null;
2090
- if (this.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED || this.passwordStatus === _constants.PASSWORD_STATUS.VERIFIED) {
2091
- this.passwordStatus = _constants.PASSWORD_STATUS.VERIFIED;
2092
- } else {
2093
- this.passwordStatus = _constants.PASSWORD_STATUS.NOT_REQUIRED;
2094
- }
2095
- _triggerProxy.default.trigger(this, {
2096
- file: 'meetings',
2097
- function: 'fetchMeetingInfo'
2098
- }, _constants.EVENT_TRIGGERS.MEETING_INFO_AVAILABLE);
2099
- this.updateMeetingActions();
2100
- return _context4.abrupt("return", _promise.default.resolve());
2101
- case 16:
2102
- _context4.prev = 16;
2103
- _context4.t0 = _context4["catch"](1);
2198
+ info = _context5.sent;
2199
+ this.parseMeetingInfo(info === null || info === void 0 ? void 0 : info.body, this.destination, info === null || info === void 0 ? void 0 : info.errors);
2200
+ this.setMeetingInfo(info === null || info === void 0 ? void 0 : info.body, info === null || info === void 0 ? void 0 : info.url);
2201
+ return _context5.abrupt("return", _promise.default.resolve());
2202
+ case 11:
2203
+ _context5.prev = 11;
2204
+ _context5.t0 = _context5["catch"](1);
2104
2205
  this.updateMeetingActions();
2105
- if (!(_context4.t0 instanceof _meetingInfoV.MeetingInfoV2PolicyError)) {
2106
- _context4.next = 26;
2206
+ if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2PolicyError)) {
2207
+ _context5.next = 21;
2107
2208
  break;
2108
2209
  }
2109
2210
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.POLICY;
2110
- this.meetingInfoFailureCode = _context4.t0.wbxAppApiCode;
2111
- if (_context4.t0.meetingInfo) {
2112
- this.meetingInfo = _context4.t0.meetingInfo;
2211
+ this.meetingInfoFailureCode = _context5.t0.wbxAppApiCode;
2212
+ if (_context5.t0.meetingInfo) {
2213
+ this.meetingInfo = _context5.t0.meetingInfo;
2113
2214
  }
2114
2215
  throw new _permission.default();
2115
- case 26:
2116
- if (!(_context4.t0 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
2117
- _context4.next = 38;
2216
+ case 21:
2217
+ if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
2218
+ _context5.next = 33;
2118
2219
  break;
2119
2220
  }
2120
2221
  _loggerProxy.default.logger.info( // @ts-ignore
2121
- "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - password required (code=").concat(_context4.t0 === null || _context4.t0 === void 0 ? void 0 : (_err$body = _context4.t0.body) === null || _err$body === void 0 ? void 0 : _err$body.code, ")."));
2222
+ "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - password required (code=").concat(_context5.t0 === null || _context5.t0 === void 0 ? void 0 : (_err$body = _context5.t0.body) === null || _err$body === void 0 ? void 0 : _err$body.code, ")."));
2122
2223
 
2123
2224
  // when wbxappapi requires password it still populates partial meeting info in the response
2124
- if (_context4.t0.meetingInfo) {
2125
- this.meetingInfo = _context4.t0.meetingInfo;
2126
- this.meetingNumber = _context4.t0.meetingInfo.meetingNumber;
2225
+ if (_context5.t0.meetingInfo) {
2226
+ this.meetingInfo = _context5.t0.meetingInfo;
2227
+ this.meetingNumber = _context5.t0.meetingInfo.meetingNumber;
2127
2228
  }
2128
- this.meetingInfoFailureCode = _context4.t0.wbxAppApiCode;
2229
+ this.meetingInfoFailureCode = _context5.t0.wbxAppApiCode;
2129
2230
  this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
2130
2231
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
2131
2232
  if (!this.requiredCaptcha) {
2132
- _context4.next = 35;
2233
+ _context5.next = 30;
2133
2234
  break;
2134
2235
  }
2135
- _context4.next = 35;
2236
+ _context5.next = 30;
2136
2237
  return this.refreshCaptcha();
2137
- case 35:
2238
+ case 30:
2138
2239
  throw new _passwordError.default();
2139
- case 38:
2140
- if (!(_context4.t0 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
2141
- _context4.next = 47;
2240
+ case 33:
2241
+ if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
2242
+ _context5.next = 42;
2142
2243
  break;
2143
2244
  }
2144
2245
  _loggerProxy.default.logger.info( // @ts-ignore
2145
- "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - captcha required (code=").concat(_context4.t0 === null || _context4.t0 === void 0 ? void 0 : (_err$body2 = _context4.t0.body) === null || _err$body2 === void 0 ? void 0 : _err$body2.code, ")."));
2246
+ "Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - captcha required (code=").concat(_context5.t0 === null || _context5.t0 === void 0 ? void 0 : (_err$body2 = _context5.t0.body) === null || _err$body2 === void 0 ? void 0 : _err$body2.code, ")."));
2146
2247
  this.meetingInfoFailureReason = this.requiredCaptcha ? _constants.MEETING_INFO_FAILURE_REASON.WRONG_CAPTCHA : _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
2147
- this.meetingInfoFailureCode = _context4.t0.wbxAppApiCode;
2148
- if (_context4.t0.isPasswordRequired) {
2248
+ this.meetingInfoFailureCode = _context5.t0.wbxAppApiCode;
2249
+ if (_context5.t0.isPasswordRequired) {
2149
2250
  this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
2150
2251
  }
2151
- this.requiredCaptcha = _context4.t0.captchaInfo;
2252
+ this.requiredCaptcha = _context5.t0.captchaInfo;
2152
2253
  throw new _captchaError.default();
2153
- case 47:
2254
+ case 42:
2154
2255
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.OTHER;
2155
- throw _context4.t0;
2156
- case 49:
2256
+ throw _context5.t0;
2257
+ case 44:
2157
2258
  case "end":
2158
- return _context4.stop();
2259
+ return _context5.stop();
2159
2260
  }
2160
- }, _callee4, this, [[1, 16]]);
2261
+ }, _callee5, this, [[1, 11]]);
2161
2262
  }));
2162
- function fetchMeetingInfoInternal(_x2) {
2263
+ function fetchMeetingInfoInternal(_x5) {
2163
2264
  return _fetchMeetingInfoInternal.apply(this, arguments);
2164
2265
  }
2165
2266
  return fetchMeetingInfoInternal;
@@ -2174,18 +2275,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2174
2275
  }, {
2175
2276
  key: "refreshPermissionToken",
2176
2277
  value: (function () {
2177
- var _refreshPermissionToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(reason) {
2278
+ var _refreshPermissionToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(reason) {
2178
2279
  var _this$meetingInfo;
2179
2280
  var isStartingSpaceInstantV2Meeting, destination, destinationType, permissionTokenExpiryInfo, timeLeft, expiryTime, currentTime;
2180
- return _regenerator.default.wrap(function _callee5$(_context5) {
2181
- while (1) switch (_context5.prev = _context5.next) {
2281
+ return _regenerator.default.wrap(function _callee6$(_context6) {
2282
+ while (1) switch (_context6.prev = _context6.next) {
2182
2283
  case 0:
2183
2284
  if ((_this$meetingInfo = this.meetingInfo) !== null && _this$meetingInfo !== void 0 && _this$meetingInfo.permissionToken) {
2184
- _context5.next = 3;
2285
+ _context6.next = 3;
2185
2286
  break;
2186
2287
  }
2187
2288
  _loggerProxy.default.logger.info("Meeting:index#refreshPermissionToken --> cannot refresh the permission token, because we don't have it (reason=".concat(reason, ")"));
2188
- return _context5.abrupt("return");
2289
+ return _context6.abrupt("return");
2189
2290
  case 3:
2190
2291
  isStartingSpaceInstantV2Meeting = this.destinationType === _constants._CONVERSATION_URL_ &&
2191
2292
  // @ts-ignore - config coming from registerPlugin
@@ -2207,8 +2308,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2207
2308
  reason: reason,
2208
2309
  destinationType: destinationType
2209
2310
  });
2210
- _context5.prev = 12;
2211
- _context5.next = 15;
2311
+ _context6.prev = 12;
2312
+ _context6.next = 15;
2212
2313
  return this.fetchMeetingInfoInternal({
2213
2314
  destination: destination,
2214
2315
  destinationType: destinationType,
@@ -2218,25 +2319,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2218
2319
  sendCAevents: true // because if we're refreshing the permissionToken, it means that user is intending to join that meeting, so we want CA events
2219
2320
  });
2220
2321
  case 15:
2221
- _context5.next = 22;
2322
+ _context6.next = 22;
2222
2323
  break;
2223
2324
  case 17:
2224
- _context5.prev = 17;
2225
- _context5.t0 = _context5["catch"](12);
2226
- _loggerProxy.default.logger.info('Meeting:index#refreshPermissionToken --> failed to refresh the permission token:', _context5.t0);
2325
+ _context6.prev = 17;
2326
+ _context6.t0 = _context6["catch"](12);
2327
+ _loggerProxy.default.logger.info('Meeting:index#refreshPermissionToken --> failed to refresh the permission token:', _context6.t0);
2227
2328
  _metrics.default.sendBehavioralMetric(_constants2.default.PERMISSION_TOKEN_REFRESH_ERROR, {
2228
2329
  correlationId: this.correlationId,
2229
- reason: _context5.t0.message,
2230
- stack: _context5.t0.stack
2330
+ reason: _context6.t0.message,
2331
+ stack: _context6.t0.stack
2231
2332
  });
2232
- throw _context5.t0;
2333
+ throw _context6.t0;
2233
2334
  case 22:
2234
2335
  case "end":
2235
- return _context5.stop();
2336
+ return _context6.stop();
2236
2337
  }
2237
- }, _callee5, this, [[12, 17]]);
2338
+ }, _callee6, this, [[12, 17]]);
2238
2339
  }));
2239
- function refreshPermissionToken(_x3) {
2340
+ function refreshPermissionToken(_x6) {
2240
2341
  return _refreshPermissionToken.apply(this, arguments);
2241
2342
  }
2242
2343
  return refreshPermissionToken;
@@ -2255,45 +2356,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2255
2356
  }, {
2256
2357
  key: "fetchMeetingInfo",
2257
2358
  value: (function () {
2258
- var _fetchMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(_ref8) {
2259
- var _ref8$password, password, _ref8$captchaCode, captchaCode, _ref8$extraParams, extraParams, _ref8$sendCAevents, sendCAevents;
2260
- return _regenerator.default.wrap(function _callee6$(_context6) {
2261
- while (1) switch (_context6.prev = _context6.next) {
2359
+ var _fetchMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(options) {
2360
+ return _regenerator.default.wrap(function _callee7$(_context7) {
2361
+ while (1) switch (_context7.prev = _context7.next) {
2262
2362
  case 0:
2263
- _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;
2264
- // when fetch meeting info is called directly by the client, we want to clear out the random timer for sdk to do it
2265
- if (this.fetchMeetingInfoTimeoutId) {
2266
- clearTimeout(this.fetchMeetingInfoTimeoutId);
2267
- this.fetchMeetingInfoTimeoutId = undefined;
2268
- }
2269
- if (!(captchaCode && !this.requiredCaptcha)) {
2270
- _context6.next = 4;
2271
- break;
2272
- }
2273
- return _context6.abrupt("return", _promise.default.reject(new Error('fetchMeetingInfo() called with captchaCode when captcha was not required')));
2274
- case 4:
2275
- if (!(password && this.passwordStatus !== _constants.PASSWORD_STATUS.REQUIRED && this.passwordStatus !== _constants.PASSWORD_STATUS.UNKNOWN)) {
2276
- _context6.next = 6;
2277
- break;
2278
- }
2279
- return _context6.abrupt("return", _promise.default.reject(new Error('fetchMeetingInfo() called with password when password was not required')));
2280
- case 6:
2281
- this.meetingInfoExtraParams = (0, _lodash.cloneDeep)(extraParams);
2282
- return _context6.abrupt("return", this.fetchMeetingInfoInternal({
2363
+ _context7.next = 2;
2364
+ return this.prepForFetchMeetingInfo(options, 'fetchMeetingInfo');
2365
+ case 2:
2366
+ return _context7.abrupt("return", this.fetchMeetingInfoInternal(_objectSpread({
2283
2367
  destination: this.destination,
2284
- destinationType: this.destinationType,
2285
- password: password,
2286
- captchaCode: captchaCode,
2287
- extraParams: extraParams,
2288
- sendCAevents: sendCAevents
2289
- }));
2290
- case 8:
2368
+ destinationType: this.destinationType
2369
+ }, options)));
2370
+ case 3:
2291
2371
  case "end":
2292
- return _context6.stop();
2372
+ return _context7.stop();
2293
2373
  }
2294
- }, _callee6, this);
2374
+ }, _callee7, this);
2295
2375
  }));
2296
- function fetchMeetingInfo(_x4) {
2376
+ function fetchMeetingInfo(_x7) {
2297
2377
  return _fetchMeetingInfo.apply(this, arguments);
2298
2378
  }
2299
2379
  return fetchMeetingInfo;
@@ -2850,18 +2930,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2850
2930
  function: 'setupLocusControlsListener'
2851
2931
  }, _constants.EVENT_TRIGGERS.MEETING_INTERPRETATION_UPDATE);
2852
2932
  });
2853
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_JOIN_BREAKOUT_FROM_MAIN, function (_ref14) {
2854
- var mainLocusUrl = _ref14.mainLocusUrl;
2855
- _this13.meetingRequest.getLocusStatusByUrl(mainLocusUrl).catch(function (error) {
2856
- // clear main session cache when attendee join into breakout and forbidden to get locus from main locus url,
2857
- // which means main session is not active for the attendee
2858
- if ((error === null || error === void 0 ? void 0 : error.statusCode) === 403) {
2859
- _this13.locusInfo.clearMainSessionLocusCache();
2860
- }
2861
- });
2862
- });
2863
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED, function (_ref15) {
2864
- var entryExitTone = _ref15.entryExitTone;
2933
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED, function (_ref14) {
2934
+ var entryExitTone = _ref14.entryExitTone;
2865
2935
  _triggerProxy.default.trigger(_this13, {
2866
2936
  file: 'meeting/index',
2867
2937
  function: 'setupLocusControlsListener'
@@ -2869,8 +2939,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2869
2939
  entryExitTone: entryExitTone
2870
2940
  });
2871
2941
  });
2872
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MUTE_ON_ENTRY_CHANGED, function (_ref16) {
2873
- var state = _ref16.state;
2942
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MUTE_ON_ENTRY_CHANGED, function (_ref15) {
2943
+ var state = _ref15.state;
2874
2944
  _triggerProxy.default.trigger(_this13, {
2875
2945
  file: 'meeting/index',
2876
2946
  function: 'setupLocusControlsListener'
@@ -2878,8 +2948,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2878
2948
  state: state
2879
2949
  });
2880
2950
  });
2881
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_SHARE_CONTROL_CHANGED, function (_ref17) {
2882
- var state = _ref17.state;
2951
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_SHARE_CONTROL_CHANGED, function (_ref16) {
2952
+ var state = _ref16.state;
2883
2953
  _triggerProxy.default.trigger(_this13, {
2884
2954
  file: 'meeting/index',
2885
2955
  function: 'setupLocusControlsListener'
@@ -2887,8 +2957,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2887
2957
  state: state
2888
2958
  });
2889
2959
  });
2890
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_DISALLOW_UNMUTE_CHANGED, function (_ref18) {
2891
- var state = _ref18.state;
2960
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_DISALLOW_UNMUTE_CHANGED, function (_ref17) {
2961
+ var state = _ref17.state;
2892
2962
  _triggerProxy.default.trigger(_this13, {
2893
2963
  file: 'meeting/index',
2894
2964
  function: 'setupLocusControlsListener'
@@ -2896,8 +2966,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2896
2966
  state: state
2897
2967
  });
2898
2968
  });
2899
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_REACTIONS_CHANGED, function (_ref19) {
2900
- var state = _ref19.state;
2969
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_REACTIONS_CHANGED, function (_ref18) {
2970
+ var state = _ref18.state;
2901
2971
  _triggerProxy.default.trigger(_this13, {
2902
2972
  file: 'meeting/index',
2903
2973
  function: 'setupLocusControlsListener'
@@ -2905,8 +2975,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2905
2975
  state: state
2906
2976
  });
2907
2977
  });
2908
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_VIEW_THE_PARTICIPANTS_LIST_CHANGED, function (_ref20) {
2909
- var state = _ref20.state;
2978
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_VIEW_THE_PARTICIPANTS_LIST_CHANGED, function (_ref19) {
2979
+ var state = _ref19.state;
2910
2980
  _triggerProxy.default.trigger(_this13, {
2911
2981
  file: 'meeting/index',
2912
2982
  function: 'setupLocusControlsListener'
@@ -2914,8 +2984,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2914
2984
  state: state
2915
2985
  });
2916
2986
  });
2917
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RAISE_HAND_CHANGED, function (_ref21) {
2918
- var state = _ref21.state;
2987
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RAISE_HAND_CHANGED, function (_ref20) {
2988
+ var state = _ref20.state;
2919
2989
  _triggerProxy.default.trigger(_this13, {
2920
2990
  file: 'meeting/index',
2921
2991
  function: 'setupLocusControlsListener'
@@ -2923,8 +2993,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2923
2993
  state: state
2924
2994
  });
2925
2995
  });
2926
- this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_VIDEO_CHANGED, function (_ref22) {
2927
- var state = _ref22.state;
2996
+ this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_VIDEO_CHANGED, function (_ref21) {
2997
+ var state = _ref21.state;
2928
2998
  _triggerProxy.default.trigger(_this13, {
2929
2999
  file: 'meeting/index',
2930
3000
  function: 'setupLocusControlsListener'
@@ -2970,21 +3040,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2970
3040
  var _this14 = this;
2971
3041
  // Will get triggered on local and remote share
2972
3042
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, /*#__PURE__*/function () {
2973
- var _ref23 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(payload) {
3043
+ var _ref22 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
2974
3044
  var _payload$previous, _payload$previous2;
2975
3045
  var _payload$current, contentShare, whiteboardShare, previousContentShare, previousWhiteboardShare, newShareStatus, oldShareStatus, sendStartedSharingRemote, _this14$mediaProperti;
2976
- return _regenerator.default.wrap(function _callee7$(_context7) {
2977
- while (1) switch (_context7.prev = _context7.next) {
3046
+ return _regenerator.default.wrap(function _callee8$(_context8) {
3047
+ while (1) switch (_context8.prev = _context8.next) {
2978
3048
  case 0:
2979
3049
  _payload$current = payload.current, contentShare = _payload$current.content, whiteboardShare = _payload$current.whiteboard;
2980
3050
  previousContentShare = (_payload$previous = payload.previous) === null || _payload$previous === void 0 ? void 0 : _payload$previous.content;
2981
3051
  previousWhiteboardShare = (_payload$previous2 = payload.previous) === null || _payload$previous2 === void 0 ? void 0 : _payload$previous2.whiteboard;
2982
3052
  _this14.triggerAnnotationInfoEvent(contentShare, previousContentShare);
2983
3053
  if (!(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))) {
2984
- _context7.next = 6;
3054
+ _context8.next = 6;
2985
3055
  break;
2986
3056
  }
2987
- return _context7.abrupt("return");
3057
+ return _context8.abrupt("return");
2988
3058
  case 6:
2989
3059
  newShareStatus = _this14.shareStatus; // REMOTE - check if remote started sharing
2990
3060
  if (_this14.selfId !== contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
@@ -3013,22 +3083,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3013
3083
  newShareStatus = _constants.SHARE_STATUS.NO_SHARE;
3014
3084
  }
3015
3085
  if (!(newShareStatus !== _this14.shareStatus)) {
3016
- _context7.next = 45;
3086
+ _context8.next = 45;
3017
3087
  break;
3018
3088
  }
3019
3089
  oldShareStatus = _this14.shareStatus; // update our state before we send out any notifications
3020
3090
  _this14.shareStatus = newShareStatus;
3021
3091
 
3022
3092
  // send out "stop" notifications for the old state
3023
- _context7.t0 = oldShareStatus;
3024
- _context7.next = _context7.t0 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 14 : _context7.t0 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 16 : _context7.t0 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 18 : _context7.t0 === _constants.SHARE_STATUS.NO_SHARE ? 20 : 21;
3093
+ _context8.t0 = oldShareStatus;
3094
+ _context8.next = _context8.t0 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 14 : _context8.t0 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 16 : _context8.t0 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 18 : _context8.t0 === _constants.SHARE_STATUS.NO_SHARE ? 20 : 21;
3025
3095
  break;
3026
3096
  case 14:
3027
3097
  _triggerProxy.default.trigger(_this14, {
3028
3098
  file: 'meetings/index',
3029
3099
  function: 'remoteShare'
3030
3100
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_REMOTE);
3031
- return _context7.abrupt("break", 22);
3101
+ return _context8.abrupt("break", 22);
3032
3102
  case 16:
3033
3103
  _triggerProxy.default.trigger(_this14, {
3034
3104
  file: 'meeting/index',
@@ -3036,46 +3106,47 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3036
3106
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL, {
3037
3107
  reason: _constants.SHARE_STOPPED_REASON.SELF_STOPPED
3038
3108
  });
3039
- return _context7.abrupt("break", 22);
3109
+ return _context8.abrupt("break", 22);
3040
3110
  case 18:
3041
3111
  _triggerProxy.default.trigger(_this14, {
3042
3112
  file: 'meeting/index',
3043
3113
  function: 'stopWhiteboardShare'
3044
3114
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_WHITEBOARD);
3045
- return _context7.abrupt("break", 22);
3115
+ return _context8.abrupt("break", 22);
3046
3116
  case 20:
3047
- return _context7.abrupt("break", 22);
3117
+ return _context8.abrupt("break", 22);
3048
3118
  case 21:
3049
- return _context7.abrupt("break", 22);
3119
+ return _context8.abrupt("break", 22);
3050
3120
  case 22:
3051
- _context7.t1 = newShareStatus;
3052
- _context7.next = _context7.t1 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 25 : _context7.t1 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 34 : _context7.t1 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 37 : _context7.t1 === _constants.SHARE_STATUS.NO_SHARE ? 40 : 41;
3121
+ _context8.t1 = newShareStatus;
3122
+ _context8.next = _context8.t1 === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE ? 25 : _context8.t1 === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE ? 34 : _context8.t1 === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE ? 37 : _context8.t1 === _constants.SHARE_STATUS.NO_SHARE ? 40 : 41;
3053
3123
  break;
3054
3124
  case 25:
3055
3125
  sendStartedSharingRemote = function sendStartedSharingRemote() {
3126
+ _this14.remoteShareInstanceId = contentShare.shareInstanceId;
3056
3127
  _triggerProxy.default.trigger(_this14, {
3057
3128
  file: 'meetings/index',
3058
3129
  function: 'remoteShare'
3059
3130
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE, {
3060
3131
  memberId: contentShare.beneficiaryId,
3061
3132
  url: contentShare.url,
3062
- shareInstanceId: contentShare.shareInstanceId,
3133
+ shareInstanceId: _this14.remoteShareInstanceId,
3063
3134
  annotationInfo: contentShare.annotation
3064
3135
  });
3065
3136
  };
3066
- _context7.prev = 26;
3137
+ _context8.prev = 26;
3067
3138
  if (!((_this14$mediaProperti = _this14.mediaProperties.mediaDirection) !== null && _this14$mediaProperti !== void 0 && _this14$mediaProperti.sendShare && oldShareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE)) {
3068
- _context7.next = 30;
3139
+ _context8.next = 30;
3069
3140
  break;
3070
3141
  }
3071
- _context7.next = 30;
3142
+ _context8.next = 30;
3072
3143
  return _this14.unpublishStreams([_this14.mediaProperties.shareVideoStream, _this14.mediaProperties.shareAudioStream]);
3073
3144
  case 30:
3074
- _context7.prev = 30;
3145
+ _context8.prev = 30;
3075
3146
  sendStartedSharingRemote();
3076
- return _context7.finish(30);
3147
+ return _context8.finish(30);
3077
3148
  case 33:
3078
- return _context7.abrupt("break", 42);
3149
+ return _context8.abrupt("break", 42);
3079
3150
  case 34:
3080
3151
  _triggerProxy.default.trigger(_this14, {
3081
3152
  file: 'meeting/index',
@@ -3085,13 +3156,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3085
3156
  _this14.webex.internal.newMetrics.submitClientEvent({
3086
3157
  name: 'client.share.floor-granted.local',
3087
3158
  payload: {
3088
- mediaType: 'share'
3159
+ mediaType: 'share',
3160
+ shareInstanceId: _this14.localShareInstanceId
3089
3161
  },
3090
3162
  options: {
3091
3163
  meetingId: _this14.id
3092
3164
  }
3093
3165
  });
3094
- return _context7.abrupt("break", 42);
3166
+ return _context8.abrupt("break", 42);
3095
3167
  case 37:
3096
3168
  _triggerProxy.default.trigger(_this14, {
3097
3169
  file: 'meeting/index',
@@ -3110,26 +3182,27 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3110
3182
  meetingId: _this14.id
3111
3183
  }
3112
3184
  });
3113
- return _context7.abrupt("break", 42);
3185
+ return _context8.abrupt("break", 42);
3114
3186
  case 40:
3115
- return _context7.abrupt("break", 42);
3187
+ return _context8.abrupt("break", 42);
3116
3188
  case 41:
3117
- return _context7.abrupt("break", 42);
3189
+ return _context8.abrupt("break", 42);
3118
3190
  case 42:
3119
3191
  _this14.members.locusMediaSharesUpdate(payload);
3120
- _context7.next = 46;
3192
+ _context8.next = 46;
3121
3193
  break;
3122
3194
  case 45:
3123
3195
  if (newShareStatus === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE) {
3124
3196
  // if we got here, then some remote participant has stolen
3125
3197
  // the presentation from another remote participant
3198
+ _this14.remoteShareInstanceId = contentShare.shareInstanceId;
3126
3199
  _triggerProxy.default.trigger(_this14, {
3127
3200
  file: 'meetings/index',
3128
3201
  function: 'remoteShare'
3129
3202
  }, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE, {
3130
3203
  memberId: contentShare.beneficiaryId,
3131
3204
  url: contentShare.url,
3132
- shareInstanceId: contentShare.shareInstanceId,
3205
+ shareInstanceId: _this14.remoteShareInstanceId,
3133
3206
  annotationInfo: contentShare.annotation
3134
3207
  });
3135
3208
  _this14.members.locusMediaSharesUpdate(payload);
@@ -3157,12 +3230,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3157
3230
  }
3158
3231
  case 46:
3159
3232
  case "end":
3160
- return _context7.stop();
3233
+ return _context8.stop();
3161
3234
  }
3162
- }, _callee7, null, [[26,, 30, 33]]);
3235
+ }, _callee8, null, [[26,, 30, 33]]);
3163
3236
  }));
3164
- return function (_x5) {
3165
- return _ref23.apply(this, arguments);
3237
+ return function (_x8) {
3238
+ return _ref22.apply(this, arguments);
3166
3239
  };
3167
3240
  }());
3168
3241
  }
@@ -3380,9 +3453,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3380
3453
  }
3381
3454
  });
3382
3455
  this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, /*#__PURE__*/function () {
3383
- var _ref24 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
3384
- return _regenerator.default.wrap(function _callee8$(_context8) {
3385
- while (1) switch (_context8.prev = _context8.next) {
3456
+ var _ref23 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(payload) {
3457
+ return _regenerator.default.wrap(function _callee9$(_context9) {
3458
+ while (1) switch (_context9.prev = _context9.next) {
3386
3459
  case 0:
3387
3460
  _this19.stopKeepAlive();
3388
3461
  if (payload) {
@@ -3403,12 +3476,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3403
3476
  }
3404
3477
  case 2:
3405
3478
  case "end":
3406
- return _context8.stop();
3479
+ return _context9.stop();
3407
3480
  }
3408
- }, _callee8);
3481
+ }, _callee9);
3409
3482
  }));
3410
- return function (_x6) {
3411
- return _ref24.apply(this, arguments);
3483
+ return function (_x9) {
3484
+ return _ref23.apply(this, arguments);
3412
3485
  };
3413
3486
  }());
3414
3487
 
@@ -3510,48 +3583,48 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3510
3583
  }
3511
3584
  });
3512
3585
  this.locusInfo.on(_constants.EVENTS.DESTROY_MEETING, /*#__PURE__*/function () {
3513
- var _ref25 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(payload) {
3514
- return _regenerator.default.wrap(function _callee9$(_context9) {
3515
- while (1) switch (_context9.prev = _context9.next) {
3586
+ var _ref24 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(payload) {
3587
+ return _regenerator.default.wrap(function _callee10$(_context10) {
3588
+ while (1) switch (_context10.prev = _context10.next) {
3516
3589
  case 0:
3517
3590
  if (!_this20.wirelessShare) {
3518
- _context9.next = 7;
3591
+ _context10.next = 7;
3519
3592
  break;
3520
3593
  }
3521
3594
  if (!_this20.mediaProperties.shareVideoStream) {
3522
- _context9.next = 4;
3595
+ _context10.next = 4;
3523
3596
  break;
3524
3597
  }
3525
- _context9.next = 4;
3598
+ _context10.next = 4;
3526
3599
  return _this20.setLocalShareVideoStream(undefined);
3527
3600
  case 4:
3528
3601
  if (!_this20.mediaProperties.shareAudioStream) {
3529
- _context9.next = 7;
3602
+ _context10.next = 7;
3530
3603
  break;
3531
3604
  }
3532
- _context9.next = 7;
3605
+ _context10.next = 7;
3533
3606
  return _this20.setLocalShareAudioStream(undefined);
3534
3607
  case 7:
3535
3608
  if (!payload.shouldLeave) {
3536
- _context9.next = 19;
3609
+ _context10.next = 19;
3537
3610
  break;
3538
3611
  }
3539
- _context9.prev = 8;
3540
- _context9.next = 11;
3612
+ _context10.prev = 8;
3613
+ _context10.next = 11;
3541
3614
  return _this20.leave({
3542
3615
  reason: payload.reason
3543
3616
  });
3544
3617
  case 11:
3545
3618
  _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.');
3546
- _context9.next = 17;
3619
+ _context10.next = 17;
3547
3620
  break;
3548
3621
  case 14:
3549
- _context9.prev = 14;
3550
- _context9.t0 = _context9["catch"](8);
3622
+ _context10.prev = 14;
3623
+ _context10.t0 = _context10["catch"](8);
3551
3624
  // @ts-ignore
3552
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_context9.t0));
3625
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_context10.t0));
3553
3626
  case 17:
3554
- _context9.next = 22;
3627
+ _context10.next = 22;
3555
3628
  break;
3556
3629
  case 19:
3557
3630
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> MEETING_REMOVED_REASON', payload.reason);
@@ -3565,12 +3638,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3565
3638
  });
3566
3639
  case 22:
3567
3640
  case "end":
3568
- return _context9.stop();
3641
+ return _context10.stop();
3569
3642
  }
3570
- }, _callee9, null, [[8, 14]]);
3643
+ }, _callee10, null, [[8, 14]]);
3571
3644
  }));
3572
- return function (_x7) {
3573
- return _ref25.apply(this, arguments);
3645
+ return function (_x10) {
3646
+ return _ref24.apply(this, arguments);
3574
3647
  };
3575
3648
  }());
3576
3649
  }
@@ -3719,12 +3792,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3719
3792
  /**
3720
3793
  * Sets the meeting info on the class instance
3721
3794
  * @param {Object} meetingInfo
3722
- * @param {Object} meetingInfo.body
3723
- * @param {String} meetingInfo.body.conversationUrl
3724
- * @param {String} meetingInfo.body.locusUrl
3725
- * @param {String} meetingInfo.body.sipUri
3726
- * @param {Object} meetingInfo.body.owner
3795
+ * @param {String} meetingInfo.conversationUrl
3796
+ * @param {String} meetingInfo.locusUrl
3797
+ * @param {String} meetingInfo.sipUri
3798
+ * @param {String} [meetingInfo.sipUrl]
3799
+ * @param {String} [meetingInfo.sipMeetingUri]
3800
+ * @param {String} [meetingInfo.meetingNumber]
3801
+ * @param {String} [meetingInfo.meetingJoinUrl]
3802
+ * @param {String} [meetingInfo.hostId]
3803
+ * @param {String} [meetingInfo.permissionToken]
3804
+ * @param {String} [meetingInfo.channel]
3805
+ * @param {Object} meetingInfo.owner
3727
3806
  * @param {Object | String} destination locus object with meeting data or destination string (sip url, meeting link, etc)
3807
+ * @param {Object | String} errors Meeting info request error
3728
3808
  * @returns {undefined}
3729
3809
  * @private
3730
3810
  * @memberof Meeting
@@ -3733,7 +3813,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3733
3813
  key: "parseMeetingInfo",
3734
3814
  value: function parseMeetingInfo(meetingInfo) {
3735
3815
  var destination = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
3736
- var webexMeetingInfo = meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.body;
3816
+ var errors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
3737
3817
  // We try to use as much info from Locus meeting object, stored in destination
3738
3818
 
3739
3819
  var locusMeetingObject;
@@ -3742,28 +3822,28 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
3742
3822
  }
3743
3823
 
3744
3824
  // MeetingInfo will be undefined for 1:1 calls
3745
- if (locusMeetingObject || webexMeetingInfo && !(meetingInfo !== null && meetingInfo !== void 0 && meetingInfo.errors && (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.errors.length) > 0)) {
3825
+ if (locusMeetingObject || meetingInfo && !((errors === null || errors === void 0 ? void 0 : errors.length) > 0)) {
3746
3826
  var _locusMeetingObject, _locusMeetingObject2, _locusMeetingObject3, _locusMeetingObject4, _locusMeetingObject6, _locusMeetingObject7;
3747
- this.conversationUrl = ((_locusMeetingObject = locusMeetingObject) === null || _locusMeetingObject === void 0 ? void 0 : _locusMeetingObject.conversationUrl) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.conversationUrl) || this.conversationUrl;
3748
- this.locusUrl = ((_locusMeetingObject2 = locusMeetingObject) === null || _locusMeetingObject2 === void 0 ? void 0 : _locusMeetingObject2.url) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.locusUrl) || this.locusUrl;
3827
+ this.conversationUrl = ((_locusMeetingObject = locusMeetingObject) === null || _locusMeetingObject === void 0 ? void 0 : _locusMeetingObject.conversationUrl) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.conversationUrl) || this.conversationUrl;
3828
+ this.locusUrl = ((_locusMeetingObject2 = locusMeetingObject) === null || _locusMeetingObject2 === void 0 ? void 0 : _locusMeetingObject2.url) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.locusUrl) || this.locusUrl;
3749
3829
  // @ts-ignore - config coming from registerPlugin
3750
3830
  this.setSipUri(
3751
3831
  // @ts-ignore
3752
- this.config.experimental.enableUnifiedMeetings ? ((_locusMeetingObject3 = locusMeetingObject) === null || _locusMeetingObject3 === void 0 ? void 0 : _locusMeetingObject3.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipUrl) : ((_locusMeetingObject4 = locusMeetingObject) === null || _locusMeetingObject4 === void 0 ? void 0 : _locusMeetingObject4.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipMeetingUri) || this.sipUri);
3832
+ this.config.experimental.enableUnifiedMeetings ? ((_locusMeetingObject3 = locusMeetingObject) === null || _locusMeetingObject3 === void 0 ? void 0 : _locusMeetingObject3.info.sipUri) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.sipUrl) : ((_locusMeetingObject4 = locusMeetingObject) === null || _locusMeetingObject4 === void 0 ? void 0 : _locusMeetingObject4.info.sipUri) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.sipMeetingUri) || this.sipUri);
3753
3833
  // @ts-ignore - config coming from registerPlugin
3754
3834
  if (this.config.experimental.enableUnifiedMeetings) {
3755
3835
  var _locusMeetingObject5;
3756
- this.meetingNumber = ((_locusMeetingObject5 = locusMeetingObject) === null || _locusMeetingObject5 === void 0 ? void 0 : _locusMeetingObject5.info.webExMeetingId) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.meetingNumber);
3757
- this.meetingJoinUrl = webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.meetingJoinUrl;
3836
+ this.meetingNumber = ((_locusMeetingObject5 = locusMeetingObject) === null || _locusMeetingObject5 === void 0 ? void 0 : _locusMeetingObject5.info.webExMeetingId) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.meetingNumber);
3837
+ this.meetingJoinUrl = meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.meetingJoinUrl;
3758
3838
  }
3759
- this.owner = ((_locusMeetingObject6 = locusMeetingObject) === null || _locusMeetingObject6 === void 0 ? void 0 : _locusMeetingObject6.info.owner) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.owner) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.hostId) || this.owner;
3760
- this.permissionToken = webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.permissionToken;
3761
- this.setPermissionTokenPayload(webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.permissionToken);
3839
+ this.owner = ((_locusMeetingObject6 = locusMeetingObject) === null || _locusMeetingObject6 === void 0 ? void 0 : _locusMeetingObject6.info.owner) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.owner) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.hostId) || this.owner;
3840
+ this.permissionToken = meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.permissionToken;
3841
+ this.setPermissionTokenPayload(meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.permissionToken);
3762
3842
  this.setSelfUserPolicies();
3763
3843
  // Need to populate environment when sending CA event
3764
- this.environment = ((_locusMeetingObject7 = locusMeetingObject) === null || _locusMeetingObject7 === void 0 ? void 0 : _locusMeetingObject7.info.channel) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.channel);
3844
+ this.environment = ((_locusMeetingObject7 = locusMeetingObject) === null || _locusMeetingObject7 === void 0 ? void 0 : _locusMeetingObject7.info.channel) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.channel);
3765
3845
  }
3766
- _util.default.parseInterpretationInfo(this, webexMeetingInfo);
3846
+ _util.default.parseInterpretationInfo(this, meetingInfo);
3767
3847
  }
3768
3848
 
3769
3849
  /**
@@ -4148,10 +4228,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4148
4228
  }, {
4149
4229
  key: "setLocalAudioStream",
4150
4230
  value: (function () {
4151
- var _setLocalAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(localStream) {
4231
+ var _setLocalAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(localStream) {
4152
4232
  var oldStream;
4153
- return _regenerator.default.wrap(function _callee10$(_context10) {
4154
- while (1) switch (_context10.prev = _context10.next) {
4233
+ return _regenerator.default.wrap(function _callee11$(_context11) {
4234
+ while (1) switch (_context11.prev = _context11.next) {
4155
4235
  case 0:
4156
4236
  oldStream = this.mediaProperties.audioStream;
4157
4237
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.MuteStateChange, this.localAudioStreamMuteStateHandler);
@@ -4163,21 +4243,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4163
4243
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.StreamEventNames.MuteStateChange, this.localAudioStreamMuteStateHandler);
4164
4244
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4165
4245
  if (!(!this.isMultistream || !localStream)) {
4166
- _context10.next = 10;
4246
+ _context11.next = 10;
4167
4247
  break;
4168
4248
  }
4169
- _context10.next = 10;
4249
+ _context11.next = 10;
4170
4250
  return this.unpublishStream(_internalMediaCore.MediaType.AudioMain, oldStream);
4171
4251
  case 10:
4172
- _context10.next = 12;
4252
+ _context11.next = 12;
4173
4253
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
4174
4254
  case 12:
4175
4255
  case "end":
4176
- return _context10.stop();
4256
+ return _context11.stop();
4177
4257
  }
4178
- }, _callee10, this);
4258
+ }, _callee11, this);
4179
4259
  }));
4180
- function setLocalAudioStream(_x8) {
4260
+ function setLocalAudioStream(_x11) {
4181
4261
  return _setLocalAudioStream.apply(this, arguments);
4182
4262
  }
4183
4263
  return setLocalAudioStream;
@@ -4193,10 +4273,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4193
4273
  }, {
4194
4274
  key: "setLocalVideoStream",
4195
4275
  value: (function () {
4196
- var _setLocalVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(localStream) {
4276
+ var _setLocalVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(localStream) {
4197
4277
  var oldStream;
4198
- return _regenerator.default.wrap(function _callee11$(_context11) {
4199
- while (1) switch (_context11.prev = _context11.next) {
4278
+ return _regenerator.default.wrap(function _callee12$(_context12) {
4279
+ while (1) switch (_context12.prev = _context12.next) {
4200
4280
  case 0:
4201
4281
  oldStream = this.mediaProperties.videoStream;
4202
4282
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.MuteStateChange, this.localVideoStreamMuteStateHandler);
@@ -4208,21 +4288,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4208
4288
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.StreamEventNames.MuteStateChange, this.localVideoStreamMuteStateHandler);
4209
4289
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4210
4290
  if (!(!this.isMultistream || !localStream)) {
4211
- _context11.next = 10;
4291
+ _context12.next = 10;
4212
4292
  break;
4213
4293
  }
4214
- _context11.next = 10;
4294
+ _context12.next = 10;
4215
4295
  return this.unpublishStream(_internalMediaCore.MediaType.VideoMain, oldStream);
4216
4296
  case 10:
4217
- _context11.next = 12;
4297
+ _context12.next = 12;
4218
4298
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
4219
4299
  case 12:
4220
4300
  case "end":
4221
- return _context11.stop();
4301
+ return _context12.stop();
4222
4302
  }
4223
- }, _callee11, this);
4303
+ }, _callee12, this);
4224
4304
  }));
4225
- function setLocalVideoStream(_x9) {
4305
+ function setLocalVideoStream(_x12) {
4226
4306
  return _setLocalVideoStream.apply(this, arguments);
4227
4307
  }
4228
4308
  return setLocalVideoStream;
@@ -4239,10 +4319,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4239
4319
  }, {
4240
4320
  key: "setLocalShareVideoStream",
4241
4321
  value: (function () {
4242
- var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(localDisplayStream) {
4322
+ var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(localDisplayStream) {
4243
4323
  var oldStream;
4244
- return _regenerator.default.wrap(function _callee12$(_context12) {
4245
- while (1) switch (_context12.prev = _context12.next) {
4324
+ return _regenerator.default.wrap(function _callee13$(_context13) {
4325
+ while (1) switch (_context13.prev = _context13.next) {
4246
4326
  case 0:
4247
4327
  oldStream = this.mediaProperties.shareVideoStream;
4248
4328
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.MuteStateChange, this.handleShareVideoStreamMuteStateChange);
@@ -4254,21 +4334,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4254
4334
  localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4255
4335
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
4256
4336
  if (!(!this.isMultistream || !localDisplayStream)) {
4257
- _context12.next = 12;
4337
+ _context13.next = 12;
4258
4338
  break;
4259
4339
  }
4260
- _context12.next = 12;
4340
+ _context13.next = 12;
4261
4341
  return this.unpublishStream(_internalMediaCore.MediaType.VideoSlides, oldStream);
4262
4342
  case 12:
4263
- _context12.next = 14;
4343
+ _context13.next = 14;
4264
4344
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
4265
4345
  case 14:
4266
4346
  case "end":
4267
- return _context12.stop();
4347
+ return _context13.stop();
4268
4348
  }
4269
- }, _callee12, this);
4349
+ }, _callee13, this);
4270
4350
  }));
4271
- function setLocalShareVideoStream(_x10) {
4351
+ function setLocalShareVideoStream(_x13) {
4272
4352
  return _setLocalShareVideoStream.apply(this, arguments);
4273
4353
  }
4274
4354
  return setLocalShareVideoStream;
@@ -4284,10 +4364,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4284
4364
  }, {
4285
4365
  key: "setLocalShareAudioStream",
4286
4366
  value: (function () {
4287
- var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(localSystemAudioStream) {
4367
+ var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(localSystemAudioStream) {
4288
4368
  var oldStream;
4289
- return _regenerator.default.wrap(function _callee13$(_context13) {
4290
- while (1) switch (_context13.prev = _context13.next) {
4369
+ return _regenerator.default.wrap(function _callee14$(_context14) {
4370
+ while (1) switch (_context14.prev = _context14.next) {
4291
4371
  case 0:
4292
4372
  oldStream = this.mediaProperties.shareAudioStream;
4293
4373
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareAudioStreamEnded);
@@ -4297,21 +4377,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4297
4377
  localSystemAudioStream === null || localSystemAudioStream === void 0 ? void 0 : localSystemAudioStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4298
4378
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
4299
4379
  if (!(!this.isMultistream || !localSystemAudioStream)) {
4300
- _context13.next = 10;
4380
+ _context14.next = 10;
4301
4381
  break;
4302
4382
  }
4303
- _context13.next = 10;
4383
+ _context14.next = 10;
4304
4384
  return this.unpublishStream(_internalMediaCore.MediaType.AudioSlides, oldStream);
4305
4385
  case 10:
4306
- _context13.next = 12;
4386
+ _context14.next = 12;
4307
4387
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
4308
4388
  case 12:
4309
4389
  case "end":
4310
- return _context13.stop();
4390
+ return _context14.stop();
4311
4391
  }
4312
- }, _callee13, this);
4392
+ }, _callee14, this);
4313
4393
  }));
4314
- function setLocalShareAudioStream(_x11) {
4394
+ function setLocalShareAudioStream(_x14) {
4315
4395
  return _setLocalShareAudioStream.apply(this, arguments);
4316
4396
  }
4317
4397
  return setLocalShareAudioStream;
@@ -4988,49 +5068,49 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
4988
5068
  }, {
4989
5069
  key: "startTranscription",
4990
5070
  value: (function () {
4991
- var _startTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(options) {
4992
- return _regenerator.default.wrap(function _callee14$(_context14) {
4993
- while (1) switch (_context14.prev = _context14.next) {
5071
+ var _startTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(options) {
5072
+ return _regenerator.default.wrap(function _callee15$(_context15) {
5073
+ while (1) switch (_context15.prev = _context15.next) {
4994
5074
  case 0:
4995
5075
  if (!this.isJoined()) {
4996
- _context14.next = 15;
5076
+ _context15.next = 15;
4997
5077
  break;
4998
5078
  }
4999
5079
  _loggerProxy.default.logger.info('Meeting:index#startTranscription --> Attempting to enable transcription!');
5000
- _context14.prev = 2;
5080
+ _context15.prev = 2;
5001
5081
  if (!this.areVoiceaEventsSetup) {
5002
5082
  this.setUpVoiceaListeners();
5003
5083
  }
5004
5084
  if (!(this.getCurUserType() === 'host')) {
5005
- _context14.next = 7;
5085
+ _context15.next = 7;
5006
5086
  break;
5007
5087
  }
5008
- _context14.next = 7;
5088
+ _context15.next = 7;
5009
5089
  return this.webex.internal.voicea.toggleTranscribing(true, options === null || options === void 0 ? void 0 : options.spokenLanguage);
5010
5090
  case 7:
5011
- _context14.next = 13;
5091
+ _context15.next = 13;
5012
5092
  break;
5013
5093
  case 9:
5014
- _context14.prev = 9;
5015
- _context14.t0 = _context14["catch"](2);
5016
- _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_context14.t0));
5094
+ _context15.prev = 9;
5095
+ _context15.t0 = _context15["catch"](2);
5096
+ _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_context15.t0));
5017
5097
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
5018
5098
  correlation_id: this.correlationId,
5019
- reason: _context14.t0.message,
5020
- stack: _context14.t0.stack
5099
+ reason: _context15.t0.message,
5100
+ stack: _context15.t0.stack
5021
5101
  });
5022
5102
  case 13:
5023
- _context14.next = 16;
5103
+ _context15.next = 16;
5024
5104
  break;
5025
5105
  case 15:
5026
5106
  _loggerProxy.default.logger.error("Meeting:index#startTranscription --> meeting joined : ".concat(this.isJoined()));
5027
5107
  case 16:
5028
5108
  case "end":
5029
- return _context14.stop();
5109
+ return _context15.stop();
5030
5110
  }
5031
- }, _callee14, this, [[2, 9]]);
5111
+ }, _callee15, this, [[2, 9]]);
5032
5112
  }));
5033
- function startTranscription(_x12) {
5113
+ function startTranscription(_x15) {
5034
5114
  return _startTranscription.apply(this, arguments);
5035
5115
  }
5036
5116
  return startTranscription;
@@ -5094,7 +5174,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5094
5174
  }, {
5095
5175
  key: "join",
5096
5176
  value: (function () {
5097
- var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
5177
+ var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5098
5178
  var _this32 = this;
5099
5179
  var options,
5100
5180
  errorMessage,
@@ -5105,25 +5185,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5105
5185
  _error,
5106
5186
  _errorMessage2,
5107
5187
  _error2,
5108
- _args15 = arguments;
5109
- return _regenerator.default.wrap(function _callee15$(_context15) {
5110
- while (1) switch (_context15.prev = _context15.next) {
5188
+ _args16 = arguments;
5189
+ return _regenerator.default.wrap(function _callee16$(_context16) {
5190
+ while (1) switch (_context16.prev = _context16.next) {
5111
5191
  case 0:
5112
- options = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
5192
+ options = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
5113
5193
  if (this.webex.meetings.registered) {
5114
- _context15.next = 6;
5194
+ _context16.next = 6;
5115
5195
  break;
5116
5196
  }
5117
5197
  errorMessage = 'Meeting:index#join --> Device not registered';
5118
5198
  error = new Error(errorMessage);
5119
5199
  _loggerProxy.default.logger.error(errorMessage);
5120
- return _context15.abrupt("return", _promise.default.reject(error));
5200
+ return _context16.abrupt("return", _promise.default.reject(error));
5121
5201
  case 6:
5122
5202
  if (!this.deferJoin) {
5123
- _context15.next = 8;
5203
+ _context16.next = 8;
5124
5204
  break;
5125
5205
  }
5126
- return _context15.abrupt("return", this.deferJoin);
5206
+ return _context16.abrupt("return", this.deferJoin);
5127
5207
  case 8:
5128
5208
  // Create a deferred promise for a consistent resolve value from utils.
5129
5209
  // This also prevents redundant API calls.
@@ -5172,15 +5252,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5172
5252
  this.wirelessShare = true;
5173
5253
  }
5174
5254
  if (!options.meetingQuality) {
5175
- _context15.next = 36;
5255
+ _context16.next = 36;
5176
5256
  break;
5177
5257
  }
5178
5258
  if (!(typeof options.meetingQuality === 'string')) {
5179
- _context15.next = 27;
5259
+ _context16.next = 27;
5180
5260
  break;
5181
5261
  }
5182
5262
  if (_constants.QUALITY_LEVELS[options.meetingQuality]) {
5183
- _context15.next = 26;
5263
+ _context16.next = 26;
5184
5264
  break;
5185
5265
  }
5186
5266
  _errorMessage = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
@@ -5188,16 +5268,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5188
5268
  _loggerProxy.default.logger.error(_errorMessage);
5189
5269
  joinFailed(_error);
5190
5270
  this.deferJoin = undefined;
5191
- return _context15.abrupt("return", _promise.default.reject(_error));
5271
+ return _context16.abrupt("return", _promise.default.reject(_error));
5192
5272
  case 26:
5193
5273
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
5194
5274
  case 27:
5195
5275
  if (!((0, _typeof2.default)(options.meetingQuality) === 'object')) {
5196
- _context15.next = 36;
5276
+ _context16.next = 36;
5197
5277
  break;
5198
5278
  }
5199
5279
  if (_constants.QUALITY_LEVELS[options.meetingQuality.remote]) {
5200
- _context15.next = 35;
5280
+ _context16.next = 35;
5201
5281
  break;
5202
5282
  }
5203
5283
  _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
@@ -5205,42 +5285,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5205
5285
  _error2 = new Error(_errorMessage2);
5206
5286
  joinFailed(_error2);
5207
5287
  this.deferJoin = undefined;
5208
- return _context15.abrupt("return", _promise.default.reject(new Error(_errorMessage2)));
5288
+ return _context16.abrupt("return", _promise.default.reject(new Error(_errorMessage2)));
5209
5289
  case 35:
5210
5290
  if (options.meetingQuality.remote) {
5211
5291
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality.remote);
5212
5292
  }
5213
5293
  case 36:
5214
5294
  this.isMultistream = !!options.enableMultistream;
5215
- _context15.prev = 37;
5216
- _context15.next = 40;
5295
+ _context16.prev = 37;
5296
+ _context16.next = 40;
5217
5297
  return this.checkAndRefreshPermissionToken(_constants.MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC, _constants.MEETING_PERMISSION_TOKEN_REFRESH_REASON);
5218
5298
  case 40:
5219
- _context15.next = 51;
5299
+ _context16.next = 51;
5220
5300
  break;
5221
5301
  case 42:
5222
- _context15.prev = 42;
5223
- _context15.t0 = _context15["catch"](37);
5224
- _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _context15.t0);
5225
- if (!(_context15.t0 instanceof _captchaError.default || _context15.t0 instanceof _passwordError.default || _context15.t0 instanceof _permission.default)) {
5226
- _context15.next = 51;
5302
+ _context16.prev = 42;
5303
+ _context16.t0 = _context16["catch"](37);
5304
+ _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _context16.t0);
5305
+ if (!(_context16.t0 instanceof _captchaError.default || _context16.t0 instanceof _passwordError.default || _context16.t0 instanceof _permission.default)) {
5306
+ _context16.next = 51;
5227
5307
  break;
5228
5308
  }
5229
- this.meetingFiniteStateMachine.fail(_context15.t0);
5309
+ this.meetingFiniteStateMachine.fail(_context16.t0);
5230
5310
 
5231
5311
  // Upload logs on refreshpermissionToken refresh Failure
5232
5312
  _triggerProxy.default.trigger(this, {
5233
5313
  file: 'meeting/index',
5234
5314
  function: 'join'
5235
5315
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
5236
- joinFailed(_context15.t0);
5316
+ joinFailed(_context16.t0);
5237
5317
  this.deferJoin = undefined;
5238
5318
 
5239
5319
  // if refresh permission token requires captcha, password or permission, we are throwing the errors
5240
5320
  // and bubble it up to client
5241
- return _context15.abrupt("return", _promise.default.reject(_context15.t0));
5321
+ return _context16.abrupt("return", _promise.default.reject(_context16.t0));
5242
5322
  case 51:
5243
- return _context15.abrupt("return", _util.default.joinMeetingOptions(this, options).then(function (join) {
5323
+ return _context16.abrupt("return", _util.default.joinMeetingOptions(this, options).then(function (join) {
5244
5324
  _this32.meetingFiniteStateMachine.join();
5245
5325
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
5246
5326
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
@@ -5305,9 +5385,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5305
5385
  }));
5306
5386
  case 52:
5307
5387
  case "end":
5308
- return _context15.stop();
5388
+ return _context16.stop();
5309
5389
  }
5310
- }, _callee15, this, [[37, 42]]);
5390
+ }, _callee16, this, [[37, 42]]);
5311
5391
  }));
5312
5392
  function join() {
5313
5393
  return _join.apply(this, arguments);
@@ -5324,38 +5404,38 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5324
5404
  }, {
5325
5405
  key: "updateLLMConnection",
5326
5406
  value: (function () {
5327
- var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5407
+ var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
5328
5408
  var _this33 = this;
5329
5409
  var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, isJoined;
5330
- return _regenerator.default.wrap(function _callee16$(_context16) {
5331
- while (1) switch (_context16.prev = _context16.next) {
5410
+ return _regenerator.default.wrap(function _callee17$(_context17) {
5411
+ while (1) switch (_context17.prev = _context17.next) {
5332
5412
  case 0:
5333
5413
  // @ts-ignore - Fix type
5334
5414
  _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;
5335
5415
  isJoined = this.isJoined(); // @ts-ignore - Fix type
5336
5416
  if (!this.webex.internal.llm.isConnected()) {
5337
- _context16.next = 8;
5417
+ _context17.next = 8;
5338
5418
  break;
5339
5419
  }
5340
5420
  if (!(url === this.webex.internal.llm.getLocusUrl() && isJoined)) {
5341
- _context16.next = 5;
5421
+ _context17.next = 5;
5342
5422
  break;
5343
5423
  }
5344
- return _context16.abrupt("return", undefined);
5424
+ return _context17.abrupt("return", undefined);
5345
5425
  case 5:
5346
- _context16.next = 7;
5426
+ _context17.next = 7;
5347
5427
  return this.webex.internal.llm.disconnectLLM();
5348
5428
  case 7:
5349
5429
  // @ts-ignore - Fix type
5350
5430
  this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
5351
5431
  case 8:
5352
5432
  if (isJoined) {
5353
- _context16.next = 10;
5433
+ _context17.next = 10;
5354
5434
  break;
5355
5435
  }
5356
- return _context16.abrupt("return", undefined);
5436
+ return _context17.abrupt("return", undefined);
5357
5437
  case 10:
5358
- return _context16.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl).then(function (registerAndConnectResult) {
5438
+ return _context17.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl).then(function (registerAndConnectResult) {
5359
5439
  // @ts-ignore - Fix type
5360
5440
  _this33.webex.internal.llm.off('event:relay.event', _this33.processRelayEvent);
5361
5441
  // @ts-ignore - Fix type
@@ -5365,9 +5445,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5365
5445
  }));
5366
5446
  case 11:
5367
5447
  case "end":
5368
- return _context16.stop();
5448
+ return _context17.stop();
5369
5449
  }
5370
- }, _callee16, this);
5450
+ }, _callee17, this);
5371
5451
  }));
5372
5452
  function updateLLMConnection() {
5373
5453
  return _updateLLMConnection.apply(this, arguments);
@@ -5539,17 +5619,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5539
5619
  meetingId: this.id
5540
5620
  }
5541
5621
  });
5542
- this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
5622
+ this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18() {
5543
5623
  var mediaSettings;
5544
- return _regenerator.default.wrap(function _callee17$(_context17) {
5545
- while (1) switch (_context17.prev = _context17.next) {
5624
+ return _regenerator.default.wrap(function _callee18$(_context18) {
5625
+ while (1) switch (_context18.prev = _context18.next) {
5546
5626
  case 0:
5547
- _context17.prev = 0;
5627
+ _context18.prev = 0;
5548
5628
  if (!(_this36.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
5549
- _context17.next = 4;
5629
+ _context18.next = 4;
5550
5630
  break;
5551
5631
  }
5552
- _context17.next = 4;
5632
+ _context18.next = 4;
5553
5633
  return _this36.releaseScreenShareFloor();
5554
5634
  case 4:
5555
5635
  mediaSettings = {
@@ -5569,28 +5649,28 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5569
5649
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the DX answers the meeting
5570
5650
  // once the DX answers we establish connection back the media server with only receiveShare enabled
5571
5651
  // @ts-ignore - reconnectMedia does not accept any argument
5572
- _context17.next = 10;
5652
+ _context18.next = 10;
5573
5653
  return _this36.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
5574
5654
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
5575
5655
  });
5576
5656
  case 10:
5577
- _context17.next = 16;
5657
+ _context18.next = 16;
5578
5658
  break;
5579
5659
  case 12:
5580
- _context17.prev = 12;
5581
- _context17.t0 = _context17["catch"](0);
5582
- _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context17.t0);
5660
+ _context18.prev = 12;
5661
+ _context18.t0 = _context18["catch"](0);
5662
+ _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context18.t0);
5583
5663
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
5584
5664
  correlation_id: _this36.correlationId,
5585
5665
  locus_id: _this36.locusUrl.split('/').pop(),
5586
- reason: _context17.t0.message,
5587
- stack: _context17.t0.stack
5666
+ reason: _context18.t0.message,
5667
+ stack: _context18.t0.stack
5588
5668
  });
5589
5669
  case 16:
5590
5670
  case "end":
5591
- return _context17.stop();
5671
+ return _context18.stop();
5592
5672
  }
5593
- }, _callee17, null, [[0, 12]]);
5673
+ }, _callee18, null, [[0, 12]]);
5594
5674
  })));
5595
5675
  _loggerProxy.default.logger.info('Meeting:index#moveTo --> Initated moved to using resourceId', resourceId);
5596
5676
  return _util.default.joinMeetingOptions(this, {
@@ -5673,10 +5753,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5673
5753
  }, {
5674
5754
  key: "createMediaConnection",
5675
5755
  value: (function () {
5676
- var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(turnServerInfo, bundlePolicy) {
5756
+ var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(turnServerInfo, bundlePolicy) {
5677
5757
  var mc, audioEnabled, videoEnabled, shareEnabled;
5678
- return _regenerator.default.wrap(function _callee18$(_context18) {
5679
- while (1) switch (_context18.prev = _context18.next) {
5758
+ return _regenerator.default.wrap(function _callee19$(_context19) {
5759
+ while (1) switch (_context19.prev = _context19.next) {
5680
5760
  case 0:
5681
5761
  mc = _media.default.createMediaConnection(this.isMultistream, this.getMediaConnectionDebugId(),
5682
5762
  // @ts-ignore
@@ -5702,41 +5782,41 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5702
5782
 
5703
5783
  // publish the streams
5704
5784
  if (!this.mediaProperties.audioStream) {
5705
- _context18.next = 7;
5785
+ _context19.next = 7;
5706
5786
  break;
5707
5787
  }
5708
- _context18.next = 7;
5788
+ _context19.next = 7;
5709
5789
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
5710
5790
  case 7:
5711
5791
  if (!this.mediaProperties.videoStream) {
5712
- _context18.next = 10;
5792
+ _context19.next = 10;
5713
5793
  break;
5714
5794
  }
5715
- _context18.next = 10;
5795
+ _context19.next = 10;
5716
5796
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
5717
5797
  case 10:
5718
5798
  if (!this.mediaProperties.shareVideoStream) {
5719
- _context18.next = 13;
5799
+ _context19.next = 13;
5720
5800
  break;
5721
5801
  }
5722
- _context18.next = 13;
5802
+ _context19.next = 13;
5723
5803
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
5724
5804
  case 13:
5725
5805
  if (!(this.isMultistream && this.mediaProperties.shareAudioStream)) {
5726
- _context18.next = 16;
5806
+ _context19.next = 16;
5727
5807
  break;
5728
5808
  }
5729
- _context18.next = 16;
5809
+ _context19.next = 16;
5730
5810
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
5731
5811
  case 16:
5732
- return _context18.abrupt("return", mc);
5812
+ return _context19.abrupt("return", mc);
5733
5813
  case 17:
5734
5814
  case "end":
5735
- return _context18.stop();
5815
+ return _context19.stop();
5736
5816
  }
5737
- }, _callee18, this);
5817
+ }, _callee19, this);
5738
5818
  }));
5739
- function createMediaConnection(_x13, _x14) {
5819
+ function createMediaConnection(_x16, _x17) {
5740
5820
  return _createMediaConnection.apply(this, arguments);
5741
5821
  }
5742
5822
  return createMediaConnection;
@@ -5774,11 +5854,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5774
5854
  }, {
5775
5855
  key: "setUpLocalStreamReferences",
5776
5856
  value: (function () {
5777
- var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(localStreams) {
5857
+ var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(localStreams) {
5778
5858
  var _localStreams$screenS, _localStreams$screenS2;
5779
5859
  var setUpStreamPromises;
5780
- return _regenerator.default.wrap(function _callee19$(_context19) {
5781
- while (1) switch (_context19.prev = _context19.next) {
5860
+ return _regenerator.default.wrap(function _callee20$(_context20) {
5861
+ while (1) switch (_context20.prev = _context20.next) {
5782
5862
  case 0:
5783
5863
  setUpStreamPromises = [];
5784
5864
  if (localStreams !== null && localStreams !== void 0 && localStreams.microphone) {
@@ -5793,24 +5873,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5793
5873
  if (localStreams !== null && localStreams !== void 0 && (_localStreams$screenS2 = localStreams.screenShare) !== null && _localStreams$screenS2 !== void 0 && _localStreams$screenS2.audio) {
5794
5874
  setUpStreamPromises.push(this.setLocalShareAudioStream(localStreams.screenShare.audio));
5795
5875
  }
5796
- _context19.prev = 5;
5797
- _context19.next = 8;
5876
+ _context20.prev = 5;
5877
+ _context20.next = 8;
5798
5878
  return _promise.default.all(setUpStreamPromises);
5799
5879
  case 8:
5800
- _context19.next = 14;
5880
+ _context20.next = 14;
5801
5881
  break;
5802
5882
  case 10:
5803
- _context19.prev = 10;
5804
- _context19.t0 = _context19["catch"](5);
5805
- _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _context19.t0);
5806
- throw _context19.t0;
5883
+ _context20.prev = 10;
5884
+ _context20.t0 = _context20["catch"](5);
5885
+ _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _context20.t0);
5886
+ throw _context20.t0;
5807
5887
  case 14:
5808
5888
  case "end":
5809
- return _context19.stop();
5889
+ return _context20.stop();
5810
5890
  }
5811
- }, _callee19, this, [[5, 10]]);
5891
+ }, _callee20, this, [[5, 10]]);
5812
5892
  }));
5813
- function setUpLocalStreamReferences(_x15) {
5893
+ function setUpLocalStreamReferences(_x18) {
5814
5894
  return _setUpLocalStreamReferences.apply(this, arguments);
5815
5895
  }
5816
5896
  return setUpLocalStreamReferences;
@@ -5825,20 +5905,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5825
5905
  }, {
5826
5906
  key: "waitForMediaConnectionConnected",
5827
5907
  value: (function () {
5828
- var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
5908
+ var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
5829
5909
  var _this$mediaProperties6, _this$mediaProperties7, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, _this$mediaProperties14, _this$mediaProperties15, _this$mediaProperties16, _this$mediaProperties17, _this$mediaProperties18, _this$mediaProperties19;
5830
- return _regenerator.default.wrap(function _callee20$(_context20) {
5831
- while (1) switch (_context20.prev = _context20.next) {
5910
+ return _regenerator.default.wrap(function _callee21$(_context21) {
5911
+ while (1) switch (_context21.prev = _context21.next) {
5832
5912
  case 0:
5833
- _context20.prev = 0;
5834
- _context20.next = 3;
5913
+ _context21.prev = 0;
5914
+ _context21.next = 3;
5835
5915
  return this.mediaProperties.waitForMediaConnectionConnected();
5836
5916
  case 3:
5837
- _context20.next = 9;
5917
+ _context21.next = 9;
5838
5918
  break;
5839
5919
  case 5:
5840
- _context20.prev = 5;
5841
- _context20.t0 = _context20["catch"](0);
5920
+ _context21.prev = 5;
5921
+ _context21.t0 = _context21["catch"](0);
5842
5922
  if (!this.hasMediaConnectionConnectedAtLeastOnce) {
5843
5923
  // Only send CA event for join flow if we haven't successfully connected media yet
5844
5924
  // @ts-ignore
@@ -5866,9 +5946,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5866
5946
  throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
5867
5947
  case 9:
5868
5948
  case "end":
5869
- return _context20.stop();
5949
+ return _context21.stop();
5870
5950
  }
5871
- }, _callee20, this, [[0, 5]]);
5951
+ }, _callee21, this, [[0, 5]]);
5872
5952
  }));
5873
5953
  function waitForMediaConnectionConnected() {
5874
5954
  return _waitForMediaConnectionConnected.apply(this, arguments);
@@ -5918,18 +5998,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5918
5998
  * @returns {Promise<void>}
5919
5999
  */
5920
6000
  function () {
5921
- var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
6001
+ var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22() {
5922
6002
  var LOG_HEADER, deferSDPAnswer;
5923
- return _regenerator.default.wrap(function _callee21$(_context21) {
5924
- while (1) switch (_context21.prev = _context21.next) {
6003
+ return _regenerator.default.wrap(function _callee22$(_context22) {
6004
+ while (1) switch (_context22.prev = _context22.next) {
5925
6005
  case 0:
5926
6006
  LOG_HEADER = 'Meeting:index#addMedia():waitForRemoteSDPAnswer -->';
5927
6007
  if (this.deferSDPAnswer) {
5928
- _context21.next = 4;
6008
+ _context22.next = 4;
5929
6009
  break;
5930
6010
  }
5931
6011
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " offer not created yet"));
5932
- return _context21.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
6012
+ return _context22.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
5933
6013
  case 4:
5934
6014
  deferSDPAnswer = this.deferSDPAnswer;
5935
6015
  this.sdpResponseTimer = setTimeout(function () {
@@ -5937,12 +6017,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5937
6017
  deferSDPAnswer.reject(new Error('Timed out waiting for REMOTE SDP ANSWER'));
5938
6018
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
5939
6019
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
5940
- return _context21.abrupt("return", deferSDPAnswer.promise);
6020
+ return _context22.abrupt("return", deferSDPAnswer.promise);
5941
6021
  case 8:
5942
6022
  case "end":
5943
- return _context21.stop();
6023
+ return _context22.stop();
5944
6024
  }
5945
- }, _callee21, this);
6025
+ }, _callee22, this);
5946
6026
  }));
5947
6027
  function waitForRemoteSDPAnswer() {
5948
6028
  return _waitForRemoteSDPAnswer.apply(this, arguments);
@@ -5961,30 +6041,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5961
6041
  }, {
5962
6042
  key: "retryEstablishMediaConnectionWithForcedTurnDiscovery",
5963
6043
  value: (function () {
5964
- var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(remoteMediaManagerConfig, bundlePolicy) {
6044
+ var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(remoteMediaManagerConfig, bundlePolicy) {
5965
6045
  var LOG_HEADER;
5966
- return _regenerator.default.wrap(function _callee22$(_context22) {
5967
- while (1) switch (_context22.prev = _context22.next) {
6046
+ return _regenerator.default.wrap(function _callee23$(_context23) {
6047
+ while (1) switch (_context23.prev = _context23.next) {
5968
6048
  case 0:
5969
6049
  LOG_HEADER = 'Meeting:index#addMedia():retryEstablishMediaConnectionWithForcedTurnDiscovery -->';
5970
- _context22.prev = 1;
5971
- _context22.next = 4;
6050
+ _context23.prev = 1;
6051
+ _context23.next = 4;
5972
6052
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
5973
6053
  case 4:
5974
- _context22.next = 10;
6054
+ _context23.next = 10;
5975
6055
  break;
5976
6056
  case 6:
5977
- _context22.prev = 6;
5978
- _context22.t0 = _context22["catch"](1);
5979
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _context22.t0);
5980
- throw _context22.t0;
6057
+ _context23.prev = 6;
6058
+ _context23.t0 = _context23["catch"](1);
6059
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _context23.t0);
6060
+ throw _context23.t0;
5981
6061
  case 10:
5982
6062
  case "end":
5983
- return _context22.stop();
6063
+ return _context23.stop();
5984
6064
  }
5985
- }, _callee22, this, [[1, 6]]);
6065
+ }, _callee23, this, [[1, 6]]);
5986
6066
  }));
5987
- function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x16, _x17) {
6067
+ function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x19, _x20) {
5988
6068
  return _retryEstablishMediaConnectionWithForcedTurnDiscovery.apply(this, arguments);
5989
6069
  }
5990
6070
  return retryEstablishMediaConnectionWithForcedTurnDiscovery;
@@ -6002,14 +6082,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6002
6082
  }, {
6003
6083
  key: "retryWithForcedTurnDiscovery",
6004
6084
  value: (function () {
6005
- var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(remoteMediaManagerConfig, bundlePolicy) {
6085
+ var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(remoteMediaManagerConfig, bundlePolicy) {
6006
6086
  var LOG_HEADER;
6007
- return _regenerator.default.wrap(function _callee23$(_context23) {
6008
- while (1) switch (_context23.prev = _context23.next) {
6087
+ return _regenerator.default.wrap(function _callee24$(_context24) {
6088
+ while (1) switch (_context24.prev = _context24.next) {
6009
6089
  case 0:
6010
6090
  this.retriedWithTurnServer = true;
6011
6091
  LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
6012
- _context23.next = 4;
6092
+ _context24.next = 4;
6013
6093
  return this.cleanUpBeforeRetryWithTurnServer();
6014
6094
  case 4:
6015
6095
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_RETRY, {
@@ -6019,24 +6099,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6019
6099
  reason: 'forcingTurnTls'
6020
6100
  });
6021
6101
  if (!(this.state === _constants.MEETING_STATE.STATES.LEFT)) {
6022
- _context23.next = 9;
6102
+ _context24.next = 9;
6023
6103
  break;
6024
6104
  }
6025
6105
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. "));
6026
- _context23.next = 9;
6106
+ _context24.next = 9;
6027
6107
  return this.join({
6028
6108
  rejoin: true
6029
6109
  });
6030
6110
  case 9:
6031
- _context23.next = 11;
6111
+ _context24.next = 11;
6032
6112
  return this.retryEstablishMediaConnectionWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
6033
6113
  case 11:
6034
6114
  case "end":
6035
- return _context23.stop();
6115
+ return _context24.stop();
6036
6116
  }
6037
- }, _callee23, this);
6117
+ }, _callee24, this);
6038
6118
  }));
6039
- function retryWithForcedTurnDiscovery(_x18, _x19) {
6119
+ function retryWithForcedTurnDiscovery(_x21, _x22) {
6040
6120
  return _retryWithForcedTurnDiscovery.apply(this, arguments);
6041
6121
  }
6042
6122
  return retryWithForcedTurnDiscovery;
@@ -6056,32 +6136,32 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6056
6136
  }, {
6057
6137
  key: "handleWaitForMediaConnectionConnectedError",
6058
6138
  value: (function () {
6059
- var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(error, remoteMediaManagerConfig, bundlePolicy) {
6139
+ var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(error, remoteMediaManagerConfig, bundlePolicy) {
6060
6140
  var LOG_HEADER;
6061
- return _regenerator.default.wrap(function _callee24$(_context24) {
6062
- while (1) switch (_context24.prev = _context24.next) {
6141
+ return _regenerator.default.wrap(function _callee25$(_context25) {
6142
+ while (1) switch (_context25.prev = _context25.next) {
6063
6143
  case 0:
6064
6144
  LOG_HEADER = 'Meeting:index#addMedia():handleWaitForMediaConnectionConnectedError -->'; // @ts-ignore - config coming from registerPlugin
6065
6145
  if (this.turnServerUsed) {
6066
- _context24.next = 7;
6146
+ _context25.next = 7;
6067
6147
  break;
6068
6148
  }
6069
6149
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " error waiting for media to connect on UDP, TCP, retrying using TURN-TLS, "), error);
6070
- _context24.next = 5;
6150
+ _context25.next = 5;
6071
6151
  return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
6072
6152
  case 5:
6073
- _context24.next = 9;
6153
+ _context25.next = 9;
6074
6154
  break;
6075
6155
  case 7:
6076
6156
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
6077
6157
  throw new _webexErrors.AddMediaFailed();
6078
6158
  case 9:
6079
6159
  case "end":
6080
- return _context24.stop();
6160
+ return _context25.stop();
6081
6161
  }
6082
- }, _callee24, this);
6162
+ }, _callee25, this);
6083
6163
  }));
6084
- function handleWaitForMediaConnectionConnectedError(_x20, _x21, _x22) {
6164
+ function handleWaitForMediaConnectionConnectedError(_x23, _x24, _x25) {
6085
6165
  return _handleWaitForMediaConnectionConnectedError.apply(this, arguments);
6086
6166
  }
6087
6167
  return handleWaitForMediaConnectionConnectedError;
@@ -6099,23 +6179,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6099
6179
  }, {
6100
6180
  key: "establishMediaConnection",
6101
6181
  value: (function () {
6102
- var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(remoteMediaManagerConfig, bundlePolicy, isForced) {
6182
+ var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(remoteMediaManagerConfig, bundlePolicy, isForced) {
6103
6183
  var LOG_HEADER, cdl, isRetry, turnDiscoveryObject, turnServerInfo, mc;
6104
- return _regenerator.default.wrap(function _callee25$(_context25) {
6105
- while (1) switch (_context25.prev = _context25.next) {
6184
+ return _regenerator.default.wrap(function _callee26$(_context26) {
6185
+ while (1) switch (_context26.prev = _context26.next) {
6106
6186
  case 0:
6107
6187
  LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->'; // @ts-ignore
6108
6188
  cdl = this.webex.internal.newMetrics.callDiagnosticLatencies;
6109
6189
  isRetry = this.retriedWithTurnServer;
6110
- _context25.prev = 3;
6190
+ _context26.prev = 3;
6111
6191
  // @ts-ignore
6112
6192
  this.webex.internal.newMetrics.submitInternalEvent({
6113
6193
  name: 'internal.client.add-media.turn-discovery.start'
6114
6194
  });
6115
- _context25.next = 7;
6195
+ _context26.next = 7;
6116
6196
  return this.roap.doTurnDiscovery(this, isRetry, isForced);
6117
6197
  case 7:
6118
- turnDiscoveryObject = _context25.sent;
6198
+ turnDiscoveryObject = _context26.sent;
6119
6199
  this.turnDiscoverySkippedReason = turnDiscoveryObject === null || turnDiscoveryObject === void 0 ? void 0 : turnDiscoveryObject.turnDiscoverySkippedReason;
6120
6200
  this.turnServerUsed = !this.turnDiscoverySkippedReason;
6121
6201
 
@@ -6132,55 +6212,55 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6132
6212
  retriedWithTurnServer: this.retriedWithTurnServer
6133
6213
  });
6134
6214
  }
6135
- _context25.next = 15;
6215
+ _context26.next = 15;
6136
6216
  return this.createMediaConnection(turnServerInfo, bundlePolicy);
6137
6217
  case 15:
6138
- mc = _context25.sent;
6218
+ mc = _context26.sent;
6139
6219
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created"));
6140
6220
  if (!this.isMultistream) {
6141
- _context25.next = 24;
6221
+ _context26.next = 24;
6142
6222
  break;
6143
6223
  }
6144
6224
  this.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(this.receiveSlotManager, this.mediaRequestManagers, remoteMediaManagerConfig);
6145
6225
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.AudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_AUDIO_CREATED);
6146
6226
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
6147
6227
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
6148
- _context25.next = 24;
6228
+ _context26.next = 24;
6149
6229
  return this.remoteMediaManager.start();
6150
6230
  case 24:
6151
- _context25.next = 26;
6231
+ _context26.next = 26;
6152
6232
  return mc.initiateOffer();
6153
6233
  case 26:
6154
- _context25.next = 28;
6234
+ _context26.next = 28;
6155
6235
  return this.waitForRemoteSDPAnswer();
6156
6236
  case 28:
6157
6237
  this.handleMediaLogging(this.mediaProperties);
6158
- _context25.next = 35;
6238
+ _context26.next = 35;
6159
6239
  break;
6160
6240
  case 31:
6161
- _context25.prev = 31;
6162
- _context25.t0 = _context25["catch"](3);
6163
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _context25.t0);
6164
- throw _context25.t0;
6241
+ _context26.prev = 31;
6242
+ _context26.t0 = _context26["catch"](3);
6243
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _context26.t0);
6244
+ throw _context26.t0;
6165
6245
  case 35:
6166
- _context25.prev = 35;
6167
- _context25.next = 38;
6246
+ _context26.prev = 35;
6247
+ _context26.next = 38;
6168
6248
  return this.waitForMediaConnectionConnected();
6169
6249
  case 38:
6170
- _context25.next = 44;
6250
+ _context26.next = 44;
6171
6251
  break;
6172
6252
  case 40:
6173
- _context25.prev = 40;
6174
- _context25.t1 = _context25["catch"](35);
6175
- _context25.next = 44;
6176
- return this.handleWaitForMediaConnectionConnectedError(_context25.t1, remoteMediaManagerConfig, bundlePolicy);
6253
+ _context26.prev = 40;
6254
+ _context26.t1 = _context26["catch"](35);
6255
+ _context26.next = 44;
6256
+ return this.handleWaitForMediaConnectionConnectedError(_context26.t1, remoteMediaManagerConfig, bundlePolicy);
6177
6257
  case 44:
6178
6258
  case "end":
6179
- return _context25.stop();
6259
+ return _context26.stop();
6180
6260
  }
6181
- }, _callee25, this, [[3, 31], [35, 40]]);
6261
+ }, _callee26, this, [[3, 31], [35, 40]]);
6182
6262
  }));
6183
- function establishMediaConnection(_x23, _x24, _x25) {
6263
+ function establishMediaConnection(_x26, _x27, _x28) {
6184
6264
  return _establishMediaConnection.apply(this, arguments);
6185
6265
  }
6186
6266
  return establishMediaConnection;
@@ -6195,22 +6275,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6195
6275
  }, {
6196
6276
  key: "cleanUpOnAddMediaFailure",
6197
6277
  value: (function () {
6198
- var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
6199
- return _regenerator.default.wrap(function _callee26$(_context26) {
6200
- while (1) switch (_context26.prev = _context26.next) {
6278
+ var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27() {
6279
+ return _regenerator.default.wrap(function _callee27$(_context27) {
6280
+ while (1) switch (_context27.prev = _context27.next) {
6201
6281
  case 0:
6202
6282
  if (!this.statsAnalyzer) {
6203
- _context26.next = 3;
6283
+ _context27.next = 3;
6204
6284
  break;
6205
6285
  }
6206
- _context26.next = 3;
6286
+ _context27.next = 3;
6207
6287
  return this.statsAnalyzer.stopAnalyzer();
6208
6288
  case 3:
6209
6289
  this.statsAnalyzer = null;
6210
6290
 
6211
6291
  // when media fails, we want to upload a webrtc dump to see whats going on
6212
6292
  // this function is async, but returns once the stats have been gathered
6213
- _context26.next = 6;
6293
+ _context27.next = 6;
6214
6294
  return this.forceSendStatsReport({
6215
6295
  callFrom: 'addMedia'
6216
6296
  });
@@ -6221,9 +6301,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6221
6301
  }
6222
6302
  case 7:
6223
6303
  case "end":
6224
- return _context26.stop();
6304
+ return _context27.stop();
6225
6305
  }
6226
- }, _callee26, this);
6306
+ }, _callee27, this);
6227
6307
  }));
6228
6308
  function cleanUpOnAddMediaFailure() {
6229
6309
  return _cleanUpOnAddMediaFailure.apply(this, arguments);
@@ -6241,11 +6321,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6241
6321
  }, {
6242
6322
  key: "cleanUpBeforeRetryWithTurnServer",
6243
6323
  value: (function () {
6244
- var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27() {
6245
- return _regenerator.default.wrap(function _callee27$(_context27) {
6246
- while (1) switch (_context27.prev = _context27.next) {
6324
+ var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28() {
6325
+ return _regenerator.default.wrap(function _callee28$(_context28) {
6326
+ while (1) switch (_context28.prev = _context28.next) {
6247
6327
  case 0:
6248
- _context27.next = 2;
6328
+ _context28.next = 2;
6249
6329
  return this.forceSendStatsReport({
6250
6330
  callFrom: 'cleanUpBeforeRetryWithTurnServer'
6251
6331
  });
@@ -6265,9 +6345,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6265
6345
  }
6266
6346
  case 3:
6267
6347
  case "end":
6268
- return _context27.stop();
6348
+ return _context28.stop();
6269
6349
  }
6270
- }, _callee27, this);
6350
+ }, _callee28, this);
6271
6351
  }));
6272
6352
  function cleanUpBeforeRetryWithTurnServer() {
6273
6353
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
@@ -6286,7 +6366,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6286
6366
  }, {
6287
6367
  key: "addMedia",
6288
6368
  value: (function () {
6289
- var _addMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28() {
6369
+ var _addMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
6290
6370
  var _this$webex$meetings$2, _this$webex$meetings$3;
6291
6371
  var options,
6292
6372
  LOG_HEADER,
@@ -6327,23 +6407,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6327
6407
  _this$mediaProperties39,
6328
6408
  _this$mediaProperties40,
6329
6409
  reachabilityMetrics,
6330
- _args28 = arguments;
6331
- return _regenerator.default.wrap(function _callee28$(_context28) {
6332
- while (1) switch (_context28.prev = _context28.next) {
6410
+ _args29 = arguments;
6411
+ return _regenerator.default.wrap(function _callee29$(_context29) {
6412
+ while (1) switch (_context29.prev = _context29.next) {
6333
6413
  case 0:
6334
- options = _args28.length > 0 && _args28[0] !== undefined ? _args28[0] : {};
6414
+ options = _args29.length > 0 && _args29[0] !== undefined ? _args29[0] : {};
6335
6415
  this.retriedWithTurnServer = false;
6336
6416
  this.hasMediaConnectionConnectedAtLeastOnce = false;
6337
6417
  LOG_HEADER = 'Meeting:index#addMedia -->';
6338
6418
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: ").concat((0, _stringify.default)(options)));
6339
6419
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
6340
- _context28.next = 7;
6420
+ _context29.next = 7;
6341
6421
  break;
6342
6422
  }
6343
6423
  throw new _webexErrors.MeetingNotActiveError();
6344
6424
  case 7:
6345
6425
  if (!_util.default.isUserInLeftState(this.locusInfo)) {
6346
- _context28.next = 9;
6426
+ _context29.next = 9;
6347
6427
  break;
6348
6428
  }
6349
6429
  throw new _webexErrors.UserNotJoinedError();
@@ -6354,7 +6434,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6354
6434
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
6355
6435
  // @ts-ignore - isUserUnadmitted coming from SelfUtil
6356
6436
  if (!(this.isUserUnadmitted && !this.wirelessShare && !allowMediaInLobby)) {
6357
- _context28.next = 13;
6437
+ _context29.next = 13;
6358
6438
  break;
6359
6439
  }
6360
6440
  throw new _webexErrors.UserInLobbyError();
@@ -6413,33 +6493,33 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6413
6493
  });
6414
6494
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
6415
6495
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
6416
- _context28.prev = 18;
6417
- _context28.next = 21;
6496
+ _context29.prev = 18;
6497
+ _context29.next = 21;
6418
6498
  return this.setUpLocalStreamReferences(localStreams);
6419
6499
  case 21:
6420
6500
  this.setMercuryListener();
6421
6501
  this.createStatsAnalyzer();
6422
- _context28.next = 25;
6502
+ _context29.next = 25;
6423
6503
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, false);
6424
6504
  case 25:
6425
- _context28.next = 27;
6505
+ _context29.next = 27;
6426
6506
  return Meeting.handleDeviceLogging();
6427
6507
  case 27:
6428
6508
  if (!this.mediaProperties.hasLocalShareStream()) {
6429
- _context28.next = 30;
6509
+ _context29.next = 30;
6430
6510
  break;
6431
6511
  }
6432
- _context28.next = 30;
6512
+ _context29.next = 30;
6433
6513
  return this.enqueueScreenShareFloorRequest();
6434
6514
  case 30:
6435
- _context28.next = 32;
6515
+ _context29.next = 32;
6436
6516
  return this.mediaProperties.getCurrentConnectionType();
6437
6517
  case 32:
6438
- connectionType = _context28.sent;
6439
- _context28.next = 35;
6518
+ connectionType = _context29.sent;
6519
+ _context29.next = 35;
6440
6520
  return this.webex.meetings.reachability.getReachabilityMetrics();
6441
6521
  case 35:
6442
- reachabilityStats = _context28.sent;
6522
+ reachabilityStats = _context29.sent;
6443
6523
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread({
6444
6524
  correlation_id: this.correlationId,
6445
6525
  locus_id: this.locusUrl.split('/').pop(),
@@ -6458,24 +6538,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6458
6538
 
6459
6539
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
6460
6540
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
6461
- _context28.next = 54;
6541
+ _context29.next = 54;
6462
6542
  break;
6463
6543
  case 42:
6464
- _context28.prev = 42;
6465
- _context28.t0 = _context28["catch"](18);
6466
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context28.t0);
6544
+ _context29.prev = 42;
6545
+ _context29.t0 = _context29["catch"](18);
6546
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context29.t0);
6467
6547
 
6468
6548
  // @ts-ignore
6469
- _context28.next = 47;
6549
+ _context29.next = 47;
6470
6550
  return this.webex.meetings.reachability.getReachabilityMetrics();
6471
6551
  case 47:
6472
- reachabilityMetrics = _context28.sent;
6552
+ reachabilityMetrics = _context29.sent;
6473
6553
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread({
6474
6554
  correlation_id: this.correlationId,
6475
6555
  locus_id: this.locusUrl.split('/').pop(),
6476
- reason: _context28.t0.message,
6477
- stack: _context28.t0.stack,
6478
- code: _context28.t0.code,
6556
+ reason: _context29.t0.message,
6557
+ stack: _context29.t0.stack,
6558
+ code: _context29.t0.code,
6479
6559
  turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
6480
6560
  turnServerUsed: this.turnServerUsed,
6481
6561
  retriedWithTurnServer: this.retriedWithTurnServer,
@@ -6484,7 +6564,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6484
6564
  connectionState: ((_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.connectionState) || ((_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.connectionState) || 'unknown',
6485
6565
  iceConnectionState: ((_this$mediaProperties34 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties34 === void 0 ? void 0 : (_this$mediaProperties35 = _this$mediaProperties34.multistreamConnection) === null || _this$mediaProperties35 === void 0 ? void 0 : (_this$mediaProperties36 = _this$mediaProperties35.pc) === null || _this$mediaProperties36 === void 0 ? void 0 : (_this$mediaProperties37 = _this$mediaProperties36.pc) === null || _this$mediaProperties37 === void 0 ? void 0 : _this$mediaProperties37.iceConnectionState) || ((_this$mediaProperties38 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties38 === void 0 ? void 0 : (_this$mediaProperties39 = _this$mediaProperties38.mediaConnection) === null || _this$mediaProperties39 === void 0 ? void 0 : (_this$mediaProperties40 = _this$mediaProperties39.pc) === null || _this$mediaProperties40 === void 0 ? void 0 : _this$mediaProperties40.iceConnectionState) || 'unknown'
6486
6566
  }, reachabilityMetrics));
6487
- _context28.next = 51;
6567
+ _context29.next = 51;
6488
6568
  return this.cleanUpOnAddMediaFailure();
6489
6569
  case 51:
6490
6570
  // Upload logs on error while adding media
@@ -6492,17 +6572,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6492
6572
  file: 'meeting/index',
6493
6573
  function: 'addMedia'
6494
6574
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
6495
- if (_context28.t0 instanceof _internalMediaCore.Errors.SdpError) {
6575
+ if (_context29.t0 instanceof _internalMediaCore.Errors.SdpError) {
6496
6576
  this.leave({
6497
6577
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
6498
6578
  });
6499
6579
  }
6500
- throw _context28.t0;
6580
+ throw _context29.t0;
6501
6581
  case 54:
6502
6582
  case "end":
6503
- return _context28.stop();
6583
+ return _context29.stop();
6504
6584
  }
6505
- }, _callee28, this, [[18, 42]]);
6585
+ }, _callee29, this, [[18, 42]]);
6506
6586
  }));
6507
6587
  function addMedia() {
6508
6588
  return _addMedia.apply(this, arguments);
@@ -6570,35 +6650,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6570
6650
  * @memberof Meeting
6571
6651
  */
6572
6652
  function () {
6573
- var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(options) {
6653
+ var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(options) {
6574
6654
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled;
6575
- return _regenerator.default.wrap(function _callee29$(_context29) {
6576
- while (1) switch (_context29.prev = _context29.next) {
6655
+ return _regenerator.default.wrap(function _callee30$(_context30) {
6656
+ while (1) switch (_context30.prev = _context30.next) {
6577
6657
  case 0:
6578
6658
  this.checkMediaConnection();
6579
6659
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
6580
6660
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
6581
6661
  if (this.canUpdateMedia()) {
6582
- _context29.next = 5;
6662
+ _context30.next = 5;
6583
6663
  break;
6584
6664
  }
6585
- return _context29.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
6665
+ return _context30.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
6586
6666
  case 5:
6587
6667
  if (!this.isMultistream) {
6588
- _context29.next = 10;
6668
+ _context30.next = 10;
6589
6669
  break;
6590
6670
  }
6591
6671
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
6592
- _context29.next = 8;
6672
+ _context30.next = 8;
6593
6673
  break;
6594
6674
  }
6595
6675
  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');
6596
6676
  case 8:
6597
- _context29.next = 12;
6677
+ _context30.next = 12;
6598
6678
  break;
6599
6679
  case 10:
6600
6680
  if (!(shareAudioEnabled !== undefined)) {
6601
- _context29.next = 12;
6681
+ _context30.next = 12;
6602
6682
  break;
6603
6683
  }
6604
6684
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -6623,20 +6703,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6623
6703
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
6624
6704
  }
6625
6705
  if (this.isMultistream) {
6626
- _context29.next = 18;
6706
+ _context30.next = 18;
6627
6707
  break;
6628
6708
  }
6629
- _context29.next = 18;
6709
+ _context30.next = 18;
6630
6710
  return this.updateTranscodedMediaConnection();
6631
6711
  case 18:
6632
- return _context29.abrupt("return", undefined);
6712
+ return _context30.abrupt("return", undefined);
6633
6713
  case 19:
6634
6714
  case "end":
6635
- return _context29.stop();
6715
+ return _context30.stop();
6636
6716
  }
6637
- }, _callee29, this);
6717
+ }, _callee30, this);
6638
6718
  }));
6639
- function updateMedia(_x26) {
6719
+ function updateMedia(_x29) {
6640
6720
  return _updateMedia.apply(this, arguments);
6641
6721
  }
6642
6722
  return updateMedia;
@@ -6960,9 +7040,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6960
7040
  if (content && this.shareStatus !== _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
6961
7041
  // @ts-ignore
6962
7042
  this.webex.internal.newMetrics.submitClientEvent({
6963
- name: 'client.share.initiated',
7043
+ name: 'client.share.floor-grant.request',
6964
7044
  payload: {
6965
- mediaType: 'share'
7045
+ mediaType: 'share',
7046
+ shareInstanceId: this.localShareInstanceId
6966
7047
  },
6967
7048
  options: {
6968
7049
  meetingId: this.id
@@ -6989,6 +7070,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6989
7070
  reason: error.message,
6990
7071
  stack: error.stack
6991
7072
  });
7073
+
7074
+ // @ts-ignore
7075
+ _this46.webex.internal.newMetrics.submitClientEvent({
7076
+ name: 'client.share.floor-granted.local',
7077
+ payload: {
7078
+ mediaType: 'share',
7079
+ errors: _util.default.getChangeMeetingFloorErrorPayload(error.message),
7080
+ shareInstanceId: _this46.localShareInstanceId
7081
+ },
7082
+ options: {
7083
+ meetingId: _this46.id
7084
+ }
7085
+ });
6992
7086
  _this46.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
6993
7087
  return _promise.default.reject(error);
6994
7088
  });
@@ -7043,7 +7137,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7043
7137
  this.webex.internal.newMetrics.submitClientEvent({
7044
7138
  name: 'client.share.stopped',
7045
7139
  payload: {
7046
- mediaType: 'share'
7140
+ mediaType: 'share',
7141
+ shareInstanceId: this.localShareInstanceId
7047
7142
  },
7048
7143
  options: {
7049
7144
  meetingId: this.id
@@ -7537,39 +7632,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7537
7632
  }, {
7538
7633
  key: "enableMusicMode",
7539
7634
  value: (function () {
7540
- var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(shouldEnableMusicMode) {
7541
- return _regenerator.default.wrap(function _callee30$(_context30) {
7542
- while (1) switch (_context30.prev = _context30.next) {
7635
+ var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(shouldEnableMusicMode) {
7636
+ return _regenerator.default.wrap(function _callee31$(_context31) {
7637
+ while (1) switch (_context31.prev = _context31.next) {
7543
7638
  case 0:
7544
7639
  this.checkMediaConnection();
7545
7640
  if (this.isMultistream) {
7546
- _context30.next = 3;
7641
+ _context31.next = 3;
7547
7642
  break;
7548
7643
  }
7549
7644
  throw new Error('enableMusicMode() only supported with multistream');
7550
7645
  case 3:
7551
7646
  if (!shouldEnableMusicMode) {
7552
- _context30.next = 8;
7647
+ _context31.next = 8;
7553
7648
  break;
7554
7649
  }
7555
- _context30.next = 6;
7650
+ _context31.next = 6;
7556
7651
  return this.sendSlotManager.setCodecParameters(_internalMediaCore.MediaType.AudioMain, {
7557
7652
  maxaveragebitrate: '64000',
7558
7653
  maxplaybackrate: '48000'
7559
7654
  });
7560
7655
  case 6:
7561
- _context30.next = 10;
7656
+ _context31.next = 10;
7562
7657
  break;
7563
7658
  case 8:
7564
- _context30.next = 10;
7659
+ _context31.next = 10;
7565
7660
  return this.sendSlotManager.deleteCodecParameters(_internalMediaCore.MediaType.AudioMain, ['maxaveragebitrate', 'maxplaybackrate']);
7566
7661
  case 10:
7567
7662
  case "end":
7568
- return _context30.stop();
7663
+ return _context31.stop();
7569
7664
  }
7570
- }, _callee30, this);
7665
+ }, _callee31, this);
7571
7666
  }));
7572
- function enableMusicMode(_x27) {
7667
+ function enableMusicMode(_x30) {
7573
7668
  return _enableMusicMode.apply(this, arguments);
7574
7669
  }
7575
7670
  return enableMusicMode;
@@ -7634,25 +7729,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7634
7729
  }, {
7635
7730
  key: "publishStream",
7636
7731
  value: (function () {
7637
- var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(mediaType, stream) {
7638
- return _regenerator.default.wrap(function _callee31$(_context31) {
7639
- while (1) switch (_context31.prev = _context31.next) {
7732
+ var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(mediaType, stream) {
7733
+ return _regenerator.default.wrap(function _callee32$(_context32) {
7734
+ while (1) switch (_context32.prev = _context32.next) {
7640
7735
  case 0:
7641
7736
  if (stream) {
7642
- _context31.next = 2;
7737
+ _context32.next = 2;
7643
7738
  break;
7644
7739
  }
7645
- return _context31.abrupt("return");
7740
+ return _context32.abrupt("return");
7646
7741
  case 2:
7647
7742
  if (!this.mediaProperties.webrtcMediaConnection) {
7648
- _context31.next = 7;
7743
+ _context32.next = 7;
7649
7744
  break;
7650
7745
  }
7651
7746
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
7652
- _context31.next = 6;
7747
+ _context32.next = 6;
7653
7748
  break;
7654
7749
  }
7655
- _context31.next = 6;
7750
+ _context32.next = 6;
7656
7751
  return this.sendSlotManager.publishStream(mediaType, stream);
7657
7752
  case 6:
7658
7753
  this.emitPublishStateChangeEvent({
@@ -7663,11 +7758,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7663
7758
  });
7664
7759
  case 7:
7665
7760
  case "end":
7666
- return _context31.stop();
7761
+ return _context32.stop();
7667
7762
  }
7668
- }, _callee31, this);
7763
+ }, _callee32, this);
7669
7764
  }));
7670
- function publishStream(_x28, _x29) {
7765
+ function publishStream(_x31, _x32) {
7671
7766
  return _publishStream.apply(this, arguments);
7672
7767
  }
7673
7768
  return publishStream;
@@ -7683,21 +7778,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7683
7778
  }, {
7684
7779
  key: "unpublishStream",
7685
7780
  value: (function () {
7686
- var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(mediaType, stream) {
7687
- return _regenerator.default.wrap(function _callee32$(_context32) {
7688
- while (1) switch (_context32.prev = _context32.next) {
7781
+ var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(mediaType, stream) {
7782
+ return _regenerator.default.wrap(function _callee33$(_context33) {
7783
+ while (1) switch (_context33.prev = _context33.next) {
7689
7784
  case 0:
7690
7785
  if (stream) {
7691
- _context32.next = 2;
7786
+ _context33.next = 2;
7692
7787
  break;
7693
7788
  }
7694
- return _context32.abrupt("return");
7789
+ return _context33.abrupt("return");
7695
7790
  case 2:
7696
7791
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
7697
- _context32.next = 5;
7792
+ _context33.next = 5;
7698
7793
  break;
7699
7794
  }
7700
- _context32.next = 5;
7795
+ _context33.next = 5;
7701
7796
  return this.sendSlotManager.unpublishStream(mediaType);
7702
7797
  case 5:
7703
7798
  this.emitPublishStateChangeEvent({
@@ -7708,11 +7803,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7708
7803
  });
7709
7804
  case 6:
7710
7805
  case "end":
7711
- return _context32.stop();
7806
+ return _context33.stop();
7712
7807
  }
7713
- }, _callee32, this);
7808
+ }, _callee33, this);
7714
7809
  }));
7715
- function unpublishStream(_x30, _x31) {
7810
+ function unpublishStream(_x33, _x34) {
7716
7811
  return _unpublishStream.apply(this, arguments);
7717
7812
  }
7718
7813
  return unpublishStream;
@@ -7727,72 +7822,88 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7727
7822
  }, {
7728
7823
  key: "publishStreams",
7729
7824
  value: (function () {
7730
- var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(streams) {
7825
+ var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(streams) {
7731
7826
  var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4;
7732
7827
  var floorRequestNeeded, _streams$screenShare5;
7733
- return _regenerator.default.wrap(function _callee33$(_context33) {
7734
- while (1) switch (_context33.prev = _context33.next) {
7828
+ return _regenerator.default.wrap(function _callee34$(_context34) {
7829
+ while (1) switch (_context34.prev = _context34.next) {
7735
7830
  case 0:
7736
7831
  this.checkMediaConnection();
7737
7832
  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))) {
7738
- _context33.next = 3;
7833
+ _context34.next = 3;
7739
7834
  break;
7740
7835
  }
7741
- return _context33.abrupt("return");
7836
+ return _context34.abrupt("return");
7742
7837
  case 3:
7743
7838
  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
7744
7839
  if (!(this.isMultistream && (_streams$screenShare3 = streams.screenShare) !== null && _streams$screenShare3 !== void 0 && _streams$screenShare3.audio)) {
7745
- _context33.next = 8;
7840
+ _context34.next = 8;
7746
7841
  break;
7747
7842
  }
7748
- _context33.next = 7;
7843
+ _context34.next = 7;
7749
7844
  return this.setLocalShareAudioStream(streams.screenShare.audio);
7750
7845
  case 7:
7751
7846
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
7752
7847
  case 8:
7753
7848
  if (!((_streams$screenShare4 = streams.screenShare) !== null && _streams$screenShare4 !== void 0 && _streams$screenShare4.video)) {
7754
- _context33.next = 12;
7849
+ _context34.next = 12;
7755
7850
  break;
7756
7851
  }
7757
- _context33.next = 11;
7852
+ _context34.next = 11;
7758
7853
  return this.setLocalShareVideoStream((_streams$screenShare5 = streams.screenShare) === null || _streams$screenShare5 === void 0 ? void 0 : _streams$screenShare5.video);
7759
7854
  case 11:
7760
7855
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
7761
7856
  case 12:
7762
7857
  if (!streams.microphone) {
7763
- _context33.next = 15;
7858
+ _context34.next = 15;
7764
7859
  break;
7765
7860
  }
7766
- _context33.next = 15;
7861
+ _context34.next = 15;
7767
7862
  return this.setLocalAudioStream(streams.microphone);
7768
7863
  case 15:
7769
7864
  if (!streams.camera) {
7770
- _context33.next = 18;
7865
+ _context34.next = 18;
7771
7866
  break;
7772
7867
  }
7773
- _context33.next = 18;
7868
+ _context34.next = 18;
7774
7869
  return this.setLocalVideoStream(streams.camera);
7775
7870
  case 18:
7776
7871
  if (this.isMultistream) {
7777
- _context33.next = 21;
7872
+ _context34.next = 21;
7778
7873
  break;
7779
7874
  }
7780
- _context33.next = 21;
7875
+ _context34.next = 21;
7781
7876
  return this.updateTranscodedMediaConnection();
7782
7877
  case 21:
7783
7878
  if (!floorRequestNeeded) {
7784
- _context33.next = 24;
7879
+ _context34.next = 26;
7785
7880
  break;
7786
7881
  }
7787
- _context33.next = 24;
7882
+ this.localShareInstanceId = _uuid.default.v4();
7883
+
7884
+ // @ts-ignore
7885
+ this.webex.internal.newMetrics.submitClientEvent({
7886
+ name: 'client.share.initiated',
7887
+ payload: {
7888
+ mediaType: 'share',
7889
+ shareInstanceId: this.localShareInstanceId
7890
+ },
7891
+ options: {
7892
+ meetingId: this.id
7893
+ }
7894
+ });
7895
+ // we're sending the http request to Locus to request the screen share floor
7896
+ // only after the SDP update, because that's how it's always been done for transcoded meetings
7897
+ // and also if sharing from the start, we need confluence to have been created
7898
+ _context34.next = 26;
7788
7899
  return this.enqueueScreenShareFloorRequest();
7789
- case 24:
7900
+ case 26:
7790
7901
  case "end":
7791
- return _context33.stop();
7902
+ return _context34.stop();
7792
7903
  }
7793
- }, _callee33, this);
7904
+ }, _callee34, this);
7794
7905
  }));
7795
- function publishStreams(_x32) {
7906
+ function publishStreams(_x35) {
7796
7907
  return _publishStreams.apply(this, arguments);
7797
7908
  }
7798
7909
  return publishStreams;
@@ -7807,10 +7918,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7807
7918
  }, {
7808
7919
  key: "unpublishStreams",
7809
7920
  value: (function () {
7810
- var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(streams) {
7921
+ var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(streams) {
7811
7922
  var promises, _iterator, _step, stream;
7812
- return _regenerator.default.wrap(function _callee34$(_context34) {
7813
- while (1) switch (_context34.prev = _context34.next) {
7923
+ return _regenerator.default.wrap(function _callee35$(_context35) {
7924
+ while (1) switch (_context35.prev = _context35.next) {
7814
7925
  case 0:
7815
7926
  this.checkMediaConnection();
7816
7927
  promises = [];
@@ -7841,7 +7952,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7841
7952
  if (!this.isMultistream) {
7842
7953
  promises.push(this.updateTranscodedMediaConnection());
7843
7954
  }
7844
- _context34.next = 7;
7955
+ _context35.next = 7;
7845
7956
  return _promise.default.all(promises);
7846
7957
  case 7:
7847
7958
  // we're allowing for the SDK to support just audio share as well
@@ -7856,11 +7967,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7856
7967
  }
7857
7968
  case 8:
7858
7969
  case "end":
7859
- return _context34.stop();
7970
+ return _context35.stop();
7860
7971
  }
7861
- }, _callee34, this);
7972
+ }, _callee35, this);
7862
7973
  }));
7863
- function unpublishStreams(_x33) {
7974
+ function unpublishStreams(_x36) {
7864
7975
  return _unpublishStreams.apply(this, arguments);
7865
7976
  }
7866
7977
  return unpublishStreams;
@@ -7920,27 +8031,27 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7920
8031
  }], [{
7921
8032
  key: "handleDeviceLogging",
7922
8033
  value: (function () {
7923
- var _handleDeviceLogging = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35() {
8034
+ var _handleDeviceLogging = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
7924
8035
  var devices;
7925
- return _regenerator.default.wrap(function _callee35$(_context35) {
7926
- while (1) switch (_context35.prev = _context35.next) {
8036
+ return _regenerator.default.wrap(function _callee36$(_context36) {
8037
+ while (1) switch (_context36.prev = _context36.next) {
7927
8038
  case 0:
7928
- _context35.prev = 0;
7929
- _context35.next = 3;
8039
+ _context36.prev = 0;
8040
+ _context36.next = 3;
7930
8041
  return (0, _mediaHelpers.getDevices)();
7931
8042
  case 3:
7932
- devices = _context35.sent;
8043
+ devices = _context36.sent;
7933
8044
  _util.default.handleDeviceLogging(devices);
7934
- _context35.next = 9;
8045
+ _context36.next = 9;
7935
8046
  break;
7936
8047
  case 7:
7937
- _context35.prev = 7;
7938
- _context35.t0 = _context35["catch"](0);
8048
+ _context36.prev = 7;
8049
+ _context36.t0 = _context36["catch"](0);
7939
8050
  case 9:
7940
8051
  case "end":
7941
- return _context35.stop();
8052
+ return _context36.stop();
7942
8053
  }
7943
- }, _callee35, null, [[0, 7]]);
8054
+ }, _callee36, null, [[0, 7]]);
7944
8055
  }));
7945
8056
  function handleDeviceLogging() {
7946
8057
  return _handleDeviceLogging.apply(this, arguments);