@webex/plugin-meetings 3.7.0-next.32 → 3.7.0-next.34

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 (36) hide show
  1. package/dist/annotation/index.js +17 -0
  2. package/dist/annotation/index.js.map +1 -1
  3. package/dist/breakouts/breakout.js +1 -1
  4. package/dist/breakouts/index.js +1 -1
  5. package/dist/common/errors/multistream-not-supported-error.js +53 -0
  6. package/dist/common/errors/multistream-not-supported-error.js.map +1 -0
  7. package/dist/constants.js +5 -0
  8. package/dist/constants.js.map +1 -1
  9. package/dist/interpretation/index.js +1 -1
  10. package/dist/interpretation/siLanguage.js +1 -1
  11. package/dist/meeting/index.js +256 -166
  12. package/dist/meeting/index.js.map +1 -1
  13. package/dist/meeting/locusMediaRequest.js +9 -0
  14. package/dist/meeting/locusMediaRequest.js.map +1 -1
  15. package/dist/meetings/util.js +1 -1
  16. package/dist/meetings/util.js.map +1 -1
  17. package/dist/roap/index.js +10 -8
  18. package/dist/roap/index.js.map +1 -1
  19. package/dist/types/annotation/index.d.ts +5 -0
  20. package/dist/types/common/errors/multistream-not-supported-error.d.ts +17 -0
  21. package/dist/types/constants.d.ts +5 -0
  22. package/dist/types/meeting/index.d.ts +11 -2
  23. package/dist/types/meeting/locusMediaRequest.d.ts +4 -0
  24. package/dist/webinar/index.js +1 -1
  25. package/package.json +21 -21
  26. package/src/annotation/index.ts +16 -0
  27. package/src/common/errors/multistream-not-supported-error.ts +30 -0
  28. package/src/constants.ts +5 -0
  29. package/src/meeting/index.ts +110 -27
  30. package/src/meeting/locusMediaRequest.ts +7 -0
  31. package/src/meetings/util.ts +2 -1
  32. package/src/roap/index.ts +10 -8
  33. package/test/unit/spec/annotation/index.ts +46 -1
  34. package/test/unit/spec/meeting/index.js +367 -21
  35. package/test/unit/spec/meetings/utils.js +10 -0
  36. package/test/unit/spec/roap/index.ts +47 -0
@@ -88,6 +88,7 @@ var _permission = _interopRequireDefault(require("../common/errors/permission"))
88
88
  var _locusMediaRequest = require("./locusMediaRequest");
89
89
  var _connectionStateHandler = require("./connectionStateHandler");
90
90
  var _joinWebinarError = _interopRequireDefault(require("../common/errors/join-webinar-error"));
91
+ var _multistreamNotSupportedError = _interopRequireDefault(require("../common/errors/multistream-not-supported-error"));
91
92
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && o[_Symbol$iterator] || o["@@iterator"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
92
93
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
93
94
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
@@ -567,8 +568,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
567
568
  if (
568
569
  // @ts-ignore - config coming from registerPlugin
569
570
  (_this.config.receiveReactions || options.receiveReactions) && _this.isReactionsSupported()) {
570
- var _this$members$members = _this.members.membersCollection.get(e.data.sender.participantId),
571
- name = _this$members$members.name;
571
+ var member = _this.members.membersCollection.get(e.data.sender.participantId);
572
+ if (!member) {
573
+ // @ts-ignore -- fix type
574
+ _loggerProxy.default.logger.warn("Meeting:index#processRelayEvent --> Skipping handling of ".concat(_constants3.REACTION_RELAY_TYPES.REACTION, " for ").concat(_this.id, ". participantId ").concat(e.data.sender.participantId, " does not exist in membersCollection."));
575
+ break;
576
+ }
577
+ var name = member.name;
572
578
  var processedReaction = {
573
579
  reaction: e.data.reaction,
574
580
  sender: {
@@ -675,6 +681,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
675
681
  */
676
682
  (0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "roapMessageReceived", function (roapMessage) {
677
683
  var mediaServer = _util3.default.getMediaServer(roapMessage.sdp);
684
+ if (_this.isMultistream && mediaServer !== 'homer') {
685
+ throw new _multistreamNotSupportedError.default("Client asked for multistream backend (Homer), but got ".concat(mediaServer, " instead"));
686
+ }
678
687
  _this.mediaProperties.webrtcMediaConnection.roapMessageReceived(roapMessage);
679
688
  if (mediaServer) {
680
689
  _this.mediaProperties.webrtcMediaConnection.mediaServer = mediaServer;
@@ -769,15 +778,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
769
778
  }), {
770
779
  logText: "".concat(LOG_HEADER, " Roap Offer")
771
780
  }).catch(function (error) {
781
+ var multistreamNotSupported = error instanceof _multistreamNotSupportedError.default;
782
+
772
783
  // @ts-ignore
773
784
  _this.webex.internal.newMetrics.submitClientEvent({
774
785
  name: 'client.media-engine.remote-sdp-received',
775
786
  payload: {
776
- canProceed: false,
787
+ canProceed: multistreamNotSupported,
777
788
  errors: [
778
789
  // @ts-ignore
779
790
  _this.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
780
- clientErrorCode: _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MISSING_ROAP_ANSWER_CLIENT_CODE
791
+ clientErrorCode: multistreamNotSupported ? _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MULTISTREAM_NOT_AVAILABLE_CLIENT_CODE : _internalPluginMetrics.CALL_DIAGNOSTIC_CONFIG.MISSING_ROAP_ANSWER_CLIENT_CODE
781
792
  })]
782
793
  },
783
794
  options: {
@@ -785,7 +796,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
785
796
  rawError: error
786
797
  }
787
798
  });
788
- _this.deferSDPAnswer.reject(new Error('failed to send ROAP SDP offer'));
799
+ _this.deferSDPAnswer.reject(error);
789
800
  clearTimeout(_this.sdpResponseTimer);
790
801
  _this.sdpResponseTimer = undefined;
791
802
  });
@@ -1351,6 +1362,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1351
1362
  _this.stopTranscription();
1352
1363
  _this.transcription = undefined;
1353
1364
  }
1365
+ _this.annotation.deregisterEvents();
1366
+
1367
+ // @ts-ignore - fix types
1368
+ _this.webex.internal.llm.off('event:relay.event', _this.processRelayEvent);
1354
1369
  });
