@webex/plugin-meetings 3.6.0-next.16 → 3.6.0-next.17

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.
@@ -5376,6 +5376,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5376
5376
  if (!_util2.default.isMediaEstablished(this.currentMediaStatus)) {
5377
5377
  return _promise.default.reject(new _parameter.default('Cannot reconnect, Media has not established to reconnect'));
5378
5378
  }
5379
+ this.cleanUpBeforeReconnection();
5379
5380
  return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5380
5381
  return _regenerator.default.wrap(function _callee16$(_context16) {
5381
5382
  while (1) switch (_context16.prev = _context16.next) {
@@ -6934,6 +6935,43 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6934
6935
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
6935
6936
  }
6936
6937
  return cleanUpBeforeRetryWithTurnServer;
6938
+ }())
6939
+ }, {
6940
+ key: "cleanUpBeforeReconnection",
6941
+ value: function () {
6942
+ var _cleanUpBeforeReconnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
6943
+ return _regenerator.default.wrap(function _callee32$(_context32) {
6944
+ while (1) switch (_context32.prev = _context32.next) {
6945
+ case 0:
6946
+ _context32.prev = 0;
6947
+ _context32.next = 3;
6948
+ return this.forceSendStatsReport({
6949
+ callFrom: 'cleanUpBeforeReconnection'
6950
+ });
6951
+ case 3:
6952
+ if (!this.statsAnalyzer) {
6953
+ _context32.next = 6;
6954
+ break;
6955
+ }
6956
+ _context32.next = 6;
6957
+ return this.statsAnalyzer.stopAnalyzer();
6958
+ case 6:
6959
+ _context32.next = 11;
6960
+ break;
6961
+ case 8:
6962
+ _context32.prev = 8;
6963
+ _context32.t0 = _context32["catch"](0);
6964
+ _loggerProxy.default.logger.error('Meeting:index#cleanUpBeforeReconnection --> Error during cleanup: ', _context32.t0);
6965
+ case 11:
6966
+ case "end":
6967
+ return _context32.stop();
6968
+ }
6969
+ }, _callee32, this, [[0, 8]]);
6970
+ }));
6971
+ function cleanUpBeforeReconnection() {
6972
+ return _cleanUpBeforeReconnection.apply(this, arguments);
6973
+ }
6974
+ return cleanUpBeforeReconnection;
6937
6975
  }()
6938
6976
  /**
6939
6977
  * Creates an instance of LocusMediaRequest for this meeting - it is needed for doing any calls
@@ -6941,7 +6979,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6941
6979
  *
6942
6980
  * @returns {void}
6943
6981
  */
