@webex/plugin-meetings 3.12.0-next.91 → 3.12.0-next.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/aiEnableRequest/index.js +1 -1
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/common/errors/webex-errors.js +47 -5
  5. package/dist/common/errors/webex-errors.js.map +1 -1
  6. package/dist/interpretation/index.js +1 -1
  7. package/dist/interpretation/siLanguage.js +1 -1
  8. package/dist/locus-info/index.js +14 -5
  9. package/dist/locus-info/index.js.map +1 -1
  10. package/dist/media/MediaConnectionAwaiter.js +15 -2
  11. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  12. package/dist/media/index.js +5 -1
  13. package/dist/media/index.js.map +1 -1
  14. package/dist/meeting/index.js +458 -365
  15. package/dist/meeting/index.js.map +1 -1
  16. package/dist/reachability/clusterReachability.js.map +1 -1
  17. package/dist/reachability/index.js +111 -70
  18. package/dist/reachability/index.js.map +1 -1
  19. package/dist/types/common/errors/webex-errors.d.ts +31 -2
  20. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  21. package/dist/types/meeting/index.d.ts +18 -3
  22. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  23. package/dist/types/reachability/index.d.ts +9 -2
  24. package/dist/webinar/index.js +1 -1
  25. package/package.json +3 -3
  26. package/src/common/errors/webex-errors.ts +47 -3
  27. package/src/locus-info/index.ts +15 -5
  28. package/src/media/MediaConnectionAwaiter.ts +21 -4
  29. package/src/media/index.ts +7 -1
  30. package/src/meeting/index.ts +100 -27
  31. package/src/reachability/clusterReachability.ts +3 -2
  32. package/src/reachability/index.ts +28 -1
  33. package/test/unit/spec/common/errors/webex-errors.ts +62 -0
  34. package/test/unit/spec/locus-info/index.js +44 -0
  35. package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
  36. package/test/unit/spec/media/index.ts +61 -0
  37. package/test/unit/spec/meeting/index.js +290 -8
  38. package/test/unit/spec/reachability/index.ts +69 -0
@@ -6232,6 +6232,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6232
6232
  forceTurnDiscovery,
6233
6233
  turnDiscoveryRequest,
6234
6234
  _yield$this$roap$hand,
6235
+ shouldRetryMediaWithOnlyTurnTLS,
6235
6236
  mediaResponse,
6236
6237
  _this$locusUrl,
6237
6238
  _leaveError,
@@ -6320,11 +6321,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6320
6321
  joined = true;
6321
6322
  case 9:
6322
6323
  _context17.next = 10;
6324
+ return this.shouldRetryMediaWithOnlyTurnTLS(prevError);
6325
+ case 10:
6326
+ shouldRetryMediaWithOnlyTurnTLS = _context17.sent;
6327
+ _context17.next = 11;
6323
6328
  return this.addMediaInternal(function () {
6324
6329
  // callback is not called when UserNotJoinedError is thrown
6325
6330
  return _this30.joinWithMediaRetryInfo.retryCount >= 1 ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
6326
- }, turnServerInfo, forceTurnDiscovery, mediaOptions);
6327
- case 10:
6331
+ }, forceTurnDiscovery, turnServerInfo, shouldRetryMediaWithOnlyTurnTLS ? 'relay' : undefined, mediaOptions);
6332
+ case 11:
6328
6333
  mediaResponse = _context17.sent;
6329
6334
  this.joinWithMediaRetryInfo = {
6330
6335
  retryCount: 0,
@@ -6335,8 +6340,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6335
6340
  media: mediaResponse,
6336
6341
  multistreamEnabled: this.isMultistream
6337
6342
  });
6338
- case 11:
6339
- _context17.prev = 11;
6343
+ case 12:
6344
+ _context17.prev = 12;
6340
6345
  _t10 = _context17["catch"](3);
6341
6346
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _t10);
6342
6347
  this.roap.abortTurnDiscovery();
@@ -6364,24 +6369,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6364
6369
 
6365
6370
  // we only want to call leave if join was successful, and we won't be doing any more retries
6366
6371
  if (!(joined && !shouldRetry)) {
6367
- _context17.next = 15;
6372
+ _context17.next = 16;
6368
6373
  break;
6369
6374
  }
6370
- _context17.prev = 12;
6371
- _context17.next = 13;
6375
+ _context17.prev = 13;
6376
+ _context17.next = 14;
6372
6377
  return this.leave({
6373
6378
  resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
6374
6379
  reason: 'joinWithMedia failure'
6375
6380
  });
6376
- case 13:
6377
- _context17.next = 15;
6378
- break;
6379
6381
  case 14:
6380
- _context17.prev = 14;
6381
- _t11 = _context17["catch"](12);
6382
+ _context17.next = 16;
6383
+ break;
6384
+ case 15:
6385
+ _context17.prev = 15;
6386
+ _t11 = _context17["catch"](13);
6382
6387
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _t11);
6383
6388
  leaveError = _t11;
6384
- case 15:
6389
+ case 16:
6385
6390
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
6386
6391
  correlation_id: this.correlationId,
6387
6392
  locus_id: (_this$locusUrl = this.locusUrl) === null || _this$locusUrl === void 0 ? void 0 : _this$locusUrl.split('/').pop(),
@@ -6394,7 +6399,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6394
6399
  type: _t10.name
6395
6400
  });
6396
6401
  if (!shouldRetry) {
6397
- _context17.next = 16;
6402
+ _context17.next = 17;
6398
6403
  break;
6399
6404
  }
6400
6405
  _loggerProxy.default.logger.warn('Meeting:index#joinWithMedia --> retrying call to joinWithMedia');
@@ -6405,7 +6410,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6405
6410
  this.joinWithMediaRetryInfo.firstError = _t10;
6406
6411
  }
6407
6412
  return _context17.abrupt("return", this.joinWithMedia(options));
6408
- case 16:
6413
+ case 17:
6409
6414
  firstError = this.joinWithMediaRetryInfo.firstError;
6410
6415
  this.joinWithMediaRetryInfo = {
6411
6416
  retryCount: 0,
@@ -6414,11 +6419,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6414
6419
  prevError: undefined
6415
6420
  };
6416
6421
  throw firstError !== null && firstError !== void 0 ? firstError : _t10;
6417
- case 17:
6422
+ case 18:
6418
6423
  case "end":
6419
6424
  return _context17.stop();
6420
6425
  }
6421
- }, _callee17, this, [[3, 11], [12, 14]]);
6426
+ }, _callee17, this, [[3, 12], [13, 15]]);
6422
6427
  }));
6423
6428
  function joinWithMedia() {
6424
6429
  return _joinWithMedia.apply(this, arguments);
@@ -7630,21 +7635,70 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7630
7635
  return "MC-".concat(this.id.substring(0, 4));
7631
7636
  }
7632
7637
 
7638
+ /**
7639
+ * Determines if the next media attempt should use only TURN-TLS (iceTransportPolicy='relay').
7640
+ * We do this in the hope that it will minimize the chance of Homer sending DTLS packets on a wrong
7641
+ * transport (as there will be only 1 transport) and dealing with firewalls that let STUN packets through, but block
7642
+ * other UDP traffic.
7643
+ *
7644
+ * For clients landing on video mesh nodes (VMN), reachability might still have successful TLS (to public nodes)
7645
+ * but TURN discovery will result in empty TURN urls array and iceTransportPolicy='relay' will still be overriden to undefined,
7646
+ * see the code in establishMediaConnection()
7647
+ *
7648
+ * @param {Error} prevError - The error from the previous addMedia attempt
7649
+ * @returns {Promise<boolean>}
7650
+ */
7651
+ }, {
7652
+ key: "shouldRetryMediaWithOnlyTurnTLS",
7653
+ value: (function () {
7654
+ var _shouldRetryMediaWithOnlyTurnTLS = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24(prevError) {
7655
+ var hasTlsReachability;
7656
+ return _regenerator.default.wrap(function (_context24) {
7657
+ while (1) switch (_context24.prev = _context24.next) {
7658
+ case 0:
7659
+ if (!(this.isMultistream && prevError instanceof _webexErrors.AddMediaFailed && prevError.isDtlsHandshakeFailure && prevError.connectionType === 'UDP')) {
7660
+ _context24.next = 2;
7661
+ break;
7662
+ }
7663
+ _context24.next = 1;
7664
+ return this.webex.meetings.reachability.isAnyClusterReachableViaProtocol('xtls');
7665
+ case 1:
7666
+ hasTlsReachability = _context24.sent;
7667
+ if (!hasTlsReachability) {
7668
+ _context24.next = 2;
7669
+ break;
7670
+ }
7671
+ _loggerProxy.default.logger.info('Meeting:index#shouldRetryMediaWithOnlyTurnTLS --> previous attempt failed due to DTLS handshake failure over UDP and TLS reachability is available');
7672
+ return _context24.abrupt("return", true);
7673
+ case 2:
7674
+ return _context24.abrupt("return", false);
7675
+ case 3:
7676
+ case "end":
7677
+ return _context24.stop();
7678
+ }
7679
+ }, _callee24, this);
7680
+ }));
7681
+ function shouldRetryMediaWithOnlyTurnTLS(_x16) {
7682
+ return _shouldRetryMediaWithOnlyTurnTLS.apply(this, arguments);
7683
+ }
7684
+ return shouldRetryMediaWithOnlyTurnTLS;
7685
+ }()
7633
7686
  /**
7634
7687
  * Creates a webrtc media connection and publishes streams to it
7635
7688
  *
7636
7689
  * @param {Object} turnServerInfo TURN server information
7637
7690
  * @param {BundlePolicy} [bundlePolicy] Bundle policy settings
7638
- * @param {AddMediaOptions} [options] Options for enabling/disabling audio/video
7691
+ * @param {RTCIceTransportPolicy} [iceTransportPolicy] ICE transport policy override
7639
7692
  * @returns {RoapMediaConnection | MultistreamRoapMediaConnection}
7640
7693
  */
