@webex/plugin-meetings 3.12.0-next.78 → 3.12.0-next.79

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.
@@ -191,7 +191,7 @@ var AIEnableRequest = _webexCore.WebexPlugin.extend({
191
191
  method: _constants.HTTP_VERBS.PUT
192
192
  });
193
193
  },
194
- version: "3.12.0-next.78"
194
+ version: "3.12.0-next.79"
195
195
  });
196
196
  var _default = exports.default = AIEnableRequest;
197
197
  //# sourceMappingURL=index.js.map
@@ -214,7 +214,7 @@ var Breakout = _webexCore.WebexPlugin.extend({
214
214
  sessionId: this.sessionId
215
215
  });
216
216
  },
217
- version: "3.12.0-next.78"
217
+ version: "3.12.0-next.79"
218
218
  });
219
219
  var _default = exports.default = Breakout;
220
220
  //# sourceMappingURL=breakout.js.map
@@ -1133,7 +1133,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
1133
1133
  this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
1134
1134
  }
1135
1135
  },
1136
- version: "3.12.0-next.78"
1136
+ version: "3.12.0-next.79"
1137
1137
  });
1138
1138
  var _default = exports.default = Breakouts;
1139
1139
  //# sourceMappingURL=index.js.map
@@ -381,7 +381,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
381
381
  throw error;
382
382
  });
383
383
  },
384
- version: "3.12.0-next.78"
384
+ version: "3.12.0-next.79"
385
385
  });
386
386
  var _default = exports.default = SimultaneousInterpretation;
387
387
  //# sourceMappingURL=index.js.map
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
18
18
  languageCode: 'number',
19
19
  languageName: 'string'
20
20
  },
21
- version: "3.12.0-next.78"
21
+ version: "3.12.0-next.79"
22
22
  });
23
23
  var _default = exports.default = SILanguage;
24
24
  //# sourceMappingURL=siLanguage.js.map
@@ -111,6 +111,7 @@ var DEFAULT_ICE_PHASE_CALLBACK = function DEFAULT_ICE_PHASE_CALLBACK() {
111
111
  return 'JOIN_MEETING_FINAL';
112
112
  };
113
113
  var LLM_HEALTHCHECK_TIMER_MS = 3 * 60 * 1000;