6944
- )
6945
6982
  }, {
6946
6983
  key: "setupLocusMediaRequest",
6947
6984
  value: function setupLocusMediaRequest() {
@@ -6997,7 +7034,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6997
7034
  }, {
6998
7035
  key: "addMediaInternal",
6999
7036
  value: (function () {
7000
- var _addMediaInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
7037
+ var _addMediaInternal = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(icePhaseCallback, turnServerInfo, forceTurnDiscovery) {
7001
7038
  var options,
7002
7039
  LOG_HEADER,
7003
7040
  localStreams,
@@ -7045,24 +7082,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7045
7082
  _selectedCandidatePairChanges,
7046
7083
  _numTransports,
7047
7084
  _iceCandidateErrors,
7048
- _args32 = arguments;
7049
- return _regenerator.default.wrap(function _callee32$(_context32) {
7050
- while (1) switch (_context32.prev = _context32.next) {
7085
+ _args33 = arguments;
7086
+ return _regenerator.default.wrap(function _callee33$(_context33) {
7087
+ while (1) switch (_context33.prev = _context33.next) {
7051
7088
  case 0:
7052
- options = _args32.length > 3 && _args32[3] !== undefined ? _args32[3] : {};
7089
+ options = _args33.length > 3 && _args33[3] !== undefined ? _args33[3] : {};
7053
7090
  this.addMediaData.retriedWithTurnServer = false;
7054
7091
  this.addMediaData.icePhaseCallback = icePhaseCallback;
7055
7092
  this.hasMediaConnectionConnectedAtLeastOnce = false;
7056
7093
  LOG_HEADER = 'Meeting:index#addMedia -->';
7057
7094
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: options=").concat((0, _stringify.default)(options), ", turnServerInfo=").concat((0, _stringify.default)(turnServerInfo), ", forceTurnDiscovery=").concat(forceTurnDiscovery));
7058
7095
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
7059
- _context32.next = 8;
7096
+ _context33.next = 8;
7060
7097
  break;
7061
7098
  }
7062
7099
  throw new _webexErrors.MeetingNotActiveError();
7063
7100
  case 8:
7064
7101
  if (!_util2.default.isUserInLeftState(this.locusInfo)) {
7065
- _context32.next = 10;
7102
+ _context33.next = 10;
7066
7103
  break;
7067
7104
  }
7068
7105
  throw new _webexErrors.UserNotJoinedError();
@@ -7073,7 +7110,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7073
7110
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
7074
7111
  // @ts-ignore - isUserUnadmitted coming from SelfUtil
7075
7112
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
7076
- _context32.next = 14;
7113
+ _context33.next = 14;
7077
7114
  break;
7078
7115
  }
7079
7116
  throw new _webexErrors.UserInLobbyError();
@@ -7116,45 +7153,45 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7116
7153
  });
7117
7154
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
7118
7155
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
7119
- _context32.prev = 18;
7120
- _context32.next = 21;
7156
+ _context33.prev = 18;
7157
+ _context33.next = 21;
7121
7158
  return this.setUpLocalStreamReferences(localStreams);
7122
7159
  case 21:
7123
7160
  this.setMercuryListener();
7124
7161
  this.createStatsAnalyzer();
7125
- _context32.next = 25;
7162
+ _context33.next = 25;
7126
7163
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
7127
7164
  case 25:
7128
7165
  if (!(audioEnabled || videoEnabled)) {
7129
- _context32.next = 30;
7166
+ _context33.next = 30;
7130
7167
  break;
7131
7168
  }
7132
- _context32.next = 28;
7169
+ _context33.next = 28;
7133
7170
  return Meeting.handleDeviceLogging(audioEnabled, videoEnabled);
7134
7171
  case 28:
7135
- _context32.next = 31;
7172
+ _context33.next = 31;
7136
7173
  break;
7137
7174
  case 30:
7138
7175
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " device logging not required"));
7139
7176
  case 31:
7140
7177
  if (!this.mediaProperties.hasLocalShareStream()) {
7141
- _context32.next = 34;
7178
+ _context33.next = 34;
7142
7179
  break;
7143
7180
  }
7144
- _context32.next = 34;
7181
+ _context33.next = 34;
7145
7182
  return this.enqueueScreenShareFloorRequest();
7146
7183
  case 34:
7147
- _context32.next = 36;
7184
+ _context33.next = 36;
7148
7185
  return this.mediaProperties.getCurrentConnectionInfo();
7149
7186
  case 36:
7150
- _yield$this$mediaProp = _context32.sent;
7187
+ _yield$this$mediaProp = _context33.sent;
7151
7188
  connectionType = _yield$this$mediaProp.connectionType;
7152
7189
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
7153
7190
  numTransports = _yield$this$mediaProp.numTransports;
7154
- _context32.next = 42;
7191
+ _context33.next = 42;
7155
7192
  return this.webex.meetings.reachability.getReachabilityMetrics();
7156
7193
  case 42:
7157
- reachabilityStats = _context32.sent;
7194
+ reachabilityStats = _context33.sent;
7158
7195
  iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7159
7196
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread(_objectSpread(_objectSpread({
7160
7197
  correlation_id: this.correlationId,
@@ -7179,31 +7216,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7179
7216
 
7180
7217
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
7181
7218
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
7182
- _context32.next = 68;
7219
+ _context33.next = 68;
7183
7220
  break;
7184
7221
  case 50:
7185
- _context32.prev = 50;
7186
- _context32.t0 = _context32["catch"](18);
7187
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context32.t0);
7222
+ _context33.prev = 50;
7223
+ _context33.t0 = _context33["catch"](18);
7224
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context33.t0);
7188
7225
 
7189
7226
  // @ts-ignore
7190
- _context32.next = 55;
7227
+ _context33.next = 55;
7191
7228
  return this.webex.meetings.reachability.getReachabilityMetrics();
7192
7229
  case 55:
7193
- reachabilityMetrics = _context32.sent;
7194
- _context32.next = 58;
7230
+ reachabilityMetrics = _context33.sent;
7231
+ _context33.next = 58;
7195
7232
  return this.mediaProperties.getCurrentConnectionInfo();
7196
7233
  case 58:
7197
- _yield$this$mediaProp2 = _context32.sent;
7234
+ _yield$this$mediaProp2 = _context33.sent;
7198
7235
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
7199
7236
  _numTransports = _yield$this$mediaProp2.numTransports;
7200
7237
  _iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
7201
7238
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread(_objectSpread(_objectSpread({
7202
7239
  correlation_id: this.correlationId,
7203
7240
  locus_id: this.locusUrl.split('/').pop(),
7204
- reason: _context32.t0.message,
7205
- stack: _context32.t0.stack,
7206
- code: _context32.t0.code,
7241
+ reason: _context33.t0.message,
7242
+ stack: _context33.t0.stack,
7243
+ code: _context33.t0.code,
7207
7244
  selectedCandidatePairChanges: _selectedCandidatePairChanges,
7208
7245
  numTransports: _numTransports,
7209
7246
  turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
@@ -7217,7 +7254,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7217
7254
  }, reachabilityMetrics), _iceCandidateErrors), {}, {
7218
7255
  iceCandidatesCount: this.iceCandidatesCount
7219
7256
  }));
7220
- _context32.next = 65;
7257
+ _context33.next = 65;
7221
7258
  return this.cleanUpOnAddMediaFailure();
7222
7259
  case 65:
7223
7260
  // Upload logs on error while adding media
@@ -7225,21 +7262,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7225
7262
  file: 'meeting/index',
7226
7263
  function: 'addMedia'
7227
7264
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
7228
- if (_context32.t0 instanceof _internalMediaCore.Errors.SdpError) {
7265
+ if (_context33.t0 instanceof _internalMediaCore.Errors.SdpError) {
7229
7266
  this.leave({
7230
7267
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
7231
7268
  });
7232
7269
  }
7233
- throw _context32.t0;
7270
+ throw _context33.t0;
7234
7271
  case 68:
7235
- _context32.prev = 68;
7272
+ _context33.prev = 68;
7236
7273
  this.addMediaData.icePhaseCallback = DEFAULT_ICE_PHASE_CALLBACK;
7237
- return _context32.finish(68);
7274
+ return _context33.finish(68);
7238
7275
  case 71:
7239
7276
  case "end":
7240
- return _context32.stop();
7277
+ return _context33.stop();
7241
7278
  }
7242
- }, _callee32, this, [[18, 50, 68, 71]]);
7279
+ }, _callee33, this, [[18, 50, 68, 71]]);
7243
7280
  }));
