@webex/plugin-meetings 3.1.0-next.7 → 3.1.0-next.9

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.
@@ -54,6 +54,7 @@ var _muteState = require("./muteState");
54
54
  var _locusInfo = _interopRequireDefault(require("../locus-info"));
55
55
  var _metrics = _interopRequireDefault(require("../metrics"));
56
56
  var _reconnectionManager = _interopRequireDefault(require("../reconnection-manager"));
57
+ var _reconnectionNotStarted = _interopRequireDefault(require("../common/errors/reconnection-not-started"));
57
58
  var _request = _interopRequireDefault(require("./request"));
58
59
  var _index2 = _interopRequireDefault(require("../members/index"));
59
60
  var _util2 = _interopRequireDefault(require("./util"));
@@ -64,8 +65,6 @@ var _util6 = _interopRequireDefault(require("../media/util"));
64
65
  var _reactions = require("../reactions/reactions");
65
66
  var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
66
67
  var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
67
- var _reconnection = _interopRequireDefault(require("../common/errors/reconnection"));
68
- var _reconnectionInProgress = _interopRequireDefault(require("../common/errors/reconnection-in-progress"));
69
68
  var _constants = require("../constants");
70
69
  var _constants2 = _interopRequireDefault(require("../metrics/constants"));
71
70
  var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
@@ -5073,66 +5072,33 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5073
5072
  if (!_util2.default.isMediaEstablished(this.currentMediaStatus)) {
5074
5073
  return _promise.default.reject(new _parameter.default('Cannot reconnect, Media has not established to reconnect'));
5075
5074
  }
5076
- try {
5077
- _loggerProxy.default.logger.info('Meeting:index#reconnect --> Validating reconnect ability.');
5078
- // @ts-ignore
5079
- this.reconnectionManager.validate();
5080
- } catch (error) {
5081
- // Unable to reconnect this call
5082
- if (error instanceof _reconnectionInProgress.default) {
5083
- _loggerProxy.default.logger.info('Meeting:index#reconnect --> Unable to reconnect, reconnection in progress.');
5084
- } else {
5085
- _loggerProxy.default.logger.log('Meeting:index#reconnect --> Unable to reconnect.', error);
5086
- }
5087
- return _promise.default.resolve();
5088
- }
5089
- _triggerProxy.default.trigger(this, {
5090
- file: 'meeting/index',
5091
- function: 'reconnect'
5092
- }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING);
5093
- return this.reconnectionManager.reconnect(options).then(function () {
5094
- return _this28.waitForRemoteSDPAnswer();
5095
- }).then(function () {
5096
- return _this28.waitForMediaConnectionConnected();
5097
- }).then(function () {
5098
- _triggerProxy.default.trigger(_this28, {
5099
- file: 'meeting/index',
5100
- function: 'reconnect'
5101
- }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_SUCCESS);
5102
- _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
5103
-
5104
- // @ts-ignore
5105
- _this28.webex.internal.newMetrics.submitClientEvent({
5106
- name: 'client.media.recovered',
5107
- payload: {
5108
- recoveredBy: 'new'
5109
- },
5110
- options: {
5111
- meetingId: _this28.id
5075
+ return this.reconnectionManager.reconnect(options, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
5076
+ return _regenerator.default.wrap(function _callee16$(_context16) {
5077
+ while (1) switch (_context16.prev = _context16.next) {
5078
+ case 0:
5079
+ _context16.next = 2;
5080
+ return _this28.waitForRemoteSDPAnswer();
5081
+ case 2:
5082
+ _context16.next = 4;
5083
+ return _this28.waitForMediaConnectionConnected();
5084
+ case 4:
5085
+ case "end":
5086
+ return _context16.stop();
5112
5087
  }
5113
- });
5114
- _this28.reconnectionManager.setStatus(_constants.RECONNECTION.STATE.COMPLETE);
5088
+ }, _callee16);
5089
+ }))).then(function () {
5090
+ _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
5115
5091
  }).catch(function (error) {
5116
- _triggerProxy.default.trigger(_this28, {
5117
- file: 'meeting/index',
5118
- function: 'reconnect'
5119
- }, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_FAILURE, {
5120
- error: new _reconnection.default('Reconnection failure event', error)
5121
- });
5092
+ if (error instanceof _reconnectionNotStarted.default) {
5093
+ _loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect not started');
5094
+ return _promise.default.resolve();
5095
+ }
5122
5096
  _loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
5123
- _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_RECONNECT_FAILURE, {
5124
- correlation_id: _this28.correlationId,
5125
- locus_id: _this28.locusUrl.split('/').pop(),
5126
- reason: error.message,
5127
- stack: error.stack
5128
- });
5129
5097
  _this28.uploadLogs({
5130
5098
  file: 'meeting/index',
5131
5099
  function: 'reconnect'
5132
5100
  });
5133
- return _promise.default.reject(new _reconnection.default('Reconnection failure event', error));
5134
- }).finally(function () {
5135
- _this28.reconnectionManager.reset();
5101
+ return _promise.default.reject(error);
5136
5102
  });
5137
5103
  }
5138
5104
 
@@ -5256,48 +5222,48 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5256
5222
  }, {
5257
5223
  key: "startTranscription",
5258
5224
  value: (function () {
5259
- var _startTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(options) {
5260
- return _regenerator.default.wrap(function _callee16$(_context16) {
5261
- while (1) switch (_context16.prev = _context16.next) {
5225
+ var _startTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(options) {
5226
+ return _regenerator.default.wrap(function _callee17$(_context17) {
5227
+ while (1) switch (_context17.prev = _context17.next) {
5262
5228
  case 0:
5263
5229
  if (!this.isJoined()) {
5264
- _context16.next = 15;
5230
+ _context17.next = 15;
5265
5231
  break;
5266
5232
  }
5267
5233
  _loggerProxy.default.logger.info('Meeting:index#startTranscription --> Attempting to enable transcription!');
5268
- _context16.prev = 2;
5234
+ _context17.prev = 2;
5269
5235
  if (!this.areVoiceaEventsSetup) {
5270
5236
  this.setUpVoiceaListeners();
5271
5237
  }
5272
5238
  if (!(this.getCurUserType() === 'host')) {
5273
- _context16.next = 7;
5239
+ _context17.next = 7;
5274
5240
  break;
5275
5241
  }
5276
- _context16.next = 7;
5242
+ _context17.next = 7;
5277
5243
  return this.webex.internal.voicea.turnOnCaptions(options === null || options === void 0 ? void 0 : options.spokenLanguage);
5278
5244
  case 7:
5279
- _context16.next = 13;
5245
+ _context17.next = 13;
5280
5246
  break;
5281
5247
  case 9:
5282
- _context16.prev = 9;
5283
- _context16.t0 = _context16["catch"](2);
5284
- _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_context16.t0));
5248
+ _context17.prev = 9;
5249
+ _context17.t0 = _context17["catch"](2);
5250
+ _loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_context17.t0));
5285
5251
  _metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
5286
5252
  correlation_id: this.correlationId,
5287
- reason: _context16.t0.message,
5288
- stack: _context16.t0.stack
5253
+ reason: _context17.t0.message,
5254
+ stack: _context17.t0.stack
5289
5255
  });
5290
5256
  case 13:
5291
- _context16.next = 17;
5257
+ _context17.next = 17;
5292
5258
  break;
5293
5259
  case 15:
5294
5260
  _loggerProxy.default.logger.error("Meeting:index#startTranscription --> meeting joined : ".concat(this.isJoined()));
5295
5261
  throw new Error('Meeting is not joined');
5296
5262
  case 17:
5297
5263
  case "end":
5298
- return _context16.stop();
5264
+ return _context17.stop();
5299
5265
  }
5300
- }, _callee16, this, [[2, 9]]);
5266
+ }, _callee17, this, [[2, 9]]);
5301
5267
  }));