1355
1370
  /**
1356
1371
  * starts keepAlives being sent
@@ -1376,10 +1391,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
1376
1391
  _loggerProxy.default.logger.warn('Meeting:index#startKeepAlive --> keepAlive not started: keepAliveSecs <= 1');
1377
1392
  return;
1378
1393
  }
1379
- var keepAliveUrl = _this.joinedWith.keepAliveUrl;
1380
1394
  var keepAliveInterval = (_this.joinedWith.keepAliveSecs - 1) * 750; // taken from UCF
1381
1395
 
1382
1396
  _this.keepAliveTimerId = setInterval(function () {
1397
+ var keepAliveUrl = _this.joinedWith.keepAliveUrl;
1383
1398
  _this.meetingRequest.keepAlive({
1384
1399
  keepAliveUrl: keepAliveUrl
1385
1400
  }).catch(function (error) {
@@ -5063,6 +5078,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5063
5078
  * Close the peer connections and remove them from the class.
5064
5079
  * Cleanup any media connection related things.
5065
5080
  *
5081
+ * @param {boolean} resetMuteStates whether to also reset the audio/video mute state information
5066
5082
  * @returns {Promise}
5067
5083
  * @public
5068
5084
  * @memberof Meeting
@@ -5070,6 +5086,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5070
5086
  }, {
5071
5087
  key: "closePeerConnections",
5072
5088
  value: function closePeerConnections() {
5089
+ var resetMuteStates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
5073
5090
  if (this.mediaProperties.webrtcMediaConnection) {
5074
5091
  if (this.remoteMediaManager) {
5075
5092
  this.remoteMediaManager.stop();
@@ -5083,8 +5100,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5083
5100
  this.sendSlotManager.reset();
5084
5101
  this.setNetworkStatus(undefined);
5085
5102
  }
5086
- this.audio = null;
5087
- this.video = null;
5103
+ if (resetMuteStates) {
5104
+ this.audio = null;
5105
+ this.video = null;
5106
+ }
5088
5107
  return _promise.default.resolve();
5089
5108
  }
5090
5109
 
@@ -5348,7 +5367,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5348
5367
  * @param {Object} options - options to join with media
5349
5368
  * @param {JoinOptions} [options.joinOptions] - see #join()
5350
5369
  * @param {AddMediaOptions} [options.mediaOptions] - see #addMedia()
5351
- * @returns {Promise} -- {join: see join(), media: see addMedia()}
5370
+ * @returns {Promise} -- {join: see join(), media: see addMedia(), multistreamEnabled: flag to indicate if we managed to join in multistream mode}
5352
5371
  * @public
5353
5372
  * @memberof Meeting
5354
5373
  * @example
@@ -5456,32 +5475,43 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5456
5475
  };
5457
5476
  return _context16.abrupt("return", {
5458
5477
  join: joinResponse,
5459
- media: mediaResponse
5478
+ media: mediaResponse,
5479
+ multistreamEnabled: this.isMultistream
5460
5480
  });
5461
5481
  case 42:
5462
5482
  _context16.prev = 42;
5463
5483
  _context16.t0 = _context16["catch"](9);
5464
5484
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _context16.t0);
5465
5485
  this.roap.abortTurnDiscovery();
5466
- if (!(joined && isRetry)) {
5467
- _context16.next = 56;
5486
+
5487
+ // if this was the first attempt, let's do a retry
5488
+ shouldRetry = !isRetry;
5489
+ if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_context16.t0)) {
5490
+ // errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
5491
+ // so there is no point doing a retry
5492
+ shouldRetry = false;
5493
+ }
5494
+
5495
+ // we only want to call leave if join was successful and this was a retry or we won't be doing any more retries
5496
+ if (!(joined && (isRetry || !shouldRetry))) {
5497
+ _context16.next = 58;
5468
5498
  break;
5469
5499
  }
5470
- _context16.prev = 47;
5471
- _context16.next = 50;
5500
+ _context16.prev = 49;
5501
+ _context16.next = 52;
5472
5502
  return this.leave({
5473
5503
  resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
5474
5504
  reason: 'joinWithMedia failure'
5475
5505
  });
5476
- case 50:
5477
- _context16.next = 56;
5478
- break;
5479
5506
  case 52:
5480
- _context16.prev = 52;
5481
- _context16.t1 = _context16["catch"](47);
5507
+ _context16.next = 58;
5508
+ break;
5509
+ case 54:
5510
+ _context16.prev = 54;
5511
+ _context16.t1 = _context16["catch"](49);
5482
5512
  _loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _context16.t1);
5483
5513
  leaveError = _context16.t1;
5484
- case 56:
5514
+ case 58:
5485
5515
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
5486
5516
  correlation_id: this.correlationId,
5487
5517
  locus_id: (_this$locusUrl = this.locusUrl) === null || _this$locusUrl === void 0 ? void 0 : _this$locusUrl.split('/').pop(),
@@ -5493,14 +5523,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5493
5523
  }, {
5494
5524
  type: _context16.t0.name
5495
5525
  });
5496
-
5497
- // if this was the first attempt, let's do a retry
5498
- shouldRetry = !isRetry;
5499
- if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_context16.t0)) {
5500
- // errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
5501
- // so there is no point doing a retry
5502
- shouldRetry = false;
5503
- }
5504
5526
  if (!shouldRetry) {
5505
5527
  _context16.next = 64;
5506
5528
  break;
@@ -5519,7 +5541,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5519
5541
  case "end":
5520
5542
  return _context16.stop();
5521
5543
  }
5522
- }, _callee16, this, [[9, 42], [47, 52]]);
5544
+ }, _callee16, this, [[9, 42], [49, 54]]);
5523
5545
  }));
5524
5546
  function joinWithMedia() {
5525
5547
  return _joinWithMedia.apply(this, arguments);
@@ -5769,6 +5791,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5769
5791
 
5770
5792
  // @ts-ignore
5771
5793
  this.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION, this.voiceaListenerCallbacks[_internalPluginVoicea.EVENT_TRIGGERS.NEW_CAPTION]);
5794
+
5795
+ // @ts-ignore
5796
+ this.webex.internal.voicea.deregisterEvents();
5772
5797
  this.areVoiceaEventsSetup = false;
5773
5798
  this.triggerStopReceivingTranscriptionEvent();
5774
5799
  }
@@ -6963,7 +6988,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6963
6988
  return this.createMediaConnection(turnServerInfo, bundlePolicy);
6964
6989
  case 11:
6965
6990
  mc = _context30.sent;
6966
- _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created"));
6991
+ _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created this.isMultistream=").concat(this.isMultistream));
6967
6992
  if (!this.isMultistream) {
6968
6993
  _context30.next = 21;
6969
6994
  break;
@@ -7058,6 +7083,49 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7058
7083
  }
7059
7084
  return cleanUpOnAddMediaFailure;
7060
7085
  }()
7086
+ /**
7087
+ * Cleans up stats analyzer, peer connection and other things before
7088
+ * we can create a new transcoded media connection
7089
+ *
7090
+ * @private
7091
+ * @returns {Promise<void>}
7092
+ */
7093
+ )
7094
+ }, {
7095
+ key: "downgradeFromMultistreamToTranscoded",
7096
+ value: (function () {
7097
+ var _downgradeFromMultistreamToTranscoded = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
7098
+ var _this$locusMediaReque2;
7099
+ return _regenerator.default.wrap(function _callee32$(_context32) {
7100
+ while (1) switch (_context32.prev = _context32.next) {
7101
+ case 0:
7102
+ if (!this.statsAnalyzer) {
7103
+ _context32.next = 3;
7104
+ break;
7105
+ }
7106
+ _context32.next = 3;
7107
+ return this.statsAnalyzer.stopAnalyzer();
7108
+ case 3:
7109
+ this.statsAnalyzer = null;
7110
+ this.isMultistream = false;
7111
+ if (this.mediaProperties.webrtcMediaConnection) {
7112
+ // close peer connection, but don't reset mute state information, because we will want to use it on the retry
7113
+ this.closePeerConnections(false);
7114
+ this.mediaProperties.unsetPeerConnection();
7115
+ }
7116
+ (_this$locusMediaReque2 = this.locusMediaRequest) === null || _this$locusMediaReque2 === void 0 ? void 0 : _this$locusMediaReque2.downgradeFromMultistreamToTranscoded();
7117
+ this.createStatsAnalyzer();
7118
+ case 8:
7119
+ case "end":
7120
+ return _context32.stop();
7121
+ }
7122
+ }, _callee32, this);
7123
+ }));
7124
+ function downgradeFromMultistreamToTranscoded() {
7125
+ return _downgradeFromMultistreamToTranscoded.apply(this, arguments);
7126
+ }
7127
+ return downgradeFromMultistreamToTranscoded;
7128
+ }()
7061
7129
  /**
7062
7130
  * Sends stats report, closes peer connection and cleans up any media connection
7063
7131
  * related things before trying to establish media connection again with turn server
@@ -7069,11 +7137,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7069
7137
  }, {
7070
7138
  key: "cleanUpBeforeRetryWithTurnServer",
7071
7139
  value: (function () {
7072
- var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
7073
- return _regenerator.default.wrap(function _callee32$(_context32) {
7074
- while (1) switch (_context32.prev = _context32.next) {
7140
+ var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33() {
7141
+ return _regenerator.default.wrap(function _callee33$(_context33) {
7142
+ while (1) switch (_context33.prev = _context33.next) {
7075
7143
  case 0:
7076
- _context32.next = 2;
7144
+ _context33.next = 2;
7077
7145
  return this.forceSendStatsReport({
7078
7146
  callFrom: 'cleanUpBeforeRetryWithTurnServer'
7079
7147
  });
@@ -7093,9 +7161,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7093
7161
  }
7094
7162
  case 3:
7095
7163
  case "end":
7096
- return _context32.stop();
7164
+ return _context33.stop();
7097
7165
  }
7098
- }, _callee32, this);
7166
+ }, _callee33, this);
7099
7167
  }));
7100
7168
  function cleanUpBeforeRetryWithTurnServer() {
7101
7169
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
@@ -7105,34 +7173,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7105
7173
  }, {
7106
7174
  key: "cleanUpBeforeReconnection",
7107
7175
  value: function () {
7108
- var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33() {
7109
- return _regenerator.default.wrap(function _callee33$(_context33) {
7110
- while (1) switch (_context33.prev = _context33.next) {
7176
+ var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34() {
7177
+ return _regenerator.default.wrap(function _callee34$(_context34) {
7178
+ while (1) switch (_context34.prev = _context34.next) {
7111
7179
  case 0:
7112
- _context33.prev = 0;
7113
- _context33.next = 3;
7180
+ _context34.prev = 0;
7181
+ _context34.next = 3;
7114
7182
  return this.forceSendStatsReport({
7115
7183
  callFrom: 'cleanUpBeforeReconnection'
7116
7184
  });
7117
7185
  case 3:
7118
7186
  if (!this.statsAnalyzer) {
7119
- _context33.next = 6;
7187
+ _context34.next = 6;
7120
7188
  break;
7121
7189
  }
7122
- _context33.next = 6;
7190
+ _context34.next = 6;
7123
7191
  return this.statsAnalyzer.stopAnalyzer();
7124
7192
  case 6:
7125
- _context33.next = 11;
7193
+ _context34.next = 11;
7126
7194
  break;
7127
7195
  case 8:
7128
- _context33.prev = 8;
7129
- _context33.t0 = _context33["catch"](0);
7130
- _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _context33.t0);
7196
+ _context34.prev = 8;
7197
+ _context34.t0 = _context34["catch"](0);
7198
+ _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _context34.t0);
7131
7199
  case 11:
7132
7200
  case "end":
7133
- return _context33.stop();
7201
+ return _context34.stop();
7134
7202
  }
7135
- }, _callee33, this, [[0, 8]]);
7203
+ }, _callee34, this, [[0, 8]]);
7136
7204
  }));
7137
7205
  function cleanUpBeforeReconnection() {
7138
7206
  return _cleanUpBeforeReconnection.apply(this, arguments);
@@ -7200,7 +7268,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7200
7268
  }, {
7201
7269
  key: "addMediaInternal",
7202
7270
  value: (function () {
7203
- var _addMediaInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
7271
+ var _addMediaInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
7204
7272
  var options,
7205
7273
  LOG_HEADER,
7206
7274
  localStreams,
@@ -7248,24 +7316,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7248
7316
  _selectedCandidatePairChanges,
7249
7317
  _numTransports,
7250
7318
  _iceCandidateErrors,
7251
- _args34 = arguments;
7252
- return _regenerator.default.wrap(function _callee34$(_context34) {
7253
- while (1) switch (_context34.prev = _context34.next) {
7319
+ _args35 = arguments;
7320
+ return _regenerator.default.wrap(function _callee35$(_context35) {
7321
+ while (1) switch (_context35.prev = _context35.next) {
7254
7322
  case 0:
7255
- options = _args34.length > 3 && _args34[3] !== undefined ? _args34[3] : {};
7323
+ options = _args35.length > 3 && _args35[3] !== undefined ? _args35[3] : {};
7256
7324
  this.addMediaData.retriedWithTurnServer = false;
7257
7325
  this.addMediaData.icePhaseCallback = icePhaseCallback;
7258
7326
  this.hasMediaConnectionConnectedAtLeastOnce = false;
7259
7327
  LOG_HEADER = 'Meeting:index#addMedia -->';
7260
7328
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: options=").concat((0, _stringify.default)(options), ", turnServerInfo=").concat((0, _stringify.default)(turnServerInfo), ", forceTurnDiscovery=").concat(forceTurnDiscovery));
7261
7329
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
7262
- _context34.next = 8;
7330
+ _context35.next = 8;
7263
7331
  break;
7264
7332
  }
7265
7333
  throw new _webexErrors.MeetingNotActiveError();
7266
7334
  case 8:
7267
7335
  if (!_util2.default.isUserInLeftState(this.locusInfo)) {
7268
- _context34.next = 10;
7336
+ _context35.next = 10;
7269
7337
  break;
7270
7338
  }
7271
7339
  throw new _webexErrors.UserNotJoinedError();
@@ -7276,7 +7344,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7276
7344
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
7277
7345
  // @ts-ignore - isUserUnadmitted coming from SelfUtil
7278
7346
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
7279
- _context34.next = 14;
7347
+ _context35.next = 14;
7280
7348
  break;
7281
7349
  }
7282
7350
  throw new _webexErrors.UserInLobbyError();
@@ -7319,33 +7387,55 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7319
7387
  });
7320
7388
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
7321
7389
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
7322
- _context34.prev = 18;
7323
- _context34.next = 21;
7390
+ _context35.prev = 18;
7391
+ _context35.next = 21;
7324
7392
  return this.setUpLocalStreamReferences(localStreams);
7325
7393
  case 21:
7326
7394
  this.setMercuryListener();
7327
7395
  this.createStatsAnalyzer();
7328
- _context34.next = 25;
7396
+ _context35.prev = 23;
7397
+ _context35.next = 26;
7329
7398
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
7330
- case 25:
7399
+ case 26:
7400
+ _context35.next = 39;
7401
+ break;
7402
+ case 28:
7403
+ _context35.prev = 28;
7404
+ _context35.t0 = _context35["catch"](23);
7405
+ if (!(_context35.t0 instanceof _multistreamNotSupportedError.default)) {
7406
+ _context35.next = 38;
7407
+ break;
7408
+ }
7409
+ _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " we asked for multistream backend (Homer), but got transcoded backend, recreating media connection..."));
7410
+ _context35.next = 34;
7411
+ return this.downgradeFromMultistreamToTranscoded();
7412
+ case 34:
7413
+ _context35.next = 36;
7414
+ return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true, undefined);
7415
+ case 36:
7416
+ _context35.next = 39;
7417
+ break;
7418
+ case 38:
7419
+ throw _context35.t0;
7420
+ case 39:
7331
7421
  if (!this.mediaProperties.hasLocalShareStream()) {
7332
- _context34.next = 28;
7422
+ _context35.next = 42;
7333
7423
  break;
7334
7424
  }
7335
- _context34.next = 28;
7425
+ _context35.next = 42;
7336
7426
  return this.enqueueScreenShareFloorRequest();
7337
- case 28:
7338
- _context34.next = 30;
7427
+ case 42:
7428
+ _context35.next = 44;
7339
7429
  return this.mediaProperties.getCurrentConnectionInfo();
7340
- case 30:
7341
- _yield$this$mediaProp = _context34.sent;
7430
+ case 44:
7431
+ _yield$this$mediaProp = _context35.sent;
7342
7432
  connectionType = _yield$this$mediaProp.connectionType;
7343
7433
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
7344
7434
  numTransports = _yield$this$mediaProp.numTransports;
7345
- _context34.next = 36;
7435
+ _context35.next = 50;
7346
7436
  return this.webex.meetings.reachability.getReachabilityMetrics();
7347
- case 36:
7348
- reachabilityStats = _context34.sent;
7437
+ case 50:
7438
+ reachabilityStats = _context35.sent;
7349
7439
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7350
7440
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
7351
7441
  correlation_id: this.correlationId,
@@ -7371,31 +7461,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7371
7461
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
7372
7462
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
7373
7463
  this.startPeriodicLogUpload();
7374
- _context34.next = 63;
7464
+ _context35.next = 77;
7375
7465
  break;
7376
- case 45:
7377
- _context34.prev = 45;
7378
- _context34.t0 = _context34["catch"](18);
7379
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context34.t0);
7466
+ case 59:
7467
+ _context35.prev = 59;
7468
+ _context35.t1 = _context35["catch"](18);
7469
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context35.t1);
7380
7470
 
7381
7471
  // @ts-ignore
7382
- _context34.next = 50;
7472
+ _context35.next = 64;
7383
7473
  return this.webex.meetings.reachability.getReachabilityMetrics();
7384
- case 50:
7385
- reachabilityMetrics = _context34.sent;
7386
- _context34.next = 53;
7474
+ case 64:
7475
+ reachabilityMetrics = _context35.sent;
7476
+ _context35.next = 67;
7387
7477
  return this.mediaProperties.getCurrentConnectionInfo();
7388
- case 53:
7389
- _yield$this$mediaProp2 = _context34.sent;
7478
+ case 67:
7479
+ _yield$this$mediaProp2 = _context35.sent;
7390
7480
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
7391
7481
  _numTransports = _yield$this$mediaProp2.numTransports;
7392
7482
  _iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7393
7483
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread(_objectSpread(_objectSpread({
7394
7484
  correlation_id: this.correlationId,
7395
7485
  locus_id: this.locusUrl.split('/').pop(),
7396
- reason: _context34.t0.message,
7397
- stack: _context34.t0.stack,
7398
- code: _context34.t0.code,
7486
+ reason: _context35.t1.message,
7487
+ stack: _context35.t1.stack,
7488
+ code: _context35.t1.code,
7399
7489
  selectedCandidatePairChanges: _selectedCandidatePairChanges,
7400
7490
  numTransports: _numTransports,
7401
7491
  turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
@@ -7409,29 +7499,29 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7409
7499
  }, reachabilityMetrics), _iceCandidateErrors), {}, {
7410
7500
  iceCandidatesCount: this.iceCandidatesCount
7411
7501
  }));
7412
- _context34.next = 60;
7502
+ _context35.next = 74;
7413
7503
  return this.cleanUpOnAddMediaFailure();
7414
- case 60:
7504
+ case 74:
7415
7505
  // Upload logs on error while adding media
7416
7506
  _triggerProxy.default.trigger(this, {
7417
7507
  file: 'meeting/index',
7418
7508
  function: 'addMedia'
7419
7509
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
7420
- if (_context34.t0 instanceof _internalMediaCore.Errors.SdpError) {
7510
+ if (_context35.t1 instanceof _internalMediaCore.Errors.SdpError) {
7421
7511
  this.leave({
7422
7512
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
7423
7513
  });
7424
7514
  }
7425
- throw _context34.t0;
7426
- case 63:
7427
- _context34.prev = 63;
7515
+ throw _context35.t1;
7516
+ case 77:
7517
+ _context35.prev = 77;
7428
7518
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
7429
- return _context34.finish(63);
7430
- case 66:
7519
+ return _context35.finish(77);
7520
+ case 80:
7431
7521
  case "end":
7432
- return _context34.stop();
7522
+ return _context35.stop();
7433
7523
  }
7434
- }, _callee34, this, [[18, 45, 63, 66]]);
7524
+ }, _callee35, this, [[18, 59, 77, 80], [23, 28]]);
7435
7525
  }));
7436
7526
  function addMediaInternal(_x33, _x34, _x35) {
7437
7527
  return _addMediaInternal.apply(this, arguments);
@@ -7499,35 +7589,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7499
7589
  * @memberof Meeting
7500
7590
  */
