@webex/plugin-meetings 3.0.0-beta.351 → 3.0.0-beta.352

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.
@@ -113,6 +113,12 @@ var MEDIA_UPDATE_TYPE = {
113
113
  };
114
114
  exports.MEDIA_UPDATE_TYPE = MEDIA_UPDATE_TYPE;
115
115
  var ScreenShareFloorStatus;
116
+ exports.ScreenShareFloorStatus = ScreenShareFloorStatus;
117
+ (function (ScreenShareFloorStatus) {
118
+ ScreenShareFloorStatus["PENDING"] = "floor_request_pending";
119
+ ScreenShareFloorStatus["GRANTED"] = "floor_request_granted";
120
+ ScreenShareFloorStatus["RELEASED"] = "floor_released";
121
+ })(ScreenShareFloorStatus || (exports.ScreenShareFloorStatus = ScreenShareFloorStatus = {}));
116
122
  /**
117
123
  * MediaDirection
118
124
  * @typedef {Object} MediaDirection
@@ -359,12 +365,6 @@ var ScreenShareFloorStatus;
359
365
  * @export
360
366
  * @class Meeting
361
367
  */
362
- exports.ScreenShareFloorStatus = ScreenShareFloorStatus;
363
- (function (ScreenShareFloorStatus) {
364
- ScreenShareFloorStatus["PENDING"] = "floor_request_pending";
365
- ScreenShareFloorStatus["GRANTED"] = "floor_request_granted";
366
- ScreenShareFloorStatus["RELEASED"] = "floor_released";
367
- })(ScreenShareFloorStatus || (exports.ScreenShareFloorStatus = ScreenShareFloorStatus = {}));
368
368
  var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
369
369
  (0, _inherits2.default)(Meeting, _StatelessWebexPlugin);
370
370
  var _super = _createSuper(Meeting);
@@ -1924,6 +1924,98 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1924
1924
  this.callStateForMetrics.correlationId = correlationId;
1925
1925
  }
1926
1926
 