5302
5268
  function startTranscription(_x15) {
5303
5269
  return _startTranscription.apply(this, arguments);
@@ -5360,7 +5326,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5360
5326
  }, {
5361
5327
  key: "join",
5362
5328
  value: (function () {
5363
- var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
5329
+ var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18() {
5364
5330
  var _this31 = this;
5365
5331
  var options,
5366
5332
  errorMessage,
@@ -5371,25 +5337,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5371
5337
  _error,
5372
5338
  _errorMessage2,
5373
5339
  _error2,
5374
- _args17 = arguments;
5375
- return _regenerator.default.wrap(function _callee17$(_context17) {
5376
- while (1) switch (_context17.prev = _context17.next) {
5340
+ _args18 = arguments;
5341
+ return _regenerator.default.wrap(function _callee18$(_context18) {
5342
+ while (1) switch (_context18.prev = _context18.next) {
5377
5343
  case 0:
5378
- options = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
5344
+ options = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
5379
5345
  if (this.webex.meetings.registered) {
5380
- _context17.next = 6;
5346
+ _context18.next = 6;
5381
5347
  break;
5382
5348
  }
5383
5349
  errorMessage = 'Meeting:index#join --> Device not registered';
5384
5350
  error = new Error(errorMessage);
5385
5351
  _loggerProxy.default.logger.error(errorMessage);
5386
- return _context17.abrupt("return", _promise.default.reject(error));
5352
+ return _context18.abrupt("return", _promise.default.reject(error));
5387
5353
  case 6:
5388
5354
  if (!this.deferJoin) {
5389
- _context17.next = 8;
5355
+ _context18.next = 8;
5390
5356
  break;
5391
5357
  }
5392
- return _context17.abrupt("return", this.deferJoin);
5358
+ return _context18.abrupt("return", this.deferJoin);
5393
5359
  case 8:
5394
5360
  // Create a deferred promise for a consistent resolve value from utils.
5395
5361
  // This also prevents redundant API calls.
@@ -5438,15 +5404,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5438
5404
  this.wirelessShare = true;
5439
5405
  }
5440
5406
  if (!options.meetingQuality) {
5441
- _context17.next = 36;
5407
+ _context18.next = 36;
5442
5408
  break;
5443
5409
  }
5444
5410
  if (!(typeof options.meetingQuality === 'string')) {
5445
- _context17.next = 27;
5411
+ _context18.next = 27;
5446
5412
  break;
5447
5413
  }
5448
5414
  if (_constants.QUALITY_LEVELS[options.meetingQuality]) {
5449
- _context17.next = 26;
5415
+ _context18.next = 26;
5450
5416
  break;
5451
5417
  }
5452
5418
  _errorMessage = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
@@ -5454,16 +5420,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5454
5420
  _loggerProxy.default.logger.error(_errorMessage);
5455
5421
  joinFailed(_error);
5456
5422
  this.deferJoin = undefined;
5457
- return _context17.abrupt("return", _promise.default.reject(_error));
5423
+ return _context18.abrupt("return", _promise.default.reject(_error));
5458
5424
  case 26:
5459
5425
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
5460
5426
  case 27:
5461
5427
  if (!((0, _typeof2.default)(options.meetingQuality) === 'object')) {
5462
- _context17.next = 36;
5428
+ _context18.next = 36;
5463
5429
  break;
5464
5430
  }
5465
5431
  if (_constants.QUALITY_LEVELS[options.meetingQuality.remote]) {
5466
- _context17.next = 35;
5432
+ _context18.next = 35;
5467
5433
  break;
5468
5434
  }
5469
5435
  _errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
@@ -5471,42 +5437,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5471
5437
  _error2 = new Error(_errorMessage2);
5472
5438
  joinFailed(_error2);
5473
5439
  this.deferJoin = undefined;
5474
- return _context17.abrupt("return", _promise.default.reject(new Error(_errorMessage2)));
5440
+ return _context18.abrupt("return", _promise.default.reject(new Error(_errorMessage2)));
5475
5441
  case 35:
5476
5442
  if (options.meetingQuality.remote) {
5477
5443
  this.mediaProperties.setRemoteQualityLevel(options.meetingQuality.remote);
5478
5444
  }
5479
5445
  case 36:
5480
5446
  this.isMultistream = !!options.enableMultistream;
5481
- _context17.prev = 37;
5482
- _context17.next = 40;
5447
+ _context18.prev = 37;
5448
+ _context18.next = 40;
5483
5449
  return this.checkAndRefreshPermissionToken(_constants.MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC, _constants.MEETING_PERMISSION_TOKEN_REFRESH_REASON);
5484
5450
  case 40:
5485
- _context17.next = 51;
5451
+ _context18.next = 51;
5486
5452
  break;
5487
5453
  case 42:
5488
- _context17.prev = 42;
5489
- _context17.t0 = _context17["catch"](37);
5490
- _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _context17.t0);
5491
- if (!(_context17.t0 instanceof _captchaError.default || _context17.t0 instanceof _passwordError.default || _context17.t0 instanceof _permission.default)) {
5492
- _context17.next = 51;
5454
+ _context18.prev = 42;
5455
+ _context18.t0 = _context18["catch"](37);
5456
+ _loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _context18.t0);
5457
+ if (!(_context18.t0 instanceof _captchaError.default || _context18.t0 instanceof _passwordError.default || _context18.t0 instanceof _permission.default)) {
5458
+ _context18.next = 51;
5493
5459
  break;
5494
5460
  }
5495
- this.meetingFiniteStateMachine.fail(_context17.t0);
5461
+ this.meetingFiniteStateMachine.fail(_context18.t0);
5496
5462
 
5497
5463
  // Upload logs on refreshpermissionToken refresh Failure
5498
5464
  _triggerProxy.default.trigger(this, {
5499
5465
  file: 'meeting/index',
5500
5466
  function: 'join'
5501
5467
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
5502
- joinFailed(_context17.t0);
5468
+ joinFailed(_context18.t0);
5503
5469
  this.deferJoin = undefined;
5504
5470
 
5505
5471
  // if refresh permission token requires captcha, password or permission, we are throwing the errors
5506
5472
  // and bubble it up to client
5507
- return _context17.abrupt("return", _promise.default.reject(_context17.t0));
5473
+ return _context18.abrupt("return", _promise.default.reject(_context18.t0));
5508
5474
  case 51:
5509
- return _context17.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
5475
+ return _context18.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
5510
5476
  _this31.meetingFiniteStateMachine.join();
5511
5477
  _loggerProxy.default.logger.log('Meeting:index#join --> Success');
5512
5478
  _metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
@@ -5571,9 +5537,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5571
5537
  }));
5572
5538
  case 52:
5573
5539
  case "end":
5574
- return _context17.stop();
5540
+ return _context18.stop();
5575
5541
  }
5576
- }, _callee17, this, [[37, 42]]);
5542
+ }, _callee18, this, [[37, 42]]);
5577
5543
  }));
5578
5544
  function join() {
5579
5545
  return _join.apply(this, arguments);
@@ -5590,38 +5556,38 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5590
5556
  }, {
5591
5557
  key: "updateLLMConnection",
5592
5558
  value: (function () {
5593
- var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18() {
5559
+ var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
5594
5560
  var _this32 = this;
5595
5561
  var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, isJoined;
5596
- return _regenerator.default.wrap(function _callee18$(_context18) {
5597
- while (1) switch (_context18.prev = _context18.next) {
5562
+ return _regenerator.default.wrap(function _callee19$(_context19) {
5563
+ while (1) switch (_context19.prev = _context19.next) {
5598
5564
  case 0:
5599
5565
  // @ts-ignore - Fix type
5600
5566
  _this$locusInfo6 = this.locusInfo, url = _this$locusInfo6.url, _this$locusInfo6$info = _this$locusInfo6.info, _this$locusInfo6$info2 = _this$locusInfo6$info === void 0 ? {} : _this$locusInfo6$info, datachannelUrl = _this$locusInfo6$info2.datachannelUrl;
5601
5567
  isJoined = this.isJoined(); // @ts-ignore - Fix type
5602
5568
  if (!this.webex.internal.llm.isConnected()) {
5603
- _context18.next = 8;
5569
+ _context19.next = 8;
5604
5570
  break;
5605
5571
  }
5606
5572
  if (!(url === this.webex.internal.llm.getLocusUrl() && isJoined)) {
5607
- _context18.next = 5;
5573
+ _context19.next = 5;
5608
5574
  break;
5609
5575
  }
5610
- return _context18.abrupt("return", undefined);
5576
+ return _context19.abrupt("return", undefined);
5611
5577
  case 5:
5612
- _context18.next = 7;
5578
+ _context19.next = 7;
5613
5579
  return this.webex.internal.llm.disconnectLLM();
5614
5580
  case 7:
5615
5581
  // @ts-ignore - Fix type
5616
5582
  this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
5617
5583
  case 8:
5618
5584
  if (isJoined) {
5619
- _context18.next = 10;
5585
+ _context19.next = 10;
5620
5586
  break;
5621
5587
  }
5622
- return _context18.abrupt("return", undefined);
5588
+ return _context19.abrupt("return", undefined);
5623
5589
  case 10:
5624
- return _context18.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl).then(function (registerAndConnectResult) {
5590
+ return _context19.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl).then(function (registerAndConnectResult) {
5625
5591
  // @ts-ignore - Fix type
5626
5592
  _this32.webex.internal.llm.off('event:relay.event', _this32.processRelayEvent);
5627
5593
  // @ts-ignore - Fix type
@@ -5631,9 +5597,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5631
5597
  }));
5632
5598
  case 11:
5633
5599
  case "end":
5634
- return _context18.stop();
5600
+ return _context19.stop();
5635
5601
  }
5636
- }, _callee18, this);
5602
+ }, _callee19, this);
5637
5603
  }));
5638
5604
  function updateLLMConnection() {
5639
5605
  return _updateLLMConnection.apply(this, arguments);
@@ -5805,17 +5771,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5805
5771
  meetingId: this.id
5806
5772
  }
5807
5773
  });
5808
- this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
5774
+ this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
5809
5775
  var mediaSettings;