7694
+ )
7641
7695
  }, {
7642
7696
  key: "createMediaConnection",
7643
7697
  value: (function () {
7644
- var _createMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24(turnServerInfo, bundlePolicy) {
7698
+ var _createMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25(turnServerInfo, bundlePolicy, iceTransportPolicy) {
7645
7699
  var mc, audioEnabled, videoEnabled, shareEnabled;
7646
- return _regenerator.default.wrap(function (_context24) {
7647
- while (1) switch (_context24.prev = _context24.next) {
7700
+ return _regenerator.default.wrap(function (_context25) {
7701
+ while (1) switch (_context25.prev = _context25.next) {
7648
7702
  case 0:
7649
7703
  this.rtcMetrics = this.isMultistream ?
7650
7704
  // @ts-ignore
@@ -7664,6 +7718,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7664
7718
  enableExtmap: this.config.enableExtmap,
7665
7719
  turnServerInfo: turnServerInfo,
7666
7720
  bundlePolicy: bundlePolicy,
7721
+ iceTransportPolicy: iceTransportPolicy,
7667
7722
  // @ts-ignore - config coming from registerPlugin
7668
7723
  iceCandidatesTimeout: this.config.iceCandidatesGatheringTimeout,
7669
7724
  // @ts-ignore - config coming from registerPlugin
@@ -7688,42 +7743,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7688
7743
 
7689
7744
  // publish the streams
7690
7745
  if (!this.mediaProperties.audioStream) {
7691
- _context24.next = 1;
7746
+ _context25.next = 1;
7692
7747
  break;
7693
7748
  }
7694
7749
  this.setSendNamedMediaGroup(_internalMediaCore.MediaType.AudioMain);
7695
- _context24.next = 1;
7750
+ _context25.next = 1;
7696
7751
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
7697
7752
  case 1:
7698
7753
  if (!this.mediaProperties.videoStream) {
7699
- _context24.next = 2;
7754
+ _context25.next = 2;
7700
7755
  break;
7701
7756
  }
7702
- _context24.next = 2;
7757
+ _context25.next = 2;
7703
7758
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
7704
7759
  case 2:
7705
7760
  if (!this.mediaProperties.shareVideoStream) {
7706
- _context24.next = 3;
7761
+ _context25.next = 3;
7707
7762
  break;
7708
7763
  }
7709
- _context24.next = 3;
7764
+ _context25.next = 3;
7710
7765
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
7711
7766
  case 3:
7712
7767
  if (!(this.isMultistream && this.mediaProperties.shareAudioStream)) {
7713
- _context24.next = 4;
7768
+ _context25.next = 4;
7714
7769
  break;
7715
7770
  }
7716
- _context24.next = 4;
7771
+ _context25.next = 4;
7717
7772
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
7718
7773
  case 4:
7719
- return _context24.abrupt("return", mc);
7774
+ return _context25.abrupt("return", mc);
7720
7775
  case 5:
7721
7776
  case "end":
7722
- return _context24.stop();
7777
+ return _context25.stop();
7723
7778
  }
7724
- }, _callee24, this);
7779
+ }, _callee25, this);
7725
7780
  }));
7726
- function createMediaConnection(_x16, _x17) {
7781
+ function createMediaConnection(_x17, _x18, _x19) {
7727
7782
  return _createMediaConnection.apply(this, arguments);
7728
7783
  }
7729
7784
  return createMediaConnection;
@@ -7761,11 +7816,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7761
7816
  }, {
7762
7817
  key: "setUpLocalStreamReferences",
7763
7818
  value: (function () {
7764
- var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25(localStreams) {
7819
+ var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26(localStreams) {
7765
7820
  var _localStreams$microph, _localStreams$camera, _localStreams$screenS, _localStreams$screenS2, _localStreams$screenS3, _localStreams$screenS4, _localStreams$screenS5, _localStreams$screenS6;
7766
7821
  var setUpStreamPromises, _t16;
7767
- return _regenerator.default.wrap(function (_context25) {
7768
- while (1) switch (_context25.prev = _context25.next) {
7822
+ return _regenerator.default.wrap(function (_context26) {
7823
+ while (1) switch (_context26.prev = _context26.next) {
7769
7824
  case 0:
7770
7825
  setUpStreamPromises = [];
7771
7826
  if (localStreams !== null && localStreams !== void 0 && localStreams.microphone && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$microph = localStreams.microphone) === null || _localStreams$microph === void 0 ? void 0 : _localStreams$microph.readyState) !== 'ended') {
@@ -7780,24 +7835,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7780
7835
  if (localStreams !== null && localStreams !== void 0 && (_localStreams$screenS4 = localStreams.screenShare) !== null && _localStreams$screenS4 !== void 0 && _localStreams$screenS4.audio && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$screenS5 = localStreams.screenShare) === null || _localStreams$screenS5 === void 0 ? void 0 : (_localStreams$screenS6 = _localStreams$screenS5.audio) === null || _localStreams$screenS6 === void 0 ? void 0 : _localStreams$screenS6.readyState) !== 'ended') {
7781
7836
  setUpStreamPromises.push(this.setLocalShareAudioStream(localStreams.screenShare.audio));
7782
7837
  }
7783
- _context25.prev = 1;
7784
- _context25.next = 2;
7838
+ _context26.prev = 1;
7839
+ _context26.next = 2;
7785
7840
  return _promise.default.all(setUpStreamPromises);
7786
7841
  case 2:
7787
- _context25.next = 4;
7842
+ _context26.next = 4;
7788
7843
  break;
7789
7844
  case 3:
7790
- _context25.prev = 3;
7791
- _t16 = _context25["catch"](1);
7845
+ _context26.prev = 3;
7846
+ _t16 = _context26["catch"](1);
7792
7847
  _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _t16);
7793
7848
  throw _t16;
7794
7849
  case 4:
7795
7850
  case "end":
7796
- return _context25.stop();
7851
+ return _context26.stop();
7797
7852
  }
7798
- }, _callee25, this, [[1, 3]]);
7853
+ }, _callee26, this, [[1, 3]]);
7799
7854
  }));
7800
- function setUpLocalStreamReferences(_x18) {
7855
+ function setUpLocalStreamReferences(_x20) {
7801
7856
  return _setUpLocalStreamReferences.apply(this, arguments);
7802
7857
  }
7803
7858
  return setUpLocalStreamReferences;
@@ -7812,23 +7867,23 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7812
7867
  }, {
7813
7868
  key: "waitForMediaConnectionConnected",
7814
7869
  value: (function () {
7815
- var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26() {
7816
- var iceConnected, _this$mediaProperties9, _this$mediaProperties0, _this$mediaProperties1, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, timedOutError, _t17, _t18, _t19, _t20, _t21, _t22, _t23, _t24, _t25, _t26, _t27, _t28, _t29, _t30, _t31;
7817
- return _regenerator.default.wrap(function (_context26) {
7818
- while (1) switch (_context26.prev = _context26.next) {
7870
+ var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27() {
7871
+ var _ref42, iceConnected, _this$mediaProperties9, _this$mediaProperties0, _this$mediaProperties1, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, _t17, _t18, _t19, _t20, _t21, _t22, _t23, _t24, _t25, _t26, _t27, _t28, _t29, _t30, _t31;
7872
+ return _regenerator.default.wrap(function (_context27) {
7873
+ while (1) switch (_context27.prev = _context27.next) {
7819
7874
  case 0:
7820
- _context26.prev = 0;
7821
- _context26.next = 1;
7875
+ _context27.prev = 0;
7876
+ _context27.next = 1;
7822
7877
  return this.mediaProperties.waitForMediaConnectionConnected(this.correlationId);
7823
7878
  case 1:
7824
- _context26.next = 5;
7879
+ _context27.next = 5;
7825
7880
  break;
7826
7881
  case 2:
7827
- _context26.prev = 2;
7828
- _t17 = _context26["catch"](0);
7829
- iceConnected = _t17.iceConnected;
7882
+ _context27.prev = 2;
7883
+ _t17 = _context27["catch"](0);
7884
+ _ref42 = _t17, iceConnected = _ref42.iceConnected;
7830
7885
  if (this.hasMediaConnectionConnectedAtLeastOnce) {
7831
- _context26.next = 4;
7886
+ _context27.next = 4;
7832
7887
  break;
7833
7888
  }
7834
7889
  _t18 = this.webex.internal.newMetrics;
@@ -7839,12 +7894,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7839
7894
  _t23 = ((_this$mediaProperties9 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties9 === void 0 ? void 0 : (_this$mediaProperties0 = _this$mediaProperties9.multistreamConnection) === null || _this$mediaProperties0 === void 0 ? void 0 : (_this$mediaProperties1 = _this$mediaProperties0.pc) === null || _this$mediaProperties1 === void 0 ? void 0 : (_this$mediaProperties10 = _this$mediaProperties1.pc) === null || _this$mediaProperties10 === void 0 ? void 0 : _this$mediaProperties10.signalingState) || ((_this$mediaProperties11 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties11 === void 0 ? void 0 : (_this$mediaProperties12 = _this$mediaProperties11.mediaConnection) === null || _this$mediaProperties12 === void 0 ? void 0 : (_this$mediaProperties13 = _this$mediaProperties12.pc) === null || _this$mediaProperties13 === void 0 ? void 0 : _this$mediaProperties13.signalingState) || 'unknown';
7840
7895
  _t24 = iceConnected;
7841
7896
  _t25 = this.turnServerUsed;
7842
- _context26.next = 3;
7897
+ _context27.next = 3;
7843
7898
  return this.webex.meetings.reachability.isWebexMediaBackendUnreachable().catch(function () {
7844
7899
  return false;
7845
7900
  });
7846
7901
  case 3:
7847
- _t26 = _context26.sent;
7902
+ _t26 = _context27.sent;
7848
7903
  _t27 = _t22.generateClientErrorCodeForIceFailure.call(_t22, {
7849
7904
  signalingState: _t23,
7850
7905
  iceConnected: _t24,
@@ -7870,14 +7925,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7870
7925
  options: _t31
7871
7926
  });
7872
7927
  case 4:
7873
- timedOutError = new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
7874
- timedOutError.cause = _t17;
7875
- throw timedOutError;
7928
+ throw new _webexErrors.MediaConnectionTimedOutError("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId), iceConnected);
7876
7929
  case 5:
7877
7930
  case "end":
7878
- return _context26.stop();
7931
+ return _context27.stop();
7879
7932
  }
7880
- }, _callee26, this, [[0, 2]]);
7933
+ }, _callee27, this, [[0, 2]]);
7881
7934
  }));
7882
7935
  function waitForMediaConnectionConnected() {
7883
7936
  return _waitForMediaConnectionConnected.apply(this, arguments);
@@ -7944,19 +7997,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7944
7997
  }, {
7945
7998
  key: "waitForRemoteSDPAnswer",
7946
7999
  value: (function () {
7947
- var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27() {
8000
+ var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28() {
7948
8001
  var _this44 = this;
7949
8002
  var LOG_HEADER, deferSDPAnswer;
7950
- return _regenerator.default.wrap(function (_context27) {
7951
- while (1) switch (_context27.prev = _context27.next) {
8003
+ return _regenerator.default.wrap(function (_context28) {
8004
+ while (1) switch (_context28.prev = _context28.next) {
7952
8005
  case 0:
7953
8006
  LOG_HEADER = 'Meeting:index#addMedia():waitForRemoteSDPAnswer -->';
7954
8007
  if (this.deferSDPAnswer) {
7955
- _context27.next = 1;
8008
+ _context28.next = 1;
7956
8009
  break;
7957
8010
  }
7958
8011
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " offer not created yet"));
7959
- return _context27.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
8012
+ return _context28.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
7960
8013
  case 1:
7961
8014
  deferSDPAnswer = this.deferSDPAnswer;
7962
8015
  this.sdpResponseTimer = setTimeout(function () {
@@ -7982,12 +8035,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7982
8035
  deferSDPAnswer.reject(error);
7983
8036
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
7984
8037
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
7985
- return _context27.abrupt("return", deferSDPAnswer.promise);
8038
+ return _context28.abrupt("return", deferSDPAnswer.promise);
7986
8039
  case 2:
7987
8040
  case "end":
7988
- return _context27.stop();
8041
+ return _context28.stop();
7989
8042
  }
7990
- }, _callee27, this);
8043
+ }, _callee28, this);
7991
8044
  }));
7992
8045
  function waitForRemoteSDPAnswer() {
7993
8046
  return _waitForRemoteSDPAnswer.apply(this, arguments);
@@ -8006,30 +8059,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8006
8059
  }, {
8007
8060
  key: "retryEstablishMediaConnectionWithForcedTurnDiscovery",
8008
8061
  value: (function () {
8009
- var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28(remoteMediaManagerConfig, bundlePolicy) {
8062
+ var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29(remoteMediaManagerConfig, bundlePolicy) {
8010
8063
  var LOG_HEADER, _t32;
8011
- return _regenerator.default.wrap(function (_context28) {
8012
- while (1) switch (_context28.prev = _context28.next) {
8064
+ return _regenerator.default.wrap(function (_context29) {
8065
+ while (1) switch (_context29.prev = _context29.next) {
8013
8066
  case 0:
8014
8067
  LOG_HEADER = 'Meeting:index#addMedia():retryEstablishMediaConnectionWithForcedTurnDiscovery -->';
8015
- _context28.prev = 1;
8016
- _context28.next = 2;
8068
+ _context29.prev = 1;
8069
+ _context29.next = 2;
8017
8070
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
8018
8071
  case 2:
8019
- _context28.next = 4;
8072
+ _context29.next = 4;
8020
8073
  break;
8021
8074
  case 3:
8022
- _context28.prev = 3;
8023
- _t32 = _context28["catch"](1);
8075
+ _context29.prev = 3;
8076
+ _t32 = _context29["catch"](1);
8024
8077
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _t32);
8025
8078
  throw _t32;
8026
8079
  case 4:
8027
8080
  case "end":
8028
- return _context28.stop();
8081
+ return _context29.stop();
8029
8082
  }
8030
- }, _callee28, this, [[1, 3]]);
8083
+ }, _callee29, this, [[1, 3]]);
8031
8084
  }));
8032
- function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x19, _x20) {
8085
+ function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x21, _x22) {
8033
8086
  return _retryEstablishMediaConnectionWithForcedTurnDiscovery.apply(this, arguments);
8034
8087
  }
8035
8088
  return retryEstablishMediaConnectionWithForcedTurnDiscovery;
@@ -8047,14 +8100,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8047
8100
  }, {
8048
8101
  key: "retryWithForcedTurnDiscovery",
8049
8102
  value: (function () {
8050
- var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29(remoteMediaManagerConfig, bundlePolicy) {
8103
+ var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30(remoteMediaManagerConfig, bundlePolicy) {
8051
8104
  var LOG_HEADER;
8052
- return _regenerator.default.wrap(function (_context29) {
8053
- while (1) switch (_context29.prev = _context29.next) {
8105
+ return _regenerator.default.wrap(function (_context30) {
8106
+ while (1) switch (_context30.prev = _context30.next) {
8054
8107
  case 0:
8055
8108
  this.addMediaData.retriedWithTurnServer = true;
8056
8109
  LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
8057
- _context29.next = 1;
8110
+ _context30.next = 1;
8058
8111
  return this.cleanUpBeforeRetryWithTurnServer();
8059
8112
  case 1:
8060
8113
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_RETRY, {
@@ -8064,24 +8117,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8064
8117
  reason: 'forcingTurnTls'
8065
8118
  });
8066
8119
  if (!(this.state === _constants.MEETING_STATE.STATES.LEFT)) {
8067
- _context29.next = 2;
8120
+ _context30.next = 2;
8068
8121
  break;
8069
8122
  }
8070
8123
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. "));
8071
- _context29.next = 2;
8124
+ _context30.next = 2;
8072
8125
  return this.join({
8073
8126
  rejoin: true
8074
8127
  });
8075
8128
  case 2:
8076
- _context29.next = 3;
8129
+ _context30.next = 3;
8077
8130
  return this.retryEstablishMediaConnectionWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
8078
8131
  case 3:
8079
8132
  case "end":
8080
- return _context29.stop();
8133
+ return _context30.stop();
8081
8134
  }
8082
- }, _callee29, this);
8135
+ }, _callee30, this);
8083
8136
  }));
8084
- function retryWithForcedTurnDiscovery(_x21, _x22) {
8137
+ function retryWithForcedTurnDiscovery(_x23, _x24) {
8085
8138
  return _retryWithForcedTurnDiscovery.apply(this, arguments);
8086
8139
  }
8087
8140
  return retryWithForcedTurnDiscovery;
@@ -8101,32 +8154,46 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8101
8154
  }, {
8102
8155
  key: "handleWaitForMediaConnectionConnectedError",
8103
8156
  value: (function () {
8104
- var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30(error, remoteMediaManagerConfig, bundlePolicy) {
8105
- var LOG_HEADER;
8106
- return _regenerator.default.wrap(function (_context30) {
8107
- while (1) switch (_context30.prev = _context30.next) {
8157
+ var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31(error, remoteMediaManagerConfig, bundlePolicy) {
8158
+ var LOG_HEADER, _yield$this$mediaProp, connectionType, selectedCandidatePairChanges, numTransports, iceConnected;
8159
+ return _regenerator.default.wrap(function (_context31) {
8160
+ while (1) switch (_context31.prev = _context31.next) {
8108
8161
  case 0:
8109
8162
  LOG_HEADER = 'Meeting:index#addMedia():handleWaitForMediaConnectionConnectedError -->'; // @ts-ignore - config coming from registerPlugin
8110
8163
  if (this.turnServerUsed) {
8111
- _context30.next = 2;
8164
+ _context31.next = 2;
8112
8165
  break;
8113
8166
  }
8114
8167
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " error waiting for media to connect on UDP, TCP, retrying using TURN-TLS, "), error);
8115
- _context30.next = 1;
8168
+ _context31.next = 1;
8116
8169
  return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
8117
8170
  case 1:
8118
- _context30.next = 3;
8171
+ _context31.next = 4;
8119
8172
  break;
8120
8173
  case 2:
8121
8174
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
8122
- throw new _webexErrors.AddMediaFailed(error);
8175
+ _context31.next = 3;
8176
+ return this.mediaProperties.getCurrentConnectionInfo();
8123
8177
  case 3:
8178
+ _yield$this$mediaProp = _context31.sent;
8179
+ connectionType = _yield$this$mediaProp.connectionType;
8180
+ selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
8181
+ numTransports = _yield$this$mediaProp.numTransports;
8182
+ iceConnected = error instanceof _webexErrors.MediaConnectionTimedOutError && error.iceConnected;
8183
+ throw new _webexErrors.AddMediaFailed({
8184
+ cause: error,
8185
+ connectionType: connectionType,
8186
+ selectedCandidatePairChanges: selectedCandidatePairChanges,
8187
+ numTransports: numTransports,
8188
+ iceConnected: iceConnected
8189
+ });
8190
+ case 4:
8124
8191
  case "end":
8125
- return _context30.stop();
8192
+ return _context31.stop();
8126
8193
  }
8127
- }, _callee30, this);
8194
+ }, _callee31, this);
8128
8195
  }));
8129
- function handleWaitForMediaConnectionConnectedError(_x23, _x24, _x25) {
8196
+ function handleWaitForMediaConnectionConnectedError(_x25, _x26, _x27) {
8130
8197
  return _handleWaitForMediaConnectionConnectedError.apply(this, arguments);
8131
8198
  }
8132
8199
  return handleWaitForMediaConnectionConnectedError;
@@ -8142,20 +8209,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8142
8209
  }, {
8143
8210
  key: "doTurnDiscovery",
8144
8211
  value: (function () {
8145
- var _doTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31(isReconnecting, isForced) {
8212
+ var _doTurnDiscovery = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32(isReconnecting, isForced) {
8146
8213
  var cdl, turnDiscoveryResult;
8147
- return _regenerator.default.wrap(function (_context31) {
8148
- while (1) switch (_context31.prev = _context31.next) {
8214
+ return _regenerator.default.wrap(function (_context32) {
8215
+ while (1) switch (_context32.prev = _context32.next) {
8149
8216
  case 0:
8150
8217
  // @ts-ignore
8151
8218
  cdl = this.webex.internal.newMetrics.callDiagnosticLatencies; // @ts-ignore
8152
8219
  this.webex.internal.newMetrics.submitInternalEvent({
8153
8220
  name: 'internal.client.add-media.turn-discovery.start'
8154
8221
  });
8155
- _context31.next = 1;
8222
+ _context32.next = 1;
8156
8223
  return this.roap.doTurnDiscovery(this, isReconnecting, isForced);
8157
8224
  case 1:
8158
- turnDiscoveryResult = _context31.sent;
8225
+ turnDiscoveryResult = _context32.sent;
8159
8226
  this.turnDiscoverySkippedReason = turnDiscoveryResult === null || turnDiscoveryResult === void 0 ? void 0 : turnDiscoveryResult.turnDiscoverySkippedReason;
8160
8227
  this.turnServerUsed = !this.turnDiscoverySkippedReason;
8161
8228
 
@@ -8171,14 +8238,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8171
8238
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer
8172
8239
  });
8173
8240
  }
8174
- return _context31.abrupt("return", turnDiscoveryResult);
8241
+ return _context32.abrupt("return", turnDiscoveryResult);
8175
8242
  case 2:
8176
8243
  case "end":
8177
- return _context31.stop();
8244
+ return _context32.stop();
8178
8245
  }
8179
- }, _callee31, this);
8246
+ }, _callee32, this);
8180
8247
  }));
8181
- function doTurnDiscovery(_x26, _x27) {
8248
+ function doTurnDiscovery(_x28, _x29) {
8182
8249
  return _doTurnDiscovery.apply(this, arguments);
8183
8250
  }
8184
8251
  return doTurnDiscovery;
@@ -8197,35 +8264,40 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8197
8264
  }, {
8198
8265
  key: "establishMediaConnection",
8199
8266
  value: (function () {
8200
- var _establishMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
8267
+ var _establishMediaConnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
8201
8268
  var _this$locusMediaReque;
8202
- var LOG_HEADER, isReconnecting, _yield$this$doTurnDis, mc, _t33, _t34;
8203
- return _regenerator.default.wrap(function (_context32) {
8204
- while (1) switch (_context32.prev = _context32.next) {
8269
+ var LOG_HEADER, isReconnecting, _turnServerInfo$urls, _yield$this$doTurnDis, mediaConnection, _t33, _t34;
8270
+ return _regenerator.default.wrap(function (_context33) {
8271
+ while (1) switch (_context33.prev = _context33.next) {
8205
8272
  case 0:
8206
8273
  LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->';
8207
8274
  isReconnecting = this.isMoveToInProgress || !!((_this$locusMediaReque = this.locusMediaRequest) !== null && _this$locusMediaReque !== void 0 && _this$locusMediaReque.isConfluenceCreated()); // We are forcing turn discovery if the case is moveTo and a turn server was used already
8208
8275
  if (this.isMoveToInProgress && this.turnServerUsed) {
8209
8276
  isForced = true;
8210
8277
  }
8211
- _context32.prev = 1;
8278
+ _context33.prev = 1;
8212
8279
  if (turnServerInfo) {
8213
- _context32.next = 3;
8280
+ _context33.next = 3;
8214
8281
  break;
8215
8282
  }
8216
- _context32.next = 2;
8283
+ _context33.next = 2;
8217
8284
  return this.doTurnDiscovery(isReconnecting, isForced);
8218
8285
  case 2:
8219
- _yield$this$doTurnDis = _context32.sent;
8286
+ _yield$this$doTurnDis = _context33.sent;
8220
8287
  turnServerInfo = _yield$this$doTurnDis.turnServerInfo;
8221
8288
  case 3:
8222
- _context32.next = 4;
8223
- return this.createMediaConnection(turnServerInfo, bundlePolicy);
8289
+ if ((!turnServerInfo || !((_turnServerInfo$urls = turnServerInfo.urls) !== null && _turnServerInfo$urls !== void 0 && _turnServerInfo$urls.length)) && this.addMediaData.iceTransportPolicy === 'relay') {
8290
+ _loggerProxy.default.logger.info("".concat(LOG_HEADER, " cannot do iceTransportPolicy=relay, because there is no turn server info available"));
8291
+ // drop the forced relay policy and use the default, because we don't have a TURN server
8292
+ this.addMediaData.iceTransportPolicy = undefined;
8293
+ }
8294
+ _context33.next = 4;
8295
+ return this.createMediaConnection(turnServerInfo, bundlePolicy, this.addMediaData.iceTransportPolicy);
8224
8296
  case 4:
8225
- mc = _context32.sent;
8297
+ mediaConnection = _context33.sent;
8226
8298
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created this.isMultistream=").concat(this.isMultistream));
8227
8299
  if (!this.isMultistream) {
8228
- _context32.next = 5;
8300
+ _context33.next = 5;
8229
8301
  break;
8230
8302
  }
8231
8303
  this.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(this.receiveSlotManager, this.mediaRequestManagers, remoteMediaManagerConfig);
@@ -8233,42 +8305,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8233
8305
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.InterpretationAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_INTERPRETATION_AUDIO_CREATED);
8234
8306
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
8235
8307
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
8236
- _context32.next = 5;
8308
+ _context33.next = 5;
8237
8309
  return this.remoteMediaManager.start();
8238
8310
  case 5:
8239
- _context32.next = 6;
8240
- return mc.initiateOffer();
8311
+ _context33.next = 6;
8312
+ return mediaConnection.initiateOffer();
8241
8313
  case 6:
8242
- _context32.next = 7;
8314
+ _context33.next = 7;
8243
8315
  return this.waitForRemoteSDPAnswer();
8244
8316
  case 7:
8245
8317
  this.handleMediaLogging(this.mediaProperties);
8246
- _context32.next = 9;
8318
+ _context33.next = 9;
8247
8319
  break;
8248
8320
  case 8:
8249
- _context32.prev = 8;
8250
- _t33 = _context32["catch"](1);
8321
+ _context33.prev = 8;
8322
+ _t33 = _context33["catch"](1);
8251
8323
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _t33);
8252
8324
  throw _t33;
8253
8325
  case 9:
8254
- _context32.prev = 9;
8255
- _context32.next = 10;
8326
+ _context33.prev = 9;
8327
+ _context33.next = 10;
8256
8328
  return this.waitForMediaConnectionConnected();
8257
8329
  case 10:
8258
- _context32.next = 12;
8330
+ _context33.next = 12;
8259
8331
  break;
8260
8332
  case 11:
8261
- _context32.prev = 11;
8262
- _t34 = _context32["catch"](9);
8263
- _context32.next = 12;
8333
+ _context33.prev = 11;
8334
+ _t34 = _context33["catch"](9);
8335
+ _context33.next = 12;
8264
8336
  return this.handleWaitForMediaConnectionConnectedError(_t34, remoteMediaManagerConfig, bundlePolicy);
8265
8337
  case 12:
8266
8338
  case "end":
8267
- return _context32.stop();
8339
+ return _context33.stop();
8268
8340
  }
8269
- }, _callee32, this, [[1, 8], [9, 11]]);
8341
+ }, _callee33, this, [[1, 8], [9, 11]]);
8270
8342
  }));
8271
- function establishMediaConnection(_x28, _x29, _x30, _x31) {
8343
+ function establishMediaConnection(_x30, _x31, _x32, _x33) {
8272
8344
  return _establishMediaConnection.apply(this, arguments);
8273
8345
  }
8274
8346
  return establishMediaConnection;
@@ -8283,16 +8355,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8283
8355
  }, {
8284
8356
  key: "cleanUpOnAddMediaFailure",
8285
8357
  value: (function () {
8286
- var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
8358
+ var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
8287
8359
  var _this$networkQualityM, _this$statsMonitor;
8288
- return _regenerator.default.wrap(function (_context33) {
8289
- while (1) switch (_context33.prev = _context33.next) {
8360
+ return _regenerator.default.wrap(function (_context34) {
8361
+ while (1) switch (_context34.prev = _context34.next) {
8290
8362
  case 0:
8291
8363
  if (!this.statsAnalyzer) {
8292
- _context33.next = 1;
8364
+ _context34.next = 1;
8293
8365
  break;
8294
8366
  }
8295
- _context33.next = 1;
8367
+ _context34.next = 1;
8296
8368
  return this.statsAnalyzer.stopAnalyzer();
8297
8369
  case 1:
8298
8370
  this.statsAnalyzer = null;
@@ -8303,7 +8375,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8303
8375
 
8304
8376
  // when media fails, we want to upload a webrtc dump to see whats going on
8305
8377
  // this function is async, but returns once the stats have been gathered
8306
- _context33.next = 2;
8378
+ _context34.next = 2;
8307
8379
  return this.forceSendStatsReport({
8308
8380
  callFrom: 'addMedia'
8309
8381
  });
@@ -8314,9 +8386,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8314
8386
  }
8315
8387
  case 3:
8316
8388
  case "end":
8317
- return _context33.stop();
8389
+ return _context34.stop();
8318
8390
  }
8319
- }, _callee33, this);
8391
+ }, _callee34, this);
8320
8392
  }));
8321
8393
  function cleanUpOnAddMediaFailure() {
8322
8394
  return _cleanUpOnAddMediaFailure.apply(this, arguments);
@@ -8334,16 +8406,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8334
8406
  }, {
8335
8407
  key: "downgradeFromMultistreamToTranscoded",
8336
8408
  value: (function () {
8337
- var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
8409
+ var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35() {
8338
8410
  var _this$networkQualityM2, _this$statsMonitor2, _this$locusMediaReque2;
8339
- return _regenerator.default.wrap(function (_context34) {
8340
- while (1) switch (_context34.prev = _context34.next) {
8411
+ return _regenerator.default.wrap(function (_context35) {
8412
+ while (1) switch (_context35.prev = _context35.next) {
8341
8413
  case 0:
8342
8414
  if (!this.statsAnalyzer) {
8343
- _context34.next = 1;
8415
+ _context35.next = 1;
8344
8416
  break;
8345
8417
  }
8346
- _context34.next = 1;
8418
+ _context35.next = 1;
8347
8419
  return this.statsAnalyzer.stopAnalyzer();
8348
8420
  case 1:
8349
8421
  this.statsAnalyzer = null;
@@ -8352,6 +8424,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8352
8424
  (_this$statsMonitor2 = this.statsMonitor) === null || _this$statsMonitor2 === void 0 ? void 0 : _this$statsMonitor2.removeAllListeners();
8353
8425
  this.statsMonitor = null;
8354
8426
  this.isMultistream = false;
8427
+
8428
+ // reset iceTransportPolicy, because it's only applied for multistream media connections
8429
+ this.addMediaData.iceTransportPolicy = undefined;
8355
8430
  if (this.mediaProperties.webrtcMediaConnection) {
8356
8431
  // close peer connection, but don't reset mute state information, because we will want to use it on the retry
8357
8432
  this.closePeerConnections(false);
@@ -8361,9 +8436,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8361
8436
  this.createStatsAnalyzer();
8362
8437
  case 2:
8363
8438
  case "end":
8364
- return _context34.stop();
8439
+ return _context35.stop();
8365
8440
  }
8366
- }, _callee34, this);
8441
+ }, _callee35, this);
8367
8442
  }));
8368
8443
  function downgradeFromMultistreamToTranscoded() {
8369
8444
  return _downgradeFromMultistreamToTranscoded.apply(this, arguments);
@@ -8381,11 +8456,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8381
8456
  }, {
8382
8457
  key: "cleanUpBeforeRetryWithTurnServer",
8383
8458
  value: (function () {
8384
- var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35() {
8385
- return _regenerator.default.wrap(function (_context35) {
8386
- while (1) switch (_context35.prev = _context35.next) {
8459
+ var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36() {
8460
+ return _regenerator.default.wrap(function (_context36) {
8461
+ while (1) switch (_context36.prev = _context36.next) {
8387
8462
  case 0:
8388
- _context35.next = 1;
8463
+ _context36.next = 1;
8389
8464
  return this.forceSendStatsReport({
8390
8465
  callFrom: 'cleanUpBeforeRetryWithTurnServer'
8391
8466
  });
@@ -8405,9 +8480,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8405
8480
  }
8406
8481
  case 2:
8407
8482
  case "end":
8408
- return _context35.stop();
8483
+ return _context36.stop();
8409
8484
  }
8410
- }, _callee35, this);
8485
+ }, _callee36, this);
8411
8486
  }));
8412
8487
  function cleanUpBeforeRetryWithTurnServer() {
8413
8488
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
@@ -8417,35 +8492,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8417
8492
  }, {
8418
8493
  key: "cleanUpBeforeReconnection",
8419
8494
  value: function () {
8420
- var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36() {
8495
+ var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37() {
8421
8496
  var _t35;
8422
- return _regenerator.default.wrap(function (_context36) {
8423
- while (1) switch (_context36.prev = _context36.next) {
8497
+ return _regenerator.default.wrap(function (_context37) {
8498
+ while (1) switch (_context37.prev = _context37.next) {
8424
8499
  case 0:
8425
- _context36.prev = 0;
8426
- _context36.next = 1;
8500
+ _context37.prev = 0;
8501
+ _context37.next = 1;
8427
8502
  return this.forceSendStatsReport({
8428
8503
  callFrom: 'cleanUpBeforeReconnection'
8429
8504
  });
8430
8505
  case 1:
8431
8506
  if (!this.statsAnalyzer) {
8432
- _context36.next = 2;
8507
+ _context37.next = 2;
8433
8508
  break;
8434
8509
  }
8435
- _context36.next = 2;
8510
+ _context37.next = 2;
8436
8511
  return this.statsAnalyzer.stopAnalyzer();
8437
8512
  case 2:
8438
- _context36.next = 4;
8513
+ _context37.next = 4;
8439
8514
  break;
8440
8515
  case 3:
8441
- _context36.prev = 3;
8442
- _t35 = _context36["catch"](0);
8516
+ _context37.prev = 3;
8517
+ _t35 = _context37["catch"](0);
8443
8518
  _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _t35);
8444
8519
  case 4:
8445
8520
  case "end":
8446
- return _context36.stop();
8521
+ return _context37.stop();
8447
8522
  }
8448
- }, _callee36, this, [[0, 3]]);
8523
+ }, _callee37, this, [[0, 3]]);
8449
8524
  }));
8450
8525
  function cleanUpBeforeReconnection() {
8451
8526
  return _cleanUpBeforeReconnection.apply(this, arguments);
@@ -8527,15 +8602,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8527
8602
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8528
8603
  return this.addMediaInternal(function () {
8529
8604
  return _this47.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
8530
- }, undefined, false, options);
8605
+ }, false, undefined /* turnServerInfo - it will be fetched via doTurnDiscovery() */, undefined /* iceTransportPolicy - we're relying on the default value */, options);
8531
8606
  }
8532
8607
 
8533
8608
  /**
8534
8609
  * Internal version of addMedia() with some more arguments for finer control of its behavior
8535
8610
  *
8536
8611
  * @param {Function} icePhaseCallback - callback to determine the icePhase for CA "client.ice.end" failure events
8537
- * @param {TurnServerInfo} turnServerInfo - TURN server information
8538
8612
  * @param {boolean} forceTurnDiscovery - if true, TURN discovery will be done
8613
+ * @param {TurnServerInfo} turnServerInfo - TURN server information
8614
+ * @param {RTCIceTransportPolicy} [iceTransportPolicy] - ICE transport policy override
8539
8615
  * @param {AddMediaOptions} options - same as options of the public addMedia() method
8540
8616
  * @returns {Promise<void>}
8541
8617
  * @protected
@@ -8544,7 +8620,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8544
8620
  }, {
8545
8621
  key: "addMediaInternal",
8546
8622
  value: (function () {
8547
- var _addMediaInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
8623
+ var _addMediaInternal = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38(icePhaseCallback, forceTurnDiscovery, turnServerInfo, iceTransportPolicy) {
8548
8624
  var options,
8549
8625
  LOG_HEADER,
8550
8626
  localStreams,
@@ -8573,7 +8649,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8573
8649
  receiveAudio,
8574
8650
  ipver,
8575
8651
  _this$remoteMediaMana,
8576
- _yield$this$mediaProp,
8652
+ _yield$this$mediaProp2,
8577
8653
  connectionType,
8578
8654
  ipVersion,
8579
8655
  selectedCandidatePairChanges,
@@ -8602,30 +8678,33 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8602
8678
  _this$mediaProperties33,
8603
8679
  _this$mediaProperties34,
8604
8680
  _reachabilityMetrics,
8605
- _yield$this$mediaProp2,
8681
+ _ref43,
8682
+ _connectionType,
8606
8683
  _selectedCandidatePairChanges,
8607
8684
  _numTransports,
8608
8685
  _iceCandidateErrors,
8609
- _args37 = arguments,
8686
+ _args38 = arguments,
8610
8687
  _t36,
8611
- _t37;
8612
- return _regenerator.default.wrap(function (_context37) {
8613
- while (1) switch (_context37.prev = _context37.next) {
8688
+ _t37,
8689
+ _t38;
8690
+ return _regenerator.default.wrap(function (_context38) {
8691
+ while (1) switch (_context38.prev = _context38.next) {
8614
8692
  case 0:
8615
- options = _args37.length > 3 && _args37[3] !== undefined ? _args37[3] : {};
8693
+ options = _args38.length > 4 && _args38[4] !== undefined ? _args38[4] : {};
8616
8694
  this.addMediaData.retriedWithTurnServer = false;
8617
8695
  this.addMediaData.icePhaseCallback = icePhaseCallback;
8696
+ this.addMediaData.iceTransportPolicy = iceTransportPolicy;
8618
8697
  this.hasMediaConnectionConnectedAtLeastOnce = false;
8619
8698
  LOG_HEADER = 'Meeting:index#addMedia -->';
8620
- _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: options=").concat((0, _stringify.default)(options), ", turnServerInfo=").concat((0, _stringify.default)(turnServerInfo), ", forceTurnDiscovery=").concat(forceTurnDiscovery));
8699
+ _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: options=").concat((0, _stringify.default)(options), ", turnServerInfo=").concat((0, _stringify.default)(turnServerInfo), ", forceTurnDiscovery=").concat(forceTurnDiscovery, ", iceTransportPolicy=").concat(iceTransportPolicy));
8621
8700
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
8622
- _context37.next = 1;
8701
+ _context38.next = 1;
8623
8702
  break;
8624
8703
  }
8625
8704
  throw new _webexErrors.MeetingNotActiveError();
8626
8705
  case 1:
8627
8706
  if (!_util2.default.isUserInLeftState(this.locusInfo)) {
8628
- _context37.next = 2;
8707
+ _context38.next = 2;
8629
8708
  break;
8630
8709
  }
8631
8710
  throw new _webexErrors.UserNotJoinedError();
@@ -8642,7 +8721,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8642
8721
  ipver = _util2.default.getIpVersion(this.webex); // used just for metrics
8643
8722
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
8644
8723
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
8645
- _context37.next = 3;
8724
+ _context38.next = 3;
8646
8725
  break;
8647
8726
  }
8648
8727
  throw new _webexErrors.UserInLobbyError();
@@ -8686,62 +8765,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8686
8765
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
8687
8766
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
8688
8767
  this.brbState = (0, _brbState.createBrbState)(this, false);
8689
- _context37.prev = 4;
8768
+ _context38.prev = 4;
8690
8769
  if (!(allowPublishMediaInLobby || !this.isUserUnadmitted)) {
8691
- _context37.next = 5;
8770
+ _context38.next = 5;
8692
8771
  break;
8693
8772
  }
8694
- _context37.next = 5;
8773
+ _context38.next = 5;
8695
8774
  return this.setUpLocalStreamReferences(localStreams);
8696
8775
  case 5:
8697
8776
  this.setMercuryListener();
8698
8777
  this.createStatsAnalyzer();
8699
- _context37.prev = 6;
8700
- _context37.next = 7;
8778
+ _context38.prev = 6;
8779
+ _context38.next = 7;
8701
8780
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
8702
8781
  case 7:
8703
- _context37.next = 12;
8782
+ _context38.next = 12;
8704
8783
  break;
8705
8784
  case 8:
8706
- _context37.prev = 8;
8707
- _t36 = _context37["catch"](6);
8785
+ _context38.prev = 8;
8786
+ _t36 = _context38["catch"](6);
8708
8787
  if (!(_t36 instanceof _multistreamNotSupportedError.default)) {
8709
- _context37.next = 11;
8788
+ _context38.next = 11;
8710
8789
  break;
8711
8790
  }
8712
8791
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
8713
- _context37.next = 9;
8792
+ _context38.next = 9;
8714
8793
  return this.downgradeFromMultistreamToTranscoded();
8715
8794
  case 9:
8716
- _context37.next = 10;
8717
- return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
8795
+ _context38.next = 10;
8796
+ return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
8718
8797
  case 10:
8719
- _context37.next = 12;
8798
+ _context38.next = 12;
8720
8799
  break;
8721
8800
  case 11:
8722
8801
  throw _t36;
8723
8802
  case 12:
8724
8803
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connected, finalizing..."));
8725
8804
  if (!this.mediaProperties.hasLocalShareStream()) {
8726
- _context37.next = 13;
8805
+ _context38.next = 13;
8727
8806
  break;
8728
8807
  }
8729
- _context37.next = 13;
8808
+ _context38.next = 13;
8730
8809
  return this.enqueueScreenShareFloorRequest();
8731
8810
  case 13:
8732
- _context37.next = 14;
8811
+ _context38.next = 14;
8733
8812
  return this.mediaProperties.getCurrentConnectionInfo();
8734
8813
  case 14:
8735
- _yield$this$mediaProp = _context37.sent;
8736
- connectionType = _yield$this$mediaProp.connectionType;
8737
- ipVersion = _yield$this$mediaProp.ipVersion;
8738
- selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
8739
- numTransports = _yield$this$mediaProp.numTransports;
8814
+ _yield$this$mediaProp2 = _context38.sent;
8815
+ connectionType = _yield$this$mediaProp2.connectionType;
8816
+ ipVersion = _yield$this$mediaProp2.ipVersion;
8817
+ selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
8818
+ numTransports = _yield$this$mediaProp2.numTransports;
8740
8819
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
8741
- _context37.next = 15;
8820
+ _context38.next = 15;
8742
8821
  return this.getMediaReachabilityMetricFields();
8743
8822
  case 15:
8744
- reachabilityMetrics = _context37.sent;
8823
+ reachabilityMetrics = _context38.sent;
8745
8824
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
8746
8825
  correlation_id: this.correlationId,
8747
8826
  locus_id: this.locusUrl.split('/').pop(),
@@ -8752,7 +8831,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8752
8831
  numTransports: numTransports,
8753
8832
  isMultistream: this.isMultistream,
8754
8833
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer,
8755
- isJoinWithMediaRetry: this.joinWithMediaRetryInfo.retryCount > 0
8834
+ isJoinWithMediaRetry: this.joinWithMediaRetryInfo.retryCount > 0,
8835
+ iceTransportPolicy: this.addMediaData.iceTransportPolicy || 'all'
8756
8836
  }, reachabilityMetrics), iceCandidateErrors), {}, {
8757
8837
  iceCandidatesCount: this.iceCandidatesCount
8758
8838
  }));
@@ -8771,24 +8851,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8771
8851
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
8772
8852
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
8773
8853
  this.startPeriodicLogUpload();
8774
- _context37.next = 20;
8854
+ _context38.next = 22;
8775
8855
  break;
8776
8856
  case 16:
8777
- _context37.prev = 16;
8778
- _t37 = _context37["catch"](4);
8857
+ _context38.prev = 16;
8858
+ _t37 = _context38["catch"](4);
8779
8859
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _t37);
8780
8860
 
8781
8861
  // @ts-ignore
8782
- _context37.next = 17;
8862
+ _context38.next = 17;
8783
8863
  return this.getMediaReachabilityMetricFields();
8784
8864
  case 17:
8785
- _reachabilityMetrics = _context37.sent;
8786
- _context37.next = 18;
8787
- return this.mediaProperties.getCurrentConnectionInfo();
8865
+ _reachabilityMetrics = _context38.sent;
8866
+ if (!(_t37 instanceof _webexErrors.AddMediaFailed)) {
8867
+ _context38.next = 18;
8868
+ break;
8869
+ }
8870
+ _t38 = _t37;
8871
+ _context38.next = 20;
8872
+ break;
8788
8873
  case 18:
8789
- _yield$this$mediaProp2 = _context37.sent;
8790
- _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
8791
- _numTransports = _yield$this$mediaProp2.numTransports;
8874
+ _context38.next = 19;
8875
+ return this.mediaProperties.getCurrentConnectionInfo();
8876
+ case 19:
8877
+ _t38 = _context38.sent;
8878
+ case 20:
8879
+ _ref43 = _t38;
8880
+ _connectionType = _ref43.connectionType;
8881
+ _selectedCandidatePairChanges = _ref43.selectedCandidatePairChanges;
8882
+ _numTransports = _ref43.numTransports;
8792
8883
  _iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
8793
8884
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread(_objectSpread(_objectSpread({
8794
8885
  correlation_id: this.correlationId,
@@ -8803,16 +8894,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8803
8894
  retriedWithTurnServer: this.addMediaData.retriedWithTurnServer,
8804
8895
  isMultistream: this.isMultistream,
8805
8896
  isJoinWithMediaRetry: this.joinWithMediaRetryInfo.retryCount > 0,
8897
+ iceTransportPolicy: this.addMediaData.iceTransportPolicy || 'all',
8806
8898
  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',
8807
8899
  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',
8808
- 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'
8900
+ 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',
8901
+ connectionType: _connectionType
8809
8902
  }, _reachabilityMetrics), _iceCandidateErrors), {}, {
8810
8903
  iceCandidatesCount: this.iceCandidatesCount,
8811
8904
  ipver: ipver
8812
8905
  }));
8813
- _context37.next = 19;
8906
+ _context38.next = 21;
8814
8907
  return this.cleanUpOnAddMediaFailure();
8815
- case 19:
8908
+ case 21:
8816
8909
  // Upload logs on error while adding media
8817
8910
  _triggerProxy.default.trigger(this, {
8818
8911
  file: 'meeting/index',
@@ -8824,17 +8917,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8824
8917
  });
8825
8918
  }
8826
8919
  throw _t37;
8827
- case 20:
8828
- _context37.prev = 20;
8920
+ case 22:
8921
+ _context38.prev = 22;
8829
8922
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
8830
- return _context37.finish(20);
8831
- case 21:
8923
+ return _context38.finish(22);
8924
+ case 23:
8832
8925
  case "end":
8833
- return _context37.stop();
8926
+ return _context38.stop();
8834
8927
  }
8835
- }, _callee37, this, [[4, 16, 20, 21], [6, 8]]);
8928
+ }, _callee38, this, [[4, 16, 22, 23], [6, 8]]);
8836
8929
  }));
8837
- function addMediaInternal(_x32, _x33, _x34) {
8930
+ function addMediaInternal(_x34, _x35, _x36, _x37) {
8838
8931
  return _addMediaInternal.apply(this, arguments);
8839
8932
  }
8840
8933
  return addMediaInternal;
@@ -8900,35 +8993,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8900
8993
  * @memberof Meeting
8901
8994
  */
8902
8995
  function () {
8903
- var _updateMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38(options) {
8996
+ var _updateMedia = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(options) {
8904
8997
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled, _this$audio3, _this$video3;
8905
- return _regenerator.default.wrap(function (_context38) {
8906
- while (1) switch (_context38.prev = _context38.next) {
8998
+ return _regenerator.default.wrap(function (_context39) {
8999
+ while (1) switch (_context39.prev = _context39.next) {
8907
9000
  case 0:
8908
9001
  this.checkMediaConnection();
8909
9002
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
8910
9003
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
8911
9004
  if (this.canUpdateMedia()) {
8912
- _context38.next = 1;
9005
+ _context39.next = 1;
8913
9006
  break;
8914
9007
  }
8915
- return _context38.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
9008
+ return _context39.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
8916
9009
  case 1:
8917
9010
  if (!this.isMultistream) {
8918
- _context38.next = 3;
9011
+ _context39.next = 3;
8919
9012
  break;
8920
9013
  }
8921
9014
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
8922
- _context38.next = 2;
9015
+ _context39.next = 2;
8923
9016
  break;
8924
9017
  }
8925
9018
  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');
8926
9019
  case 2:
8927
- _context38.next = 4;
9020
+ _context39.next = 4;
8928
9021
  break;
8929
9022
  case 3:
8930
9023
  if (!(shareAudioEnabled !== undefined)) {
8931
- _context38.next = 4;
9024
+ _context39.next = 4;
8932
9025
  break;
8933
9026
  }
8934
9027
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -8953,20 +9046,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8953
9046
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
8954
9047
  }
8955
9048
  if (this.isMultistream) {
8956
- _context38.next = 5;
9049
+ _context39.next = 5;
8957
9050
  break;
8958
9051
  }
8959
- _context38.next = 5;
9052
+ _context39.next = 5;
8960
9053
  return this.updateTranscodedMediaConnection();
8961
9054
  case 5:
8962
- return _context38.abrupt("return", undefined);
9055
+ return _context39.abrupt("return", undefined);
8963
9056
  case 6:
8964
9057
  case "end":
8965
- return _context38.stop();
9058
+ return _context39.stop();
8966
9059
  }
8967
- }, _callee38, this);
9060
+ }, _callee39, this);
8968
9061
  }));
8969
- function updateMedia(_x35) {
9062
+ function updateMedia(_x38) {
8970
9063
  return _updateMedia.apply(this, arguments);
8971
9064
  }
8972
9065
  return updateMedia;
@@ -9108,14 +9201,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9108
9201
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
9109
9202
  this.stopListeningForMeetingEvents();
9110
9203
  return _util2.default.leaveMeeting(this, options).then(/*#__PURE__*/function () {
9111
- var _ref42 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(leave) {
9112
- return _regenerator.default.wrap(function (_context39) {
9113
- while (1) switch (_context39.prev = _context39.next) {
9204
+ var _ref44 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40(leave) {
9205
+ return _regenerator.default.wrap(function (_context40) {
9206
+ while (1) switch (_context40.prev = _context40.next) {
9114
9207
  case 0:
9115
9208
  // CA team recommends submitting this *after* locus /leave
9116
9209
  submitLeaveMetric();
9117
9210
  _this51.meetingFiniteStateMachine.leave();
9118
- _context39.next = 1;
9211
+ _context40.next = 1;
9119
9212
  return _this51.clearMeetingData();
9120
9213
  case 1:
9121
9214
  // upload logs on leave irrespective of meeting delete
@@ -9136,15 +9229,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9136
9229
  });
9137
9230
  }
9138
9231
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
9139
- return _context39.abrupt("return", leave);
9232
+ return _context40.abrupt("return", leave);
9140
9233
  case 2:
9141
9234
  case "end":
9142
- return _context39.stop();
9235
+ return _context40.stop();
9143
9236
  }
9144
- }, _callee39);
9237
+ }, _callee40);
9145
9238
  }));
9146
- return function (_x36) {
9147
- return _ref42.apply(this, arguments);
9239
+ return function (_x39) {
9240
+ return _ref44.apply(this, arguments);
9148
9241
  };
9149
9242
  }()).catch(function (error) {
9150
9243
  // CA team recommends submitting this *after* locus /leave
@@ -9810,12 +9903,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9810
9903
  });
9811
9904
  this.stopListeningForMeetingEvents();
9812
9905
  return _util2.default.endMeetingForAll(this).then(/*#__PURE__*/function () {
9813
- var _ref43 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40(end) {
9814
- return _regenerator.default.wrap(function (_context40) {
9815
- while (1) switch (_context40.prev = _context40.next) {
9906
+ var _ref45 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41(end) {
9907
+ return _regenerator.default.wrap(function (_context41) {
9908
+ while (1) switch (_context41.prev = _context41.next) {
9816
9909
  case 0:
9817
9910
  _this58.meetingFiniteStateMachine.end();
9818
- _context40.next = 1;
9911
+ _context41.next = 1;
9819
9912
  return _this58.clearMeetingData();
9820
9913
  case 1:
9821
9914
  // upload logs on leave irrespective of meeting delete
@@ -9823,15 +9916,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9823
9916
  file: 'meeting/index',
9824
9917
  function: 'endMeetingForAll'
9825
9918
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this58);
9826
- return _context40.abrupt("return", end);
9919
+ return _context41.abrupt("return", end);
9827
9920
  case 2:
9828
9921
  case "end":
9829
- return _context40.stop();
9922
+ return _context41.stop();
9830
9923
  }
9831
- }, _callee40);
9924
+ }, _callee41);
9832
9925
  }));
9833
- return function (_x37) {
9834
- return _ref43.apply(this, arguments);
9926
+ return function (_x40) {
9927
+ return _ref45.apply(this, arguments);
9835
9928
  };
9836
9929
  }()).catch(function (error) {
9837
9930
  _this58.meetingFiniteStateMachine.fail(error);
@@ -9894,12 +9987,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9894
9987
  */
9895
9988
  }, {
9896
9989
  key: "extendMeeting",
9897
- value: function extendMeeting(_ref44) {
9898
- var meetingPolicyUrl = _ref44.meetingPolicyUrl,
9899
- meetingInstanceId = _ref44.meetingInstanceId,
9900
- participantId = _ref44.participantId,
9901
- _ref44$extensionMinut = _ref44.extensionMinutes,
9902
- extensionMinutes = _ref44$extensionMinut === void 0 ? 30 : _ref44$extensionMinut;
9990
+ value: function extendMeeting(_ref46) {
9991
+ var meetingPolicyUrl = _ref46.meetingPolicyUrl,
9992
+ meetingInstanceId = _ref46.meetingInstanceId,
9993
+ participantId = _ref46.participantId,
9994
+ _ref46$extensionMinut = _ref46.extensionMinutes,
9995
+ extensionMinutes = _ref46$extensionMinut === void 0 ? 30 : _ref46$extensionMinut;
9903
9996
  if (!meetingInstanceId || !participantId) {
9904
9997
  return _promise.default.reject(new Error('Missing meetingInstanceId or participantId'));
9905
9998
  }
@@ -9980,39 +10073,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
9980
10073
  }, {
9981
10074
  key: "enableMusicMode",
9982
10075
  value: (function () {
9983
- var _enableMusicMode = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41(shouldEnableMusicMode) {
9984
- return _regenerator.default.wrap(function (_context41) {
9985
- while (1) switch (_context41.prev = _context41.next) {
10076
+ var _enableMusicMode = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42(shouldEnableMusicMode) {
10077
+ return _regenerator.default.wrap(function (_context42) {
10078
+ while (1) switch (_context42.prev = _context42.next) {
9986
10079
  case 0:
9987
10080
  this.checkMediaConnection();
9988
10081
  if (this.isMultistream) {
9989
- _context41.next = 1;
10082
+ _context42.next = 1;
9990
10083
  break;
9991
10084
  }
9992
10085
  throw new Error('enableMusicMode() only supported with multistream');
9993
10086
  case 1:
9994
10087
  if (!shouldEnableMusicMode) {
9995
- _context41.next = 3;
10088
+ _context42.next = 3;
9996
10089
  break;
9997
10090
  }
9998
- _context41.next = 2;
10091
+ _context42.next = 2;
9999
10092
  return this.sendSlotManager.setCustomCodecParameters(_internalMediaCore.MediaType.AudioMain, _internalMediaCore.MediaCodecMimeType.OPUS, {
10000
10093
  maxaveragebitrate: '64000',
10001
10094
  maxplaybackrate: '48000'
10002
10095
  });
10003
10096
  case 2:
10004
- _context41.next = 4;
10097
+ _context42.next = 4;
10005
10098
  break;
10006
10099
  case 3:
10007
- _context41.next = 4;
10100
+ _context42.next = 4;
10008
10101
  return this.sendSlotManager.markCustomCodecParametersForDeletion(_internalMediaCore.MediaType.AudioMain, _internalMediaCore.MediaCodecMimeType.OPUS, ['maxaveragebitrate', 'maxplaybackrate']);
10009
10102
  case 4:
10010
10103
  case "end":
10011
- return _context41.stop();
10104
+ return _context42.stop();
10012
10105
  }
10013
- }, _callee41, this);
10106
+ }, _callee42, this);
10014
10107
  }));
10015
- function enableMusicMode(_x38) {
10108
+ function enableMusicMode(_x41) {
10016
10109
  return _enableMusicMode.apply(this, arguments);
10017
10110
  }
10018
10111
  return enableMusicMode;
@@ -10103,25 +10196,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10103
10196
  }, {
10104
10197
  key: "publishStream",
10105
10198
  value: (function () {
10106
- var _publishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42(mediaType, stream) {
10107
- return _regenerator.default.wrap(function (_context42) {
10108
- while (1) switch (_context42.prev = _context42.next) {
10199
+ var _publishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43(mediaType, stream) {
10200
+ return _regenerator.default.wrap(function (_context43) {
10201
+ while (1) switch (_context43.prev = _context43.next) {
10109
10202
  case 0:
10110
10203
  if (stream) {
10111
- _context42.next = 1;
10204
+ _context43.next = 1;
10112
10205
  break;
10113
10206
  }
10114
- return _context42.abrupt("return");
10207
+ return _context43.abrupt("return");
10115
10208
  case 1:
10116
10209
  if (!this.mediaProperties.webrtcMediaConnection) {
10117
- _context42.next = 3;
10210
+ _context43.next = 3;
10118
10211
  break;
10119
10212
  }
10120
10213
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
10121
- _context42.next = 2;
10214
+ _context43.next = 2;
10122
10215
  break;
10123
10216
  }
10124
- _context42.next = 2;
10217
+ _context43.next = 2;
10125
10218
  return this.sendSlotManager.publishStream(mediaType, stream);
10126
10219
  case 2:
10127
10220
  this.emitPublishStateChangeEvent({
@@ -10132,11 +10225,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10132
10225
  });
10133
10226
  case 3:
10134
10227
  case "end":
10135
- return _context42.stop();
10228
+ return _context43.stop();
10136
10229
  }
10137
- }, _callee42, this);
10230
+ }, _callee43, this);
10138
10231
  }));
10139
- function publishStream(_x39, _x40) {
10232
+ function publishStream(_x42, _x43) {
10140
10233
  return _publishStream.apply(this, arguments);
10141
10234
  }
10142
10235
  return publishStream;
@@ -10152,21 +10245,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10152
10245
  }, {
10153
10246
  key: "unpublishStream",
10154
10247
  value: (function () {
10155
- var _unpublishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43(mediaType, stream) {
10156
- return _regenerator.default.wrap(function (_context43) {
10157
- while (1) switch (_context43.prev = _context43.next) {
10248
+ var _unpublishStream = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44(mediaType, stream) {
10249
+ return _regenerator.default.wrap(function (_context44) {
10250
+ while (1) switch (_context44.prev = _context44.next) {
10158
10251
  case 0:
10159
10252
  if (stream) {
10160
- _context43.next = 1;
10253
+ _context44.next = 1;
10161
10254
  break;
10162
10255
  }
10163
- return _context43.abrupt("return");
10256
+ return _context44.abrupt("return");
10164
10257
  case 1:
10165
10258
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
10166
- _context43.next = 2;
10259
+ _context44.next = 2;
10167
10260
  break;
10168
10261
  }
10169
- _context43.next = 2;
10262
+ _context44.next = 2;
10170
10263
  return this.sendSlotManager.unpublishStream(mediaType);
10171
10264
  case 2:
10172
10265
  this.emitPublishStateChangeEvent({
@@ -10177,11 +10270,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10177
10270
  });
10178
10271
  case 3:
10179
10272
  case "end":
10180
- return _context43.stop();
10273
+ return _context44.stop();
10181
10274
  }
10182
- }, _callee43, this);
10275
+ }, _callee44, this);
10183
10276
  }));
10184
- function unpublishStream(_x41, _x42) {
10277
+ function unpublishStream(_x44, _x45) {
10185
10278
  return _unpublishStream.apply(this, arguments);
10186
10279
  }
10187
10280
  return unpublishStream;
@@ -10196,19 +10289,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10196
10289
  }, {
10197
10290
  key: "publishStreams",
10198
10291
  value: (function () {
10199
- var _publishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44(streams) {
10292
+ var _publishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45(streams) {
10200
10293
  var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4, _streams$screenShare5, _streams$screenShare6;
10201
10294
  var streamChecks, _i, _streamChecks, _streamChecks$_i, stream, name, floorRequestNeeded, _streams$screenShare7;
10202
- return _regenerator.default.wrap(function (_context44) {
10203
- while (1) switch (_context44.prev = _context44.next) {
10295
+ return _regenerator.default.wrap(function (_context45) {
10296
+ while (1) switch (_context45.prev = _context45.next) {
10204
10297
  case 0:
10205
10298
  _loggerProxy.default.logger.info("Meeting:index#publishStreams --> called with: ".concat((0, _stringify.default)(streams)));
10206
10299
  this.checkMediaConnection();
10207
10300
  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))) {
10208
- _context44.next = 1;
10301
+ _context45.next = 1;
10209
10302
  break;
10210
10303
  }
10211
- return _context44.abrupt("return");
10304
+ return _context45.abrupt("return");
10212
10305
  case 1:
10213
10306
  streamChecks = [{
10214
10307
  stream: streams === null || streams === void 0 ? void 0 : streams.microphone,
@@ -10226,62 +10319,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10226
10319
  _i = 0, _streamChecks = streamChecks;
10227
10320
  case 2:
10228
10321
  if (!(_i < _streamChecks.length)) {
10229
- _context44.next = 4;
10322
+ _context45.next = 4;
10230
10323
  break;
10231
10324
  }
10232
10325
  _streamChecks$_i = _streamChecks[_i], stream = _streamChecks$_i.stream, name = _streamChecks$_i.name;
10233
10326
  if (!((stream === null || stream === void 0 ? void 0 : stream.readyState) === 'ended')) {
10234
- _context44.next = 3;
10327
+ _context45.next = 3;
10235
10328
  break;
10236
10329
  }
10237
10330
  throw new Error("Attempted to publish ".concat(name, " stream with ended readyState, correlationId=").concat(this.correlationId));
10238
10331
  case 3:
10239
10332
  _i++;
10240
- _context44.next = 2;
10333
+ _context45.next = 2;
10241
10334
  break;
10242
10335
  case 4:
10243
10336
  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
10244
10337
  if (!(this.isMultistream && (_streams$screenShare5 = streams.screenShare) !== null && _streams$screenShare5 !== void 0 && _streams$screenShare5.audio)) {
10245
- _context44.next = 6;
10338
+ _context45.next = 6;
10246
10339
  break;
10247
10340
  }
10248
- _context44.next = 5;
10341
+ _context45.next = 5;
10249
10342
  return this.setLocalShareAudioStream(streams.screenShare.audio);
10250
10343
  case 5:
10251
10344
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
10252
10345
  case 6:
10253
10346
  if (!((_streams$screenShare6 = streams.screenShare) !== null && _streams$screenShare6 !== void 0 && _streams$screenShare6.video)) {
10254
- _context44.next = 8;
10347
+ _context45.next = 8;
10255
10348
  break;
10256
10349
  }
10257
- _context44.next = 7;
10350
+ _context45.next = 7;
10258
10351
  return this.setLocalShareVideoStream((_streams$screenShare7 = streams.screenShare) === null || _streams$screenShare7 === void 0 ? void 0 : _streams$screenShare7.video);
10259
10352
  case 7:
10260
10353
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
10261
10354
  case 8:
10262
10355
  if (!streams.microphone) {
10263
- _context44.next = 9;
10356
+ _context45.next = 9;
10264
10357
  break;
10265
10358
  }
10266
- _context44.next = 9;
10359
+ _context45.next = 9;
10267
10360
  return this.setLocalAudioStream(streams.microphone);
10268
10361
  case 9:
10269
10362
  if (!streams.camera) {
10270
- _context44.next = 10;
10363
+ _context45.next = 10;
10271
10364
  break;
10272
10365
  }
10273
- _context44.next = 10;
10366
+ _context45.next = 10;
10274
10367
  return this.setLocalVideoStream(streams.camera);
10275
10368
  case 10:
10276
10369
  if (this.isMultistream) {
10277
- _context44.next = 11;
10370
+ _context45.next = 11;
10278
10371
  break;
10279
10372
  }
10280
- _context44.next = 11;
10373
+ _context45.next = 11;
10281
10374
  return this.updateTranscodedMediaConnection();
10282
10375
  case 11:
10283
10376
  if (!floorRequestNeeded) {
10284
- _context44.next = 12;
10377
+ _context45.next = 12;
10285
10378
  break;
10286
10379
  }
10287
10380
  this.localShareInstanceId = _uuid.default.v4();
@@ -10312,15 +10405,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10312
10405
  // we're sending the http request to Locus to request the screen share floor
10313
10406
  // only after the SDP update, because that's how it's always been done for transcoded meetings
10314
10407
  // and also if sharing from the start, we need confluence to have been created
10315
- _context44.next = 12;
10408
+ _context45.next = 12;
10316
10409
  return this.enqueueScreenShareFloorRequest();
10317
10410
  case 12:
10318
10411
  case "end":
10319
- return _context44.stop();
10412
+ return _context45.stop();
10320
10413
  }
10321
- }, _callee44, this);
10414
+ }, _callee45, this);
10322
10415
  }));
10323
- function publishStreams(_x43) {
10416
+ function publishStreams(_x46) {
10324
10417
  return _publishStreams.apply(this, arguments);
10325
10418
  }
10326
10419
  return publishStreams;
@@ -10335,10 +10428,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10335
10428
  }, {
10336
10429
  key: "unpublishStreams",
10337
10430
  value: (function () {
10338
- var _unpublishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45(streams) {
10431
+ var _unpublishStreams = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee46(streams) {
10339
10432
  var promises, _iterator2, _step2, stream;
10340
- return _regenerator.default.wrap(function (_context45) {
10341
- while (1) switch (_context45.prev = _context45.next) {
10433
+ return _regenerator.default.wrap(function (_context46) {
10434
+ while (1) switch (_context46.prev = _context46.next) {
10342
10435
  case 0:
10343
10436
  _loggerProxy.default.logger.info("Meeting:index#unpublishStreams --> called with: ".concat((0, _stringify.default)(streams)));
10344
10437
  this.checkMediaConnection();
@@ -10370,7 +10463,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10370
10463
  if (!this.isMultistream) {
10371
10464
  promises.push(this.updateTranscodedMediaConnection());
10372
10465
  }
10373
- _context45.next = 1;
10466
+ _context46.next = 1;
10374
10467
  return _promise.default.all(promises);
10375
10468
  case 1:
10376
10469
  // we're allowing for the SDK to support just audio share as well
@@ -10391,11 +10484,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10391
10484
  }
10392
10485
  case 2:
10393
10486
  case "end":
10394
- return _context45.stop();
10487
+ return _context46.stop();
10395
10488
  }
10396
- }, _callee45, this);
10489
+ }, _callee46, this);
10397
10490
  }));
10398
- function unpublishStreams(_x44) {
10491
+ function unpublishStreams(_x47) {
10399
10492
  return _unpublishStreams.apply(this, arguments);
10400
10493
  }
10401
10494
  return unpublishStreams;
@@ -10461,16 +10554,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10461
10554
  }, {
10462
10555
  key: "getMediaReachabilityMetricFields",
10463
10556
  value: (function () {
10464
- var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee46() {
10557
+ var _getMediaReachabilityMetricFields = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee47() {
10465
10558
  var _this$mediaServerIp, _this$mediaConnection, _this$mediaConnection2, _this$mediaConnection3;
10466
10559
  var reachabilityMetrics, successKeys, totalSuccessCases, selectedSubnetFirstOctet, isSubnetReachable, selectedCluster;
10467
- return _regenerator.default.wrap(function (_context46) {
10468
- while (1) switch (_context46.prev = _context46.next) {
10560
+ return _regenerator.default.wrap(function (_context47) {
10561
+ while (1) switch (_context47.prev = _context47.next) {
10469
10562
  case 0:
10470
- _context46.next = 1;
10563
+ _context47.next = 1;
10471
10564
  return this.webex.meetings.reachability.getReachabilityMetrics();
10472
10565
  case 1:
10473
- reachabilityMetrics = _context46.sent;
10566
+ reachabilityMetrics = _context47.sent;
10474
10567
  successKeys = ['reachability_public_udp_success', 'reachability_public_tcp_success', 'reachability_public_xtls_success', 'reachability_vmn_udp_success', 'reachability_vmn_tcp_success', 'reachability_vmn_xtls_success'];
10475
10568
  totalSuccessCases = successKeys.reduce(function (total, key) {
10476
10569
  var value = reachabilityMetrics[key];
@@ -10487,16 +10580,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10487
10580
  this.webex.meetings.reachability.isSubnetReachable(selectedSubnetFirstOctet);
10488
10581
  }
10489
10582
  selectedCluster = (_this$mediaConnection = (_this$mediaConnection2 = this.mediaConnections) === null || _this$mediaConnection2 === void 0 ? void 0 : (_this$mediaConnection3 = _this$mediaConnection2[0]) === null || _this$mediaConnection3 === void 0 ? void 0 : _this$mediaConnection3.mediaAgentCluster) !== null && _this$mediaConnection !== void 0 ? _this$mediaConnection : null;
10490
- return _context46.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
10583
+ return _context47.abrupt("return", _objectSpread(_objectSpread({}, reachabilityMetrics), {}, {
10491
10584
  subnet_reachable: isSubnetReachable,
10492
10585
  selected_cluster: selectedCluster,
10493
10586
  selected_subnet: selectedSubnetFirstOctet ? "".concat(selectedSubnetFirstOctet, ".X.X.X") : null
10494
10587
  }));
10495
10588
  case 2:
10496
10589
  case "end":
10497
- return _context46.stop();
10590
+ return _context47.stop();
10498
10591
  }
10499
- }, _callee46, this);
10592
+ }, _callee47, this);
10500
10593
  }));
10501
10594
  function getMediaReachabilityMetricFields() {
10502
10595
  return _getMediaReachabilityMetricFields.apply(this, arguments);
@@ -10513,17 +10606,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10513
10606
  }, {
10514
10607
  key: "setStage",
10515
10608
  value: function setStage() {
10516
- var _ref45 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
10517
- _ref45$activeSpeakerP = _ref45.activeSpeakerProportion,
10518
- activeSpeakerProportion = _ref45$activeSpeakerP === void 0 ? 0.5 : _ref45$activeSpeakerP,
10519
- customBackground = _ref45.customBackground,
10520
- customLogo = _ref45.customLogo,
10521
- customNameLabel = _ref45.customNameLabel,
10522
- importantParticipants = _ref45.importantParticipants,
10523
- _ref45$lockAttendeeVi = _ref45.lockAttendeeViewOnStage,
10524
- lockAttendeeViewOnStage = _ref45$lockAttendeeVi === void 0 ? false : _ref45$lockAttendeeVi,
10525
- _ref45$showActiveSpea = _ref45.showActiveSpeaker,
10526
- showActiveSpeaker = _ref45$showActiveSpea === void 0 ? false : _ref45$showActiveSpea;
10609
+ var _ref47 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
10610
+ _ref47$activeSpeakerP = _ref47.activeSpeakerProportion,
10611
+ activeSpeakerProportion = _ref47$activeSpeakerP === void 0 ? 0.5 : _ref47$activeSpeakerP,
10612
+ customBackground = _ref47.customBackground,
10613
+ customLogo = _ref47.customLogo,
10614
+ customNameLabel = _ref47.customNameLabel,
10615
+ importantParticipants = _ref47.importantParticipants,
10616
+ _ref47$lockAttendeeVi = _ref47.lockAttendeeViewOnStage,
10617
+ lockAttendeeViewOnStage = _ref47$lockAttendeeVi === void 0 ? false : _ref47$lockAttendeeVi,
10618
+ _ref47$showActiveSpea = _ref47.showActiveSpeaker,
10619
+ showActiveSpeaker = _ref47$showActiveSpea === void 0 ? false : _ref47$showActiveSpea;
10527
10620
  var videoLayout = {
10528
10621
  overrideDefault: true,
10529
10622
  lockAttendeeViewOnStageOnly: lockAttendeeViewOnStage,
@@ -10627,41 +10720,41 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
10627
10720
  }, {
10628
10721
  key: "refreshDataChannelToken",
10629
10722
  value: (function () {
10630
- var _refreshDataChannelToken = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee47() {
10631
- var isPracticeSession, dataChannelTokenType, res, msg, _t38;
10632
- return _regenerator.default.wrap(function (_context47) {
10633
- while (1) switch (_context47.prev = _context47.next) {
10723
+ var _refreshDataChannelToken = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee48() {
10724
+ var isPracticeSession, dataChannelTokenType, res, msg, _t39;
10725
+ return _regenerator.default.wrap(function (_context48) {
10726
+ while (1) switch (_context48.prev = _context48.next) {
10634
10727
  case 0:
10635
10728
  isPracticeSession = this.webinar.isJoinPracticeSessionDataChannel();
10636
10729
  dataChannelTokenType = this.getDataChannelTokenType();
10637
- _context47.prev = 1;
10638
- _context47.next = 2;
10730
+ _context48.prev = 1;
10731
+ _context48.next = 2;
10639
10732
  return this.meetingRequest.fetchDatachannelToken({
10640
10733
  locusUrl: this.locusUrl,
10641
10734
  requestingParticipantId: this.members.selfId,
10642
10735
  isPracticeSession: isPracticeSession
10643
10736
  });
10644
10737
  case 2:
10645
- res = _context47.sent;
10646
- return _context47.abrupt("return", {
10738
+ res = _context48.sent;
10739
+ return _context48.abrupt("return", {
10647
10740
  body: {
10648
10741
  datachannelToken: res.body.datachannelToken,
10649
10742
  dataChannelTokenType: dataChannelTokenType
10650
10743
  }
10651
10744
  });
10652
10745
  case 3:
10653
- _context47.prev = 3;
10654
- _t38 = _context47["catch"](1);
10655
- msg = (_t38 === null || _t38 === void 0 ? void 0 : _t38.message) || String(_t38);
10746
+ _context48.prev = 3;
10747
+ _t39 = _context48["catch"](1);
10748
+ msg = (_t39 === null || _t39 === void 0 ? void 0 : _t39.message) || String(_t39);
10656
10749
  _loggerProxy.default.logger.warn("Meeting:index#refreshDataChannelToken --> DataChannel token refresh failed (likely locus changed or participant left): ".concat(msg), {
10657
- statusCode: _t38 === null || _t38 === void 0 ? void 0 : _t38.statusCode
10750
+ statusCode: _t39 === null || _t39 === void 0 ? void 0 : _t39.statusCode
10658
10751
  });
10659
- return _context47.abrupt("return", null);
10752
+ return _context48.abrupt("return", null);
10660
10753
  case 4:
10661
10754
  case "end":
10662
- return _context47.stop();
10755
+ return _context48.stop();
10663
10756
  }
10664
- }, _callee47, this, [[1, 3]]);
10757
+ }, _callee48, this, [[1, 3]]);
10665
10758
  }));
10666
10759
  function refreshDataChannelToken() {
10667
10760
  return _refreshDataChannelToken.apply(this, arguments);