@webex/plugin-meetings 3.0.0-beta.327 → 3.0.0-beta.329

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.
@@ -209,7 +209,7 @@ var Breakout = _webexCore.WebexPlugin.extend({
209
209
  sessionId: this.sessionId
210
210
  });
211
211
  },
212
- version: "3.0.0-beta.327"
212
+ version: "3.0.0-beta.329"
213
213
  });
214
214
  var _default = Breakout;
215
215
  exports.default = _default;
@@ -1041,7 +1041,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
1041
1041
  this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
1042
1042
  }
1043
1043
  },
1044
- version: "3.0.0-beta.327"
1044
+ version: "3.0.0-beta.329"
1045
1045
  });
1046
1046
  var _default = Breakouts;
1047
1047
  exports.default = _default;
@@ -359,7 +359,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
359
359
  throw error;
360
360
  });
361
361
  },
362
- version: "3.0.0-beta.327"
362
+ version: "3.0.0-beta.329"
363
363
  });
364
364
  var _default = SimultaneousInterpretation;
365
365
  exports.default = _default;
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
18
18
  languageCode: 'number',
19
19
  languageName: 'string'
20
20
  },
21
- version: "3.0.0-beta.327"
21
+ version: "3.0.0-beta.329"
22
22
  });
23
23
  var _default = SILanguage;
24
24
  exports.default = _default;
@@ -379,7 +379,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
379
379
  * @memberof Meeting
380
380
  */
381
381
  function Meeting(attrs, _options) {
382
- var _this$locusInfo, _this$locusInfo$links, _this$locusInfo$links2, _this$locusInfo$links3, _this$locusInfo2, _this$locusInfo2$full, _this$locusInfo3, _this$locusInfo4;
382
+ var _attrs$callStateForMe, _this$locusInfo, _this$locusInfo$links, _this$locusInfo$links2, _this$locusInfo$links3, _this$locusInfo2, _this$locusInfo2$full, _this$locusInfo3, _this$locusInfo4;
383
383
  var _this;
384
384
  (0, _classCallCheck2.default)(this, Meeting);
385
385
  _this = _super.call(this, {}, _options);
@@ -397,7 +397,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
397
397
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "annotation", void 0);
398
398
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "webinar", void 0);
399
399
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "conversationUrl", void 0);
400
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "correlationId", void 0);
400
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "callStateForMetrics", void 0);
401
401
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "destination", void 0);
402
402
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "destinationType", void 0);
403
403
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "deviceUrl", void 0);
@@ -1173,18 +1173,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1173
1173
  */
1174
1174
  _this.id = _uuid.default.v4();
1175
1175
  /**
1176
- * Correlation ID used for network tracking of meeting
1176
+ * Call state used for metrics
1177
1177
  * @instance
1178
- * @type {String}
1178
+ * @type {CallStateForMetrics}
1179
1179
  * @readonly
1180
1180
  * @public
1181
1181
  * @memberof Meeting
1182
1182
  */