1927
+ /**
1928
+ * Set meeting info and trigger `MEETING_INFO_AVAILABLE` event
1929
+ * @param {any} info
1930
+ * @param {string} [meetingLookupUrl] Lookup url, defined when the meeting info fetched
1931
+ * @returns {void}
1932
+ */
1933
+ }, {
1934
+ key: "setMeetingInfo",
1935
+ value: function setMeetingInfo(info, meetingLookupUrl) {
1936
+ this.meetingInfo = info ? _objectSpread(_objectSpread({}, info), {}, {
1937
+ meetingLookupUrl: meetingLookupUrl
1938
+ }) : null;
1939
+ this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.NONE;
1940
+ this.requiredCaptcha = null;
1941
+ if (this.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED || this.passwordStatus === _constants.PASSWORD_STATUS.VERIFIED) {
1942
+ this.passwordStatus = _constants.PASSWORD_STATUS.VERIFIED;
1943
+ } else {
1944
+ this.passwordStatus = _constants.PASSWORD_STATUS.NOT_REQUIRED;
1945
+ }
1946
+ _triggerProxy.default.trigger(this, {
1947
+ file: 'meetings',
1948
+ function: 'fetchMeetingInfo'
1949
+ }, _constants.EVENT_TRIGGERS.MEETING_INFO_AVAILABLE);
1950
+ this.updateMeetingActions();
1951
+ }
1952
+
1953
+ /**
1954
+ * Add pre-fetched meeting info
1955
+ *
1956
+ * The passed meeting info should be be complete, e.g.: fetched after password or captcha provided
1957
+ *
1958
+ * @param {Object} meetingInfo - Complete meeting info
1959
+ * @param {FetchMeetingInfoParams} fetchParams - Fetch parameters for validation
1960
+ * @param {String|undefined} meetingLookupUrl - Lookup url, defined when the meeting info fetched
1961
+ * @returns {Promise<void>}
1962
+ */
1963
+ }, {
1964
+ key: "injectMeetingInfo",
1965
+ value: function () {
1966
+ var _injectMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(meetingInfo, fetchParams, meetingLookupUrl) {
1967
+ return _regenerator.default.wrap(function _callee4$(_context4) {
1968
+ while (1) switch (_context4.prev = _context4.next) {
1969
+ case 0:
1970
+ _context4.next = 2;
1971
+ return this.prepForFetchMeetingInfo(fetchParams, 'injectMeetingInfo');
1972
+ case 2:
1973
+ this.parseMeetingInfo(meetingInfo, this.destination);
1974
+ this.setMeetingInfo(meetingInfo, meetingLookupUrl);
1975
+ case 4:
1976
+ case "end":
1977
+ return _context4.stop();
1978
+ }
1979
+ }, _callee4, this);
1980
+ }));
1981
+ function injectMeetingInfo(_x2, _x3, _x4) {
1982
+ return _injectMeetingInfo.apply(this, arguments);
1983
+ }
1984
+ return injectMeetingInfo;
1985
+ }()
1986
+ /**
1987
+ * Validate fetch parameters and clear the fetchMeetingInfoTimeout timeout
1988
+ *
1989
+ * @param {FetchMeetingInfoParams} fetchParams - fetch parameters for validation
1990
+ * @param {String} caller - Name of the caller for logging
1991
+ *
1992
+ * @returns {Promise<void>}
1993
+ * @private
1994
+ */
1995
+ }, {
1996
+ key: "prepForFetchMeetingInfo",
1997
+ value: function prepForFetchMeetingInfo(_ref7, caller) {
1998
+ var _ref7$password = _ref7.password,
1999
+ password = _ref7$password === void 0 ? null : _ref7$password,
2000
+ _ref7$captchaCode = _ref7.captchaCode,
2001
+ captchaCode = _ref7$captchaCode === void 0 ? null : _ref7$captchaCode,
2002
+ _ref7$extraParams = _ref7.extraParams,
2003
+ extraParams = _ref7$extraParams === void 0 ? {} : _ref7$extraParams;
2004
+ // when fetch meeting info is called directly by the client, we want to clear out the random timer for sdk to do it
2005
+ if (this.fetchMeetingInfoTimeoutId) {
2006
+ clearTimeout(this.fetchMeetingInfoTimeoutId);
2007
+ this.fetchMeetingInfoTimeoutId = undefined;
2008
+ }
2009
+ if (captchaCode && !this.requiredCaptcha) {
2010
+ return _promise.default.reject(new Error("".concat(caller, "() called with captchaCode when captcha was not required")));
2011
+ }
2012
+ if (password && this.passwordStatus !== _constants.PASSWORD_STATUS.REQUIRED && this.passwordStatus !== _constants.PASSWORD_STATUS.UNKNOWN) {
2013
+ return _promise.default.reject(new Error("".concat(caller, "() called with password when password was not required")));
2014
+ }
2015
+ this.meetingInfoExtraParams = (0, _cloneDeep2.default)(extraParams);
2016
+ return _promise.default.resolve();
2017
+ }
2018
+
1927
2019
  /**
1928
2020
  * Internal method for fetching meeting info
1929
2021
  *
@@ -1932,18 +2024,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1932
2024
  }, {
1933
2025
  key: "fetchMeetingInfoInternal",
1934
2026
  value: function () {
1935
- var _fetchMeetingInfoInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref7) {
1936
- var destination, destinationType, _ref7$password, password, _ref7$captchaCode, captchaCode, _ref7$extraParams, extraParams, _ref7$sendCAevents, sendCAevents, captchaInfo, info, _err$body, _err$body2;
1937
- return _regenerator.default.wrap(function _callee4$(_context4) {
1938
- while (1) switch (_context4.prev = _context4.next) {
2027
+ var _fetchMeetingInfoInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(_ref8) {
2028
+ var destination, destinationType, _ref8$password, password, _ref8$captchaCode, captchaCode, _ref8$extraParams, extraParams, _ref8$sendCAevents, sendCAevents, captchaInfo, info, _err$body, _err$body2;
2029
+ return _regenerator.default.wrap(function _callee5$(_context5) {
2030
+ while (1) switch (_context5.prev = _context5.next) {
1939
2031
  case 0:
1940
- 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;
1941
- _context4.prev = 1;
2032
+ 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;
2033
+ _context5.prev = 1;
1942
2034
  captchaInfo = captchaCode ? {
1943
2035
  code: captchaCode,
1944
2036
  id: this.requiredCaptcha.captchaId
1945
2037
  } : null;
1946
- _context4.next = 5;
2038
+ _context5.next = 5;
1947
2039
  return this.attrs.meetingInfoProvider.fetchMeetingInfo(destination, destinationType, password, captchaInfo,
1948
2040
  // @ts-ignore - config coming from registerPlugin
1949
2041
  this.config.installedOrgID, this.locusId, extraParams, {
@@ -1951,86 +2043,72 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1951
2043
  sendCAevents: sendCAevents
1952
2044
  });
1953
2045
  case 5:
1954
- info = _context4.sent;
1955
- this.parseMeetingInfo(info, this.destination);
1956
- this.meetingInfo = info ? _objectSpread(_objectSpread({}, info.body), {}, {
1957
- meetingLookupUrl: info === null || info === void 0 ? void 0 : info.url
1958
- }) : null;
1959
- this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.NONE;
1960
- this.requiredCaptcha = null;
1961
- if (this.passwordStatus === _constants.PASSWORD_STATUS.REQUIRED || this.passwordStatus === _constants.PASSWORD_STATUS.VERIFIED) {
1962
- this.passwordStatus = _constants.PASSWORD_STATUS.VERIFIED;
1963
- } else {
1964
- this.passwordStatus = _constants.PASSWORD_STATUS.NOT_REQUIRED;
1965
- }
1966
- _triggerProxy.default.trigger(this, {
1967
- file: 'meetings',
1968
- function: 'fetchMeetingInfo'
1969
- }, _constants.EVENT_TRIGGERS.MEETING_INFO_AVAILABLE);
1970
- this.updateMeetingActions();
1971
- return _context4.abrupt("return", _promise.default.resolve());
1972
- case 16:
1973
- _context4.prev = 16;
1974
- _context4.t0 = _context4["catch"](1);
2046
+ info = _context5.sent;
2047
+ this.parseMeetingInfo(info === null || info === void 0 ? void 0 : info.body, this.destination, info === null || info === void 0 ? void 0 : info.errors);
2048
+ this.setMeetingInfo(info === null || info === void 0 ? void 0 : info.body, info === null || info === void 0 ? void 0 : info.url);
2049
+ return _context5.abrupt("return", _promise.default.resolve());
2050
+ case 11:
2051
+ _context5.prev = 11;
2052
+ _context5.t0 = _context5["catch"](1);
1975
2053
  this.updateMeetingActions();
1976
- if (!(_context4.t0 instanceof _meetingInfoV.MeetingInfoV2PolicyError)) {
1977
- _context4.next = 26;
2054
+ if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2PolicyError)) {
2055
+ _context5.next = 21;
1978
2056
  break;
1979
2057
  }
1980
2058
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.POLICY;
1981
- this.meetingInfoFailureCode = _context4.t0.wbxAppApiCode;
1982
- if (_context4.t0.meetingInfo) {
1983
- this.meetingInfo = _context4.t0.meetingInfo;
2059
+ this.meetingInfoFailureCode = _context5.t0.wbxAppApiCode;
2060
+ if (_context5.t0.meetingInfo) {
2061
+ this.meetingInfo = _context5.t0.meetingInfo;
1984
2062
  }
1985
2063
  throw new _permission.default();
1986
- case 26:
1987
- if (!(_context4.t0 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
1988
- _context4.next = 38;
2064
+ case 21:
2065
+ if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2PasswordError)) {
2066
+ _context5.next = 33;
1989
2067
  break;
1990
2068
  }
1991
2069
  _loggerProxy.default.logger.info( // @ts-ignore
1992
- "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, ")."));
2070
+ "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, ")."));
1993
2071
 
1994
2072
  // when wbxappapi requires password it still populates partial meeting info in the response
1995
- if (_context4.t0.meetingInfo) {
1996
- this.meetingInfo = _context4.t0.meetingInfo;
1997
- this.meetingNumber = _context4.t0.meetingInfo.meetingNumber;
2073
+ if (_context5.t0.meetingInfo) {
2074
+ this.meetingInfo = _context5.t0.meetingInfo;
2075
+ this.meetingNumber = _context5.t0.meetingInfo.meetingNumber;
1998
2076
  }
1999
- this.meetingInfoFailureCode = _context4.t0.wbxAppApiCode;
2077
+ this.meetingInfoFailureCode = _context5.t0.wbxAppApiCode;
2000
2078
  this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
2001
2079
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
2002
2080
  if (!this.requiredCaptcha) {
2003
- _context4.next = 35;
2081
+ _context5.next = 30;
2004
2082
  break;
2005
2083
  }
2006
- _context4.next = 35;
2084
+ _context5.next = 30;
2007
2085
  return this.refreshCaptcha();
2008
- case 35:
2086
+ case 30:
2009
2087
  throw new _passwordError.default();
2010
- case 38:
2011
- if (!(_context4.t0 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
2012
- _context4.next = 47;
2088
+ case 33:
2089
+ if (!(_context5.t0 instanceof _meetingInfoV.MeetingInfoV2CaptchaError)) {
2090
+ _context5.next = 42;
2013
2091
  break;
2014
2092
  }
2015
2093
  _loggerProxy.default.logger.info( // @ts-ignore
2016
- "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, ")."));
2094
+ "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, ")."));
2017
2095
  this.meetingInfoFailureReason = this.requiredCaptcha ? _constants.MEETING_INFO_FAILURE_REASON.WRONG_CAPTCHA : _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
2018
- this.meetingInfoFailureCode = _context4.t0.wbxAppApiCode;
2019
- if (_context4.t0.isPasswordRequired) {
2096
+ this.meetingInfoFailureCode = _context5.t0.wbxAppApiCode;
2097
+ if (_context5.t0.isPasswordRequired) {
2020
2098
  this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
2021
2099
  }
2022
- this.requiredCaptcha = _context4.t0.captchaInfo;
2100
+ this.requiredCaptcha = _context5.t0.captchaInfo;
2023
2101
  throw new _captchaError.default();
2024
- case 47:
2102
+ case 42:
2025
2103
  this.meetingInfoFailureReason = _constants.MEETING_INFO_FAILURE_REASON.OTHER;
2026
- throw _context4.t0;
2027
- case 49:
2104
+ throw _context5.t0;
2105
+ case 44:
2028
2106
  case "end":
2029
- return _context4.stop();
2107
+ return _context5.stop();
2030
2108
  }
2031
- }, _callee4, this, [[1, 16]]);
2109
+ }, _callee5, this, [[1, 11]]);
2032
2110
  }));
2033
- function fetchMeetingInfoInternal(_x2) {
2111
+ function fetchMeetingInfoInternal(_x5) {
2034
2112
  return _fetchMeetingInfoInternal.apply(this, arguments);
2035
2113
  }
2036
2114
  return fetchMeetingInfoInternal;
@@ -2044,18 +2122,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2044
2122
  }, {
2045
2123
  key: "refreshPermissionToken",
2046
2124
  value: function () {
2047
- var _refreshPermissionToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(reason) {
2125
+ var _refreshPermissionToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(reason) {
2048
2126
  var _this$meetingInfo;
2049
2127
  var isStartingSpaceInstantV2Meeting, destination, destinationType, permissionTokenExpiryInfo, timeLeft, expiryTime, currentTime;
2050
- return _regenerator.default.wrap(function _callee5$(_context5) {
2051
- while (1) switch (_context5.prev = _context5.next) {
2128
+ return _regenerator.default.wrap(function _callee6$(_context6) {
2129
+ while (1) switch (_context6.prev = _context6.next) {
2052
2130
  case 0:
2053
2131
  if ((_this$meetingInfo = this.meetingInfo) !== null && _this$meetingInfo !== void 0 && _this$meetingInfo.permissionToken) {
2054
- _context5.next = 3;
2132
+ _context6.next = 3;
2055
2133
  break;
2056
2134
  }
2057
2135
  _loggerProxy.default.logger.info("Meeting:index#refreshPermissionToken --> cannot refresh the permission token, because we don't have it (reason=".concat(reason, ")"));
2058
- return _context5.abrupt("return");
2136
+ return _context6.abrupt("return");
2059
2137
  case 3:
2060
2138
  isStartingSpaceInstantV2Meeting = this.destinationType === _constants._CONVERSATION_URL_ &&
2061
2139
  // @ts-ignore - config coming from registerPlugin
@@ -2077,8 +2155,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2077
2155
  reason: reason,
2078
2156
  destinationType: destinationType
2079
2157
  });
2080
- _context5.prev = 12;
2081
- _context5.next = 15;
2158
+ _context6.prev = 12;
2159
+ _context6.next = 15;
2082
2160
  return this.fetchMeetingInfoInternal({
2083
2161
  destination: destination,
2084
2162
  destinationType: destinationType,
@@ -2088,25 +2166,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2088
2166
  sendCAevents: true // because if we're refreshing the permissionToken, it means that user is intending to join that meeting, so we want CA events
2089
2167
  });
2090
2168
  case 15:
2091
- _context5.next = 22;
2169
+ _context6.next = 22;
2092
2170
  break;
2093
2171
  case 17:
2094
- _context5.prev = 17;
2095
- _context5.t0 = _context5["catch"](12);
2096
- _loggerProxy.default.logger.info('Meeting:index#refreshPermissionToken --> failed to refresh the permission token:', _context5.t0);
2172
+ _context6.prev = 17;
2173
+ _context6.t0 = _context6["catch"](12);
2174
+ _loggerProxy.default.logger.info('Meeting:index#refreshPermissionToken --> failed to refresh the permission token:', _context6.t0);
2097
2175
  _metrics.default.sendBehavioralMetric(_constants2.default.PERMISSION_TOKEN_REFRESH_ERROR, {
2098
2176
  correlationId: this.correlationId,
2099
- reason: _context5.t0.message,
2100
- stack: _context5.t0.stack
2177
+ reason: _context6.t0.message,
2178
+ stack: _context6.t0.stack
2101
2179
  });
2102
- throw _context5.t0;
2180
+ throw _context6.t0;
2103
2181
  case 22:
2104
2182
  case "end":
2105
- return _context5.stop();
2183
+ return _context6.stop();
2106
2184
  }
2107
- }, _callee5, this, [[12, 17]]);
2185
+ }, _callee6, this, [[12, 17]]);
2108
2186
  }));
2109
- function refreshPermissionToken(_x3) {
2187
+ function refreshPermissionToken(_x6) {
2110
2188
  return _refreshPermissionToken.apply(this, arguments);
2111
2189
  }
2112
2190
  return refreshPermissionToken;
@@ -2124,45 +2202,24 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2124
2202
  }, {
2125
2203
  key: "fetchMeetingInfo",
2126
2204
  value: function () {
2127
- var _fetchMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(_ref8) {
2128
- var _ref8$password, password, _ref8$captchaCode, captchaCode, _ref8$extraParams, extraParams, _ref8$sendCAevents, sendCAevents;
2129
- return _regenerator.default.wrap(function _callee6$(_context6) {
2130
- while (1) switch (_context6.prev = _context6.next) {
2205
+ var _fetchMeetingInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(options) {
2206
+ return _regenerator.default.wrap(function _callee7$(_context7) {
2207
+ while (1) switch (_context7.prev = _context7.next) {
2131
2208
  case 0:
2132
- _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;
2133
- // when fetch meeting info is called directly by the client, we want to clear out the random timer for sdk to do it
2134
- if (this.fetchMeetingInfoTimeoutId) {
2135
- clearTimeout(this.fetchMeetingInfoTimeoutId);
2136
- this.fetchMeetingInfoTimeoutId = undefined;
2137
- }
2138
- if (!(captchaCode && !this.requiredCaptcha)) {
2139
- _context6.next = 4;
2140
- break;
2141
- }
2142
- return _context6.abrupt("return", _promise.default.reject(new Error('fetchMeetingInfo() called with captchaCode when captcha was not required')));
2143
- case 4:
2144
- if (!(password && this.passwordStatus !== _constants.PASSWORD_STATUS.REQUIRED && this.passwordStatus !== _constants.PASSWORD_STATUS.UNKNOWN)) {
2145
- _context6.next = 6;
2146
- break;
2147
- }
2148
- return _context6.abrupt("return", _promise.default.reject(new Error('fetchMeetingInfo() called with password when password was not required')));
2149
- case 6:
2150
- this.meetingInfoExtraParams = (0, _cloneDeep2.default)(extraParams);
2151
- return _context6.abrupt("return", this.fetchMeetingInfoInternal({
2209
+ _context7.next = 2;
2210
+ return this.prepForFetchMeetingInfo(options, 'fetchMeetingInfo');
2211
+ case 2:
2212
+ return _context7.abrupt("return", this.fetchMeetingInfoInternal(_objectSpread({
2152
2213
  destination: this.destination,
2153
- destinationType: this.destinationType,
2154
- password: password,
2155
- captchaCode: captchaCode,
2156
- extraParams: extraParams,
2157
- sendCAevents: sendCAevents
2158
- }));
2159
- case 8:
2214
+ destinationType: this.destinationType
2215
+ }, options)));
2216
+ case 3:
2160
2217
  case "end":
2161
- return _context6.stop();
2218
+ return _context7.stop();
2162
2219
  }
2163
- }, _callee6, this);
2220
+ }, _callee7, this);
2164
2221
  }));
2165
- function fetchMeetingInfo(_x4) {
2222
+ function fetchMeetingInfo(_x7) {
2166
2223
  return _fetchMeetingInfo.apply(this, arguments);
2167
2224
  }
2168
2225
  return fetchMeetingInfo;
@@ -2794,21 +2851,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2794
2851
  var _this14 = this;
2795
2852
  // Will get triggered on local and remote share
2796
2853
  this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, /*#__PURE__*/function () {
2797
- var _ref22 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(payload) {
2854
+ var _ref22 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
2798
2855
  var _payload$previous, _payload$previous2;
2799
2856
  var _payload$current, contentShare, whiteboardShare, previousContentShare, previousWhiteboardShare, newShareStatus, oldShareStatus, sendStartedSharingRemote, _this14$mediaProperti;
2800
- return _regenerator.default.wrap(function _callee7$(_context7) {
2801
- while (1) switch (_context7.prev = _context7.next) {
2857
+ return _regenerator.default.wrap(function _callee8$(_context8) {
2858
+ while (1) switch (_context8.prev = _context8.next) {
2802
2859
  case 0:
2803
2860
  _payload$current = payload.current, contentShare = _payload$current.content, whiteboardShare = _payload$current.whiteboard;
2804
2861
  previousContentShare = (_payload$previous = payload.previous) === null || _payload$previous === void 0 ? void 0 : _payload$previous.content;
2805
2862
  previousWhiteboardShare = (_payload$previous2 = payload.previous) === null || _payload$previous2 === void 0 ? void 0 : _payload$previous2.whiteboard;
2806
2863
  _this14.triggerAnnotationInfoEvent(contentShare, previousContentShare);
2807
2864
  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))) {
2808
- _context7.next = 6;
2865
+ _context8.next = 6;
2809
2866
  break;
2810
2867
  }
2811
- return _context7.abrupt("return");
2868
+ return _context8.abrupt("return");
2812
2869
  case 6:
2813
2870
  newShareStatus = _this14.shareStatus; // REMOTE - check if remote started sharing
2814
2871
  if (_this14.selfId !== contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
@@ -2837,22 +2894,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2837
2894
  newShareStatus = _constants.SHARE_STATUS.NO_SHARE;
2838
2895
  }
2839
2896
  if (!(newShareStatus !== _this14.shareStatus)) {
2840
- _context7.next = 45;
2897
+ _context8.next = 45;
2841
2898
  break;
2842
2899
  }
2843
2900
  oldShareStatus = _this14.shareStatus; // update our state before we send out any notifications
2844
2901
  _this14.shareStatus = newShareStatus;
2845
2902
 
2846
2903
  // send out "stop" notifications for the old state
2847
- _context7.t0 = oldShareStatus;
2848
- _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;
2904
+ _context8.t0 = oldShareStatus;
2905
+ _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;
2849
2906
  break;
2850
2907
  case 14:
2851
2908
  _triggerProxy.default.trigger(_this14, {
2852
2909
  file: 'meetings/index',
2853
2910
  function: 'remoteShare'
2854
2911
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_REMOTE);
2855
- return _context7.abrupt("break", 22);
2912
+ return _context8.abrupt("break", 22);
2856
2913
  case 16:
2857
2914
  _triggerProxy.default.trigger(_this14, {
2858
2915
  file: 'meeting/index',
@@ -2860,20 +2917,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2860
2917
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL, {
2861
2918
  reason: _constants.SHARE_STOPPED_REASON.SELF_STOPPED
2862
2919
  });
2863
- return _context7.abrupt("break", 22);
2920
+ return _context8.abrupt("break", 22);
2864
2921
  case 18:
2865
2922
  _triggerProxy.default.trigger(_this14, {
2866
2923
  file: 'meeting/index',
2867
2924
  function: 'stopWhiteboardShare'
2868
2925
  }, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_WHITEBOARD);
2869
- return _context7.abrupt("break", 22);
2926
+ return _context8.abrupt("break", 22);
2870
2927
  case 20:
2871
- return _context7.abrupt("break", 22);
2928
+ return _context8.abrupt("break", 22);
2872
2929
  case 21:
2873
- return _context7.abrupt("break", 22);
2930
+ return _context8.abrupt("break", 22);
2874
2931
  case 22:
2875
- _context7.t1 = newShareStatus;
2876
- _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;
2932
+ _context8.t1 = newShareStatus;
2933
+ _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;
2877
2934
  break;
2878
2935
  case 25:
2879
2936
  sendStartedSharingRemote = function sendStartedSharingRemote() {
@@ -2887,19 +2944,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2887
2944
  annotationInfo: contentShare.annotation
2888
2945
  });
2889
2946
  };
2890
- _context7.prev = 26;
2947
+ _context8.prev = 26;
2891
2948
  if (!((_this14$mediaProperti = _this14.mediaProperties.mediaDirection) !== null && _this14$mediaProperti !== void 0 && _this14$mediaProperti.sendShare && oldShareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE)) {
2892
- _context7.next = 30;
2949
+ _context8.next = 30;
2893
2950
  break;
2894
2951
  }
2895
- _context7.next = 30;
2952
+ _context8.next = 30;
2896
2953
  return _this14.unpublishStreams([_this14.mediaProperties.shareVideoStream, _this14.mediaProperties.shareAudioStream]);
2897
2954
  case 30:
2898
- _context7.prev = 30;
2955
+ _context8.prev = 30;
2899
2956
  sendStartedSharingRemote();
2900
- return _context7.finish(30);
2957
+ return _context8.finish(30);
2901
2958
  case 33:
2902
- return _context7.abrupt("break", 42);
2959
+ return _context8.abrupt("break", 42);
2903
2960
  case 34:
2904
2961
  _triggerProxy.default.trigger(_this14, {
2905
2962
  file: 'meeting/index',
@@ -2915,7 +2972,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2915
2972
  meetingId: _this14.id
2916
2973
  }
2917
2974
  });
2918
- return _context7.abrupt("break", 42);
2975
+ return _context8.abrupt("break", 42);
2919
2976
  case 37:
2920
2977
  _triggerProxy.default.trigger(_this14, {
2921
2978
  file: 'meeting/index',
@@ -2934,14 +2991,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2934
2991
  meetingId: _this14.id
2935
2992
  }
2936
2993
  });
2937
- return _context7.abrupt("break", 42);
2994
+ return _context8.abrupt("break", 42);
2938
2995
  case 40:
2939
- return _context7.abrupt("break", 42);
2996
+ return _context8.abrupt("break", 42);
2940
2997
  case 41:
2941
- return _context7.abrupt("break", 42);
2998
+ return _context8.abrupt("break", 42);
2942
2999
  case 42:
2943
3000
  _this14.members.locusMediaSharesUpdate(payload);
2944
- _context7.next = 46;
3001
+ _context8.next = 46;
2945
3002
  break;
2946
3003
  case 45:
2947
3004
  if (newShareStatus === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE) {
@@ -2981,11 +3038,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2981
3038
  }
2982
3039
  case 46:
2983
3040
  case "end":
2984
- return _context7.stop();
3041
+ return _context8.stop();
2985
3042
  }
2986
- }, _callee7, null, [[26,, 30, 33]]);
3043
+ }, _callee8, null, [[26,, 30, 33]]);
2987
3044
  }));