5810
- return _regenerator.default.wrap(function _callee19$(_context19) {
5811
- while (1) switch (_context19.prev = _context19.next) {
5776
+ return _regenerator.default.wrap(function _callee20$(_context20) {
5777
+ while (1) switch (_context20.prev = _context20.next) {
5812
5778
  case 0:
5813
- _context19.prev = 0;
5779
+ _context20.prev = 0;
5814
5780
  if (!(_this35.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
5815
- _context19.next = 4;
5781
+ _context20.next = 4;
5816
5782
  break;
5817
5783
  }
5818
- _context19.next = 4;
5784
+ _context20.next = 4;
5819
5785
  return _this35.releaseScreenShareFloor();
5820
5786
  case 4:
5821
5787
  mediaSettings = {
@@ -5835,28 +5801,28 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5835
5801
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the DX answers the meeting
5836
5802
  // once the DX answers we establish connection back the media server with only receiveShare enabled
5837
5803
  // @ts-ignore - reconnectMedia does not accept any argument
5838
- _context19.next = 10;
5804
+ _context20.next = 10;
5839
5805
  return _this35.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
5840
5806
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
5841
5807
  });
5842
5808
  case 10:
5843
- _context19.next = 16;
5809
+ _context20.next = 16;
5844
5810
  break;
5845
5811
  case 12:
5846
- _context19.prev = 12;
5847
- _context19.t0 = _context19["catch"](0);
5848
- _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context19.t0);
5812
+ _context20.prev = 12;
5813
+ _context20.t0 = _context20["catch"](0);
5814
+ _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context20.t0);
5849
5815
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
5850
5816
  correlation_id: _this35.correlationId,
5851
5817
  locus_id: _this35.locusUrl.split('/').pop(),
5852
- reason: _context19.t0.message,
5853
- stack: _context19.t0.stack
5818
+ reason: _context20.t0.message,
5819
+ stack: _context20.t0.stack
5854
5820
  });
5855
5821
  case 16:
5856
5822
  case "end":
5857
- return _context19.stop();
5823
+ return _context20.stop();
5858
5824
  }
5859
- }, _callee19, null, [[0, 12]]);
5825
+ }, _callee20, null, [[0, 12]]);
5860
5826
  })));
5861
5827
  _loggerProxy.default.logger.info('Meeting:index#moveTo --> Initated moved to using resourceId', resourceId);