114
+ var JOIN_WITH_MEDIA_RETRY_MAX_COUNT = 2;
114
115
  var logRequest = function logRequest(request, _ref) {
115
116
  var _ref$logText = _ref.logText,
116
117
  logText = _ref$logText === void 0 ? '' : _ref$logText;
@@ -2514,12 +2515,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
2514
2515
  /**
2515
2516
  * Information needed for a retry of a call to joinWithMedia
2516
2517
  * @instance
2517
- * @type {{isRetry: boolean; prevJoinResponse?: any}}
2518
+ * @type {{retryCount: number; prevJoinResponse?: any}}
2518
2519
  * @private
2519
2520
  * @memberof Meeting
2520
2521
  */
2521
2522
  _this.joinWithMediaRetryInfo = {
2522
- isRetry: false,
2523
+ retryCount: 0,
2523
2524
  prevJoinResponse: undefined
2524
2525
  };
2525
2526
 
@@ -6198,10 +6199,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6198
6199
  _options$joinOptions,
6199
6200
  joinOptions,
6200
6201
  _this$joinWithMediaRe,
6201
- isRetry,
6202
+ retryCount,
6202
6203
  prevJoinResponse,
6204
+ prevError,
6203
6205
  joined,
6204
6206
  joinResponse,
6207
+ shouldJoin,
6205
6208
  turnServerInfo,
6206
6209
  turnDiscoverySkippedReason,
6207
6210
  forceTurnDiscovery,
@@ -6214,6 +6217,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6214
6217
  shouldRetry,
6215
6218
  _error2,
6216
6219
  _error3,
6220
+ firstError,
6217
6221
  _args17 = arguments,
6218
6222
  _t10,
6219
6223
  _t11;
@@ -6222,7 +6226,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6222
6226
  case 0:
6223
6227
  options = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
6224
6228
  mediaOptions = options.mediaOptions, _options$joinOptions = options.joinOptions, joinOptions = _options$joinOptions === void 0 ? {} : _options$joinOptions;
6225
- _this$joinWithMediaRe = this.joinWithMediaRetryInfo, isRetry = _this$joinWithMediaRe.isRetry, prevJoinResponse = _this$joinWithMediaRe.prevJoinResponse;
6229
+ _this$joinWithMediaRe = this.joinWithMediaRetryInfo, retryCount = _this$joinWithMediaRe.retryCount, prevJoinResponse = _this$joinWithMediaRe.prevJoinResponse, prevError = _this$joinWithMediaRe.prevError;
6226
6230
  if (mediaOptions !== null && mediaOptions !== void 0 && mediaOptions.allowMediaInLobby) {
6227
6231
  _context17.next = 1;
6228
6232
  break;
@@ -6244,33 +6248,38 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6244
6248
  }
6245
6249
  throw new _internalMediaCore.Errors.WebrtcApiNotAvailableError('RTCPeerConnection API is not available in this environment');
6246
6250
  case 2:
6247
- _context17.prev = 2;
6251
+ shouldJoin = !joinResponse ||
6252
+ // first try, when the join response is empty
6253
+ prevError && prevError instanceof _webexErrors.UserNotJoinedError ||
6254
+ // last try failed with UserNotJoinedError
6255
+ _util2.default.isUserInLeftState(this.locusInfo); // locus dropped the connection before we can re-try addMedia
6256
+ _context17.prev = 3;
6248
6257
  forceTurnDiscovery = false;
6249
- if (joinResponse) {
6250
- _context17.next = 7;
6258
+ if (!shouldJoin) {
6259
+ _context17.next = 8;
6251
6260
  break;
6252
6261
  }
6253
- _context17.next = 3;
6262
+ _context17.next = 4;
6254
6263
  return this.roap.generateTurnDiscoveryRequestMessage(this, true);
6255
- case 3:
6264
+ case 4:
6256
6265
  turnDiscoveryRequest = _context17.sent;
6257
6266
  turnDiscoverySkippedReason = turnDiscoveryRequest.turnDiscoverySkippedReason;
6258
6267
  joinOptions.roapMessage = turnDiscoveryRequest.roapMessage;
6259
6268
  _loggerProxy.default.logger.info('Meeting:index#joinWithMedia ---> calling join with joinOptions, ', joinOptions);
6260
- _context17.next = 4;
6269
+ _context17.next = 5;
6261
6270
  return this.join(joinOptions);
6262
- case 4:
6271
+ case 5:
6263
6272
  joinResponse = _context17.sent;
6264
6273
  joined = true;
6265
6274
 
6266
6275
  // if we sent out TURN discovery Roap message with join, process the TURN discovery response
6267
6276
  if (!joinOptions.roapMessage) {
6268
- _context17.next = 6;
6277
+ _context17.next = 7;
6269
6278
  break;
6270
6279
  }
6271
- _context17.next = 5;
6280
+ _context17.next = 6;
6272
6281
  return this.roap.handleTurnDiscoveryHttpResponse(this, joinResponse);
6273
- case 5:
6282
+ case 6:
6274
6283
  _yield$this$roap$hand = _context17.sent;
6275
6284
  turnServerInfo = _yield$this$roap$hand.turnServerInfo;
6276
6285
  turnDiscoverySkippedReason = _yield$this$roap$hand.turnDiscoverySkippedReason;
@@ -6279,23 +6288,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6279
6288
  if (turnServerInfo === undefined) {
6280
6289
  this.roap.abortTurnDiscovery();
6281
6290
  }
6282
- case 6:
6283
- _context17.next = 8;
6284
- break;
6285
6291
  case 7:
6292
+ _context17.next = 9;
6293
+ break;
6294
+ case 8:
6286
6295
  // This is a retry, when join succeeded but addMedia failed, so we'll just call addMedia() again,
6287
6296
  // but we need to ensure that it also does a new TURN discovery
6288
6297
  forceTurnDiscovery = true;
6289
6298
  joined = true;
6290
- case 8:
6291
- _context17.next = 9;
6299
+ case 9:
6300
+ _context17.next = 10;
6292
6301
  return this.addMediaInternal(function () {
6293
- return _this30.joinWithMediaRetryInfo.isRetry ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
6302
+ // callback is not called when UserNotJoinedError is thrown
6303
+ return _this30.joinWithMediaRetryInfo.retryCount >= 1 ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
6294
6304
  }, turnServerInfo, forceTurnDiscovery, mediaOptions);
6295
- case 9:
6305
+ case 10:
6296
6306
  mediaResponse = _context17.sent;
6297
6307
  this.joinWithMediaRetryInfo = {
6298
- isRetry: false,
6308
+ retryCount: 0,
6299
6309
  prevJoinResponse: undefined
6300
6310
  };
6301
6311
  return _context17.abrupt("return", {
@@ -6303,14 +6313,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6303
6313
  media: mediaResponse,
6304
6314
  multistreamEnabled: this.isMultistream
6305
6315
  });
6306
- case 10:
6307
- _context17.prev = 10;
6308
- _t10 = _context17["catch"](2);
6316
+ case 11:
6317
+ _context17.prev = 11;
6318
+ _t10 = _context17["catch"](3);
6309
6319
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _t10);
6310
6320
  this.roap.abortTurnDiscovery();
6311
6321
 
6312
- // if this was the first attempt, let's do a retry
6313
- shouldRetry = !isRetry;
6322
+ // let's do a retry
6323
+ shouldRetry = retryCount < 1 || _t10 instanceof _webexErrors.UserNotJoinedError && retryCount < JOIN_WITH_MEDIA_RETRY_MAX_COUNT;
6314
6324
  if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_t10) || _internalPluginMetrics.CallDiagnosticUtils.isWebrtcApiNotAvailableError(_t10)) {
6315
6325
  // errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
6316
6326
  // so there is no point doing a retry
@@ -6330,26 +6340,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6330
6340
  });