2988
- return function (_x5) {
3045
+ return function (_x8) {
2989
3046
  return _ref22.apply(this, arguments);
2990
3047
  };
2991
3048
  }());
@@ -3321,48 +3378,48 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3321
3378
  }
3322
3379
  });
3323
3380
  this.locusInfo.on(_constants.EVENTS.DESTROY_MEETING, /*#__PURE__*/function () {
3324
- var _ref23 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(payload) {
3325
- return _regenerator.default.wrap(function _callee8$(_context8) {
3326
- while (1) switch (_context8.prev = _context8.next) {
3381
+ var _ref23 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(payload) {
3382
+ return _regenerator.default.wrap(function _callee9$(_context9) {
3383
+ while (1) switch (_context9.prev = _context9.next) {
3327
3384
  case 0:
3328
3385
  if (!_this20.wirelessShare) {
3329
- _context8.next = 7;
3386
+ _context9.next = 7;
3330
3387
  break;
3331
3388
  }
3332
3389
  if (!_this20.mediaProperties.shareVideoStream) {
3333
- _context8.next = 4;
3390
+ _context9.next = 4;
3334
3391
  break;
3335
3392
  }
3336
- _context8.next = 4;
3393
+ _context9.next = 4;
3337
3394
  return _this20.setLocalShareVideoStream(undefined);
3338
3395
  case 4:
3339
3396
  if (!_this20.mediaProperties.shareAudioStream) {
3340
- _context8.next = 7;
3397
+ _context9.next = 7;
3341
3398
  break;
3342
3399
  }
3343
- _context8.next = 7;
3400
+ _context9.next = 7;
3344
3401
  return _this20.setLocalShareAudioStream(undefined);
3345
3402
  case 7:
3346
3403
  if (!payload.shouldLeave) {
3347
- _context8.next = 19;
3404
+ _context9.next = 19;
3348
3405
  break;
3349
3406
  }
3350
- _context8.prev = 8;
3351
- _context8.next = 11;
3407
+ _context9.prev = 8;
3408
+ _context9.next = 11;
3352
3409
  return _this20.leave({
3353
3410
  reason: payload.reason
3354
3411
  });
3355
3412
  case 11:
3356
3413
  _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.');
3357
- _context8.next = 17;
3414
+ _context9.next = 17;
3358
3415
  break;
3359
3416
  case 14:
3360
- _context8.prev = 14;
3361
- _context8.t0 = _context8["catch"](8);
3417
+ _context9.prev = 14;
3418
+ _context9.t0 = _context9["catch"](8);
3362
3419
  // @ts-ignore
3363
- _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_context8.t0));
3420
+ _loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(_context9.t0));
3364
3421
  case 17:
3365
- _context8.next = 22;
3422
+ _context9.next = 22;
3366
3423
  break;
3367
3424
  case 19:
3368
3425
  _loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> MEETING_REMOVED_REASON', payload.reason);
@@ -3376,11 +3433,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3376
3433
  });
3377
3434
  case 22:
3378
3435
  case "end":
3379
- return _context8.stop();
3436
+ return _context9.stop();
3380
3437
  }
3381
- }, _callee8, null, [[8, 14]]);
3438
+ }, _callee9, null, [[8, 14]]);
3382
3439
  }));
3383
- return function (_x6) {
3440
+ return function (_x9) {
3384
3441
  return _ref23.apply(this, arguments);
3385
3442
  };
3386
3443
  }());