7244
7281
  function addMediaInternal(_x32, _x33, _x34) {
7245
7282
  return _addMediaInternal.apply(this, arguments);
@@ -7307,35 +7344,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7307
7344
  * @memberof Meeting
7308
7345
  */
7309
7346
  function () {
7310
- var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(options) {
7347
+ var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(options) {
7311
7348
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled, _this$audio3, _this$video3;
7312
- return _regenerator.default.wrap(function _callee33$(_context33) {
7313
- while (1) switch (_context33.prev = _context33.next) {
7349
+ return _regenerator.default.wrap(function _callee34$(_context34) {
7350
+ while (1) switch (_context34.prev = _context34.next) {
7314
7351
  case 0:
7315
7352
  this.checkMediaConnection();
7316
7353
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
7317
7354
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
7318
7355
  if (this.canUpdateMedia()) {
7319
- _context33.next = 5;
7356
+ _context34.next = 5;
7320
7357
  break;
7321
7358
  }
7322
- return _context33.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
7359
+ return _context34.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
7323
7360
  case 5:
7324
7361
  if (!this.isMultistream) {
7325
- _context33.next = 10;
7362
+ _context34.next = 10;
7326
7363
  break;
7327
7364
  }
7328
7365
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
7329
- _context33.next = 8;
7366
+ _context34.next = 8;
7330
7367
  break;
7331
7368
  }
7332
7369
  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');
7333
7370
  case 8:
7334
- _context33.next = 12;
7371
+ _context34.next = 12;
7335
7372
  break;
7336
7373
  case 10:
7337
7374
  if (!(shareAudioEnabled !== undefined)) {
7338
- _context33.next = 12;
7375
+ _context34.next = 12;
7339
7376
  break;
7340
7377
  }
7341
7378
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -7360,18 +7397,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7360
7397
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
7361
7398
  }
7362
7399
  if (this.isMultistream) {
7363
- _context33.next = 18;
7400
+ _context34.next = 18;
7364
7401
  break;
7365
7402
  }
7366
- _context33.next = 18;
7403
+ _context34.next = 18;
7367
7404
  return this.updateTranscodedMediaConnection();
7368
7405
  case 18:
7369
- return _context33.abrupt("return", undefined);
7406
+ return _context34.abrupt("return", undefined);
7370
7407
  case 19:
7371
7408
  case "end":
7372
- return _context33.stop();
7409
+ return _context34.stop();
7373
7410
  }
7374
- }, _callee33, this);
7411
+ }, _callee34, this);
7375
7412
  }));