6331
6341
  }
6332
6342
 
6333
- // we only want to call leave if join was successful and this was a retry or we won't be doing any more retries
6334
- if (!(joined && (isRetry || !shouldRetry))) {
6335
- _context17.next = 14;
6343
+ // we only want to call leave if join was successful, and we won't be doing any more retries
6344
+ if (!(joined && !shouldRetry)) {
6345
+ _context17.next = 15;
6336
6346
  break;
6337
6347
  }
6338
- _context17.prev = 11;
6339
- _context17.next = 12;
6348
+ _context17.prev = 12;
6349
+ _context17.next = 13;
6340
6350
  return this.leave({
6341
6351
  resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
6342
6352
  reason: 'joinWithMedia failure'
6343
6353
  });
6344
- case 12:
6345
- _context17.next = 14;
6346
- break;
6347
6354
  case 13:
6348
- _context17.prev = 13;
6349
- _t11 = _context17["catch"](11);
6355
+ _context17.next = 15;
6356
+ break;
6357
+ case 14:
6358
+ _context17.prev = 14;
6359
+ _t11 = _context17["catch"](12);
6350
6360
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _t11);
6351
6361
  leaveError = _t11;
6352
- case 14:
6362
+ case 15:
6353
6363
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
6354
6364
  correlation_id: this.correlationId,
6355
6365
  locus_id: (_this$locusUrl = this.locusUrl) === null || _this$locusUrl === void 0 ? void 0 : _this$locusUrl.split('/').pop(),
@@ -6357,29 +6367,36 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6357
6367
  reason: _t10.message,
6358
6368
  stack: _t10.stack,
6359
6369
  leaveErrorReason: (_leaveError = leaveError) === null || _leaveError === void 0 ? void 0 : _leaveError.message,
6360
- isRetry: isRetry
6370
+ isRetry: retryCount > 0
6361
6371
  }, {
6362
6372
  type: _t10.name
6363
6373
  });
6364
6374
  if (!shouldRetry) {
6365
- _context17.next = 15;
6375
+ _context17.next = 16;
6366
6376
  break;
6367
6377
  }
6368
6378
  _loggerProxy.default.logger.warn('Meeting:index#joinWithMedia --> retrying call to joinWithMedia');
6369
- this.joinWithMediaRetryInfo.isRetry = true;
6379
+ this.joinWithMediaRetryInfo.retryCount = retryCount + 1;
6370
6380
  this.joinWithMediaRetryInfo.prevJoinResponse = joinResponse;
6381
+ this.joinWithMediaRetryInfo.prevError = _t10;
6382
+ if (!this.joinWithMediaRetryInfo.firstError) {
6383
+ this.joinWithMediaRetryInfo.firstError = _t10;
6384
+ }
6371
6385
  return _context17.abrupt("return", this.joinWithMedia(options));
6372
- case 15:
6386
+ case 16:
6387
+ firstError = this.joinWithMediaRetryInfo.firstError;
6373
6388
  this.joinWithMediaRetryInfo = {
6374
- isRetry: false,
6375
- prevJoinResponse: undefined
6389
+ retryCount: 0,
6390
+ prevJoinResponse: undefined,
6391
+ firstError: undefined,
6392
+ prevError: undefined
6376
6393
  };