@@ -3530,12 +3587,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3530
3587
  /**
3531
3588
  * Sets the meeting info on the class instance
3532
3589
  * @param {Object} meetingInfo
3533
- * @param {Object} meetingInfo.body
3534
- * @param {String} meetingInfo.body.conversationUrl
3535
- * @param {String} meetingInfo.body.locusUrl
3536
- * @param {String} meetingInfo.body.sipUri
3537
- * @param {Object} meetingInfo.body.owner
3590
+ * @param {String} meetingInfo.conversationUrl
3591
+ * @param {String} meetingInfo.locusUrl
3592
+ * @param {String} meetingInfo.sipUri
3593
+ * @param {String} [meetingInfo.sipUrl]
3594
+ * @param {String} [meetingInfo.sipMeetingUri]
3595
+ * @param {String} [meetingInfo.meetingNumber]
3596
+ * @param {String} [meetingInfo.meetingJoinUrl]
3597
+ * @param {String} [meetingInfo.hostId]
3598
+ * @param {String} [meetingInfo.permissionToken]
3599
+ * @param {String} [meetingInfo.channel]
3600
+ * @param {Object} meetingInfo.owner
3538
3601
  * @param {Object | String} destination locus object with meeting data or destination string (sip url, meeting link, etc)
3602
+ * @param {Object | String} errors Meeting info request error
3539
3603
  * @returns {undefined}
3540
3604
  * @private
3541
3605
  * @memberof Meeting
@@ -3544,7 +3608,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3544
3608
  key: "parseMeetingInfo",
3545
3609
  value: function parseMeetingInfo(meetingInfo) {
3546
3610
  var destination = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
3547
- var webexMeetingInfo = meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.body;
3611
+ var errors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
3548
3612
  // We try to use as much info from Locus meeting object, stored in destination
3549
3613
 
3550
3614
  var locusMeetingObject;
@@ -3553,28 +3617,28 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3553
3617
  }
3554
3618
 
3555
3619
  // MeetingInfo will be undefined for 1:1 calls
3556
- if (locusMeetingObject || webexMeetingInfo && !(meetingInfo !== null && meetingInfo !== void 0 && meetingInfo.errors && (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.errors.length) > 0)) {
3620
+ if (locusMeetingObject || meetingInfo && !((errors === null || errors === void 0 ? void 0 : errors.length) > 0)) {
3557
3621
  var _locusMeetingObject, _locusMeetingObject2, _locusMeetingObject3, _locusMeetingObject4, _locusMeetingObject6, _locusMeetingObject7;
3558
- this.conversationUrl = ((_locusMeetingObject = locusMeetingObject) === null || _locusMeetingObject === void 0 ? void 0 : _locusMeetingObject.conversationUrl) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.conversationUrl) || this.conversationUrl;
3559
- this.locusUrl = ((_locusMeetingObject2 = locusMeetingObject) === null || _locusMeetingObject2 === void 0 ? void 0 : _locusMeetingObject2.url) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.locusUrl) || this.locusUrl;
3622
+ this.conversationUrl = ((_locusMeetingObject = locusMeetingObject) === null || _locusMeetingObject === void 0 ? void 0 : _locusMeetingObject.conversationUrl) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.conversationUrl) || this.conversationUrl;
3623
+ this.locusUrl = ((_locusMeetingObject2 = locusMeetingObject) === null || _locusMeetingObject2 === void 0 ? void 0 : _locusMeetingObject2.url) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.locusUrl) || this.locusUrl;
3560
3624
  // @ts-ignore - config coming from registerPlugin
3561
3625
  this.setSipUri(
3562
3626
  // @ts-ignore
3563
- 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);
3627
+ 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);
3564
3628
  // @ts-ignore - config coming from registerPlugin
3565
3629
  if (this.config.experimental.enableUnifiedMeetings) {
3566
3630
  var _locusMeetingObject5;
3567
- this.meetingNumber = ((_locusMeetingObject5 = locusMeetingObject) === null || _locusMeetingObject5 === void 0 ? void 0 : _locusMeetingObject5.info.webExMeetingId) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.meetingNumber);
3568
- this.meetingJoinUrl = webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.meetingJoinUrl;
3631
+ this.meetingNumber = ((_locusMeetingObject5 = locusMeetingObject) === null || _locusMeetingObject5 === void 0 ? void 0 : _locusMeetingObject5.info.webExMeetingId) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.meetingNumber);
3632
+ this.meetingJoinUrl = meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.meetingJoinUrl;
3569
3633
  }
3570
- 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;
3571
- this.permissionToken = webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.permissionToken;
3572
- this.setPermissionTokenPayload(webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.permissionToken);
3634
+ 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;
3635
+ this.permissionToken = meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.permissionToken;
3636
+ this.setPermissionTokenPayload(meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.permissionToken);
3573
3637
  this.setSelfUserPolicies();
3574
3638
  // Need to populate environment when sending CA event
3575
- this.environment = ((_locusMeetingObject7 = locusMeetingObject) === null || _locusMeetingObject7 === void 0 ? void 0 : _locusMeetingObject7.info.channel) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.channel);
3639
+ this.environment = ((_locusMeetingObject7 = locusMeetingObject) === null || _locusMeetingObject7 === void 0 ? void 0 : _locusMeetingObject7.info.channel) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.channel);
3576
3640
  }
3577
- _util.default.parseInterpretationInfo(this, webexMeetingInfo);
3641
+ _util.default.parseInterpretationInfo(this, meetingInfo);
3578
3642
  }
3579
3643
 
3580
3644
  /**
@@ -3959,10 +4023,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3959
4023
  }, {
3960
4024
  key: "setLocalAudioStream",
3961
4025
  value: function () {
3962
- var _setLocalAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(localStream) {
4026
+ var _setLocalAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(localStream) {
3963
4027
  var oldStream;
3964
- return _regenerator.default.wrap(function _callee9$(_context9) {
3965
- while (1) switch (_context9.prev = _context9.next) {
4028
+ return _regenerator.default.wrap(function _callee10$(_context10) {
4029
+ while (1) switch (_context10.prev = _context10.next) {
3966
4030
  case 0:
3967
4031
  oldStream = this.mediaProperties.audioStream;
3968
4032
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.MuteStateChange, this.localAudioStreamMuteStateHandler);
@@ -3974,21 +4038,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3974
4038
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.StreamEventNames.MuteStateChange, this.localAudioStreamMuteStateHandler);
3975
4039
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
3976
4040
  if (!(!this.isMultistream || !localStream)) {
3977
- _context9.next = 10;
4041
+ _context10.next = 10;
3978
4042
  break;
3979
4043
  }
3980
- _context9.next = 10;
4044
+ _context10.next = 10;
3981
4045
  return this.unpublishStream(_internalMediaCore.MediaType.AudioMain, oldStream);
3982
4046
  case 10:
3983
- _context9.next = 12;
4047
+ _context10.next = 12;
3984
4048
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
3985
4049
  case 12:
3986
4050
  case "end":
3987
- return _context9.stop();
4051
+ return _context10.stop();
3988
4052
  }
3989
- }, _callee9, this);
4053
+ }, _callee10, this);
3990
4054
  }));
3991
- function setLocalAudioStream(_x7) {
4055
+ function setLocalAudioStream(_x10) {
3992
4056
  return _setLocalAudioStream.apply(this, arguments);
3993
4057
  }
3994
4058
  return setLocalAudioStream;
@@ -4003,10 +4067,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4003
4067
  }, {
4004
4068
  key: "setLocalVideoStream",
4005
4069
  value: function () {
4006
- var _setLocalVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(localStream) {
4070
+ var _setLocalVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(localStream) {
4007
4071
  var oldStream;
4008
- return _regenerator.default.wrap(function _callee10$(_context10) {
4009
- while (1) switch (_context10.prev = _context10.next) {
4072
+ return _regenerator.default.wrap(function _callee11$(_context11) {
4073
+ while (1) switch (_context11.prev = _context11.next) {
4010
4074
  case 0:
4011
4075
  oldStream = this.mediaProperties.videoStream;
4012
4076
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.MuteStateChange, this.localVideoStreamMuteStateHandler);
@@ -4018,21 +4082,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4018
4082
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.StreamEventNames.MuteStateChange, this.localVideoStreamMuteStateHandler);
4019
4083
  localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4020
4084
  if (!(!this.isMultistream || !localStream)) {
4021
- _context10.next = 10;
4085
+ _context11.next = 10;
4022
4086
  break;
4023
4087
  }
4024
- _context10.next = 10;
4088
+ _context11.next = 10;
4025
4089
  return this.unpublishStream(_internalMediaCore.MediaType.VideoMain, oldStream);
4026
4090
  case 10:
4027
- _context10.next = 12;
4091
+ _context11.next = 12;
4028
4092
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
4029
4093
  case 12:
4030
4094
  case "end":
4031
- return _context10.stop();
4095
+ return _context11.stop();
4032
4096
  }
4033
- }, _callee10, this);
4097
+ }, _callee11, this);
4034
4098
  }));
4035
- function setLocalVideoStream(_x8) {
4099
+ function setLocalVideoStream(_x11) {
4036
4100
  return _setLocalVideoStream.apply(this, arguments);
4037
4101
  }
4038
4102
  return setLocalVideoStream;
@@ -4048,10 +4112,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4048
4112
  }, {
4049
4113
  key: "setLocalShareVideoStream",
4050
4114
  value: function () {
4051
- var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(localDisplayStream) {
4115
+ var _setLocalShareVideoStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(localDisplayStream) {
4052
4116
  var oldStream;
4053
- return _regenerator.default.wrap(function _callee11$(_context11) {
4054
- while (1) switch (_context11.prev = _context11.next) {
4117
+ return _regenerator.default.wrap(function _callee12$(_context12) {
4118
+ while (1) switch (_context12.prev = _context12.next) {
4055
4119
  case 0:
4056
4120
  oldStream = this.mediaProperties.shareVideoStream;
4057
4121
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.MuteStateChange, this.handleShareVideoStreamMuteStateChange);
@@ -4063,21 +4127,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4063
4127
  localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4064
4128
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
4065
4129
  if (!(!this.isMultistream || !localDisplayStream)) {
4066
- _context11.next = 12;
4130
+ _context12.next = 12;
4067
4131
  break;
4068
4132
  }
4069
- _context11.next = 12;
4133
+ _context12.next = 12;
4070
4134
  return this.unpublishStream(_internalMediaCore.MediaType.VideoSlides, oldStream);
4071
4135
  case 12:
4072
- _context11.next = 14;
4136
+ _context12.next = 14;
4073
4137
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
4074
4138
  case 14:
4075
4139
  case "end":
4076
- return _context11.stop();
4140
+ return _context12.stop();
4077
4141
  }
4078
- }, _callee11, this);
4142
+ }, _callee12, this);
4079
4143
  }));
4080
- function setLocalShareVideoStream(_x9) {
4144
+ function setLocalShareVideoStream(_x12) {
4081
4145
  return _setLocalShareVideoStream.apply(this, arguments);
4082
4146
  }
4083
4147
  return setLocalShareVideoStream;
@@ -4092,10 +4156,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4092
4156
  }, {
4093
4157
  key: "setLocalShareAudioStream",
4094
4158
  value: function () {
4095
- var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12(localSystemAudioStream) {
4159
+ var _setLocalShareAudioStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13(localSystemAudioStream) {
4096
4160
  var oldStream;
4097
- return _regenerator.default.wrap(function _callee12$(_context12) {
4098
- while (1) switch (_context12.prev = _context12.next) {
4161
+ return _regenerator.default.wrap(function _callee13$(_context13) {
4162
+ while (1) switch (_context13.prev = _context13.next) {
4099
4163
  case 0:
4100
4164
  oldStream = this.mediaProperties.shareAudioStream;
4101
4165
  oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareAudioStreamEnded);
@@ -4105,21 +4169,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4105
4169
  localSystemAudioStream === null || localSystemAudioStream === void 0 ? void 0 : localSystemAudioStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
4106
4170
  this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
4107
4171
  if (!(!this.isMultistream || !localSystemAudioStream)) {
4108
- _context12.next = 10;
4172
+ _context13.next = 10;
4109
4173
  break;
4110
4174
  }
4111
- _context12.next = 10;
4175
+ _context13.next = 10;
4112
4176
  return this.unpublishStream(_internalMediaCore.MediaType.AudioSlides, oldStream);
4113
4177
  case 10:
4114
- _context12.next = 12;
4178
+ _context13.next = 12;
4115
4179
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
4116
4180
  case 12:
4117
4181
  case "end":
4118
- return _context12.stop();
4182
+ return _context13.stop();
4119
4183
  }
4120
- }, _callee12, this);
4184
+ }, _callee13, this);
4121
4185
  }));
4122
- function setLocalShareAudioStream(_x10) {
4186
+ function setLocalShareAudioStream(_x13) {
4123
4187
  return _setLocalShareAudioStream.apply(this, arguments);
4124
4188
  }
4125
4189
  return setLocalShareAudioStream;
@@ -4740,16 +4804,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4740
4804
  }, {
4741
4805
  key: "receiveTranscription",
4742
4806
  value: function () {
4743
- var _receiveTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
4807
+ var _receiveTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14() {
4744
4808
  var _this31 = this;
4745
4809
  var datachannelUrl, _yield$this$request, webSocketUrl;
4746
- return _regenerator.default.wrap(function _callee13$(_context13) {
4747
- while (1) switch (_context13.prev = _context13.next) {
4810
+ return _regenerator.default.wrap(function _callee14$(_context14) {
4811
+ while (1) switch (_context14.prev = _context14.next) {
4748
4812
  case 0:
4749
4813
  _loggerProxy.default.logger.info("Meeting:index#receiveTranscription -->\n Attempting to generate a web socket url.");
4750
- _context13.prev = 1;
4814
+ _context14.prev = 1;
4751
4815
  datachannelUrl = this.locusInfo.info.datachannelUrl; // @ts-ignore - fix type
4752
- _context13.next = 5;
4816
+ _context14.next = 5;
4753
4817
  return this.request({
4754
4818
  method: _constants.HTTP_VERBS.POST,
4755
4819
  uri: datachannelUrl,
@@ -4758,7 +4822,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4758
4822
  }
4759
4823
  });
4760
4824
  case 5:
4761
- _yield$this$request = _context13.sent;
4825
+ _yield$this$request = _context14.sent;
4762
4826
  webSocketUrl = _yield$this$request.body.webSocketUrl;
4763
4827
  _loggerProxy.default.logger.info("Meeting:index#receiveTranscription -->\n Generated web socket url succesfully.");
4764
4828
  this.transcription = new _transcription.default(webSocketUrl,
@@ -4779,22 +4843,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4779
4843
  this.monitorTranscriptionSocketConnection();
4780
4844
  // @ts-ignore - fix type
4781
4845
  this.transcription.connect(this.webex.credentials.supertoken.access_token);
4782
- _context13.next = 20;
4846
+ _context14.next = 20;
4783
4847
  break;
4784
4848
  case 16:
4785
- _context13.prev = 16;
4786
- _context13.t0 = _context13["catch"](1);
4787
- _loggerProxy.default.logger.error("Meeting:index#receiveTranscription --> ".concat(_context13.t0));
4849
+ _context14.prev = 16;
4850
+ _context14.t0 = _context14["catch"](1);
4851
+ _loggerProxy.default.logger.error("Meeting:index#receiveTranscription --> ".concat(_context14.t0));
4788
4852
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
4789
4853
  correlation_id: this.correlationId,
4790
- reason: _context13.t0.message,
4791
- stack: _context13.t0.stack
4854
+ reason: _context14.t0.message,
4855
+ stack: _context14.t0.stack
4792
4856
  });
4793
4857
  case 20:
4794
4858
  case "end":
4795
- return _context13.stop();
4859
+ return _context14.stop();
4796
4860
  }
4797
- }, _callee13, this, [[1, 16]]);
4861
+ }, _callee14, this, [[1, 16]]);
4798
4862
  }));
4799
4863
  function receiveTranscription() {
4800
4864
  return _receiveTranscription.apply(this, arguments);
@@ -4852,7 +4916,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4852
4916
  }, {
4853
4917
  key: "join",
4854
4918
  value: function () {
4855
- var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14() {
4919
+ var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
4856
4920
  var _this32 = this;
4857
4921
  var options,
4858
4922
  errorMessage,
@@ -4863,25 +4927,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4863
4927
  _error,
4864
4928
  _errorMessage2,
4865
4929
  _error2,
4866
- _args14 = arguments;
4867
- return _regenerator.default.wrap(function _callee14$(_context14) {
4868
- while (1) switch (_context14.prev = _context14.next) {
4930
+ _args15 = arguments;
4931
+ return _regenerator.default.wrap(function _callee15$(_context15) {
4932
+ while (1) switch (_context15.prev = _context15.next) {
4869
4933
  case 0:
4870
- options = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
4934
+ options = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
4871
4935
  if (this.webex.meetings.registered) {
4872
- _context14.next = 6;
4936
+ _context15.next = 6;
4873
4937
  break;
4874
4938
  }
4875
4939
  errorMessage = 'Meeting:index#join --> Device not registered';
4876
4940
  error = new Error(errorMessage);
4877
4941
  _loggerProxy.default.logger.error(errorMessage);
4878
- return _context14.abrupt("return", _promise.default.reject(error));
4942
+ return _context15.abrupt("return", _promise.default.reject(error));
4879
4943
  case 6:
4880
4944
  if (!this.deferJoin) {
4881
- _context14.next = 8;
4945
+ _context15.next = 8;
4882
4946
  break;
4883
4947
  }
4884
- return _context14.abrupt("return", this.deferJoin);
4948
+ return _context15.abrupt("return", this.deferJoin);
4885
4949
  case 8:
4886
4950
  // Create a deferred promise for a consistent resolve value from utils.
4887
4951
  // This also prevents redundant API calls.
@@ -4930,15 +4994,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4930
4994
  this.wirelessShare = true;
4931
4995
  }
4932
4996
  if (!options.meetingQuality) {
4933
- _context14.next = 36;
4997
+ _context15.next = 36;
4934
4998
  break;
4935
4999
  }
4936
5000
  if (!(typeof options.meetingQuality === 'string')) {
4937
- _context14.next = 27;
5001
+ _context15.next = 27;
4938
5002
  break;
4939
5003
  }
4940
5004
  if (_constants.QUALITY_LEVELS[options.meetingQuality]) {
4941
- _context14.next = 26;
5005
+ _context15.next = 26;
4942
5006
  break;
4943
5007
  }
4944
5008
  _errorMessage = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
@@ -4946,16 +5010,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4946
5010
  _loggerProxy.default.logger.error(_errorMessage);
4947
5011
  joinFailed(_error);
4948
5012
  this.deferJoin = undefined;
4949
- return _context14.abrupt("return", _promise.default.reject(_error));
5013
+ return _context15.abrupt("return", _promise.default.reject(_error));
4950
5014
  case 26:
4951
5015
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
4952
5016
  case 27:
4953
5017
  if (!((0, _typeof2.default)(options.meetingQuality) === 'object')) {
4954
- _context14.next = 36;
5018
+ _context15.next = 36;
4955
5019
  break;
4956
5020
  }
4957
5021
  if (_constants.QUALITY_LEVELS[options.meetingQuality.remote]) {
4958
- _context14.next = 35;
5022
+ _context15.next = 35;
4959
5023
  break;
4960
5024
  }
4961
5025
  _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
@@ -4963,42 +5027,42 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4963
5027
  _error2 = new Error(_errorMessage2);
4964
5028
  joinFailed(_error2);
4965
5029
  this.deferJoin = undefined;
4966
- return _context14.abrupt("return", _promise.default.reject(new Error(_errorMessage2)));
5030
+ return _context15.abrupt("return", _promise.default.reject(new Error(_errorMessage2)));
4967
5031
  case 35:
4968
5032
  if (options.meetingQuality.remote) {
4969
5033
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality.remote);
4970
5034
  }
4971
5035
  case 36:
4972
5036
  this.isMultistream = !!options.enableMultistream;
4973
- _context14.prev = 37;
4974
- _context14.next = 40;
5037
+ _context15.prev = 37;
5038
+ _context15.next = 40;
4975
5039
  return this.checkAndRefreshPermissionToken(_constants.MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC, _constants.MEETING_PERMISSION_TOKEN_REFRESH_REASON);
4976
5040
  case 40:
4977
- _context14.next = 51;
5041
+ _context15.next = 51;
4978
5042
  break;
4979
5043
  case 42:
4980
- _context14.prev = 42;
4981
- _context14.t0 = _context14["catch"](37);
4982
- _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _context14.t0);
4983
- if (!(_context14.t0 instanceof _captchaError.default || _context14.t0 instanceof _passwordError.default || _context14.t0 instanceof _permission.default)) {
4984
- _context14.next = 51;
5044
+ _context15.prev = 42;
5045
+ _context15.t0 = _context15["catch"](37);
5046
+ _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _context15.t0);
5047
+ if (!(_context15.t0 instanceof _captchaError.default || _context15.t0 instanceof _passwordError.default || _context15.t0 instanceof _permission.default)) {
5048
+ _context15.next = 51;
4985
5049
  break;
4986
5050
  }
4987
- this.meetingFiniteStateMachine.fail(_context14.t0);
5051
+ this.meetingFiniteStateMachine.fail(_context15.t0);
4988
5052
 
4989
5053
  // Upload logs on refreshpermissionToken refresh Failure
4990
5054
  _triggerProxy.default.trigger(this, {
4991
5055
  file: 'meeting/index',
4992
5056
  function: 'join'
4993
5057
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
4994
- joinFailed(_context14.t0);
5058
+ joinFailed(_context15.t0);
4995
5059
  this.deferJoin = undefined;
4996
5060
 
4997
5061
  // if refresh permission token requires captcha, password or permission, we are throwing the errors
4998
5062
  // and bubble it up to client
4999
- return _context14.abrupt("return", _promise.default.reject(_context14.t0));
5063
+ return _context15.abrupt("return", _promise.default.reject(_context15.t0));
5000
5064
  case 51:
5001
- return _context14.abrupt("return", _util.default.joinMeetingOptions(this, options).then(function (join) {
5065
+ return _context15.abrupt("return", _util.default.joinMeetingOptions(this, options).then(function (join) {
5002
5066
  _this32.meetingFiniteStateMachine.join();
5003
5067
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
5004
5068
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
@@ -5077,9 +5141,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5077
5141
  }));
5078
5142
  case 52:
5079
5143
  case "end":
5080
- return _context14.stop();
5144
+ return _context15.stop();
5081
5145
  }
5082
- }, _callee14, this, [[37, 42]]);
5146
+ }, _callee15, this, [[37, 42]]);
5083
5147
  }));
5084
5148
  function join() {
5085
5149
  return _join.apply(this, arguments);
@@ -5095,38 +5159,38 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5095
5159
  }, {
5096
5160
  key: "updateLLMConnection",
5097
5161
  value: function () {
5098
- var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
5162
+ var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5099
5163
  var _this33 = this;
5100
5164
  var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, isJoined;
5101
- return _regenerator.default.wrap(function _callee15$(_context15) {
5102
- while (1) switch (_context15.prev = _context15.next) {
5165
+ return _regenerator.default.wrap(function _callee16$(_context16) {
5166
+ while (1) switch (_context16.prev = _context16.next) {
5103
5167
  case 0:
5104
5168
  // @ts-ignore - Fix type
5105
5169
  _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;
5106
5170
  isJoined = this.isJoined(); // @ts-ignore - Fix type
5107
5171
  if (!this.webex.internal.llm.isConnected()) {
5108
- _context15.next = 8;
5172
+ _context16.next = 8;
5109
5173
  break;
5110
5174
  }
5111
5175
  if (!(url === this.webex.internal.llm.getLocusUrl() && isJoined)) {
5112
- _context15.next = 5;
5176
+ _context16.next = 5;
5113
5177
  break;
5114
5178
  }
5115
- return _context15.abrupt("return", undefined);
5179
+ return _context16.abrupt("return", undefined);
5116
5180
  case 5:
5117
- _context15.next = 7;
5181
+ _context16.next = 7;
5118
5182
  return this.webex.internal.llm.disconnectLLM();
5119
5183
  case 7:
5120
5184
  // @ts-ignore - Fix type
5121
5185
  this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
5122
5186
  case 8:
5123
5187
  if (isJoined) {
5124
- _context15.next = 10;
5188
+ _context16.next = 10;
5125
5189
  break;
5126
5190
  }
5127
- return _context15.abrupt("return", undefined);
5191
+ return _context16.abrupt("return", undefined);
5128
5192
  case 10:
5129
- return _context15.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl).then(function (registerAndConnectResult) {
5193
+ return _context16.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl).then(function (registerAndConnectResult) {
5130
5194
  // @ts-ignore - Fix type
5131
5195
  _this33.webex.internal.llm.off('event:relay.event', _this33.processRelayEvent);
5132
5196
  // @ts-ignore - Fix type
@@ -5136,9 +5200,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5136
5200
  }));
5137
5201
  case 11:
5138
5202
  case "end":
5139
- return _context15.stop();
5203
+ return _context16.stop();
5140
5204
  }
5141
- }, _callee15, this);
5205
+ }, _callee16, this);
5142
5206
  }));
5143
5207
  function updateLLMConnection() {
5144
5208
  return _updateLLMConnection.apply(this, arguments);
@@ -5309,17 +5373,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5309
5373
  meetingId: this.id
5310
5374
  }
5311
5375
  });
5312
- this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5376
+ this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
5313
5377
  var mediaSettings;
5314
- return _regenerator.default.wrap(function _callee16$(_context16) {
5315
- while (1) switch (_context16.prev = _context16.next) {
5378
+ return _regenerator.default.wrap(function _callee17$(_context17) {
5379
+ while (1) switch (_context17.prev = _context17.next) {
5316
5380
  case 0:
5317
- _context16.prev = 0;
5381
+ _context17.prev = 0;
5318
5382
  if (!(_this36.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
5319
- _context16.next = 4;
5383
+ _context17.next = 4;
5320
5384
  break;
5321
5385
  }
5322
- _context16.next = 4;
5386
+ _context17.next = 4;
5323
5387
  return _this36.releaseScreenShareFloor();
5324
5388
  case 4:
5325
5389
  mediaSettings = {
@@ -5339,28 +5403,28 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5339
5403
  // 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
5340
5404
  // once the DX answers we establish connection back the media server with only receiveShare enabled
5341
5405
  // @ts-ignore - reconnectMedia does not accept any argument
5342
- _context16.next = 10;
5406
+ _context17.next = 10;
5343
5407
  return _this36.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
5344
5408
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
5345
5409
  });
5346
5410
  case 10:
5347
- _context16.next = 16;
5411
+ _context17.next = 16;
5348
5412
  break;
5349
5413
  case 12:
5350
- _context16.prev = 12;
5351
- _context16.t0 = _context16["catch"](0);
5352
- _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context16.t0);
5414
+ _context17.prev = 12;
5415
+ _context17.t0 = _context17["catch"](0);
5416
+ _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context17.t0);
5353
5417
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
5354
5418
  correlation_id: _this36.correlationId,
5355
5419
  locus_id: _this36.locusUrl.split('/').pop(),
5356
- reason: _context16.t0.message,
5357
- stack: _context16.t0.stack
5420
+ reason: _context17.t0.message,
5421
+ stack: _context17.t0.stack
5358
5422
  });
5359
5423
  case 16:
5360
5424
  case "end":
5361
- return _context16.stop();
5425
+ return _context17.stop();
5362
5426
  }
5363
- }, _callee16, null, [[0, 12]]);
5427
+ }, _callee17, null, [[0, 12]]);
5364
5428
  })));
5365
5429
  _loggerProxy.default.logger.info('Meeting:index#moveTo --> Initated moved to using resourceId', resourceId);
5366
5430
  return _util.default.joinMeetingOptions(this, {
@@ -5450,10 +5514,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5450
5514
  }, {
5451
5515
  key: "createMediaConnection",
5452
5516
  value: function () {
5453
- var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(turnServerInfo, bundlePolicy) {
5517
+ var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(turnServerInfo, bundlePolicy) {
5454
5518
  var mc, audioEnabled, videoEnabled, shareEnabled;
5455
- return _regenerator.default.wrap(function _callee17$(_context17) {
5456
- while (1) switch (_context17.prev = _context17.next) {
5519
+ return _regenerator.default.wrap(function _callee18$(_context18) {
5520
+ while (1) switch (_context18.prev = _context18.next) {
5457
5521
  case 0:
5458
5522
  mc = _media.default.createMediaConnection(this.isMultistream, this.getMediaConnectionDebugId(),
5459
5523
  // @ts-ignore
@@ -5479,41 +5543,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5479
5543
 
5480
5544
  // publish the streams
5481
5545
  if (!this.mediaProperties.audioStream) {
5482
- _context17.next = 7;
5546
+ _context18.next = 7;
5483
5547
  break;
5484
5548
  }
5485
- _context17.next = 7;
5549
+ _context18.next = 7;
5486
5550
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
5487
5551
  case 7:
5488
5552
  if (!this.mediaProperties.videoStream) {
5489
- _context17.next = 10;
5553
+ _context18.next = 10;
5490
5554
  break;
5491
5555
  }
5492
- _context17.next = 10;
5556
+ _context18.next = 10;
5493
5557
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
5494
5558
  case 10:
5495
5559
  if (!this.mediaProperties.shareVideoStream) {
5496
- _context17.next = 13;
5560
+ _context18.next = 13;
5497
5561
  break;
5498
5562
  }
5499
- _context17.next = 13;
5563
+ _context18.next = 13;
5500
5564
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
5501
5565
  case 13:
5502
5566
  if (!(this.isMultistream && this.mediaProperties.shareAudioStream)) {
5503
- _context17.next = 16;
5567
+ _context18.next = 16;
5504
5568
  break;
5505
5569
  }
5506
- _context17.next = 16;
5570
+ _context18.next = 16;
5507
5571
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
5508
5572
  case 16:
5509
- return _context17.abrupt("return", mc);
5573
+ return _context18.abrupt("return", mc);
5510
5574
  case 17:
5511
5575
  case "end":
5512
- return _context17.stop();
5576
+ return _context18.stop();
5513
5577
  }
5514
- }, _callee17, this);
5578
+ }, _callee18, this);
5515
5579
  }));
5516
- function createMediaConnection(_x11, _x12) {
5580
+ function createMediaConnection(_x14, _x15) {
5517
5581
  return _createMediaConnection.apply(this, arguments);
5518
5582
  }
5519
5583
  return createMediaConnection;
@@ -5550,11 +5614,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5550
5614
  }, {
5551
5615
  key: "setUpLocalStreamReferences",
5552
5616
  value: function () {
5553
- var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(localStreams) {
5617
+ var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(localStreams) {
5554
5618
  var _localStreams$screenS, _localStreams$screenS2;
5555
5619
  var setUpStreamPromises;
5556
- return _regenerator.default.wrap(function _callee18$(_context18) {
5557
- while (1) switch (_context18.prev = _context18.next) {
5620
+ return _regenerator.default.wrap(function _callee19$(_context19) {
5621
+ while (1) switch (_context19.prev = _context19.next) {
5558
5622
  case 0:
5559
5623
  setUpStreamPromises = [];
5560
5624
  if (localStreams !== null && localStreams !== void 0 && localStreams.microphone) {
@@ -5569,24 +5633,24 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5569
5633
  if (localStreams !== null && localStreams !== void 0 && (_localStreams$screenS2 = localStreams.screenShare) !== null && _localStreams$screenS2 !== void 0 && _localStreams$screenS2.audio) {
5570
5634
  setUpStreamPromises.push(this.setLocalShareAudioStream(localStreams.screenShare.audio));
5571
5635
  }
5572
- _context18.prev = 5;
5573
- _context18.next = 8;
5636
+ _context19.prev = 5;
5637
+ _context19.next = 8;
5574
5638
  return _promise.default.all(setUpStreamPromises);
5575
5639
  case 8:
5576
- _context18.next = 14;
5640
+ _context19.next = 14;
5577
5641
  break;
5578
5642
  case 10:
5579
- _context18.prev = 10;
5580
- _context18.t0 = _context18["catch"](5);
5581
- _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _context18.t0);
5582
- throw _context18.t0;
5643
+ _context19.prev = 10;
5644
+ _context19.t0 = _context19["catch"](5);
5645
+ _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _context19.t0);
5646
+ throw _context19.t0;
5583
5647
  case 14:
5584
5648
  case "end":
5585
- return _context18.stop();
5649
+ return _context19.stop();
5586
5650
  }
5587
- }, _callee18, this, [[5, 10]]);
5651
+ }, _callee19, this, [[5, 10]]);
5588
5652
  }));
5589
- function setUpLocalStreamReferences(_x13) {
5653
+ function setUpLocalStreamReferences(_x16) {
5590
5654
  return _setUpLocalStreamReferences.apply(this, arguments);
5591
5655
  }
5592
5656
  return setUpLocalStreamReferences;
@@ -5600,20 +5664,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5600
5664
  }, {
5601
5665
  key: "waitForMediaConnectionConnected",
5602
5666
  value: function () {
5603
- var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
5667
+ var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
5604
5668
  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;
5605
- return _regenerator.default.wrap(function _callee19$(_context19) {
5606
- while (1) switch (_context19.prev = _context19.next) {
5669
+ return _regenerator.default.wrap(function _callee20$(_context20) {
5670
+ while (1) switch (_context20.prev = _context20.next) {
5607
5671
  case 0:
5608
- _context19.prev = 0;
5609
- _context19.next = 3;
5672
+ _context20.prev = 0;
5673
+ _context20.next = 3;
5610
5674
  return this.mediaProperties.waitForMediaConnectionConnected();
5611
5675
  case 3:
5612
- _context19.next = 9;
5676
+ _context20.next = 9;
5613
5677
  break;
5614
5678
  case 5:
5615
- _context19.prev = 5;
5616
- _context19.t0 = _context19["catch"](0);
5679
+ _context20.prev = 5;
5680
+ _context20.t0 = _context20["catch"](0);
5617
5681
  if (!this.hasMediaConnectionConnectedAtLeastOnce) {
5618
5682
  // Only send CA event for join flow if we haven't successfully connected media yet
5619
5683
  // @ts-ignore
@@ -5641,9 +5705,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5641
5705
  throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
5642
5706
  case 9:
5643
5707
  case "end":
5644
- return _context19.stop();
5708
+ return _context20.stop();
5645
5709
  }
5646
- }, _callee19, this, [[0, 5]]);
5710
+ }, _callee20, this, [[0, 5]]);
5647
5711
  }));
5648
5712
  function waitForMediaConnectionConnected() {
5649
5713
  return _waitForMediaConnectionConnected.apply(this, arguments);
@@ -5692,18 +5756,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5692
5756
  * @returns {Promise<void>}
5693
5757
  */