7501
7591
  function () {
7502
- var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(options) {
7592
+ var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(options) {
7503
7593
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled, _this$audio3, _this$video3;
7504
- return _regenerator.default.wrap(function _callee35$(_context35) {
7505
- while (1) switch (_context35.prev = _context35.next) {
7594
+ return _regenerator.default.wrap(function _callee36$(_context36) {
7595
+ while (1) switch (_context36.prev = _context36.next) {
7506
7596
  case 0:
7507
7597
  this.checkMediaConnection();
7508
7598
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
7509
7599
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
7510
7600
  if (this.canUpdateMedia()) {
7511
- _context35.next = 5;
7601
+ _context36.next = 5;
7512
7602
  break;
7513
7603
  }
7514
- return _context35.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
7604
+ return _context36.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
7515
7605
  case 5:
7516
7606
  if (!this.isMultistream) {
7517
- _context35.next = 10;
7607
+ _context36.next = 10;
7518
7608
  break;
7519
7609
  }
7520
7610
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
7521
- _context35.next = 8;
7611
+ _context36.next = 8;
7522
7612
  break;
7523
7613
  }
7524
7614
  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');
7525
7615
  case 8:
7526
- _context35.next = 12;
7616
+ _context36.next = 12;
7527
7617
  break;
7528
7618
  case 10:
7529
7619
  if (!(shareAudioEnabled !== undefined)) {
7530
- _context35.next = 12;
7620
+ _context36.next = 12;
7531
7621
  break;
7532
7622
  }
7533
7623
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -7552,18 +7642,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7552
7642
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
7553
7643
  }
7554
7644
  if (this.isMultistream) {
7555
- _context35.next = 18;
7645
+ _context36.next = 18;
7556
7646
  break;
7557
7647
  }
7558
- _context35.next = 18;
7648
+ _context36.next = 18;
7559
7649
  return this.updateTranscodedMediaConnection();
7560
7650
  case 18:
7561
- return _context35.abrupt("return", undefined);
7651
+ return _context36.abrupt("return", undefined);
7562
7652
  case 19:
7563
7653
  case "end":
7564
- return _context35.stop();
7654
+ return _context36.stop();
7565
7655
  }
7566
- }, _callee35, this);
7656
+ }, _callee36, this);
7567
7657
  }));