6377
- throw _t10;
6378
- case 16:
6394
+ throw firstError !== null && firstError !== void 0 ? firstError : _t10;
6395
+ case 17:
6379
6396
  case "end":
6380
6397
  return _context17.stop();
6381
6398
  }
6382
- }, _callee17, this, [[2, 10], [11, 13]]);
6399
+ }, _callee17, this, [[3, 11], [12, 14]]);
6383
6400
  }));
6384
6401
  function joinWithMedia() {
6385
6402
  return _joinWithMedia.apply(this, arguments);
@@ -8682,7 +8699,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8682
8699
  numTransports: numTransports,
8683
8700
  isMultistream: this.isMultistream,
8684
8701
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer,
8685
- isJoinWithMediaRetry: this.joinWithMediaRetryInfo.isRetry
8702
+ isJoinWithMediaRetry: this.joinWithMediaRetryInfo.retryCount > 0
8686
8703
  }, reachabilityMetrics), iceCandidateErrors), {}, {
8687
8704
  iceCandidatesCount: this.iceCandidatesCount
8688
8705
  }));
@@ -8732,7 +8749,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8732
8749
  turnServerUsed: this.turnServerUsed,
8733
8750
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer,
8734
8751
  isMultistream: this.isMultistream,
8735
- isJoinWithMediaRetry: this.joinWithMediaRetryInfo.isRetry,
8752
+ isJoinWithMediaRetry: this.joinWithMediaRetryInfo.retryCount > 0,
8736
8753
  signalingState: ((_this$mediaProperties14 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties14 === void 0 ? void 0 : (_this$mediaProperties15 = _this$mediaProperties14.multistreamConnection) === null || _this$mediaProperties15 === void 0 ? void 0 : (_this$mediaProperties16 = _this$mediaProperties15.pc) === null || _this$mediaProperties16 === void 0 ? void 0 : (_this$mediaProperties17 = _this$mediaProperties16.pc) === null || _this$mediaProperties17 === void 0 ? void 0 : _this$mediaProperties17.signalingState) || ((_this$mediaProperties18 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties18 === void 0 ? void 0 : (_this$mediaProperties19 = _this$mediaProperties18.mediaConnection) === null || _this$mediaProperties19 === void 0 ? void 0 : (_this$mediaProperties20 = _this$mediaProperties19.pc) === null || _this$mediaProperties20 === void 0 ? void 0 : _this$mediaProperties20.signalingState) || 'unknown',
8737
8754
  connectionState: ((_this$mediaProperties21 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties21 === void 0 ? void 0 : (_this$mediaProperties22 = _this$mediaProperties21.multistreamConnection) === null || _this$mediaProperties22 === void 0 ? void 0 : (_this$mediaProperties23 = _this$mediaProperties22.pc) === null || _this$mediaProperties23 === void 0 ? void 0 : (_this$mediaProperties24 = _this$mediaProperties23.pc) === null || _this$mediaProperties24 === void 0 ? void 0 : _this$mediaProperties24.connectionState) || ((_this$mediaProperties25 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties25 === void 0 ? void 0 : (_this$mediaProperties26 = _this$mediaProperties25.mediaConnection) === null || _this$mediaProperties26 === void 0 ? void 0 : (_this$mediaProperties27 = _this$mediaProperties26.pc) === null || _this$mediaProperties27 === void 0 ? void 0 : _this$mediaProperties27.connectionState) || 'unknown',
8738
8755
  iceConnectionState: ((_this$mediaProperties28 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties28 === void 0 ? void 0 : (_this$mediaProperties29 = _this$mediaProperties28.multistreamConnection) === null || _this$mediaProperties29 === void 0 ? void 0 : (_this$mediaProperties30 = _this$mediaProperties29.pc) === null || _this$mediaProperties30 === void 0 ? void 0 : (_this$mediaProperties31 = _this$mediaProperties30.pc) === null || _this$mediaProperties31 === void 0 ? void 0 : _this$mediaProperties31.iceConnectionState) || ((_this$mediaProperties32 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties32 === void 0 ? void 0 : (_this$mediaProperties33 = _this$mediaProperties32.mediaConnection) === null || _this$mediaProperties33 === void 0 ? void 0 : (_this$mediaProperties34 = _this$mediaProperties33.pc) === null || _this$mediaProperties34 === void 0 ? void 0 : _this$mediaProperties34.iceConnectionState) || 'unknown'