5694
5758
  function () {
5695
- var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
5759
+ var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
5696
5760
  var LOG_HEADER, deferSDPAnswer;
5697
- return _regenerator.default.wrap(function _callee20$(_context20) {
5698
- while (1) switch (_context20.prev = _context20.next) {
5761
+ return _regenerator.default.wrap(function _callee21$(_context21) {
5762
+ while (1) switch (_context21.prev = _context21.next) {
5699
5763
  case 0:
5700
5764
  LOG_HEADER = 'Meeting:index#addMedia():waitForRemoteSDPAnswer -->';
5701
5765
  if (this.deferSDPAnswer) {
5702
- _context20.next = 4;
5766
+ _context21.next = 4;
5703
5767
  break;
5704
5768
  }
5705
5769
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " offer not created yet"));
5706
- return _context20.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
5770
+ return _context21.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
5707
5771
  case 4:
5708
5772
  deferSDPAnswer = this.deferSDPAnswer;
5709
5773
  this.sdpResponseTimer = setTimeout(function () {
@@ -5711,12 +5775,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5711
5775
  deferSDPAnswer.reject(new Error('Timed out waiting for REMOTE SDP ANSWER'));
5712
5776
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
5713
5777
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
5714
- return _context20.abrupt("return", deferSDPAnswer.promise);
5778
+ return _context21.abrupt("return", deferSDPAnswer.promise);
5715
5779
  case 8:
5716
5780
  case "end":
5717
- return _context20.stop();
5781
+ return _context21.stop();
5718
5782
  }
5719
- }, _callee20, this);
5783
+ }, _callee21, this);
5720
5784
  }));