1183
- if (attrs.correlationId) {
1184
- _loggerProxy.default.logger.log("Meetings:index#constructor --> Initializing the meeting object with correlation id from app ".concat(_this.correlationId));
1185
- _this.correlationId = attrs.correlationId;
1183
+ _this.callStateForMetrics = attrs.callStateForMetrics || {};
1184
+ var _correlationId = attrs.correlationId || ((_attrs$callStateForMe = attrs.callStateForMetrics) === null || _attrs$callStateForMe === void 0 ? void 0 : _attrs$callStateForMe.correlationId);
1185
+ if (_correlationId) {
1186
+ _loggerProxy.default.logger.log("Meetings:index#constructor --> Initializing the meeting object with correlation id from app ".concat(_correlationId));
1187
+ _this.callStateForMetrics.correlationId = _correlationId;
1186
1188
  } else {
1187
- _this.correlationId = _this.id;
1189
+ _this.callStateForMetrics.correlationId = _this.id;
1188
1190
  }
1189
1191
  /**
1190
1192
  * @instance
@@ -1902,6 +1904,24 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1902
1904
  return this.type === 'CALL';
1903
1905
  }
1904
1906
 
1907
+ /**
1908
+ * Getter - Returns callStateForMetrics.correlationId
1909
+ * @returns {string}
1910
+ */
1911
+ }, {
1912
+ key: "correlationId",
1913
+ get: function get() {
1914
+ return this.callStateForMetrics.correlationId;
1915
+ }
1916
+
1917
+ /**
1918
+ * Setter - sets callStateForMetrics.correlationId
1919
+ * @param {string} correlationId
1920
+ */,
1921
+ set: function set(correlationId) {
1922
+ this.callStateForMetrics.correlationId = correlationId;
1923
+ }
1924
+
1905
1925
  /**
1906
1926
  * Internal method for fetching meeting info
1907
1927
  *
@@ -2024,7 +2044,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2024
2044
  value: function () {
2025
2045
  var _refreshPermissionToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(reason) {
2026
2046
  var _this$meetingInfo;
2027
- var isStartingSpaceInstantV2Meeting, destination, destinationType, _this$getPermissionTo, timeLeft, expiryTime, currentTime;
2047
+ var isStartingSpaceInstantV2Meeting, destination, destinationType, permissionTokenExpiryInfo, timeLeft, expiryTime, currentTime;
2028
2048
  return _regenerator.default.wrap(function _callee5$(_context5) {
2029
2049
  while (1) switch (_context5.prev = _context5.next) {
2030
2050
  case 0:
@@ -2042,7 +2062,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2042
2062
  this.webex.meetings.preferredWebexSite;
2043
2063
  destination = isStartingSpaceInstantV2Meeting ? this.meetingInfo.meetingJoinUrl : this.destination;
2044
2064
  destinationType = isStartingSpaceInstantV2Meeting ? _constants._MEETING_LINK_ : this.destinationType;
2045
- _this$getPermissionTo = this.getPermissionTokenExpiryInfo(), timeLeft = _this$getPermissionTo.timeLeft, expiryTime = _this$getPermissionTo.expiryTime, currentTime = _this$getPermissionTo.currentTime;
2065
+ permissionTokenExpiryInfo = this.getPermissionTokenExpiryInfo();
2066
+ timeLeft = permissionTokenExpiryInfo === null || permissionTokenExpiryInfo === void 0 ? void 0 : permissionTokenExpiryInfo.timeLeft;
2067
+ expiryTime = permissionTokenExpiryInfo === null || permissionTokenExpiryInfo === void 0 ? void 0 : permissionTokenExpiryInfo.expiryTime;
2068
+ currentTime = permissionTokenExpiryInfo === null || permissionTokenExpiryInfo === void 0 ? void 0 : permissionTokenExpiryInfo.currentTime;
2046
2069
  _loggerProxy.default.logger.info("Meeting:index#refreshPermissionToken --> refreshing permission token, destinationType=".concat(destinationType, ", timeLeft=").concat(timeLeft, ", permissionTokenExpiry=").concat(expiryTime, ", currentTimestamp=").concat(currentTime, ",reason=").concat(reason));
2047
2070
  _metrics.default.sendBehavioralMetric(_constants2.default.PERMISSION_TOKEN_REFRESH, {
2048
2071
  correlationId: this.correlationId,
@@ -2052,8 +2075,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2052
2075
  reason: reason,
2053
2076
  destinationType: destinationType
2054
2077
  });
2055
- _context5.prev = 9;
2056
- _context5.next = 12;
2078
+ _context5.prev = 12;
2079
+ _context5.next = 15;
2057
2080
  return this.fetchMeetingInfoInternal({
2058
2081
  destination: destination,
2059
2082
  destinationType: destinationType,
@@ -2062,12 +2085,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2062
2085
  }),
2063
2086
  sendCAevents: true // because if we're refreshing the permissionToken, it means that user is intending to join that meeting, so we want CA events
2064
2087
  });
2065
- case 12:
2066
- _context5.next = 19;
2088
+ case 15:
2089
+ _context5.next = 22;
2067
2090
  break;
2068
- case 14:
2069
- _context5.prev = 14;
2070
- _context5.t0 = _context5["catch"](9);
2091
+ case 17:
2092
+ _context5.prev = 17;
2093
+ _context5.t0 = _context5["catch"](12);
2071
2094
  _loggerProxy.default.logger.info('Meeting:index#refreshPermissionToken --> failed to refresh the permission token:', _context5.t0);
2072
2095
  _metrics.default.sendBehavioralMetric(_constants2.default.PERMISSION_TOKEN_REFRESH_ERROR, {
2073
2096
  correlationId: this.correlationId,
@@ -2075,11 +2098,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
2075
2098
  stack: _context5.t0.stack
2076
2099
  });
2077
2100
  throw _context5.t0;
2078
- case 19:
2101
+ case 22:
2079
2102
  case "end":
2080
2103
  return _context5.stop();
2081
2104
  }
2082
- }, _callee5, this, [[9, 14]]);
2105
+ }, _callee5, this, [[12, 17]]);
2083
2106
  }));
2084
2107
  function refreshPermissionToken(_x3) {
2085
2108
  return _refreshPermissionToken.apply(this, arguments);
@@ -4291,8 +4314,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4291
4314
  }
4292
4315
 
4293
4316
  /**
4294
- * Convenience method to set the correlation id for the Meeting
4295
- * @param {String} id correlation id to set on the class
4317
+ * Convenience method to set the correlation id for the callStateForMetrics
4318
+ * @param {String} id correlation id to set on the callStateForMetrics
4296
4319
  * @returns {undefined}
4297
4320
  * @public
4298
4321
  * @memberof Meeting
@@ -4300,7 +4323,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4300
4323
  }, {
4301
4324
  key: "setCorrelationId",
4302
4325
  value: function setCorrelationId(id) {
4303
- this.correlationId = id;
4326
+ this.callStateForMetrics.correlationId = id;
4327
+ }
4328
+
4329
+ /**
4330
+ * Update the callStateForMetrics
4331
+ * @param {CallStateForMetrics} callStateForMetrics updated values for callStateForMetrics
4332
+ * @returns {undefined}
4333
+ * @public
4334
+ * @memberof Meeting
4335
+ */
4336
+ }, {
4337
+ key: "updateCallStateForMetrics",
4338
+ value: function updateCallStateForMetrics(callStateForMetrics) {
4339
+ this.callStateForMetrics = _objectSpread(_objectSpread({}, this.callStateForMetrics), callStateForMetrics);
4304
4340
  }
4305
4341
 
4306
4342
  /**
@@ -4872,7 +4908,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4872
4908
  this.webex.internal.newMetrics.submitClientEvent({
4873
4909
  name: 'client.call.initiated',
4874
4910
  payload: {
4875
- trigger: 'user-interaction',
4911
+ trigger: this.callStateForMetrics.joinTrigger || 'user-interaction',
4876
4912
  isRoapCallEnabled: true,
4877
4913
  pstnAudioType: options === null || options === void 0 ? void 0 : options.pstnAudioType
4878
4914
  },
@@ -7649,8 +7685,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
7649
7685
  }, {
7650
7686
  key: "checkAndRefreshPermissionToken",
7651
7687
  value: function checkAndRefreshPermissionToken(threshold, reason) {
7652
- var _this$getPermissionTo2 = this.getPermissionTokenExpiryInfo(),
7653
- timeLeft = _this$getPermissionTo2.timeLeft;
7688
+ var _this$getPermissionTo;
7689
+ var timeLeft = (_this$getPermissionTo = this.getPermissionTokenExpiryInfo()) === null || _this$getPermissionTo === void 0 ? void 0 : _this$getPermissionTo.timeLeft;
7654
7690
  if (timeLeft !== undefined && timeLeft <= threshold) {
7655
7691
  return this.refreshPermissionToken(reason);
7656
7692
  }