7568
7658
  function updateMedia(_x36) {
7569
7659
  return _updateMedia.apply(this, arguments);
@@ -8205,7 +8295,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8205
8295
  }
8206
8296
  if (layoutType) {
8207
8297
  if (!_constants.LAYOUT_TYPES.includes(layoutType)) {
8208
- return this.rejectWithErrorLog('Meeting:index#changeVideoLayout --> cannot change video layout, invalid layoutType received.');
8298
+ return this.rejectWithErrorLog("Meeting:index#changeVideoLayout --> cannot change video layout, invalid layoutType \"".concat(layoutType, "\" received."));
8209
8299
  }
8210
8300
  layoutInfo.layoutType = layoutType;
8211
8301
  }
@@ -8484,37 +8574,37 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8484
8574
  }, {
8485
8575
  key: "enableMusicMode",
8486
8576
  value: (function () {
8487
- var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(shouldEnableMusicMode) {
8488
- return _regenerator.default.wrap(function _callee36$(_context36) {
8489
- while (1) switch (_context36.prev = _context36.next) {
8577
+ var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(shouldEnableMusicMode) {
8578
+ return _regenerator.default.wrap(function _callee37$(_context37) {
8579
+ while (1) switch (_context37.prev = _context37.next) {
8490
8580
  case 0:
8491
8581
  this.checkMediaConnection();
8492
8582
  if (this.isMultistream) {
8493
- _context36.next = 3;
8583
+ _context37.next = 3;
8494
8584
  break;
8495
8585
  }
8496
8586
  throw new Error('enableMusicMode() only supported with multistream');
8497
8587
  case 3:
8498
8588
  if (!shouldEnableMusicMode) {
8499
- _context36.next = 8;
8589
+ _context37.next = 8;
8500
8590
  break;
8501
8591
  }
8502
- _context36.next = 6;
8592
+ _context37.next = 6;
8503
8593
  return this.sendSlotManager.setCodecParameters(_internalMediaCore.MediaType.AudioMain, {
8504
8594
  maxaveragebitrate: '64000',
8505
8595
  maxplaybackrate: '48000'
8506
8596
  });
8507
8597
  case 6:
8508
- _context36.next = 10;
8598
+ _context37.next = 10;
8509
8599
  break;
8510
8600
  case 8:
8511
- _context36.next = 10;
8601
+ _context37.next = 10;
8512
8602
  return this.sendSlotManager.deleteCodecParameters(_internalMediaCore.MediaType.AudioMain, ['maxaveragebitrate', 'maxplaybackrate']);
8513
8603
  case 10:
8514
8604
  case "end":
8515
- return _context36.stop();
8605
+ return _context37.stop();
8516
8606
  }
8517
- }, _callee36, this);
8607
+ }, _callee37, this);
8518
8608
  }));
8519
8609
  function enableMusicMode(_x37) {
8520
8610
  return _enableMusicMode.apply(this, arguments);
@@ -8607,25 +8697,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8607
8697
  }, {
8608
8698
  key: "publishStream",
8609
8699
  value: (function () {
8610
- var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(mediaType, stream) {
8611
- return _regenerator.default.wrap(function _callee37$(_context37) {
8612
- while (1) switch (_context37.prev = _context37.next) {
8700
+ var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(mediaType, stream) {
8701
+ return _regenerator.default.wrap(function _callee38$(_context38) {
8702
+ while (1) switch (_context38.prev = _context38.next) {
8613
8703
  case 0:
8614
8704
  if (stream) {
8615
- _context37.next = 2;
8705
+ _context38.next = 2;
8616
8706
  break;
8617
8707
  }
8618
- return _context37.abrupt("return");
8708
+ return _context38.abrupt("return");
8619
8709
  case 2:
8620
8710
  if (!this.mediaProperties.webrtcMediaConnection) {
8621
- _context37.next = 7;
8711
+ _context38.next = 7;
8622
8712
  break;
8623
8713
  }
8624
8714
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
8625
- _context37.next = 6;
8715
+ _context38.next = 6;
8626
8716
  break;
8627
8717
  }
8628
- _context37.next = 6;
8718
+ _context38.next = 6;
8629
8719
  return this.sendSlotManager.publishStream(mediaType, stream);
8630
8720
  case 6:
8631
8721
  this.emitPublishStateChangeEvent({
@@ -8636,9 +8726,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8636
8726
  });
8637
8727
  case 7:
8638
8728
  case "end":
8639
- return _context37.stop();
8729
+ return _context38.stop();
8640
8730
  }
8641
- }, _callee37, this);
8731
+ }, _callee38, this);
8642
8732
  }));
8643
8733
  function publishStream(_x38, _x39) {
8644
8734
  return _publishStream.apply(this, arguments);
@@ -8656,21 +8746,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8656
8746
  }, {
8657
8747
  key: "unpublishStream",
8658
8748
  value: (function () {
8659
- var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(mediaType, stream) {
8660
- return _regenerator.default.wrap(function _callee38$(_context38) {
8661
- while (1) switch (_context38.prev = _context38.next) {
8749
+ var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(mediaType, stream) {
8750
+ return _regenerator.default.wrap(function _callee39$(_context39) {
8751
+ while (1) switch (_context39.prev = _context39.next) {
8662
8752
  case 0:
8663
8753
  if (stream) {
8664
- _context38.next = 2;
8754
+ _context39.next = 2;
8665
8755
  break;
8666
8756
  }
8667
- return _context38.abrupt("return");
8757
+ return _context39.abrupt("return");
8668
8758
  case 2:
8669
8759
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
8670
- _context38.next = 5;
8760
+ _context39.next = 5;
8671
8761
  break;
8672
8762
  }
8673
- _context38.next = 5;
8763
+ _context39.next = 5;
8674
8764
  return this.sendSlotManager.unpublishStream(mediaType);
8675
8765
  case 5:
8676
8766
  this.emitPublishStateChangeEvent({
@@ -8681,9 +8771,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8681
8771
  });
8682
8772
  case 6:
8683
8773
  case "end":
8684
- return _context38.stop();
8774
+ return _context39.stop();
8685
8775
  }
8686
- }, _callee38, this);
8776
+ }, _callee39, this);
8687
8777
  }));
8688
8778
  function unpublishStream(_x40, _x41) {
8689
8779
  return _unpublishStream.apply(this, arguments);
@@ -8700,19 +8790,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8700
8790
  }, {
8701
8791
  key: "publishStreams",
8702
8792
  value: (function () {
8703
- var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(streams) {
8793
+ var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40(streams) {
8704
8794
  var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4, _streams$screenShare5, _streams$screenShare6;
8705
8795
  var streamChecks, _i, _streamChecks, _streamChecks$_i, stream, name, floorRequestNeeded, _streams$screenShare7;
8706
- return _regenerator.default.wrap(function _callee39$(_context39) {
8707
- while (1) switch (_context39.prev = _context39.next) {
8796
+ return _regenerator.default.wrap(function _callee40$(_context40) {
8797
+ while (1) switch (_context40.prev = _context40.next) {
8708
8798
  case 0:
8709
8799
  _loggerProxy.default.logger.info("Meeting:index#publishStreams --> called with: ".concat((0, _stringify.default)(streams)));
8710
8800
  this.checkMediaConnection();
8711
8801
  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))) {
8712
- _context39.next = 4;
8802
+ _context40.next = 4;
8713
8803
  break;
8714
8804
  }
8715
- return _context39.abrupt("return");
8805
+ return _context40.abrupt("return");
8716
8806
  case 4:
8717
8807
  streamChecks = [{
8718
8808
  stream: streams === null || streams === void 0 ? void 0 : streams.microphone,
@@ -8730,62 +8820,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8730
8820
  _i = 0, _streamChecks = streamChecks;
8731
8821
  case 6:
8732
8822
  if (!(_i < _streamChecks.length)) {
8733
- _context39.next = 13;
8823
+ _context40.next = 13;
8734
8824
  break;
8735
8825
  }
8736
8826
  _streamChecks$_i = _streamChecks[_i], stream = _streamChecks$_i.stream, name = _streamChecks$_i.name;
8737
8827
  if (!((stream === null || stream === void 0 ? void 0 : stream.readyState) === 'ended')) {
8738
- _context39.next = 10;
8828
+ _context40.next = 10;
8739
8829
  break;
8740
8830
  }
8741
8831
  throw new Error("Attempted to publish ".concat(name, " stream with ended readyState, correlationId=").concat(this.correlationId));
8742
8832
  case 10:
8743
8833
  _i++;
8744
- _context39.next = 6;
8834
+ _context40.next = 6;
8745
8835
  break;
8746
8836
  case 13:
8747
8837
  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
8748
8838
  if (!(this.isMultistream && (_streams$screenShare5 = streams.screenShare) !== null && _streams$screenShare5 !== void 0 && _streams$screenShare5.audio)) {
8749
- _context39.next = 18;
8839
+ _context40.next = 18;
8750
8840
  break;
8751
8841
  }
8752
- _context39.next = 17;
8842
+ _context40.next = 17;
8753
8843
  return this.setLocalShareAudioStream(streams.screenShare.audio);
8754
8844
  case 17:
8755
8845
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
8756
8846
  case 18:
8757
8847
  if (!((_streams$screenShare6 = streams.screenShare) !== null && _streams$screenShare6 !== void 0 && _streams$screenShare6.video)) {
8758
- _context39.next = 22;
8848
+ _context40.next = 22;
8759
8849
  break;
8760
8850
  }
8761
- _context39.next = 21;
8851
+ _context40.next = 21;
8762
8852
  return this.setLocalShareVideoStream((_streams$screenShare7 = streams.screenShare) === null || _streams$screenShare7 === void 0 ? void 0 : _streams$screenShare7.video);
8763
8853
  case 21:
8764
8854
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
8765
8855
  case 22:
8766
8856
  if (!streams.microphone) {
8767
- _context39.next = 25;
8857
+ _context40.next = 25;
8768
8858
  break;
8769
8859
  }
8770
- _context39.next = 25;
8860
+ _context40.next = 25;
8771
8861
  return this.setLocalAudioStream(streams.microphone);
8772
8862
  case 25:
8773
8863
  if (!streams.camera) {
8774
- _context39.next = 28;
8864
+ _context40.next = 28;
8775
8865
  break;
8776
8866
  }
8777
- _context39.next = 28;
8867
+ _context40.next = 28;
8778
8868
  return this.setLocalVideoStream(streams.camera);
8779
8869
  case 28:
8780
8870
  if (this.isMultistream) {
8781
- _context39.next = 31;
8871
+ _context40.next = 31;
8782
8872
  break;
8783
8873
  }
8784
- _context39.next = 31;
8874
+ _context40.next = 31;
8785
8875
  return this.updateTranscodedMediaConnection();
8786
8876
  case 31:
8787
8877
  if (!floorRequestNeeded) {
8788
- _context39.next = 37;
8878
+ _context40.next = 37;
8789
8879
  break;
8790
8880
  }
8791
8881
  this.localShareInstanceId = _uuid.default.v4();
@@ -8809,13 +8899,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8809
8899
  // we're sending the http request to Locus to request the screen share floor
8810
8900
  // only after the SDP update, because that's how it's always been done for transcoded meetings
8811
8901
  // and also if sharing from the start, we need confluence to have been created
8812
- _context39.next = 37;
8902
+ _context40.next = 37;
8813
8903
  return this.enqueueScreenShareFloorRequest();
8814
8904
  case 37:
8815
8905
  case "end":
8816
- return _context39.stop();
8906
+ return _context40.stop();
8817
8907
  }
8818
- }, _callee39, this);
8908
+ }, _callee40, this);
8819
8909
  }));
8820
8910
  function publishStreams(_x42) {
8821
8911
  return _publishStreams.apply(this, arguments);
@@ -8832,10 +8922,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8832
8922
  }, {
8833
8923
  key: "unpublishStreams",
8834
8924
  value: (function () {
8835
- var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40(streams) {
8925
+ var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(streams) {
8836
8926
  var promises, _iterator, _step, stream;
8837
- return _regenerator.default.wrap(function _callee40$(_context40) {
8838
- while (1) switch (_context40.prev = _context40.next) {
8927
+ return _regenerator.default.wrap(function _callee41$(_context41) {
8928
+ while (1) switch (_context41.prev = _context41.next) {
8839
8929
  case 0:
8840
8930
  _loggerProxy.default.logger.info("Meeting:index#unpublishStreams --> called with: ".concat((0, _stringify.default)(streams)));
8841
8931
  this.checkMediaConnection();
@@ -8867,7 +8957,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8867
8957
  if (!this.isMultistream) {
8868
8958
  promises.push(this.updateTranscodedMediaConnection());
8869
8959
  }
8870
- _context40.next = 8;
8960
+ _context41.next = 8;
8871
8961
  return _promise.default.all(promises);
8872
8962
  case 8:
8873
8963
  // we're allowing for the SDK to support just audio share as well
@@ -8888,9 +8978,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8888
8978
  }
8889
8979
  case 9:
8890
8980
  case "end":
8891
- return _context40.stop();
8981
+ return _context41.stop();
8892
8982
  }
8893
- }, _callee40, this);
8983
+ }, _callee41, this);
8894
8984
  }));
8895
8985
  function unpublishStreams(_x43) {
8896
8986
  return _unpublishStreams.apply(this, arguments);