5721
5785
  function waitForRemoteSDPAnswer() {
5722
5786
  return _waitForRemoteSDPAnswer.apply(this, arguments);
@@ -5734,30 +5798,30 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5734
5798
  }, {
5735
5799
  key: "retryEstablishMediaConnectionWithForcedTurnDiscovery",
5736
5800
  value: function () {
5737
- var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(remoteMediaManagerConfig, bundlePolicy) {
5801
+ var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(remoteMediaManagerConfig, bundlePolicy) {
5738
5802
  var LOG_HEADER;
5739
- return _regenerator.default.wrap(function _callee21$(_context21) {
5740
- while (1) switch (_context21.prev = _context21.next) {
5803
+ return _regenerator.default.wrap(function _callee22$(_context22) {
5804
+ while (1) switch (_context22.prev = _context22.next) {
5741
5805
  case 0:
5742
5806
  LOG_HEADER = 'Meeting:index#addMedia():retryEstablishMediaConnectionWithForcedTurnDiscovery -->';
5743
- _context21.prev = 1;
5744
- _context21.next = 4;
5807
+ _context22.prev = 1;
5808
+ _context22.next = 4;
5745
5809
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
5746
5810
  case 4:
5747
- _context21.next = 10;
5811
+ _context22.next = 10;
5748
5812
  break;
5749
5813
  case 6:
5750
- _context21.prev = 6;
5751
- _context21.t0 = _context21["catch"](1);
5752
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _context21.t0);
5753
- throw _context21.t0;
5814
+ _context22.prev = 6;
5815
+ _context22.t0 = _context22["catch"](1);
5816
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _context22.t0);
5817
+ throw _context22.t0;
5754
5818
  case 10:
5755
5819
  case "end":
5756
- return _context21.stop();
5820
+ return _context22.stop();
5757
5821
  }
5758
- }, _callee21, this, [[1, 6]]);
5822
+ }, _callee22, this, [[1, 6]]);
5759
5823
  }));
5760
- function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x14, _x15) {
5824
+ function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x17, _x18) {
5761
5825
  return _retryEstablishMediaConnectionWithForcedTurnDiscovery.apply(this, arguments);
5762
5826
  }
5763
5827
  return retryEstablishMediaConnectionWithForcedTurnDiscovery;
@@ -5774,14 +5838,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5774
5838
  }, {
5775
5839
  key: "retryWithForcedTurnDiscovery",
5776
5840
  value: function () {
5777
- var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(remoteMediaManagerConfig, bundlePolicy) {
5841
+ var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(remoteMediaManagerConfig, bundlePolicy) {
5778
5842
  var LOG_HEADER;
5779
- return _regenerator.default.wrap(function _callee22$(_context22) {
5780
- while (1) switch (_context22.prev = _context22.next) {
5843
+ return _regenerator.default.wrap(function _callee23$(_context23) {
5844
+ while (1) switch (_context23.prev = _context23.next) {
5781
5845
  case 0:
5782
5846
  this.retriedWithTurnServer = true;
5783
5847
  LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
5784
- _context22.next = 4;
5848
+ _context23.next = 4;
5785
5849
  return this.cleanUpBeforeRetryWithTurnServer();
5786
5850
  case 4:
5787
5851
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_RETRY, {
@@ -5791,24 +5855,24 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5791
5855
  reason: 'forcingTurnTls'
5792
5856
  });
5793
5857
  if (!(this.state === _constants.MEETING_STATE.STATES.LEFT)) {
5794
- _context22.next = 9;
5858
+ _context23.next = 9;
5795
5859
  break;
5796
5860
  }
5797
5861
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. "));
5798
- _context22.next = 9;
5862
+ _context23.next = 9;
5799
5863
  return this.join({
5800
5864
  rejoin: true
5801
5865
  });
5802
5866
  case 9:
5803
- _context22.next = 11;
5867
+ _context23.next = 11;
5804
5868
  return this.retryEstablishMediaConnectionWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
5805
5869
  case 11:
5806
5870
  case "end":
5807
- return _context22.stop();
5871
+ return _context23.stop();
5808
5872
  }
5809
- }, _callee22, this);
5873
+ }, _callee23, this);
5810
5874
  }));
5811
- function retryWithForcedTurnDiscovery(_x16, _x17) {
5875
+ function retryWithForcedTurnDiscovery(_x19, _x20) {
5812
5876
  return _retryWithForcedTurnDiscovery.apply(this, arguments);
5813
5877
  }
5814
5878
  return retryWithForcedTurnDiscovery;
@@ -5827,32 +5891,32 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5827
5891
  }, {
5828
5892
  key: "handleWaitForMediaConnectionConnectedError",
5829
5893
  value: function () {
5830
- var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(error, remoteMediaManagerConfig, bundlePolicy) {
5894
+ var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(error, remoteMediaManagerConfig, bundlePolicy) {
5831
5895
  var LOG_HEADER;
5832
- return _regenerator.default.wrap(function _callee23$(_context23) {
5833
- while (1) switch (_context23.prev = _context23.next) {
5896
+ return _regenerator.default.wrap(function _callee24$(_context24) {
5897
+ while (1) switch (_context24.prev = _context24.next) {
5834
5898
  case 0:
5835
5899
  LOG_HEADER = 'Meeting:index#addMedia():handleWaitForMediaConnectionConnectedError -->'; // @ts-ignore - config coming from registerPlugin
5836
5900
  if (this.turnServerUsed) {
5837
- _context23.next = 7;
5901
+ _context24.next = 7;
5838
5902
  break;
5839
5903
  }
5840
5904
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " error waiting for media to connect on UDP, TCP, retrying using TURN-TLS, "), error);
5841
- _context23.next = 5;
5905
+ _context24.next = 5;
5842
5906
  return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
5843
5907
  case 5:
5844
- _context23.next = 9;
5908
+ _context24.next = 9;
5845
5909
  break;
5846
5910
  case 7:
5847
5911
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
5848
5912
  throw new _webexErrors.AddMediaFailed();
5849
5913
  case 9:
5850
5914
  case "end":
5851
- return _context23.stop();
5915
+ return _context24.stop();
5852
5916
  }
5853
- }, _callee23, this);
5917
+ }, _callee24, this);
5854
5918
  }));
5855
- function handleWaitForMediaConnectionConnectedError(_x18, _x19, _x20) {
5919
+ function handleWaitForMediaConnectionConnectedError(_x21, _x22, _x23) {
5856
5920
  return _handleWaitForMediaConnectionConnectedError.apply(this, arguments);
5857
5921
  }
5858
5922
  return handleWaitForMediaConnectionConnectedError;
@@ -5869,23 +5933,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5869
5933
  }, {
5870
5934
  key: "establishMediaConnection",
5871
5935
  value: function () {
5872
- var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(remoteMediaManagerConfig, bundlePolicy, isForced) {
5936
+ var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(remoteMediaManagerConfig, bundlePolicy, isForced) {
5873
5937
  var LOG_HEADER, cdl, isRetry, turnDiscoveryObject, turnServerInfo, mc;
5874
- return _regenerator.default.wrap(function _callee24$(_context24) {
5875
- while (1) switch (_context24.prev = _context24.next) {
5938
+ return _regenerator.default.wrap(function _callee25$(_context25) {
5939
+ while (1) switch (_context25.prev = _context25.next) {
5876
5940
  case 0:
5877
5941
  LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->'; // @ts-ignore
5878
5942
  cdl = this.webex.internal.newMetrics.callDiagnosticLatencies;
5879
5943
  isRetry = this.retriedWithTurnServer;
5880
- _context24.prev = 3;
5944
+ _context25.prev = 3;
5881
5945
  // @ts-ignore
5882
5946
  this.webex.internal.newMetrics.submitInternalEvent({
5883
5947
  name: 'internal.client.add-media.turn-discovery.start'
5884
5948
  });
5885
- _context24.next = 7;
5949
+ _context25.next = 7;
5886
5950
  return this.roap.doTurnDiscovery(this, isRetry, isForced);
5887
5951
  case 7:
5888
- turnDiscoveryObject = _context24.sent;
5952
+ turnDiscoveryObject = _context25.sent;
5889
5953
  this.turnDiscoverySkippedReason = turnDiscoveryObject === null || turnDiscoveryObject === void 0 ? void 0 : turnDiscoveryObject.turnDiscoverySkippedReason;
5890
5954
  this.turnServerUsed = !this.turnDiscoverySkippedReason;
5891
5955
 
@@ -5902,55 +5966,55 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5902
5966
  retriedWithTurnServer: this.retriedWithTurnServer
5903
5967
  });
5904
5968
  }
5905
- _context24.next = 15;
5969
+ _context25.next = 15;
5906
5970
  return this.createMediaConnection(turnServerInfo, bundlePolicy);
5907
5971
  case 15:
5908
- mc = _context24.sent;
5972
+ mc = _context25.sent;
5909
5973
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created"));
5910
5974
  if (!this.isMultistream) {
5911
- _context24.next = 24;
5975
+ _context25.next = 24;
5912
5976
  break;
5913
5977
  }
5914
5978
  this.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(this.receiveSlotManager, this.mediaRequestManagers, remoteMediaManagerConfig);
5915
5979
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.AudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_AUDIO_CREATED);
5916
5980
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
5917
5981
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
5918
- _context24.next = 24;
5982
+ _context25.next = 24;
5919
5983
  return this.remoteMediaManager.start();
5920
5984
  case 24:
5921
- _context24.next = 26;
5985
+ _context25.next = 26;
5922
5986
  return mc.initiateOffer();
5923
5987
  case 26:
5924
- _context24.next = 28;
5988
+ _context25.next = 28;
5925
5989
  return this.waitForRemoteSDPAnswer();
5926
5990
  case 28:
5927
5991
  this.handleMediaLogging(this.mediaProperties);
5928
- _context24.next = 35;
5992
+ _context25.next = 35;
5929
5993
  break;
5930
5994
  case 31:
5931
- _context24.prev = 31;
5932
- _context24.t0 = _context24["catch"](3);
5933
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _context24.t0);
5934
- throw _context24.t0;
5995
+ _context25.prev = 31;
5996
+ _context25.t0 = _context25["catch"](3);
5997
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _context25.t0);
5998
+ throw _context25.t0;
5935
5999
  case 35:
5936
- _context24.prev = 35;
5937
- _context24.next = 38;
6000
+ _context25.prev = 35;
6001
+ _context25.next = 38;
5938
6002
  return this.waitForMediaConnectionConnected();
5939
6003
  case 38:
5940
- _context24.next = 44;
6004
+ _context25.next = 44;
5941
6005
  break;
5942
6006
  case 40:
5943
- _context24.prev = 40;
5944
- _context24.t1 = _context24["catch"](35);
5945
- _context24.next = 44;
5946
- return this.handleWaitForMediaConnectionConnectedError(_context24.t1, remoteMediaManagerConfig, bundlePolicy);
6007
+ _context25.prev = 40;
6008
+ _context25.t1 = _context25["catch"](35);
6009
+ _context25.next = 44;
6010
+ return this.handleWaitForMediaConnectionConnectedError(_context25.t1, remoteMediaManagerConfig, bundlePolicy);
5947
6011
  case 44:
5948
6012
  case "end":
5949
- return _context24.stop();
6013
+ return _context25.stop();
5950
6014
  }
5951
- }, _callee24, this, [[3, 31], [35, 40]]);
6015
+ }, _callee25, this, [[3, 31], [35, 40]]);
5952
6016
  }));