7376
7413
  function updateMedia(_x35) {
7377
7414
  return _updateMedia.apply(this, arguments);
@@ -8292,37 +8329,37 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8292
8329
  }, {
8293
8330
  key: "enableMusicMode",
8294
8331
  value: (function () {
8295
- var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(shouldEnableMusicMode) {
8296
- return _regenerator.default.wrap(function _callee34$(_context34) {
8297
- while (1) switch (_context34.prev = _context34.next) {
8332
+ var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(shouldEnableMusicMode) {
8333
+ return _regenerator.default.wrap(function _callee35$(_context35) {
8334
+ while (1) switch (_context35.prev = _context35.next) {
8298
8335
  case 0:
8299
8336
  this.checkMediaConnection();
8300
8337
  if (this.isMultistream) {
8301
- _context34.next = 3;
8338
+ _context35.next = 3;
8302
8339
  break;
8303
8340
  }
8304
8341
  throw new Error('enableMusicMode() only supported with multistream');
8305
8342
  case 3:
8306
8343
  if (!shouldEnableMusicMode) {
8307
- _context34.next = 8;
8344
+ _context35.next = 8;
8308
8345
  break;
8309
8346
  }
8310
- _context34.next = 6;
8347
+ _context35.next = 6;
8311
8348
  return this.sendSlotManager.setCodecParameters(_internalMediaCore.MediaType.AudioMain, {
8312
8349
  maxaveragebitrate: '64000',
8313
8350
  maxplaybackrate: '48000'
8314
8351
  });
8315
8352
  case 6:
8316
- _context34.next = 10;
8353
+ _context35.next = 10;
8317
8354
  break;
8318
8355
  case 8:
8319
- _context34.next = 10;
8356
+ _context35.next = 10;
8320
8357
  return this.sendSlotManager.deleteCodecParameters(_internalMediaCore.MediaType.AudioMain, ['maxaveragebitrate', 'maxplaybackrate']);
8321
8358
  case 10:
8322
8359
  case "end":
8323
- return _context34.stop();
8360
+ return _context35.stop();
8324
8361
  }
8325
- }, _callee34, this);
8362
+ }, _callee35, this);
8326
8363
  }));
8327
8364
  function enableMusicMode(_x36) {
8328
8365
  return _enableMusicMode.apply(this, arguments);
@@ -8415,25 +8452,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8415
8452
  }, {
8416
8453
  key: "publishStream",
8417
8454
  value: (function () {
8418
- var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(mediaType, stream) {
8419
- return _regenerator.default.wrap(function _callee35$(_context35) {
8420
- while (1) switch (_context35.prev = _context35.next) {
8455
+ var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(mediaType, stream) {
8456
+ return _regenerator.default.wrap(function _callee36$(_context36) {
8457
+ while (1) switch (_context36.prev = _context36.next) {
8421
8458
  case 0:
8422
8459
  if (stream) {
8423
- _context35.next = 2;
8460
+ _context36.next = 2;
8424
8461
  break;
8425
8462
  }
8426
- return _context35.abrupt("return");
8463
+ return _context36.abrupt("return");
8427
8464
  case 2:
8428
8465
  if (!this.mediaProperties.webrtcMediaConnection) {
8429
- _context35.next = 7;
8466
+ _context36.next = 7;
8430
8467
  break;
8431
8468
  }
8432
8469
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
8433
- _context35.next = 6;
8470
+ _context36.next = 6;
8434
8471
  break;
8435
8472
  }
8436
- _context35.next = 6;
8473
+ _context36.next = 6;
8437
8474
  return this.sendSlotManager.publishStream(mediaType, stream);
8438
8475
  case 6:
8439
8476
  this.emitPublishStateChangeEvent({
@@ -8444,9 +8481,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8444
8481
  });
8445
8482
  case 7:
8446
8483
  case "end":
8447
- return _context35.stop();
8484
+ return _context36.stop();
8448
8485
  }
8449
- }, _callee35, this);
8486
+ }, _callee36, this);
8450
8487
  }));
8451
8488
  function publishStream(_x37, _x38) {
8452
8489
  return _publishStream.apply(this, arguments);
@@ -8464,21 +8501,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8464
8501
  }, {
8465
8502
  key: "unpublishStream",
8466
8503
  value: (function () {
8467
- var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(mediaType, stream) {
8468
- return _regenerator.default.wrap(function _callee36$(_context36) {
8469
- while (1) switch (_context36.prev = _context36.next) {
8504
+ var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(mediaType, stream) {
8505
+ return _regenerator.default.wrap(function _callee37$(_context37) {
8506
+ while (1) switch (_context37.prev = _context37.next) {
8470
8507
  case 0:
8471
8508
  if (stream) {
8472
- _context36.next = 2;
8509
+ _context37.next = 2;
8473
8510
  break;
8474
8511
  }
8475
- return _context36.abrupt("return");
8512
+ return _context37.abrupt("return");
8476
8513
  case 2:
8477
8514
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
8478
- _context36.next = 5;
8515
+ _context37.next = 5;
8479
8516
  break;
8480
8517
  }
8481
- _context36.next = 5;
8518
+ _context37.next = 5;
8482
8519
  return this.sendSlotManager.unpublishStream(mediaType);
8483
8520
  case 5:
8484
8521
  this.emitPublishStateChangeEvent({
@@ -8489,9 +8526,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8489
8526
  });
8490
8527
  case 6:
8491
8528
  case "end":
8492
- return _context36.stop();
8529
+ return _context37.stop();
8493
8530
  }
8494
- }, _callee36, this);
8531
+ }, _callee37, this);
8495
8532
  }));
8496
8533
  function unpublishStream(_x39, _x40) {
8497
8534
  return _unpublishStream.apply(this, arguments);
@@ -8508,19 +8545,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8508
8545
  }, {
8509
8546
  key: "publishStreams",
8510
8547
  value: (function () {
8511
- var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(streams) {
8548
+ var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(streams) {
8512
8549
  var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4, _streams$screenShare5, _streams$screenShare6;
8513
8550
  var streamChecks, _i, _streamChecks, _streamChecks$_i, stream, name, floorRequestNeeded, _streams$screenShare7;
8514
- return _regenerator.default.wrap(function _callee37$(_context37) {
8515
- while (1) switch (_context37.prev = _context37.next) {
8551
+ return _regenerator.default.wrap(function _callee38$(_context38) {
8552
+ while (1) switch (_context38.prev = _context38.next) {
8516
8553
  case 0:
8517
8554
  _loggerProxy.default.logger.info("Meeting:index#publishStreams --> called with: ".concat((0, _stringify.default)(streams)));
8518
8555
  this.checkMediaConnection();
8519
8556
  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))) {
8520
- _context37.next = 4;
8557
+ _context38.next = 4;
8521
8558
  break;
8522
8559
  }
8523
- return _context37.abrupt("return");
8560
+ return _context38.abrupt("return");
8524
8561
  case 4:
8525
8562
  streamChecks = [{
8526
8563
  stream: streams === null || streams === void 0 ? void 0 : streams.microphone,
@@ -8538,62 +8575,62 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8538
8575
  _i = 0, _streamChecks = streamChecks;
8539
8576
  case 6:
8540
8577
  if (!(_i < _streamChecks.length)) {
8541
- _context37.next = 13;
8578
+ _context38.next = 13;
8542
8579
  break;
8543
8580
  }
8544
8581
  _streamChecks$_i = _streamChecks[_i], stream = _streamChecks$_i.stream, name = _streamChecks$_i.name;
8545
8582
  if (!((stream === null || stream === void 0 ? void 0 : stream.readyState) === 'ended')) {
8546
- _context37.next = 10;
8583
+ _context38.next = 10;
8547
8584
  break;
8548
8585
  }
8549
8586
  throw new Error("Attempted to publish ".concat(name, " stream with ended readyState, correlationId=").concat(this.correlationId));
8550
8587
  case 10:
8551
8588
  _i++;
8552
- _context37.next = 6;
8589
+ _context38.next = 6;
8553
8590
  break;
8554
8591
  case 13:
8555
8592
  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
8556
8593
  if (!(this.isMultistream && (_streams$screenShare5 = streams.screenShare) !== null && _streams$screenShare5 !== void 0 && _streams$screenShare5.audio)) {
8557
- _context37.next = 18;
8594
+ _context38.next = 18;
8558
8595
  break;
8559
8596
  }
8560
- _context37.next = 17;
8597
+ _context38.next = 17;
8561
8598
  return this.setLocalShareAudioStream(streams.screenShare.audio);
8562
8599
  case 17:
8563
8600
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
8564
8601
  case 18:
8565
8602
  if (!((_streams$screenShare6 = streams.screenShare) !== null && _streams$screenShare6 !== void 0 && _streams$screenShare6.video)) {
8566
- _context37.next = 22;
8603
+ _context38.next = 22;
8567
8604
  break;
8568
8605
  }
8569
- _context37.next = 21;
8606
+ _context38.next = 21;
8570
8607
  return this.setLocalShareVideoStream((_streams$screenShare7 = streams.screenShare) === null || _streams$screenShare7 === void 0 ? void 0 : _streams$screenShare7.video);
8571
8608
  case 21:
8572
8609
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
8573
8610
  case 22:
8574
8611
  if (!streams.microphone) {
8575
- _context37.next = 25;
8612
+ _context38.next = 25;
8576
8613
  break;
8577
8614
  }
8578
- _context37.next = 25;
8615
+ _context38.next = 25;
8579
8616
  return this.setLocalAudioStream(streams.microphone);
8580
8617
  case 25:
8581
8618
  if (!streams.camera) {
8582
- _context37.next = 28;
8619
+ _context38.next = 28;
8583
8620
  break;
8584
8621
  }
8585
- _context37.next = 28;
8622
+ _context38.next = 28;
8586
8623
  return this.setLocalVideoStream(streams.camera);
8587
8624
  case 28:
8588
8625
  if (this.isMultistream) {
8589
- _context37.next = 31;
8626
+ _context38.next = 31;
8590
8627
  break;
8591
8628
  }
8592
- _context37.next = 31;
8629
+ _context38.next = 31;
8593
8630
  return this.updateTranscodedMediaConnection();
8594
8631
  case 31:
8595
8632
  if (!floorRequestNeeded) {
8596
- _context37.next = 37;
8633
+ _context38.next = 37;
8597
8634
  break;
8598
8635
  }
8599
8636
  this.localShareInstanceId = _uuid.default.v4();
@@ -8617,13 +8654,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8617
8654
  // we're sending the http request to Locus to request the screen share floor
8618
8655
  // only after the SDP update, because that's how it's always been done for transcoded meetings
8619
8656
  // and also if sharing from the start, we need confluence to have been created
8620
- _context37.next = 37;
8657
+ _context38.next = 37;
8621
8658
  return this.enqueueScreenShareFloorRequest();
8622
8659
  case 37:
8623
8660
  case "end":
8624
- return _context37.stop();
8661
+ return _context38.stop();
8625
8662
  }
8626
- }, _callee37, this);
8663
+ }, _callee38, this);
8627
8664
  }));
8628
8665
  function publishStreams(_x41) {
8629
8666
  return _publishStreams.apply(this, arguments);
@@ -8640,10 +8677,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8640
8677
  }, {
8641
8678
  key: "unpublishStreams",
8642
8679
  value: (function () {
8643
- var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(streams) {
8680
+ var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(streams) {
8644
8681
  var promises, _iterator, _step, stream;
8645
- return _regenerator.default.wrap(function _callee38$(_context38) {
8646
- while (1) switch (_context38.prev = _context38.next) {
8682
+ return _regenerator.default.wrap(function _callee39$(_context39) {
8683
+ while (1) switch (_context39.prev = _context39.next) {
8647
8684
  case 0:
8648
8685
  _loggerProxy.default.logger.info("Meeting:index#unpublishStreams --> called with: ".concat((0, _stringify.default)(streams)));
8649
8686
  this.checkMediaConnection();
@@ -8675,7 +8712,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8675
8712
  if (!this.isMultistream) {
8676
8713
  promises.push(this.updateTranscodedMediaConnection());
8677
8714
  }
8678
- _context38.next = 8;
8715
+ _context39.next = 8;
8679
8716
  return _promise.default.all(promises);
8680
8717
  case 8:
8681
8718
  // we're allowing for the SDK to support just audio share as well
@@ -8696,9 +8733,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8696
8733
  }
8697
8734
  case 9:
8698
8735
  case "end":
8699
- return _context38.stop();
8736
+ return _context39.stop();
8700
8737
  }
8701
- }, _callee38, this);
8738
+ }, _callee39, this);
8702
8739
  }));
8703
8740
  function unpublishStreams(_x42) {
8704
8741
  return _unpublishStreams.apply(this, arguments);
@@ -8760,55 +8797,55 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8760
8797
  }], [{
8761
8798
  key: "handleDeviceLogging",
8762
8799
  value: (function () {
8763
- var _handleDeviceLogging = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(isAudioEnabled, isVideoEnabled) {
8800
+ var _handleDeviceLogging = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40(isAudioEnabled, isVideoEnabled) {
8764
8801
  var devices;
8765
- return _regenerator.default.wrap(function _callee39$(_context39) {
8766
- while (1) switch (_context39.prev = _context39.next) {
8802
+ return _regenerator.default.wrap(function _callee40$(_context40) {
8803
+ while (1) switch (_context40.prev = _context40.next) {
8767
8804
  case 0:
8768
- _context39.prev = 0;
8805
+ _context40.prev = 0;
8769
8806
  devices = [];
8770
8807
  if (!(isVideoEnabled && isAudioEnabled)) {
8771
- _context39.next = 8;
8808
+ _context40.next = 8;
8772
8809
  break;
8773
8810
  }
8774
- _context39.next = 5;
8811
+ _context40.next = 5;
8775
8812
  return (0, _mediaHelpers.getDevices)();
8776
8813
  case 5:
8777
- devices = _context39.sent;
8778
- _context39.next = 18;
8814
+ devices = _context40.sent;
8815
+ _context40.next = 18;
8779
8816
  break;
8780
8817
  case 8:
8781
8818
  if (!isVideoEnabled) {
8782
- _context39.next = 14;
8819
+ _context40.next = 14;
8783
8820
  break;
8784
8821
  }
8785
- _context39.next = 11;
8822
+ _context40.next = 11;
8786
8823
  return (0, _mediaHelpers.getDevices)(_media.default.DeviceKind.VIDEO_INPUT);
8787
8824
  case 11:
8788
- devices = _context39.sent;
8789
- _context39.next = 18;
8825
+ devices = _context40.sent;
8826
+ _context40.next = 18;
8790
8827
  break;
8791
8828
  case 14:
8792
8829
  if (!isAudioEnabled) {
8793
- _context39.next = 18;
8830
+ _context40.next = 18;
8794
8831
  break;
8795
8832
  }
8796
- _context39.next = 17;
8833
+ _context40.next = 17;
8797
8834
  return (0, _mediaHelpers.getDevices)(_media.default.DeviceKind.AUDIO_INPUT);
8798
8835
  case 17:
8799
- devices = _context39.sent;
8836
+ devices = _context40.sent;
8800
8837
  case 18:
8801
8838
  _util2.default.handleDeviceLogging(devices);
8802
- _context39.next = 23;
8839
+ _context40.next = 23;
8803
8840
  break;
8804
8841
  case 21:
8805
- _context39.prev = 21;
8806
- _context39.t0 = _context39["catch"](0);
8842
+ _context40.prev = 21;
8843
+ _context40.t0 = _context40["catch"](0);
8807
8844
  case 23:
8808
8845
  case "end":
8809
- return _context39.stop();
8846
+ return _context40.stop();
8810
8847
  }
8811
- }, _callee39, null, [[0, 21]]);
8848
+ }, _callee40, null, [[0, 21]]);
8812
8849
  }));
8813
8850
  function handleDeviceLogging(_x43, _x44) {
8814
8851
  return _handleDeviceLogging.apply(this, arguments);