5862
5828
  return _util2.default.joinMeetingOptions(this, {
@@ -5939,10 +5905,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5939
5905
  }, {
5940
5906
  key: "createMediaConnection",
5941
5907
  value: (function () {
5942
- var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(turnServerInfo, bundlePolicy) {
5908
+ var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(turnServerInfo, bundlePolicy) {
5943
5909
  var mc, audioEnabled, videoEnabled, shareEnabled;
5944
- return _regenerator.default.wrap(function _callee20$(_context20) {
5945
- while (1) switch (_context20.prev = _context20.next) {
5910
+ return _regenerator.default.wrap(function _callee21$(_context21) {
5911
+ while (1) switch (_context21.prev = _context21.next) {
5946
5912
  case 0:
5947
5913
  mc = _media.default.createMediaConnection(this.isMultistream, this.getMediaConnectionDebugId(),
5948
5914
  // @ts-ignore
@@ -5968,40 +5934,40 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
5968
5934
 
5969
5935
  // publish the streams
5970
5936
  if (!this.mediaProperties.audioStream) {
5971
- _context20.next = 8;
5937
+ _context21.next = 8;
5972
5938
  break;
5973
5939
  }
5974
5940
  this.setSendNamedMediaGroup(_internalMediaCore.MediaType.AudioMain);
5975
- _context20.next = 8;
5941
+ _context21.next = 8;
5976
5942
  return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
5977
5943
  case 8:
5978
5944
  if (!this.mediaProperties.videoStream) {
5979
- _context20.next = 11;
5945
+ _context21.next = 11;
5980
5946
  break;
5981
5947
  }
5982
- _context20.next = 11;
5948
+ _context21.next = 11;
5983
5949
  return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
5984
5950
  case 11:
5985
5951
  if (!this.mediaProperties.shareVideoStream) {
5986
- _context20.next = 14;
5952
+ _context21.next = 14;
5987
5953
  break;
5988
5954
  }
5989
- _context20.next = 14;
5955
+ _context21.next = 14;
5990
5956
  return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
5991
5957
  case 14:
5992
5958
  if (!(this.isMultistream && this.mediaProperties.shareAudioStream)) {
5993
- _context20.next = 17;
5959
+ _context21.next = 17;
5994
5960
  break;
5995
5961
  }
5996
- _context20.next = 17;
5962
+ _context21.next = 17;
5997
5963
  return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
5998
5964
  case 17:
5999
- return _context20.abrupt("return", mc);
5965
+ return _context21.abrupt("return", mc);
6000
5966
  case 18:
6001
5967
  case "end":
6002
- return _context20.stop();
5968
+ return _context21.stop();
6003
5969
  }
6004
- }, _callee20, this);
5970
+ }, _callee21, this);
6005
5971
  }));
6006
5972
  function createMediaConnection(_x16, _x17) {
6007
5973
  return _createMediaConnection.apply(this, arguments);
@@ -6041,11 +6007,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6041
6007
  }, {
6042
6008
  key: "setUpLocalStreamReferences",
6043
6009
  value: (function () {
6044
- var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(localStreams) {
6010
+ var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(localStreams) {
6045
6011
  var _localStreams$microph, _localStreams$camera, _localStreams$screenS, _localStreams$screenS2, _localStreams$screenS3, _localStreams$screenS4, _localStreams$screenS5, _localStreams$screenS6;
6046
6012
  var setUpStreamPromises;
6047
- return _regenerator.default.wrap(function _callee21$(_context21) {
6048
- while (1) switch (_context21.prev = _context21.next) {
6013
+ return _regenerator.default.wrap(function _callee22$(_context22) {
6014
+ while (1) switch (_context22.prev = _context22.next) {
6049
6015
  case 0:
6050
6016
  setUpStreamPromises = [];
6051
6017
  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') {
@@ -6060,22 +6026,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6060
6026
  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') {
6061
6027
  setUpStreamPromises.push(this.setLocalShareAudioStream(localStreams.screenShare.audio));
6062
6028
  }
6063
- _context21.prev = 5;
6064
- _context21.next = 8;
6029
+ _context22.prev = 5;
6030
+ _context22.next = 8;
6065
6031
  return _promise.default.all(setUpStreamPromises);
6066
6032
  case 8:
6067
- _context21.next = 14;
6033
+ _context22.next = 14;
6068
6034
  break;
6069
6035
  case 10:
6070
- _context21.prev = 10;
6071
- _context21.t0 = _context21["catch"](5);
6072
- _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _context21.t0);
6073
- throw _context21.t0;
6036
+ _context22.prev = 10;
6037
+ _context22.t0 = _context22["catch"](5);
6038
+ _loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _context22.t0);
6039
+ throw _context22.t0;
6074
6040
  case 14:
6075
6041
  case "end":
6076
- return _context21.stop();
6042
+ return _context22.stop();
6077
6043
  }
6078
- }, _callee21, this, [[5, 10]]);
6044
+ }, _callee22, this, [[5, 10]]);
6079
6045
  }));
6080
6046
  function setUpLocalStreamReferences(_x18) {
6081
6047
  return _setUpLocalStreamReferences.apply(this, arguments);
@@ -6092,20 +6058,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6092
6058
  }, {
6093
6059
  key: "waitForMediaConnectionConnected",
6094
6060
  value: (function () {
6095
- var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22() {
6061
+ var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
6096
6062
  var _this$mediaProperties6, _this$mediaProperties7, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, _this$mediaProperties14, _this$mediaProperties15, _this$mediaProperties16, _this$mediaProperties17, _this$mediaProperties18, _this$mediaProperties19;
6097
- return _regenerator.default.wrap(function _callee22$(_context22) {
6098
- while (1) switch (_context22.prev = _context22.next) {
6063
+ return _regenerator.default.wrap(function _callee23$(_context23) {
6064
+ while (1) switch (_context23.prev = _context23.next) {
6099
6065
  case 0:
6100
- _context22.prev = 0;
6101
- _context22.next = 3;
6066
+ _context23.prev = 0;
6067
+ _context23.next = 3;
6102
6068
  return this.mediaProperties.waitForMediaConnectionConnected();
6103
6069
  case 3:
6104
- _context22.next = 9;
6070
+ _context23.next = 9;
6105
6071
  break;
6106
6072
  case 5:
6107
- _context22.prev = 5;
6108
- _context22.t0 = _context22["catch"](0);
6073
+ _context23.prev = 5;
6074
+ _context23.t0 = _context23["catch"](0);
6109
6075
  if (!this.hasMediaConnectionConnectedAtLeastOnce) {
6110
6076
  // Only send CA event for join flow if we haven't successfully connected media yet
6111
6077
  // @ts-ignore
@@ -6133,9 +6099,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6133
6099
  throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
6134
6100
  case 9:
6135
6101
  case "end":
6136
- return _context22.stop();
6102
+ return _context23.stop();
6137
6103
  }
6138
- }, _callee22, this, [[0, 5]]);
6104
+ }, _callee23, this, [[0, 5]]);
6139
6105
  }));
6140
6106
  function waitForMediaConnectionConnected() {
6141
6107
  return _waitForMediaConnectionConnected.apply(this, arguments);
@@ -6185,18 +6151,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6185
6151
  * @returns {Promise<void>}
6186
6152
  */
6187
6153
  function () {
6188
- var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
6154
+ var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
6189
6155
  var LOG_HEADER, deferSDPAnswer;
6190
- return _regenerator.default.wrap(function _callee23$(_context23) {
6191
- while (1) switch (_context23.prev = _context23.next) {
6156
+ return _regenerator.default.wrap(function _callee24$(_context24) {
6157
+ while (1) switch (_context24.prev = _context24.next) {
6192
6158
  case 0:
6193
6159
  LOG_HEADER = 'Meeting:index#addMedia():waitForRemoteSDPAnswer -->';
6194
6160
  if (this.deferSDPAnswer) {
6195
- _context23.next = 4;
6161
+ _context24.next = 4;
6196
6162
  break;
6197
6163
  }
6198
6164
  _loggerProxy.default.logger.warn("".concat(LOG_HEADER, " offer not created yet"));
6199
- return _context23.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
6165
+ return _context24.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
6200
6166
  case 4:
6201
6167
  deferSDPAnswer = this.deferSDPAnswer;
6202
6168
  this.sdpResponseTimer = setTimeout(function () {
@@ -6204,12 +6170,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6204
6170
  deferSDPAnswer.reject(new Error('Timed out waiting for REMOTE SDP ANSWER'));
6205
6171
  }, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
6206
6172
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
6207
- return _context23.abrupt("return", deferSDPAnswer.promise);
6173
+ return _context24.abrupt("return", deferSDPAnswer.promise);
6208
6174
  case 8:
6209
6175
  case "end":
6210
- return _context23.stop();
6176
+ return _context24.stop();
6211
6177
  }
6212
- }, _callee23, this);
6178
+ }, _callee24, this);
6213
6179
  }));
6214
6180
  function waitForRemoteSDPAnswer() {
6215
6181
  return _waitForRemoteSDPAnswer.apply(this, arguments);
@@ -6228,28 +6194,28 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6228
6194
  }, {
6229
6195
  key: "retryEstablishMediaConnectionWithForcedTurnDiscovery",
6230
6196
  value: (function () {
6231
- var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(remoteMediaManagerConfig, bundlePolicy) {
6197
+ var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(remoteMediaManagerConfig, bundlePolicy) {
6232
6198
  var LOG_HEADER;
6233
- return _regenerator.default.wrap(function _callee24$(_context24) {
6234
- while (1) switch (_context24.prev = _context24.next) {
6199
+ return _regenerator.default.wrap(function _callee25$(_context25) {
6200
+ while (1) switch (_context25.prev = _context25.next) {
6235
6201
  case 0:
6236
6202
  LOG_HEADER = 'Meeting:index#addMedia():retryEstablishMediaConnectionWithForcedTurnDiscovery -->';
6237
- _context24.prev = 1;
6238
- _context24.next = 4;
6203
+ _context25.prev = 1;
6204
+ _context25.next = 4;
6239
6205
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
6240
6206
  case 4:
6241
- _context24.next = 10;
6207
+ _context25.next = 10;
6242
6208
  break;
6243
6209
  case 6:
6244
- _context24.prev = 6;
6245
- _context24.t0 = _context24["catch"](1);
6246
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _context24.t0);
6247
- throw _context24.t0;
6210
+ _context25.prev = 6;
6211
+ _context25.t0 = _context25["catch"](1);
6212
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _context25.t0);
6213
+ throw _context25.t0;
6248
6214
  case 10:
6249
6215
  case "end":
6250
- return _context24.stop();
6216
+ return _context25.stop();
6251
6217
  }
6252
- }, _callee24, this, [[1, 6]]);
6218
+ }, _callee25, this, [[1, 6]]);
6253
6219
  }));
6254
6220
  function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x19, _x20) {
6255
6221
  return _retryEstablishMediaConnectionWithForcedTurnDiscovery.apply(this, arguments);
@@ -6269,14 +6235,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6269
6235
  }, {
6270
6236
  key: "retryWithForcedTurnDiscovery",
6271
6237
  value: (function () {
6272
- var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(remoteMediaManagerConfig, bundlePolicy) {
6238
+ var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(remoteMediaManagerConfig, bundlePolicy) {
6273
6239
  var LOG_HEADER;
6274
- return _regenerator.default.wrap(function _callee25$(_context25) {
6275
- while (1) switch (_context25.prev = _context25.next) {
6240
+ return _regenerator.default.wrap(function _callee26$(_context26) {
6241
+ while (1) switch (_context26.prev = _context26.next) {
6276
6242
  case 0:
6277
6243
  this.retriedWithTurnServer = true;
6278
6244
  LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
6279
- _context25.next = 4;
6245
+ _context26.next = 4;
6280
6246
  return this.cleanUpBeforeRetryWithTurnServer();
6281
6247
  case 4:
6282
6248
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_RETRY, {
@@ -6286,22 +6252,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6286
6252
  reason: 'forcingTurnTls'
6287
6253
  });
6288
6254
  if (!(this.state === _constants.MEETING_STATE.STATES.LEFT)) {
6289
- _context25.next = 9;
6255
+ _context26.next = 9;
6290
6256
  break;
6291
6257
  }
6292
6258
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. "));
6293
- _context25.next = 9;
6259
+ _context26.next = 9;
6294
6260
  return this.join({
6295
6261
  rejoin: true
6296
6262
  });
6297
6263
  case 9:
6298
- _context25.next = 11;
6264
+ _context26.next = 11;
6299
6265
  return this.retryEstablishMediaConnectionWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
6300
6266
  case 11:
6301
6267
  case "end":
6302
- return _context25.stop();
6268
+ return _context26.stop();
6303
6269
  }
6304
- }, _callee25, this);
6270
+ }, _callee26, this);
6305
6271
  }));
6306
6272
  function retryWithForcedTurnDiscovery(_x21, _x22) {
6307
6273
  return _retryWithForcedTurnDiscovery.apply(this, arguments);
@@ -6323,30 +6289,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6323
6289
  }, {
6324
6290
  key: "handleWaitForMediaConnectionConnectedError",
6325
6291
  value: (function () {
6326
- var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(error, remoteMediaManagerConfig, bundlePolicy) {
6292
+ var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(error, remoteMediaManagerConfig, bundlePolicy) {
6327
6293
  var LOG_HEADER;
6328
- return _regenerator.default.wrap(function _callee26$(_context26) {
6329
- while (1) switch (_context26.prev = _context26.next) {
6294
+ return _regenerator.default.wrap(function _callee27$(_context27) {
6295
+ while (1) switch (_context27.prev = _context27.next) {
6330
6296
  case 0:
6331
6297
  LOG_HEADER = 'Meeting:index#addMedia():handleWaitForMediaConnectionConnectedError -->'; // @ts-ignore - config coming from registerPlugin
6332
6298
  if (this.turnServerUsed) {
6333
- _context26.next = 7;
6299
+ _context27.next = 7;
6334
6300
  break;
6335
6301
  }
6336
6302
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " error waiting for media to connect on UDP, TCP, retrying using TURN-TLS, "), error);
6337
- _context26.next = 5;
6303
+ _context27.next = 5;
6338
6304
  return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
6339
6305
  case 5:
6340
- _context26.next = 9;
6306
+ _context27.next = 9;
6341
6307
  break;
6342
6308
  case 7:
6343
6309
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
6344
6310
  throw new _webexErrors.AddMediaFailed();
6345
6311
  case 9:
6346
6312
  case "end":
6347
- return _context26.stop();
6313
+ return _context27.stop();
6348
6314
  }
6349
- }, _callee26, this);
6315
+ }, _callee27, this);
6350
6316
  }));
6351
6317
  function handleWaitForMediaConnectionConnectedError(_x23, _x24, _x25) {
6352
6318
  return _handleWaitForMediaConnectionConnectedError.apply(this, arguments);
@@ -6364,20 +6330,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6364
6330
  }, {
6365
6331
  key: "doTurnDiscovery",
6366
6332
  value: (function () {
6367
- var _doTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(isRetry, isForced) {
6333
+ var _doTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(isRetry, isForced) {
6368
6334
  var cdl, turnDiscoveryResult;
6369
- return _regenerator.default.wrap(function _callee27$(_context27) {
6370
- while (1) switch (_context27.prev = _context27.next) {
6335
+ return _regenerator.default.wrap(function _callee28$(_context28) {
6336
+ while (1) switch (_context28.prev = _context28.next) {
6371
6337
  case 0:
6372
6338
  // @ts-ignore
6373
6339
  cdl = this.webex.internal.newMetrics.callDiagnosticLatencies; // @ts-ignore
6374
6340
  this.webex.internal.newMetrics.submitInternalEvent({
6375
6341
  name: 'internal.client.add-media.turn-discovery.start'
6376
6342
  });
6377
- _context27.next = 4;
6343
+ _context28.next = 4;
6378
6344
  return this.roap.doTurnDiscovery(this, isRetry, isForced);
6379
6345
  case 4:
6380
- turnDiscoveryResult = _context27.sent;
6346
+ turnDiscoveryResult = _context28.sent;
6381
6347
  this.turnDiscoverySkippedReason = turnDiscoveryResult === null || turnDiscoveryResult === void 0 ? void 0 : turnDiscoveryResult.turnDiscoverySkippedReason;
6382
6348
  this.turnServerUsed = !this.turnDiscoverySkippedReason;
6383
6349
 
@@ -6393,12 +6359,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6393
6359
  retriedWithTurnServer: this.retriedWithTurnServer
6394
6360
  });
6395
6361
  }
6396
- return _context27.abrupt("return", turnDiscoveryResult);
6362
+ return _context28.abrupt("return", turnDiscoveryResult);
6397
6363
  case 10:
6398
6364
  case "end":
6399
- return _context27.stop();
6365
+ return _context28.stop();
6400
6366
  }
6401
- }, _callee27, this);
6367
+ }, _callee28, this);
6402
6368
  }));
6403
6369
  function doTurnDiscovery(_x26, _x27) {
6404
6370
  return _doTurnDiscovery.apply(this, arguments);
@@ -6419,31 +6385,31 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6419
6385
  }, {
6420
6386
  key: "establishMediaConnection",
6421
6387
  value: (function () {
6422
- var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
6388
+ var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
6423
6389
  var LOG_HEADER, isRetry, _yield$this$doTurnDis, mc;
6424
- return _regenerator.default.wrap(function _callee28$(_context28) {
6425
- while (1) switch (_context28.prev = _context28.next) {
6390
+ return _regenerator.default.wrap(function _callee29$(_context29) {
6391
+ while (1) switch (_context29.prev = _context29.next) {
6426
6392
  case 0:
6427
6393
  LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->';
6428
6394
  isRetry = this.retriedWithTurnServer;
6429
- _context28.prev = 2;
6395
+ _context29.prev = 2;
6430
6396
  if (turnServerInfo) {
6431
- _context28.next = 8;
6397
+ _context29.next = 8;
6432
6398
  break;
6433
6399
  }
6434
- _context28.next = 6;
6400
+ _context29.next = 6;
6435
6401
  return this.doTurnDiscovery(isRetry, isForced);
6436
6402
  case 6:
6437
- _yield$this$doTurnDis = _context28.sent;
6403
+ _yield$this$doTurnDis = _context29.sent;
6438
6404
  turnServerInfo = _yield$this$doTurnDis.turnServerInfo;
6439
6405
  case 8:
6440
- _context28.next = 10;
6406
+ _context29.next = 10;
6441
6407
  return this.createMediaConnection(turnServerInfo, bundlePolicy);
6442
6408
  case 10:
6443
- mc = _context28.sent;
6409
+ mc = _context29.sent;
6444
6410
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created"));
6445
6411
  if (!this.isMultistream) {
6446
- _context28.next = 20;
6412
+ _context29.next = 20;
6447
6413
  break;
6448
6414
  }
6449
6415
  this.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(this.receiveSlotManager, this.mediaRequestManagers, remoteMediaManagerConfig);
@@ -6451,40 +6417,40 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6451
6417
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.InterpretationAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_INTERPRETATION_AUDIO_CREATED);
6452
6418
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
6453
6419
  this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
6454
- _context28.next = 20;
6420
+ _context29.next = 20;
6455
6421
  return this.remoteMediaManager.start();
6456
6422
  case 20:
6457
- _context28.next = 22;
6423
+ _context29.next = 22;
6458
6424
  return mc.initiateOffer();
6459
6425
  case 22:
6460
- _context28.next = 24;
6426
+ _context29.next = 24;
6461
6427
  return this.waitForRemoteSDPAnswer();
6462
6428
  case 24:
6463
6429
  this.handleMediaLogging(this.mediaProperties);
6464
- _context28.next = 31;
6430
+ _context29.next = 31;
6465
6431
  break;
6466
6432
  case 27:
6467
- _context28.prev = 27;
6468
- _context28.t0 = _context28["catch"](2);
6469
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _context28.t0);
6470
- throw _context28.t0;
6433
+ _context29.prev = 27;
6434
+ _context29.t0 = _context29["catch"](2);
6435
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _context29.t0);
6436
+ throw _context29.t0;
6471
6437
  case 31:
6472
- _context28.prev = 31;
6473
- _context28.next = 34;
6438
+ _context29.prev = 31;
6439
+ _context29.next = 34;
6474
6440
  return this.waitForMediaConnectionConnected();
6475
6441
  case 34:
6476
- _context28.next = 40;
6442
+ _context29.next = 40;
6477
6443
  break;
6478
6444
  case 36:
6479
- _context28.prev = 36;
6480
- _context28.t1 = _context28["catch"](31);
6481
- _context28.next = 40;
6482
- return this.handleWaitForMediaConnectionConnectedError(_context28.t1, remoteMediaManagerConfig, bundlePolicy);
6445
+ _context29.prev = 36;
6446
+ _context29.t1 = _context29["catch"](31);
6447
+ _context29.next = 40;
6448
+ return this.handleWaitForMediaConnectionConnectedError(_context29.t1, remoteMediaManagerConfig, bundlePolicy);
6483
6449
  case 40:
6484
6450
  case "end":
6485
- return _context28.stop();
6451
+ return _context29.stop();
6486
6452
  }
6487
- }, _callee28, this, [[2, 27], [31, 36]]);
6453
+ }, _callee29, this, [[2, 27], [31, 36]]);
6488
6454
  }));
6489
6455
  function establishMediaConnection(_x28, _x29, _x30, _x31) {
6490
6456
  return _establishMediaConnection.apply(this, arguments);
@@ -6501,22 +6467,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6501
6467
  }, {
6502
6468
  key: "cleanUpOnAddMediaFailure",
6503
6469
  value: (function () {
6504
- var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
6505
- return _regenerator.default.wrap(function _callee29$(_context29) {
6506
- while (1) switch (_context29.prev = _context29.next) {
6470
+ var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30() {
6471
+ return _regenerator.default.wrap(function _callee30$(_context30) {
6472
+ while (1) switch (_context30.prev = _context30.next) {
6507
6473
  case 0:
6508
6474
  if (!this.statsAnalyzer) {
6509
- _context29.next = 3;
6475
+ _context30.next = 3;
6510
6476
  break;
6511
6477
  }
6512
- _context29.next = 3;
6478
+ _context30.next = 3;
6513
6479
  return this.statsAnalyzer.stopAnalyzer();
6514
6480
  case 3:
6515
6481
  this.statsAnalyzer = null;
6516
6482
 
6517
6483
  // when media fails, we want to upload a webrtc dump to see whats going on
6518
6484
  // this function is async, but returns once the stats have been gathered
6519
- _context29.next = 6;
6485
+ _context30.next = 6;
6520
6486
  return this.forceSendStatsReport({
6521
6487
  callFrom: 'addMedia'
6522
6488
  });
@@ -6527,9 +6493,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6527
6493
  }
6528
6494
  case 7:
6529
6495
  case "end":
6530
- return _context29.stop();
6496
+ return _context30.stop();
6531
6497
  }
6532
- }, _callee29, this);
6498
+ }, _callee30, this);
6533
6499
  }));
6534
6500
  function cleanUpOnAddMediaFailure() {
6535
6501
  return _cleanUpOnAddMediaFailure.apply(this, arguments);
@@ -6547,11 +6513,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6547
6513
  }, {
6548
6514
  key: "cleanUpBeforeRetryWithTurnServer",
6549
6515
  value: (function () {
6550
- var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30() {
6551
- return _regenerator.default.wrap(function _callee30$(_context30) {
6552
- while (1) switch (_context30.prev = _context30.next) {
6516
+ var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31() {
6517
+ return _regenerator.default.wrap(function _callee31$(_context31) {
6518
+ while (1) switch (_context31.prev = _context31.next) {
6553
6519
  case 0:
6554
- _context30.next = 2;
6520
+ _context31.next = 2;
6555
6521
  return this.forceSendStatsReport({
6556
6522
  callFrom: 'cleanUpBeforeRetryWithTurnServer'
6557
6523
  });
@@ -6571,9 +6537,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6571
6537
  }
6572
6538
  case 3:
6573
6539
  case "end":
6574
- return _context30.stop();
6540
+ return _context31.stop();
6575
6541
  }
6576
- }, _callee30, this);
6542
+ }, _callee31, this);
6577
6543
  }));
6578
6544
  function cleanUpBeforeRetryWithTurnServer() {
6579
6545
  return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
@@ -6593,7 +6559,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6593
6559
  }, {
6594
6560
  key: "addMedia",
6595
6561
  value: (function () {
6596
- var _addMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31() {
6562
+ var _addMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
6597
6563
  var _this$webex$meetings$2, _this$webex$meetings$3;
6598
6564
  var options,
6599
6565
  turnServerInfo,
@@ -6640,24 +6606,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6640
6606
  _yield$this$mediaProp2,
6641
6607
  _selectedCandidatePairChanges,
6642
6608
  _numTransports,
6643
- _args31 = arguments;
6644
- return _regenerator.default.wrap(function _callee31$(_context31) {
6645
- while (1) switch (_context31.prev = _context31.next) {
6609
+ _args32 = arguments;
6610
+ return _regenerator.default.wrap(function _callee32$(_context32) {
6611
+ while (1) switch (_context32.prev = _context32.next) {
6646
6612
  case 0:
6647
- options = _args31.length > 0 && _args31[0] !== undefined ? _args31[0] : {};
6648
- turnServerInfo = _args31.length > 1 && _args31[1] !== undefined ? _args31[1] : undefined;
6613
+ options = _args32.length > 0 && _args32[0] !== undefined ? _args32[0] : {};
6614
+ turnServerInfo = _args32.length > 1 && _args32[1] !== undefined ? _args32[1] : undefined;
6649
6615
  this.retriedWithTurnServer = false;
6650
6616
  this.hasMediaConnectionConnectedAtLeastOnce = false;
6651
6617
  LOG_HEADER = 'Meeting:index#addMedia -->';
6652
6618
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: ").concat((0, _stringify.default)(options), ", ").concat((0, _stringify.default)(turnServerInfo)));
6653
6619
  if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
6654
- _context31.next = 8;
6620
+ _context32.next = 8;
6655
6621
  break;
6656
6622
  }
6657
6623
  throw new _webexErrors.MeetingNotActiveError();
6658
6624
  case 8:
6659
6625
  if (!_util2.default.isUserInLeftState(this.locusInfo)) {
6660
- _context31.next = 10;
6626
+ _context32.next = 10;
6661
6627
  break;
6662
6628
  }
6663
6629
  throw new _webexErrors.UserNotJoinedError();
@@ -6668,7 +6634,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6668
6634
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
6669
6635
  // @ts-ignore - isUserUnadmitted coming from SelfUtil
6670
6636
  if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
6671
- _context31.next = 14;
6637
+ _context32.next = 14;
6672
6638
  break;
6673
6639
  }
6674
6640
  throw new _webexErrors.UserInLobbyError();
@@ -6727,45 +6693,45 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6727
6693
  });
6728
6694
  this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
6729
6695
  this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
6730
- _context31.prev = 19;
6731
- _context31.next = 22;
6696
+ _context32.prev = 19;
6697
+ _context32.next = 22;
6732
6698
  return this.setUpLocalStreamReferences(localStreams);
6733
6699
  case 22:
6734
6700
  this.setMercuryListener();
6735
6701
  this.createStatsAnalyzer();
6736
- _context31.next = 26;
6702
+ _context32.next = 26;
6737
6703
  return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, false, turnServerInfo);
6738
6704
  case 26:
6739
6705
  if (!(audioEnabled || videoEnabled)) {
6740
- _context31.next = 31;
6706
+ _context32.next = 31;
6741
6707
  break;
6742
6708
  }
6743
- _context31.next = 29;
6709
+ _context32.next = 29;
6744
6710
  return Meeting.handleDeviceLogging();
6745
6711
  case 29:
6746
- _context31.next = 32;
6712
+ _context32.next = 32;
6747
6713
  break;
6748
6714
  case 31:
6749
6715
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " device logging not required"));
6750
6716
  case 32:
6751
6717
  if (!this.mediaProperties.hasLocalShareStream()) {
6752
- _context31.next = 35;
6718
+ _context32.next = 35;
6753
6719
  break;
6754
6720
  }
6755
- _context31.next = 35;
6721
+ _context32.next = 35;
6756
6722
  return this.enqueueScreenShareFloorRequest();
6757
6723
  case 35:
6758
- _context31.next = 37;
6724
+ _context32.next = 37;
6759
6725
  return this.mediaProperties.getCurrentConnectionInfo();
6760
6726
  case 37:
6761
- _yield$this$mediaProp = _context31.sent;
6727
+ _yield$this$mediaProp = _context32.sent;
6762
6728
  connectionType = _yield$this$mediaProp.connectionType;
6763
6729
  selectedCandidatePairChanges = _yield$this$mediaProp.selectedCandidatePairChanges;
6764
6730
  numTransports = _yield$this$mediaProp.numTransports;
6765
- _context31.next = 43;
6731
+ _context32.next = 43;
6766
6732
  return this.webex.meetings.reachability.getReachabilityMetrics();
6767
6733
  case 43:
6768
- reachabilityStats = _context31.sent;
6734
+ reachabilityStats = _context32.sent;
6769
6735
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread({
6770
6736
  correlation_id: this.correlationId,
6771
6737
  locus_id: this.locusUrl.split('/').pop(),
@@ -6787,30 +6753,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6787
6753
 
6788
6754
  // We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
6789
6755
  (_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
6790
- _context31.next = 67;
6756
+ _context32.next = 67;
6791
6757
  break;
6792
6758
  case 50:
6793
- _context31.prev = 50;
6794
- _context31.t0 = _context31["catch"](19);
6795
- _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context31.t0);
6759
+ _context32.prev = 50;
6760
+ _context32.t0 = _context32["catch"](19);
6761
+ _loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context32.t0);
6796
6762
 
6797
6763
  // @ts-ignore
6798
- _context31.next = 55;
6764
+ _context32.next = 55;
6799
6765
  return this.webex.meetings.reachability.getReachabilityMetrics();
6800
6766
  case 55:
6801
- reachabilityMetrics = _context31.sent;
6802
- _context31.next = 58;
6767
+ reachabilityMetrics = _context32.sent;
6768
+ _context32.next = 58;
6803
6769
  return this.mediaProperties.getCurrentConnectionInfo();
6804
6770
  case 58:
6805
- _yield$this$mediaProp2 = _context31.sent;
6771
+ _yield$this$mediaProp2 = _context32.sent;
6806
6772
  _selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
6807
6773
  _numTransports = _yield$this$mediaProp2.numTransports;
6808
6774
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread({
6809
6775
  correlation_id: this.correlationId,
6810
6776
  locus_id: this.locusUrl.split('/').pop(),
6811
- reason: _context31.t0.message,
6812
- stack: _context31.t0.stack,
6813
- code: _context31.t0.code,
6777
+ reason: _context32.t0.message,
6778
+ stack: _context32.t0.stack,
6779
+ code: _context32.t0.code,
6814
6780
  selectedCandidatePairChanges: _selectedCandidatePairChanges,
6815
6781
  numTransports: _numTransports,
6816
6782
  turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
@@ -6822,7 +6788,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6822
6788
  connectionState: ((_this$mediaProperties27 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties27 === void 0 ? void 0 : (_this$mediaProperties28 = _this$mediaProperties27.multistreamConnection) === null || _this$mediaProperties28 === void 0 ? void 0 : (_this$mediaProperties29 = _this$mediaProperties28.pc) === null || _this$mediaProperties29 === void 0 ? void 0 : (_this$mediaProperties30 = _this$mediaProperties29.pc) === null || _this$mediaProperties30 === void 0 ? void 0 : _this$mediaProperties30.connectionState) || ((_this$mediaProperties31 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties31 === void 0 ? void 0 : (_this$mediaProperties32 = _this$mediaProperties31.mediaConnection) === null || _this$mediaProperties32 === void 0 ? void 0 : (_this$mediaProperties33 = _this$mediaProperties32.pc) === null || _this$mediaProperties33 === void 0 ? void 0 : _this$mediaProperties33.connectionState) || 'unknown',
6823
6789
  iceConnectionState: ((_this$mediaProperties34 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties34 === void 0 ? void 0 : (_this$mediaProperties35 = _this$mediaProperties34.multistreamConnection) === null || _this$mediaProperties35 === void 0 ? void 0 : (_this$mediaProperties36 = _this$mediaProperties35.pc) === null || _this$mediaProperties36 === void 0 ? void 0 : (_this$mediaProperties37 = _this$mediaProperties36.pc) === null || _this$mediaProperties37 === void 0 ? void 0 : _this$mediaProperties37.iceConnectionState) || ((_this$mediaProperties38 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties38 === void 0 ? void 0 : (_this$mediaProperties39 = _this$mediaProperties38.mediaConnection) === null || _this$mediaProperties39 === void 0 ? void 0 : (_this$mediaProperties40 = _this$mediaProperties39.pc) === null || _this$mediaProperties40 === void 0 ? void 0 : _this$mediaProperties40.iceConnectionState) || 'unknown'
6824
6790
  }, reachabilityMetrics));
6825
- _context31.next = 64;
6791
+ _context32.next = 64;
6826
6792
  return this.cleanUpOnAddMediaFailure();
6827
6793
  case 64:
6828
6794
  // Upload logs on error while adding media
@@ -6830,17 +6796,17 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6830
6796
  file: 'meeting/index',
6831
6797
  function: 'addMedia'
6832
6798
  }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
6833
- if (_context31.t0 instanceof _internalMediaCore.Errors.SdpError) {
6799
+ if (_context32.t0 instanceof _internalMediaCore.Errors.SdpError) {
6834
6800
  this.leave({
6835
6801
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
6836
6802
  });
6837
6803
  }
6838
- throw _context31.t0;
6804
+ throw _context32.t0;
6839
6805
  case 67:
6840
6806
  case "end":
6841
- return _context31.stop();
6807
+ return _context32.stop();
6842
6808
  }
6843
- }, _callee31, this, [[19, 50]]);
6809
+ }, _callee32, this, [[19, 50]]);
6844
6810
  }));
6845
6811
  function addMedia() {
6846
6812
  return _addMedia.apply(this, arguments);
@@ -6908,35 +6874,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6908
6874
  * @memberof Meeting
6909
6875
  */
6910
6876
  function () {
6911
- var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(options) {
6877
+ var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(options) {
6912
6878
  var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled;
6913
- return _regenerator.default.wrap(function _callee32$(_context32) {
6914
- while (1) switch (_context32.prev = _context32.next) {
6879
+ return _regenerator.default.wrap(function _callee33$(_context33) {
6880
+ while (1) switch (_context33.prev = _context33.next) {
6915
6881
  case 0:
6916
6882
  this.checkMediaConnection();
6917
6883
  audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
6918
6884
  _loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
6919
6885
  if (this.canUpdateMedia()) {
6920
- _context32.next = 5;
6886
+ _context33.next = 5;
6921
6887
  break;
6922
6888
  }
6923
- return _context32.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
6889
+ return _context33.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
6924
6890
  case 5:
6925
6891
  if (!this.isMultistream) {
6926
- _context32.next = 10;
6892
+ _context33.next = 10;
6927
6893
  break;
6928
6894
  }
6929
6895
  if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
6930
- _context32.next = 8;
6896
+ _context33.next = 8;
6931
6897
  break;
6932
6898
  }
6933
6899
  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');
6934
6900
  case 8:
6935
- _context32.next = 12;
6901
+ _context33.next = 12;
6936
6902
  break;
6937
6903
  case 10:
6938
6904
  if (!(shareAudioEnabled !== undefined)) {
6939
- _context32.next = 12;
6905
+ _context33.next = 12;
6940
6906
  break;
6941
6907
  }
6942
6908
  throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
@@ -6961,18 +6927,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
6961
6927
  this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
6962
6928
  }
6963
6929
  if (this.isMultistream) {
6964
- _context32.next = 18;
6930
+ _context33.next = 18;
6965
6931
  break;
6966
6932
  }
6967
- _context32.next = 18;
6933
+ _context33.next = 18;
6968
6934
  return this.updateTranscodedMediaConnection();
6969
6935
  case 18:
6970
- return _context32.abrupt("return", undefined);
6936
+ return _context33.abrupt("return", undefined);
6971
6937
  case 19:
6972
6938
  case "end":
6973
- return _context32.stop();
6939
+ return _context33.stop();
6974
6940
  }
6975
- }, _callee32, this);
6941
+ }, _callee33, this);
6976
6942
  }));
6977
6943
  function updateMedia(_x32) {
6978
6944
  return _updateMedia.apply(this, arguments);
@@ -7892,37 +7858,37 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
7892
7858
  }, {
7893
7859
  key: "enableMusicMode",
7894
7860
  value: (function () {
7895
- var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(shouldEnableMusicMode) {
7896
- return _regenerator.default.wrap(function _callee33$(_context33) {
7897
- while (1) switch (_context33.prev = _context33.next) {
7861
+ var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(shouldEnableMusicMode) {
7862
+ return _regenerator.default.wrap(function _callee34$(_context34) {
7863
+ while (1) switch (_context34.prev = _context34.next) {
7898
7864
  case 0:
7899
7865
  this.checkMediaConnection();
7900
7866
  if (this.isMultistream) {
7901
- _context33.next = 3;
7867
+ _context34.next = 3;
7902
7868
  break;
7903
7869
  }
7904
7870
  throw new Error('enableMusicMode() only supported with multistream');
7905
7871
  case 3:
7906
7872
  if (!shouldEnableMusicMode) {
7907
- _context33.next = 8;
7873
+ _context34.next = 8;
7908
7874
  break;
7909
7875
  }
7910
- _context33.next = 6;
7876
+ _context34.next = 6;
7911
7877
  return this.sendSlotManager.setCodecParameters(_internalMediaCore.MediaType.AudioMain, {
7912
7878
  maxaveragebitrate: '64000',
7913
7879
  maxplaybackrate: '48000'
7914
7880
  });
7915
7881
  case 6:
7916
- _context33.next = 10;
7882
+ _context34.next = 10;
7917
7883
  break;
7918
7884
  case 8:
7919
- _context33.next = 10;
7885
+ _context34.next = 10;
7920
7886
  return this.sendSlotManager.deleteCodecParameters(_internalMediaCore.MediaType.AudioMain, ['maxaveragebitrate', 'maxplaybackrate']);
7921
7887
  case 10:
7922
7888
  case "end":
7923
- return _context33.stop();
7889
+ return _context34.stop();
7924
7890
  }
7925
- }, _callee33, this);
7891
+ }, _callee34, this);
7926
7892
  }));
7927
7893
  function enableMusicMode(_x33) {
7928
7894
  return _enableMusicMode.apply(this, arguments);
@@ -8015,25 +7981,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8015
7981
  }, {
8016
7982
  key: "publishStream",
8017
7983
  value: (function () {
8018
- var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(mediaType, stream) {
8019
- return _regenerator.default.wrap(function _callee34$(_context34) {
8020
- while (1) switch (_context34.prev = _context34.next) {
7984
+ var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(mediaType, stream) {
7985
+ return _regenerator.default.wrap(function _callee35$(_context35) {
7986
+ while (1) switch (_context35.prev = _context35.next) {
8021
7987
  case 0:
8022
7988
  if (stream) {
8023
- _context34.next = 2;
7989
+ _context35.next = 2;
8024
7990
  break;
8025
7991
  }
8026
- return _context34.abrupt("return");
7992
+ return _context35.abrupt("return");
8027
7993
  case 2:
8028
7994
  if (!this.mediaProperties.webrtcMediaConnection) {
8029
- _context34.next = 7;
7995
+ _context35.next = 7;
8030
7996
  break;
8031
7997
  }
8032
7998
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
8033
- _context34.next = 6;
7999
+ _context35.next = 6;
8034
8000
  break;
8035
8001
  }
8036
- _context34.next = 6;
8002
+ _context35.next = 6;
8037
8003
  return this.sendSlotManager.publishStream(mediaType, stream);
8038
8004
  case 6:
8039
8005
  this.emitPublishStateChangeEvent({
@@ -8044,9 +8010,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8044
8010
  });
8045
8011
  case 7:
8046
8012
  case "end":
8047
- return _context34.stop();
8013
+ return _context35.stop();
8048
8014
  }
8049
- }, _callee34, this);
8015
+ }, _callee35, this);
8050
8016
  }));
8051
8017
  function publishStream(_x34, _x35) {
8052
8018
  return _publishStream.apply(this, arguments);
@@ -8064,21 +8030,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8064
8030
  }, {
8065
8031
  key: "unpublishStream",
8066
8032
  value: (function () {
8067
- var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(mediaType, stream) {
8068
- return _regenerator.default.wrap(function _callee35$(_context35) {
8069
- while (1) switch (_context35.prev = _context35.next) {
8033
+ var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(mediaType, stream) {
8034
+ return _regenerator.default.wrap(function _callee36$(_context36) {
8035
+ while (1) switch (_context36.prev = _context36.next) {
8070
8036
  case 0:
8071
8037
  if (stream) {
8072
- _context35.next = 2;
8038
+ _context36.next = 2;
8073
8039
  break;
8074
8040
  }
8075
- return _context35.abrupt("return");
8041
+ return _context36.abrupt("return");
8076
8042
  case 2:
8077
8043
  if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
8078
- _context35.next = 5;
8044
+ _context36.next = 5;
8079
8045
  break;
8080
8046
  }
8081
- _context35.next = 5;
8047
+ _context36.next = 5;
8082
8048
  return this.sendSlotManager.unpublishStream(mediaType);
8083
8049
  case 5:
8084
8050
  this.emitPublishStateChangeEvent({
@@ -8089,9 +8055,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8089
8055
  });
8090
8056
  case 6:
8091
8057
  case "end":
8092
- return _context35.stop();
8058
+ return _context36.stop();
8093
8059
  }
8094
- }, _callee35, this);
8060
+ }, _callee36, this);
8095
8061
  }));
8096
8062
  function unpublishStream(_x36, _x37) {
8097
8063
  return _unpublishStream.apply(this, arguments);
@@ -8108,67 +8074,67 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8108
8074
  }, {
8109
8075
  key: "publishStreams",
8110
8076
  value: (function () {
8111
- var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(streams) {
8077
+ var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(streams) {
8112
8078
  var _streams$screenShare, _streams$screenShare2, _streams$microphone, _streams$camera, _streams$screenShare3, _streams$screenShare4, _streams$screenShare5, _streams$screenShare6, _streams$screenShare7, _streams$screenShare8;
8113
8079
  var floorRequestNeeded, _streams$screenShare9;
8114
- return _regenerator.default.wrap(function _callee36$(_context36) {
8115
- while (1) switch (_context36.prev = _context36.next) {
8080
+ return _regenerator.default.wrap(function _callee37$(_context37) {
8081
+ while (1) switch (_context37.prev = _context37.next) {
8116
8082
  case 0:
8117
8083
  this.checkMediaConnection();
8118
8084
  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))) {
8119
- _context36.next = 3;
8085
+ _context37.next = 3;
8120
8086
  break;
8121
8087
  }
8122
- return _context36.abrupt("return");
8088
+ return _context37.abrupt("return");
8123
8089
  case 3:
8124
8090
  if (!((streams === null || streams === void 0 ? void 0 : (_streams$microphone = streams.microphone) === null || _streams$microphone === void 0 ? void 0 : _streams$microphone.readyState) === 'ended' || (streams === null || streams === void 0 ? void 0 : (_streams$camera = streams.camera) === null || _streams$camera === void 0 ? void 0 : _streams$camera.readyState) === 'ended' || (streams === null || streams === void 0 ? void 0 : (_streams$screenShare3 = streams.screenShare) === null || _streams$screenShare3 === void 0 ? void 0 : (_streams$screenShare4 = _streams$screenShare3.audio) === null || _streams$screenShare4 === void 0 ? void 0 : _streams$screenShare4.readyState) === 'ended' || (streams === null || streams === void 0 ? void 0 : (_streams$screenShare5 = streams.screenShare) === null || _streams$screenShare5 === void 0 ? void 0 : (_streams$screenShare6 = _streams$screenShare5.video) === null || _streams$screenShare6 === void 0 ? void 0 : _streams$screenShare6.readyState) === 'ended')) {
8125
- _context36.next = 5;
8091
+ _context37.next = 5;
8126
8092
  break;
8127
8093
  }
8128
8094
  throw new Error("Attempted to publish stream with ended readyState, correlationId=".concat(this.correlationId));
8129
8095
  case 5:
8130
8096
  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
8131
8097
  if (!(this.isMultistream && (_streams$screenShare7 = streams.screenShare) !== null && _streams$screenShare7 !== void 0 && _streams$screenShare7.audio)) {
8132
- _context36.next = 10;
8098
+ _context37.next = 10;
8133
8099
  break;
8134
8100
  }
8135
- _context36.next = 9;
8101
+ _context37.next = 9;
8136
8102
  return this.setLocalShareAudioStream(streams.screenShare.audio);
8137
8103
  case 9:
8138
8104
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
8139
8105
  case 10:
8140
8106
  if (!((_streams$screenShare8 = streams.screenShare) !== null && _streams$screenShare8 !== void 0 && _streams$screenShare8.video)) {
8141
- _context36.next = 14;
8107
+ _context37.next = 14;
8142
8108
  break;
8143
8109
  }
8144
- _context36.next = 13;
8110
+ _context37.next = 13;
8145
8111
  return this.setLocalShareVideoStream((_streams$screenShare9 = streams.screenShare) === null || _streams$screenShare9 === void 0 ? void 0 : _streams$screenShare9.video);
8146
8112
  case 13:
8147
8113
  floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
8148
8114
  case 14:
8149
8115
  if (!streams.microphone) {
8150
- _context36.next = 17;
8116
+ _context37.next = 17;
8151
8117
  break;
8152
8118
  }
8153
- _context36.next = 17;
8119
+ _context37.next = 17;
8154
8120
  return this.setLocalAudioStream(streams.microphone);
8155
8121
  case 17:
8156
8122
  if (!streams.camera) {
8157
- _context36.next = 20;
8123
+ _context37.next = 20;
8158
8124
  break;
8159
8125
  }
8160
- _context36.next = 20;
8126
+ _context37.next = 20;
8161
8127
  return this.setLocalVideoStream(streams.camera);
8162
8128
  case 20:
8163
8129
  if (this.isMultistream) {
8164
- _context36.next = 23;
8130
+ _context37.next = 23;
8165
8131
  break;
8166
8132
  }
8167
- _context36.next = 23;
8133
+ _context37.next = 23;
8168
8134
  return this.updateTranscodedMediaConnection();
8169
8135
  case 23:
8170
8136
  if (!floorRequestNeeded) {
8171
- _context36.next = 29;
8137
+ _context37.next = 29;
8172
8138
  break;
8173
8139
  }
8174
8140
  this.localShareInstanceId = _uuid.default.v4();
@@ -8192,13 +8158,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8192
8158
  // we're sending the http request to Locus to request the screen share floor
8193
8159
  // only after the SDP update, because that's how it's always been done for transcoded meetings
8194
8160
  // and also if sharing from the start, we need confluence to have been created
8195
- _context36.next = 29;
8161
+ _context37.next = 29;
8196
8162
  return this.enqueueScreenShareFloorRequest();
8197
8163
  case 29:
8198
8164
  case "end":
8199
- return _context36.stop();
8165
+ return _context37.stop();
8200
8166
  }
8201
- }, _callee36, this);
8167
+ }, _callee37, this);
8202
8168
  }));
8203
8169
  function publishStreams(_x38) {
8204
8170
  return _publishStreams.apply(this, arguments);
@@ -8215,10 +8181,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8215
8181
  }, {
8216
8182
  key: "unpublishStreams",
8217
8183
  value: (function () {
8218
- var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(streams) {
8184
+ var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(streams) {
8219
8185
  var promises, _iterator, _step, stream;
8220
- return _regenerator.default.wrap(function _callee37$(_context37) {
8221
- while (1) switch (_context37.prev = _context37.next) {
8186
+ return _regenerator.default.wrap(function _callee38$(_context38) {
8187
+ while (1) switch (_context38.prev = _context38.next) {
8222
8188
  case 0:
8223
8189
  this.checkMediaConnection();
8224
8190
  promises = [];
@@ -8249,7 +8215,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8249
8215
  if (!this.isMultistream) {
8250
8216
  promises.push(this.updateTranscodedMediaConnection());
8251
8217
  }
8252
- _context37.next = 7;
8218
+ _context38.next = 7;
8253
8219
  return _promise.default.all(promises);
8254
8220
  case 7:
8255
8221
  // we're allowing for the SDK to support just audio share as well
@@ -8270,9 +8236,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8270
8236
  }
8271
8237
  case 8:
8272
8238
  case "end":
8273
- return _context37.stop();
8239
+ return _context38.stop();
8274
8240
  }
8275
- }, _callee37, this);
8241
+ }, _callee38, this);
8276
8242
  }));
8277
8243
  function unpublishStreams(_x39) {
8278
8244
  return _unpublishStreams.apply(this, arguments);
@@ -8334,27 +8300,27 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
8334
8300
  }], [{
8335
8301
  key: "handleDeviceLogging",
8336
8302
  value: (function () {
8337
- var _handleDeviceLogging = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
8303
+ var _handleDeviceLogging = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
8338
8304
  var devices;
8339
- return _regenerator.default.wrap(function _callee38$(_context38) {
8340
- while (1) switch (_context38.prev = _context38.next) {
8305
+ return _regenerator.default.wrap(function _callee39$(_context39) {
8306
+ while (1) switch (_context39.prev = _context39.next) {
8341
8307
  case 0:
8342
- _context38.prev = 0;
8343
- _context38.next = 3;
8308
+ _context39.prev = 0;
8309
+ _context39.next = 3;
8344
8310
  return (0, _mediaHelpers.getDevices)();
8345
8311
  case 3:
8346
- devices = _context38.sent;
8312
+ devices = _context39.sent;
8347
8313
  _util2.default.handleDeviceLogging(devices);
8348
- _context38.next = 9;
8314
+ _context39.next = 9;
8349
8315
  break;
8350
8316
  case 7:
8351
- _context38.prev = 7;
8352
- _context38.t0 = _context38["catch"](0);
8317
+ _context39.prev = 7;
8318
+ _context39.t0 = _context39["catch"](0);
8353
8319
  case 9:
8354
8320
  case "end":
8355
- return _context38.stop();
8321
+ return _context39.stop();
8356
8322
  }
8357
- }, _callee38, null, [[0, 7]]);
8323
+ }, _callee39, null, [[0, 7]]);
8358
8324
  }));
8359
8325
  function handleDeviceLogging() {
8360
8326
  return _handleDeviceLogging.apply(this, arguments);