5953
- function establishMediaConnection(_x21, _x22, _x23) {
6017
+ function establishMediaConnection(_x24, _x25, _x26) {
5954
6018
  return _establishMediaConnection.apply(this, arguments);
5955
6019
  }
5956
6020
  return establishMediaConnection;
@@ -5964,22 +6028,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5964
6028
  }, {
5965
6029
  key: "cleanUpOnAddMediaFailure",
5966
6030
  value: function () {
5967
- var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
5968
- return _regenerator.default.wrap(function _callee25$(_context25) {
5969
- while (1) switch (_context25.prev = _context25.next) {
6031
+ var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
6032
+ return _regenerator.default.wrap(function _callee26$(_context26) {
6033
+ while (1) switch (_context26.prev = _context26.next) {
5970
6034
  case 0:
5971
6035
  if (!this.statsAnalyzer) {
5972
- _context25.next = 3;
6036
+ _context26.next = 3;
5973
6037
  break;
5974
6038
  }
5975
- _context25.next = 3;
6039
+ _context26.next = 3;
5976
6040
  return this.statsAnalyzer.stopAnalyzer();
5977
6041
  case 3:
5978
6042
  this.statsAnalyzer = null;
5979
6043
 
5980
6044
  // when media fails, we want to upload a webrtc dump to see whats going on
5981
6045
  // this function is async, but returns once the stats have been gathered
5982
- _context25.next = 6;
6046
+ _context26.next = 6;
5983
6047
  return this.forceSendStatsReport({
5984
6048
  callFrom: 'addMedia'
5985
6049
  });
@@ -5990,9 +6054,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5990
6054
  }
5991
6055
  case 7:
5992
6056
  case "end":
5993
- return _context25.stop();
6057
+ return _context26.stop();
5994
6058
  }
5995
- }, _callee25, this);
6059
+ }, _callee26, this);
5996
6060
  }));
5997
6061
  function cleanUpOnAddMediaFailure() {
5998
6062
  return _cleanUpOnAddMediaFailure.apply(this, arguments);
@@ -6009,11 +6073,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6009
6073
  }, {
6010
6074
  key: "cleanUpBeforeRetryWithTurnServer",
6011
6075
  value: function () {
6012
- var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
6013
- return _regenerator.default.wrap(function _callee26$(_context26) {
6014
- while (1) switch (_context26.prev = _context26.next) {
6076
+ var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27() {
6077
+ return _regenerator.default.wrap(function _callee27$(_context27) {
6078
+ while (1) switch (_context27.prev = _context27.next) {
6015
6079
  case 0:
6016
- _context26.next = 2;
6080
+ _context27.next = 2;
6017
6081
  return this.forceSendStatsReport({
6018
6082
  callFrom: 'cleanUpBeforeRetryWithTurnServer'
6019
6083
  });
@@ -6033,9 +6097,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6033
6097
  }
6034
6098
  case 3:
6035
6099
  case "end":
6036
- return _context26.stop();
6100
+ return _context27.stop();
6037
6101
  }
6038
- }, _callee26, this);
6102
+ }, _callee27, this);
6039
6103
  }));
6040
6104
  function cleanUpBeforeRetryWithTurnServer() {
6041
6105
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
@@ -6053,7 +6117,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6053
6117
  }, {
6054
6118
  key: "addMedia",
6055
6119
  value: function () {
6056
- var _addMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27() {
6120
+ var _addMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28() {
6057
6121
  var _this$webex$meetings$2, _this$webex$meetings$3;
6058
6122
  var options,
6059
6123
  LOG_HEADER,
@@ -6094,23 +6158,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6094
6158
  _this$mediaProperties39,
6095
6159
  _this$mediaProperties40,
6096
6160
  reachabilityMetrics,
6097
- _args27 = arguments;
6098
- return _regenerator.default.wrap(function _callee27$(_context27) {
6099
- while (1) switch (_context27.prev = _context27.next) {
6161
+ _args28 = arguments;
6162
+ return _regenerator.default.wrap(function _callee28$(_context28) {
6163
+ while (1) switch (_context28.prev = _context28.next) {
6100
6164
  case 0:
6101
- options = _args27.length > 0 && _args27[0] !== undefined ? _args27[0] : {};
6165
+ options = _args28.length > 0 && _args28[0] !== undefined ? _args28[0] : {};
6102
6166
  this.retriedWithTurnServer = false;
6103
6167
  this.hasMediaConnectionConnectedAtLeastOnce = false;
6104
6168
  LOG_HEADER = 'Meeting:index#addMedia -->';
6105
6169
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: ").concat((0, _stringify.default)(options)));
6106
6170
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
6107
- _context27.next = 7;
6171
+ _context28.next = 7;
6108
6172
  break;
6109
6173
  }
6110
6174
  throw new _webexErrors.MeetingNotActiveError();
6111
6175
  case 7:
6112
6176
  if (!_util.default.isUserInLeftState(this.locusInfo)) {
6113
- _context27.next = 9;
6177
+ _context28.next = 9;
6114
6178
  break;
6115
6179
  }
6116
6180
  throw new _webexErrors.UserNotJoinedError();
@@ -6121,7 +6185,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6121
6185
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
6122
6186
  // @ts-ignore - isUserUnadmitted coming from SelfUtil
6123
6187
  if (!(this.isUserUnadmitted && !this.wirelessShare && !allowMediaInLobby)) {
6124
- _context27.next = 13;
6188
+ _context28.next = 13;
6125
6189
  break;
6126
6190
  }
6127
6191
  throw new _webexErrors.UserInLobbyError();
@@ -6180,33 +6244,33 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6180
6244
  });
6181
6245
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
6182
6246
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
6183
- _context27.prev = 18;
6184
- _context27.next = 21;
6247
+ _context28.prev = 18;
6248
+ _context28.next = 21;
6185
6249
  return this.setUpLocalStreamReferences(localStreams);
6186
6250
  case 21:
6187
6251
  this.setMercuryListener();
6188
6252
  this.createStatsAnalyzer();
6189
- _context27.next = 25;
6253
+ _context28.next = 25;
6190
6254
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, false);
6191
6255
  case 25:
6192
- _context27.next = 27;
6256
+ _context28.next = 27;
6193
6257
  return Meeting.handleDeviceLogging();
6194
6258
  case 27:
6195
6259
  if (!this.mediaProperties.hasLocalShareStream()) {
6196
- _context27.next = 30;
6260
+ _context28.next = 30;
6197
6261
  break;
6198
6262
  }
6199
- _context27.next = 30;
6263
+ _context28.next = 30;
6200
6264
  return this.enqueueScreenShareFloorRequest();
6201
6265
  case 30:
6202
- _context27.next = 32;
6266
+ _context28.next = 32;
6203
6267
  return this.mediaProperties.getCurrentConnectionType();
6204
6268
  case 32:
6205
- connectionType = _context27.sent;
6206
- _context27.next = 35;
6269
+ connectionType = _context28.sent;
6270
+ _context28.next = 35;
6207
6271
  return this.webex.meetings.reachability.getReachabilityMetrics();
6208
6272
  case 35:
6209
- reachabilityStats = _context27.sent;
6273
+ reachabilityStats = _context28.sent;
6210
6274
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread({
6211
6275
  correlation_id: this.correlationId,
6212
6276
  locus_id: this.locusUrl.split('/').pop(),
@@ -6225,24 +6289,24 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6225
6289
 
6226
6290
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
6227
6291
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
6228
- _context27.next = 54;
6292
+ _context28.next = 54;
6229
6293
  break;
6230
6294
  case 42:
6231
- _context27.prev = 42;
6232
- _context27.t0 = _context27["catch"](18);
6233
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context27.t0);
6295
+ _context28.prev = 42;
6296
+ _context28.t0 = _context28["catch"](18);
6297
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context28.t0);
6234
6298
 
6235
6299
  // @ts-ignore
6236
- _context27.next = 47;
6300
+ _context28.next = 47;
6237
6301
  return this.webex.meetings.reachability.getReachabilityMetrics();
6238
6302
  case 47:
6239
- reachabilityMetrics = _context27.sent;
6303
+ reachabilityMetrics = _context28.sent;
6240
6304
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread({
6241
6305
  correlation_id: this.correlationId,
6242
6306
  locus_id: this.locusUrl.split('/').pop(),
6243
- reason: _context27.t0.message,
6244
- stack: _context27.t0.stack,
6245
- code: _context27.t0.code,
6307
+ reason: _context28.t0.message,
6308
+ stack: _context28.t0.stack,
6309
+ code: _context28.t0.code,
6246
6310
  turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
6247
6311
  turnServerUsed: this.turnServerUsed,
6248
6312
  retriedWithTurnServer: this.retriedWithTurnServer,
@@ -6251,7 +6315,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6251
6315
  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',
6252
6316
  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'
6253
6317
  }, reachabilityMetrics));
6254
- _context27.next = 51;
6318
+ _context28.next = 51;
6255
6319
  return this.cleanUpOnAddMediaFailure();
6256
6320
  case 51:
6257
6321
  // Upload logs on error while adding media
@@ -6259,17 +6323,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6259
6323
  file: 'meeting/index',
6260
6324
  function: 'addMedia'
6261
6325
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
6262
- if (_context27.t0 instanceof _internalMediaCore.Errors.SdpError) {
6326
+ if (_context28.t0 instanceof _internalMediaCore.Errors.SdpError) {
6263
6327
  this.leave({
6264
6328
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
6265
6329
  });
6266
6330
  }
6267
- throw _context27.t0;
6331
+ throw _context28.t0;
6268
6332
  case 54:
6269
6333
  case "end":
6270
- return _context27.stop();
6334
+ return _context28.stop();
6271
6335
  }
6272
- }, _callee27, this, [[18, 42]]);
6336
+ }, _callee28, this, [[18, 42]]);
6273
6337
  }));
6274
6338
  function addMedia() {
6275
6339
  return _addMedia.apply(this, arguments);
@@ -6350,35 +6414,35 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6350
6414
  * @memberof Meeting
6351
6415
  */
6352
6416
  function () {
6353
- var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(options) {
6417
+ var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(options) {
6354
6418
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled;
6355
- return _regenerator.default.wrap(function _callee28$(_context28) {
6356
- while (1) switch (_context28.prev = _context28.next) {
6419
+ return _regenerator.default.wrap(function _callee29$(_context29) {
6420
+ while (1) switch (_context29.prev = _context29.next) {
6357
6421
  case 0:
6358
6422
  this.checkMediaConnection();
6359
6423
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
6360
6424
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
6361
6425
  if (this.canUpdateMedia()) {
6362
- _context28.next = 5;
6426
+ _context29.next = 5;
6363
6427
  break;
6364
6428
  }
6365
- return _context28.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
6429
+ return _context29.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
6366
6430
  case 5:
6367
6431
  if (!this.isMultistream) {
6368
- _context28.next = 10;
6432
+ _context29.next = 10;
6369
6433
  break;
6370
6434
  }
6371
6435
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
6372
- _context28.next = 8;
6436
+ _context29.next = 8;
6373
6437
  break;
6374
6438
  }
6375
6439
  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');
6376
6440
  case 8:
6377
- _context28.next = 12;
6441
+ _context29.next = 12;
6378
6442
  break;
6379
6443
  case 10:
6380
6444
  if (!(shareAudioEnabled !== undefined)) {
6381
- _context28.next = 12;
6445
+ _context29.next = 12;
6382
6446
  break;
6383
6447
  }
6384
6448
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -6403,20 +6467,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
6403
6467
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
6404
6468
  }
6405
6469
  if (this.isMultistream) {
6406
- _context28.next = 18;
6470
+ _context29.next = 18;
6407
6471
  break;
6408
6472
  }
6409
- _context28.next = 18;
6473
+ _context29.next = 18;
6410
6474
  return this.updateTranscodedMediaConnection();
6411
6475
  case 18:
6412
- return _context28.abrupt("return", undefined);
6476
+ return _context29.abrupt("return", undefined);
6413
6477
  case 19:
6414
6478
  case "end":
6415
- return _context28.stop();
6479
+ return _context29.stop();
6416
6480
  }
6417
- }, _callee28, this);
6481
+ }, _callee29, this);
6418
6482
  }));
6419
- function updateMedia(_x24) {
6483
+ function updateMedia(_x27) {
6420
6484
  return _updateMedia.apply(this, arguments);
6421
6485
  }
6422
6486
  return updateMedia;
@@ -7327,39 +7391,39 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
7327
7391
  }, {
7328
7392
  key: "enableMusicMode",
7329
7393
  value: function () {
7330
- var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(shouldEnableMusicMode) {
7331
- return _regenerator.default.wrap(function _callee29$(_context29) {
7332
- while (1) switch (_context29.prev = _context29.next) {
7394
+ var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(shouldEnableMusicMode) {
7395
+ return _regenerator.default.wrap(function _callee30$(_context30) {
7396
+ while (1) switch (_context30.prev = _context30.next) {
7333
7397
  case 0:
7334
7398
  this.checkMediaConnection();
7335
7399
  if (this.isMultistream) {
7336
- _context29.next = 3;
7400
+ _context30.next = 3;
7337
7401
  break;
7338
7402
  }
7339
7403
  throw new Error('enableMusicMode() only supported with multistream');
7340
7404
  case 3:
7341
7405
  if (!shouldEnableMusicMode) {
7342
- _context29.next = 8;
7406
+ _context30.next = 8;
7343
7407
  break;
7344
7408
  }
7345
- _context29.next = 6;
7409
+ _context30.next = 6;
7346
7410
  return this.sendSlotManager.setCodecParameters(_internalMediaCore.MediaType.AudioMain, {
7347
7411
  maxaveragebitrate: '64000',
7348
7412
  maxplaybackrate: '48000'
7349
7413
  });
7350
7414
  case 6:
7351
- _context29.next = 10;
7415
+ _context30.next = 10;
7352
7416
  break;
7353
7417
  case 8:
7354
- _context29.next = 10;
7418
+ _context30.next = 10;
7355
7419
  return this.sendSlotManager.deleteCodecParameters(_internalMediaCore.MediaType.AudioMain, ['maxaveragebitrate', 'maxplaybackrate']);
7356
7420
  case 10:
7357
7421
  case "end":
7358
- return _context29.stop();
7422
+ return _context30.stop();
7359
7423
  }
7360
- }, _callee29, this);
7424
+ }, _callee30, this);
7361
7425
  }));
7362
- function enableMusicMode(_x25) {
7426
+ function enableMusicMode(_x28) {
7363
7427
  return _enableMusicMode.apply(this, arguments);
7364
7428
  }
7365
7429
  return enableMusicMode;
@@ -7423,25 +7487,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
7423
7487
  }, {
7424
7488
  key: "publishStream",
7425
7489
  value: function () {
7426
- var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(mediaType, stream) {
7427
- return _regenerator.default.wrap(function _callee30$(_context30) {
7428
- while (1) switch (_context30.prev = _context30.next) {
7490
+ var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(mediaType, stream) {
7491
+ return _regenerator.default.wrap(function _callee31$(_context31) {
7492
+ while (1) switch (_context31.prev = _context31.next) {
7429
7493
  case 0:
7430
7494
  if (stream) {
7431
- _context30.next = 2;
7495
+ _context31.next = 2;
7432
7496
  break;
7433
7497
  }
7434
- return _context30.abrupt("return");
7498
+ return _context31.abrupt("return");
7435
7499
  case 2:
7436
7500
  if (!this.mediaProperties.webrtcMediaConnection) {
7437
- _context30.next = 7;
7501
+ _context31.next = 7;
7438
7502
  break;
7439
7503
  }
7440
7504
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
7441
- _context30.next = 6;
7505
+ _context31.next = 6;
7442
7506
  break;
7443
7507
  }
7444
- _context30.next = 6;
7508
+ _context31.next = 6;
7445
7509
  return this.sendSlotManager.publishStream(mediaType, stream);
7446
7510
  case 6:
7447
7511
  this.emitPublishStateChangeEvent({
@@ -7452,11 +7516,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
7452
7516
  });
7453
7517
  case 7:
7454
7518
  case "end":
7455
- return _context30.stop();
7519
+ return _context31.stop();
7456
7520
  }
7457
- }, _callee30, this);
7521
+ }, _callee31, this);
7458
7522
  }));
7459
- function publishStream(_x26, _x27) {
7523
+ function publishStream(_x29, _x30) {
7460
7524
  return _publishStream.apply(this, arguments);
7461
7525
  }
7462
7526
  return publishStream;
@@ -7471,21 +7535,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
7471
7535
  }, {
7472
7536
  key: "unpublishStream",
7473
7537
  value: function () {
7474
- var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(mediaType, stream) {
7475
- return _regenerator.default.wrap(function _callee31$(_context31) {
7476
- while (1) switch (_context31.prev = _context31.next) {
7538
+ var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(mediaType, stream) {
7539
+ return _regenerator.default.wrap(function _callee32$(_context32) {
7540
+ while (1) switch (_context32.prev = _context32.next) {
7477
7541
  case 0:
7478
7542
  if (stream) {
7479
- _context31.next = 2;
7543
+ _context32.next = 2;
7480
7544
  break;
7481
7545
  }
7482
- return _context31.abrupt("return");
7546
+ return _context32.abrupt("return");
7483
7547
  case 2:
7484
7548
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
7485
- _context31.next = 5;
7549
+ _context32.next = 5;
7486
7550
  break;
7487
7551
  }
7488
- _context31.next = 5;
7552
+ _context32.next = 5;
7489
7553
  return this.sendSlotManager.unpublishStream(mediaType);
7490
7554
  case 5:
7491
7555
  this.emitPublishStateChangeEvent({
@@ -7496,11 +7560,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
7496
7560
  });
7497
7561
  case 6:
7498
7562
  case "end":
7499
- return _context31.stop();
7563
+ return _context32.stop();
7500
7564
  }
7501
- }, _callee31, this);
7565
+ }, _callee32, this);
7502
7566
  }));
7503
- function unpublishStream(_x28, _x29) {
7567
+ function unpublishStream(_x31, _x32) {
7504
7568
  return _unpublishStream.apply(this, arguments);
7505
7569
  }
7506
7570
  return unpublishStream;
@@ -7514,72 +7578,72 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
7514
7578
  }, {
7515
7579
  key: "publishStreams",
7516
7580
  value: function () {
7517
- var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(streams) {
7581
+ var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(streams) {
7518
7582
  var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4;
7519
7583
  var floorRequestNeeded, _streams$screenShare5;
7520
- return _regenerator.default.wrap(function _callee32$(_context32) {
7521
- while (1) switch (_context32.prev = _context32.next) {
7584
+ return _regenerator.default.wrap(function _callee33$(_context33) {
7585
+ while (1) switch (_context33.prev = _context33.next) {
7522
7586
  case 0:
7523
7587
  this.checkMediaConnection();
7524
7588
  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))) {
7525
- _context32.next = 3;
7589
+ _context33.next = 3;
7526
7590
  break;
7527
7591
  }
7528
- return _context32.abrupt("return");
7592
+ return _context33.abrupt("return");
7529
7593
  case 3:
7530
7594
  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
7531
7595
  if (!(this.isMultistream && (_streams$screenShare3 = streams.screenShare) !== null && _streams$screenShare3 !== void 0 && _streams$screenShare3.audio)) {
7532
- _context32.next = 8;
7596
+ _context33.next = 8;
7533
7597
  break;
7534
7598
  }
7535
- _context32.next = 7;
7599
+ _context33.next = 7;
7536
7600
  return this.setLocalShareAudioStream(streams.screenShare.audio);
7537
7601
  case 7:
7538
7602
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
7539
7603
  case 8:
7540
7604
  if (!((_streams$screenShare4 = streams.screenShare) !== null && _streams$screenShare4 !== void 0 && _streams$screenShare4.video)) {
7541
- _context32.next = 12;
7605
+ _context33.next = 12;
7542
7606
  break;
7543
7607
  }
7544
- _context32.next = 11;
7608
+ _context33.next = 11;
7545
7609
  return this.setLocalShareVideoStream((_streams$screenShare5 = streams.screenShare) === null || _streams$screenShare5 === void 0 ? void 0 : _streams$screenShare5.video);
7546
7610
  case 11:
7547
7611
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
7548
7612
  case 12:
7549
7613
  if (!streams.microphone) {
7550
- _context32.next = 15;
7614
+ _context33.next = 15;
7551
7615
  break;
7552
7616
  }
7553
- _context32.next = 15;
7617
+ _context33.next = 15;
7554
7618
  return this.setLocalAudioStream(streams.microphone);
7555
7619
  case 15:
7556
7620
  if (!streams.camera) {
7557
- _context32.next = 18;
7621
+ _context33.next = 18;
7558
7622
  break;
7559
7623
  }
7560
- _context32.next = 18;
7624
+ _context33.next = 18;
7561
7625
  return this.setLocalVideoStream(streams.camera);
7562
7626
  case 18:
7563
7627
  if (this.isMultistream) {
7564
- _context32.next = 21;
7628
+ _context33.next = 21;
7565
7629
  break;
7566
7630
  }
7567
- _context32.next = 21;
7631
+ _context33.next = 21;
7568
7632
  return this.updateTranscodedMediaConnection();
7569
7633
  case 21:
7570
7634
  if (!floorRequestNeeded) {
7571
- _context32.next = 24;
7635
+ _context33.next = 24;
7572
7636
  break;
7573
7637
  }
7574
- _context32.next = 24;
7638
+ _context33.next = 24;
7575
7639
  return this.enqueueScreenShareFloorRequest();
7576
7640
  case 24:
7577
7641
  case "end":
7578
- return _context32.stop();
7642
+ return _context33.stop();
7579
7643
  }
7580
- }, _callee32, this);
7644
+ }, _callee33, this);
7581
7645
  }));
7582
- function publishStreams(_x30) {
7646
+ function publishStreams(_x33) {
7583
7647
  return _publishStreams.apply(this, arguments);
7584
7648
  }
7585
7649
  return publishStreams;
@@ -7593,10 +7657,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
7593
7657
  }, {
7594
7658
  key: "unpublishStreams",
7595
7659
  value: function () {
7596
- var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(streams) {
7660
+ var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(streams) {
7597
7661
  var promises, _iterator, _step, stream;
7598
- return _regenerator.default.wrap(function _callee33$(_context33) {
7599
- while (1) switch (_context33.prev = _context33.next) {
7662
+ return _regenerator.default.wrap(function _callee34$(_context34) {
7663
+ while (1) switch (_context34.prev = _context34.next) {
7600
7664
  case 0:
7601
7665
  this.checkMediaConnection();
7602
7666
  promises = [];
@@ -7627,7 +7691,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
7627
7691
  if (!this.isMultistream) {
7628
7692
  promises.push(this.updateTranscodedMediaConnection());
7629
7693
  }
7630
- _context33.next = 7;
7694
+ _context34.next = 7;
7631
7695
  return _promise.default.all(promises);
7632
7696
  case 7:
7633
7697
  // we're allowing for the SDK to support just audio share as well
@@ -7642,11 +7706,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
7642
7706
  }
7643
7707
  case 8:
7644
7708
  case "end":
7645
- return _context33.stop();
7709
+ return _context34.stop();
7646
7710
  }
7647
- }, _callee33, this);
7711
+ }, _callee34, this);
7648
7712
  }));
7649
- function unpublishStreams(_x31) {
7713
+ function unpublishStreams(_x34) {
7650
7714
  return _unpublishStreams.apply(this, arguments);
7651
7715
  }
7652
7716
  return unpublishStreams;
@@ -7705,27 +7769,27 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
7705
7769
  }], [{
7706
7770
  key: "handleDeviceLogging",
7707
7771
  value: function () {
7708
- var _handleDeviceLogging = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34() {
7772
+ var _handleDeviceLogging = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35() {
7709
7773
  var devices;
7710
- return _regenerator.default.wrap(function _callee34$(_context34) {
7711
- while (1) switch (_context34.prev = _context34.next) {
7774
+ return _regenerator.default.wrap(function _callee35$(_context35) {
7775
+ while (1) switch (_context35.prev = _context35.next) {
7712
7776
  case 0:
7713
- _context34.prev = 0;
7714
- _context34.next = 3;
7777
+ _context35.prev = 0;
7778
+ _context35.next = 3;
7715
7779
  return (0, _mediaHelpers.getDevices)();
7716
7780
  case 3:
7717
- devices = _context34.sent;
7781
+ devices = _context35.sent;
7718
7782
  _util.default.handleDeviceLogging(devices);
7719
- _context34.next = 9;
7783
+ _context35.next = 9;
7720
7784
  break;
7721
7785
  case 7:
7722
- _context34.prev = 7;
7723
- _context34.t0 = _context34["catch"](0);
7786
+ _context35.prev = 7;
7787
+ _context35.t0 = _context35["catch"](0);
7724
7788
  case 9:
7725
7789
  case "end":
7726
- return _context34.stop();
7790
+ return _context35.stop();
7727
7791
  }
7728
- }, _callee34, null, [[0, 7]]);
7792
+ }, _callee35, null, [[0, 7]]);
7729
7793
  }));
7730
7794
  function handleDeviceLogging() {
7731
7795
  return _handleDeviceLogging.apply(this, arguments);