@webex/plugin-meetings 2.52.8 → 2.52.10

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.
@@ -4004,10 +4004,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4004
4004
  }, {
4005
4005
  key: "usePhoneAudio",
4006
4006
  value: function usePhoneAudio(phoneNumber) {
4007
- if (!phoneNumber) {
4008
- return this.dialInPstn();
4009
- }
4010
- return this.dialOutPstn(phoneNumber);
4007
+ var _this35 = this;
4008
+ var promise = phoneNumber ? this.dialOutPstn(phoneNumber) : this.dialInPstn();
4009
+ return promise.then(function () {
4010
+ _loggerProxy.default.logger.info("Meeting:index#usePhoneAudio --> ".concat(phoneNumber ? 'dialOutPstn' : 'dialInPstn', " request completed"));
4011
+ _loggerProxy.default.logger.info("Meeting:index#usePhoneAudio --> removing audio track from desktop");
4012
+
4013
+ // removing audio from desktop to avoid echo as phone audio is being used
4014
+ _media.default.stopTracks(_this35.mediaProperties.audioTrack);
4015
+ }).catch(function (error) {
4016
+ _loggerProxy.default.logger.error('Meeting:index#usePhoneAudio --> Failed to move audio to phone', error);
4017
+ return _promise.default.reject(error);
4018
+ });
4011
4019
  }
4012
4020
 
4013
4021
  /**
@@ -4032,7 +4040,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4032
4040
  }, {
4033
4041
  key: "dialInPstn",
4034
4042
  value: function dialInPstn() {
4035
- var _this35 = this;
4043
+ var _this36 = this;
4036
4044
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
4037
4045
 
4038
4046
  var correlationId = this.correlationId,
@@ -4046,14 +4054,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4046
4054
  locusUrl: locusUrl,
4047
4055
  clientUrl: this.deviceUrl
4048
4056
  }).then(function (res) {
4049
- _this35.locusInfo.onFullLocus(res.body.locus);
4057
+ _this36.locusInfo.onFullLocus(res.body.locus);
4050
4058
  }).catch(function (error) {
4051
4059
  var _error$error2;
4052
4060
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
4053
- correlation_id: _this35.correlationId,
4054
- dial_in_url: _this35.dialInUrl,
4061
+ correlation_id: _this36.correlationId,
4062
+ dial_in_url: _this36.dialInUrl,
4055
4063
  locus_id: locusUrl.split('/').pop(),
4056
- client_url: _this35.deviceUrl,
4064
+ client_url: _this36.deviceUrl,
4057
4065
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
4058
4066
  stack: error.stack
4059
4067
  });
@@ -4071,7 +4079,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4071
4079
  }, {
4072
4080
  key: "dialOutPstn",
4073
4081
  value: function dialOutPstn(phoneNumber) {
4074
- var _this36 = this;
4082
+ var _this37 = this;
4075
4083
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
4076
4084
 
4077
4085
  var correlationId = this.correlationId,
@@ -4086,14 +4094,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4086
4094
  locusUrl: locusUrl,
4087
4095
  clientUrl: this.deviceUrl
4088
4096
  }).then(function (res) {
4089
- _this36.locusInfo.onFullLocus(res.body.locus);
4097
+ _this37.locusInfo.onFullLocus(res.body.locus);
4090
4098
  }).catch(function (error) {
4091
4099
  var _error$error3;
4092
4100
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
4093
- correlation_id: _this36.correlationId,
4094
- dial_out_url: _this36.dialOutUrl,
4101
+ correlation_id: _this37.correlationId,
4102
+ dial_out_url: _this37.dialOutUrl,
4095
4103
  locus_id: locusUrl.split('/').pop(),
4096
- client_url: _this36.deviceUrl,
4104
+ client_url: _this37.deviceUrl,
4097
4105
  reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
4098
4106
  stack: error.stack
4099
4107
  });
@@ -4124,7 +4132,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4124
4132
  }, {
4125
4133
  key: "moveTo",
4126
4134
  value: function moveTo(resourceId) {
4127
- var _this37 = this;
4135
+ var _this38 = this;
4128
4136
  if (!resourceId) {
4129
4137
  throw new _parameter.default('Cannot move call without a resourceId.');
4130
4138
  }
@@ -4160,12 +4168,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4160
4168
  while (1) switch (_context4.prev = _context4.next) {
4161
4169
  case 0:
4162
4170
  _context4.prev = 0;
4163
- if (!_this37.isSharing) {
4171
+ if (!_this38.isSharing) {
4164
4172
  _context4.next = 4;
4165
4173
  break;
4166
4174
  }
4167
4175
  _context4.next = 4;
4168
- return _this37.releaseScreenShareFloor();
4176
+ return _this38.releaseScreenShareFloor();
4169
4177
  case 4:
4170
4178
  mediaSettings = {
4171
4179
  mediaDirection: {
@@ -4177,22 +4185,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4177
4185
  receiveShare: true
4178
4186
  }
4179
4187
  }; // clean up the local tracks
4180
- _this37.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
4188
+ _this38.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
4181
4189
 
4182
4190
  // close the existing local tracks
4183
4191
  _context4.next = 8;
4184
- return _this37.closeLocalStream();
4192
+ return _this38.closeLocalStream();
4185
4193
  case 8:
4186
4194
  _context4.next = 10;
4187
- return _this37.closeLocalShare();
4195
+ return _this38.closeLocalShare();
4188
4196
  case 10:
4189
- _this37.mediaProperties.unsetMediaTracks();
4197
+ _this38.mediaProperties.unsetMediaTracks();
4190
4198
 
4191
4199
  // 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
4192
4200
  // once the DX answers we establish connection back the media server with only receiveShare enabled
4193
4201
  // @ts-ignore - reconnectMedia does not accept any argument
4194
4202
  _context4.next = 13;
4195
- return _this37.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
4203
+ return _this38.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
4196
4204
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
4197
4205
  });
4198
4206
  case 13:
@@ -4203,8 +4211,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4203
4211
  _context4.t0 = _context4["catch"](0);
4204
4212
  _loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context4.t0);
4205
4213
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
4206
- correlation_id: _this37.correlationId,
4207
- locus_id: _this37.locusUrl.split('/').pop(),
4214
+ correlation_id: _this38.correlationId,
4215
+ locus_id: _this38.locusUrl.split('/').pop(),
4208
4216
  reason: _context4.t0.message,
4209
4217
  stack: _context4.t0.stack
4210
4218
  });
@@ -4219,12 +4227,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4219
4227
  resourceId: resourceId,
4220
4228
  moveToResource: true
4221
4229
  }).then(function () {
4222
- _this37.meetingFiniteStateMachine.join();
4230
+ _this38.meetingFiniteStateMachine.join();
4223
4231
  }).catch(function (error) {
4224
- _this37.meetingFiniteStateMachine.fail(error);
4232
+ _this38.meetingFiniteStateMachine.fail(error);
4225
4233
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
4226
- correlation_id: _this37.correlationId,
4227
- locus_id: _this37.locusUrl.split('/').pop(),
4234
+ correlation_id: _this38.correlationId,
4235
+ locus_id: _this38.locusUrl.split('/').pop(),
4228
4236
  reason: error.message,
4229
4237
  stack: error.stack
4230
4238
  });
@@ -4243,7 +4251,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4243
4251
  }, {
4244
4252
  key: "moveFrom",
4245
4253
  value: function moveFrom(resourceId) {
4246
- var _this38 = this;
4254
+ var _this39 = this;
4247
4255
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
4248
4256
  if (!resourceId) {
4249
4257
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -4254,19 +4262,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4254
4262
  meeting: this
4255
4263
  });
4256
4264
  return _util.default.joinMeetingOptions(this).then(function () {
4257
- return _util.default.leaveMeeting(_this38, {
4265
+ return _util.default.leaveMeeting(_this39, {
4258
4266
  resourceId: resourceId,
4259
4267
  correlationId: oldCorrelationId,
4260
4268
  moveMeeting: true
4261
4269
  }).then(function () {
4262
- _this38.resourceId = '';
4270
+ _this39.resourceId = '';
4263
4271
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
4264
4272
  });
4265
4273
  }).catch(function (error) {
4266
- _this38.meetingFiniteStateMachine.fail(error);
4274
+ _this39.meetingFiniteStateMachine.fail(error);
4267
4275
  _metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
4268
- correlation_id: _this38.correlationId,
4269
- locus_id: _this38.locusUrl.split('/').pop(),
4276
+ correlation_id: _this39.correlationId,
4277
+ locus_id: _this39.locusUrl.split('/').pop(),
4270
4278
  reason: error.message,
4271
4279
  stack: error.stack
4272
4280
  });
@@ -4289,7 +4297,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4289
4297
  * @memberof Meeting
4290
4298
  */
4291
4299
  function addMedia() {
4292
- var _this39 = this;
4300
+ var _this40 = this;
4293
4301
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4294
4302
  var LOG_HEADER = 'Meeting:index#addMedia -->';
4295
4303
  var turnDiscoverySkippedReason;
@@ -4332,43 +4340,43 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4332
4340
  }
4333
4341
  });
4334
4342
  return _util.default.validateOptions(options).then(function () {
4335
- return _this39.roap.doTurnDiscovery(_this39, false);
4343
+ return _this40.roap.doTurnDiscovery(_this40, false);
4336
4344
  }).then(function (turnDiscoveryObject) {
4337
4345
  turnDiscoverySkippedReason = turnDiscoveryObject.turnDiscoverySkippedReason;
4338
4346
  turnServerUsed = !turnDiscoverySkippedReason;
4339
4347
  var turnServerInfo = turnDiscoveryObject.turnServerInfo;
4340
- _this39.mediaProperties.setMediaPeerConnection(_util4.default.createPeerConnection(turnServerInfo));
4341
- _this39.setMercuryListener();
4342
- _peerConnectionManager.default.setPeerConnectionEvents(_this39);
4343
- return _this39.preMedia(localStream, localShare, mediaSettings);
4348
+ _this40.mediaProperties.setMediaPeerConnection(_util4.default.createPeerConnection(turnServerInfo));
4349
+ _this40.setMercuryListener();
4350
+ _peerConnectionManager.default.setPeerConnectionEvents(_this40);
4351
+ return _this40.preMedia(localStream, localShare, mediaSettings);
4344
4352
  }).then(function () {
4345
- return _media.default.attachMedia(_this39.mediaProperties, {
4346
- meetingId: _this39.id,
4347
- remoteQualityLevel: _this39.mediaProperties.remoteQualityLevel,
4353
+ return _media.default.attachMedia(_this40.mediaProperties, {
4354
+ meetingId: _this40.id,
4355
+ remoteQualityLevel: _this40.mediaProperties.remoteQualityLevel,
4348
4356
  // @ts-ignore - config coming from registerPlugin
4349
- enableRtx: _this39.config.enableRtx,
4357
+ enableRtx: _this40.config.enableRtx,
4350
4358
  // @ts-ignore - config coming from registerPlugin
4351
- enableExtmap: _this39.config.enableExtmap,
4352
- setStartLocalSDPGenRemoteSDPRecvDelay: _this39.setStartLocalSDPGenRemoteSDPRecvDelay.bind(_this39)
4359
+ enableExtmap: _this40.config.enableExtmap,
4360
+ setStartLocalSDPGenRemoteSDPRecvDelay: _this40.setStartLocalSDPGenRemoteSDPRecvDelay.bind(_this40)
4353
4361
  });
4354
4362
  }).then(function (peerConnection) {
4355
- return _this39.getDevices().then(function (devices) {
4363
+ return _this40.getDevices().then(function (devices) {
4356
4364
  _util.default.handleDeviceLogging(devices);
4357
4365
  return peerConnection;
4358
4366
  });
4359
4367
  }).then(function (peerConnection) {
4360
- _this39.handleMediaLogging(_this39.mediaProperties);
4368
+ _this40.handleMediaLogging(_this40.mediaProperties);
4361
4369
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection Received from attachMedia "));
4362
- _this39.setRemoteStream(peerConnection);
4370
+ _this40.setRemoteStream(peerConnection);
4363
4371
  // @ts-ignore - config coming from registerPlugin
4364
- if (_this39.config.stats.enableStatsAnalyzer) {
4372
+ if (_this40.config.stats.enableStatsAnalyzer) {
4365
4373
  // TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
4366
4374
  // @ts-ignore - config coming from registerPlugin
4367
- _this39.networkQualityMonitor = new _networkQualityMonitor.default(_this39.config.stats);
4375
+ _this40.networkQualityMonitor = new _networkQualityMonitor.default(_this40.config.stats);
4368
4376
  // @ts-ignore - config coming from registerPlugin
4369
- _this39.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(_this39.config.stats, _this39.networkQualityMonitor);
4370
- _this39.setupStatsAnalyzerEventHandlers();
4371
- _this39.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this39.sendNetworkQualityEvent.bind(_this39));
4377
+ _this40.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(_this40.config.stats, _this40.networkQualityMonitor);
4378
+ _this40.setupStatsAnalyzerEventHandlers();
4379
+ _this40.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this40.sendNetworkQualityEvent.bind(_this40));
4372
4380
  }
4373
4381
  }).catch(function (error) {
4374
4382
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
@@ -4379,12 +4387,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4379
4387
 
4380
4388
  // eslint-disable-next-line func-names
4381
4389
  // eslint-disable-next-line prefer-arrow-callback
4382
- if (_this39.type === _constants._CALL_) {
4390
+ if (_this40.type === _constants._CALL_) {
4383
4391
  resolve();
4384
4392
  }
4385
4393
  var joiningTimer = setInterval(function () {
4386
4394
  timerCount += 1;
4387
- if (_this39.meetingState === _constants.FULL_STATE.ACTIVE) {
4395
+ if (_this40.meetingState === _constants.FULL_STATE.ACTIVE) {
4388
4396
  clearInterval(joiningTimer);
4389
4397
  resolve();
4390
4398
  }
@@ -4395,51 +4403,51 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4395
4403
  }, 1000);
4396
4404
  });
4397
4405
  }).then(function () {
4398
- return logRequest(_this39.roap.sendRoapMediaRequest({
4399
- sdp: _this39.mediaProperties.peerConnection.sdp,
4400
- roapSeq: _this39.roapSeq,
4401
- meeting: _this39 // or can pass meeting ID
4406
+ return logRequest(_this40.roap.sendRoapMediaRequest({
4407
+ sdp: _this40.mediaProperties.peerConnection.sdp,
4408
+ roapSeq: _this40.roapSeq,
4409
+ meeting: _this40 // or can pass meeting ID
4402
4410
  }), {
4403
4411
  header: "".concat(LOG_HEADER, " Send Roap Media Request."),
4404
4412
  success: "".concat(LOG_HEADER, " Successfully send roap media request"),
4405
4413
  failure: "".concat(LOG_HEADER, " Error joining the call on send roap media request, ")
4406
4414
  });
4407
4415
  }).then(function () {
4408
- return _this39.mediaProperties.waitForIceConnectedState().catch(function () {
4416
+ return _this40.mediaProperties.waitForIceConnectedState().catch(function () {
4409
4417
  throw (0, _webexErrors.createMeetingsError)(30202, 'Meeting connection failed');
4410
4418
  });
4411
4419
  }).then(function () {
4412
4420
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
4413
4421
  if (mediaSettings && mediaSettings.sendShare && localShare) {
4414
- if (_this39.state === _constants.MEETING_STATE.STATES.JOINED) {
4415
- return _this39.requestScreenShareFloor();
4422
+ if (_this40.state === _constants.MEETING_STATE.STATES.JOINED) {
4423
+ return _this40.requestScreenShareFloor();
4416
4424
  }
4417
4425
 
4418
4426
  // When the self state changes to JOINED then request the floor
4419
- _this39.floorGrantPending = true;
4427
+ _this40.floorGrantPending = true;
4420
4428
  }
4421
4429
  return {};
4422
4430
  }).then(function () {
4423
- return _this39.mediaProperties.getCurrentConnectionType();
4431
+ return _this40.mediaProperties.getCurrentConnectionType();
4424
4432
  }).then(function (connectionType) {
4425
4433
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, {
4426
- correlation_id: _this39.correlationId,
4427
- locus_id: _this39.locusUrl.split('/').pop(),
4434
+ correlation_id: _this40.correlationId,
4435
+ locus_id: _this40.locusUrl.split('/').pop(),
4428
4436
  connectionType: connectionType
4429
4437
  });
4430
4438
  }).catch(function (error) {
4431
4439
  // Clean up stats analyzer, peer connection, and turn off listeners
4432
- var stopStatsAnalyzer = _this39.statsAnalyzer ? _this39.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
4440
+ var stopStatsAnalyzer = _this40.statsAnalyzer ? _this40.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
4433
4441
  return stopStatsAnalyzer.then(function () {
4434
- _this39.statsAnalyzer = null;
4435
- if (_this39.mediaProperties.peerConnection) {
4436
- _this39.closePeerConnections();
4437
- _this39.unsetPeerConnections();
4442
+ _this40.statsAnalyzer = null;
4443
+ if (_this40.mediaProperties.peerConnection) {
4444
+ _this40.closePeerConnections();
4445
+ _this40.unsetPeerConnections();
4438
4446
  }
4439
4447
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
4440
4448
  _metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
4441
- correlation_id: _this39.correlationId,
4442
- locus_id: _this39.locusUrl.split('/').pop(),
4449
+ correlation_id: _this40.correlationId,
4450
+ locus_id: _this40.locusUrl.split('/').pop(),
4443
4451
  reason: error.message,
4444
4452
  stack: error.stack,
4445
4453
  code: error.code,
@@ -4448,16 +4456,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4448
4456
  });
4449
4457
 
4450
4458
  // Upload logs on error while adding media
4451
- _triggerProxy.default.trigger(_this39, {
4459
+ _triggerProxy.default.trigger(_this40, {
4452
4460
  file: 'meeting/index',
4453
4461
  function: 'addMedia'
4454
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this39);
4462
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this40);
4455
4463
 
4456
4464
  // If addMedia failes for not establishing connection then
4457
4465
  // leave the meeting with reson connection failed as meeting anyways will end
4458
4466
  // and cannot be connected unless network condition is checked for firewall
4459
4467
  if (error.code === _webexErrors.InvalidSdpError.CODE) {
4460
- _this39.leave({
4468
+ _this40.leave({
4461
4469
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
4462
4470
  });
4463
4471
  }
@@ -4487,7 +4495,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4487
4495
  }, {
4488
4496
  key: "enqueueMediaUpdate",
4489
4497
  value: function enqueueMediaUpdate(mediaUpdateType, options) {
4490
- var _this40 = this;
4498
+ var _this41 = this;
4491
4499
  return new _promise.default(function (resolve, reject) {
4492
4500
  var queueItem = {
4493
4501
  pendingPromiseResolve: resolve,
@@ -4496,7 +4504,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4496
4504
  options: options
4497
4505
  };
4498
4506
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
4499
- _this40.queuedMediaUpdates.push(queueItem);
4507
+ _this41.queuedMediaUpdates.push(queueItem);
4500
4508
  });
4501
4509
  }
4502
4510
  }, {
@@ -4515,7 +4523,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4515
4523
  * @memberof Meeting
4516
4524
  */
4517
4525
  function updateMedia() {
4518
- var _this41 = this;
4526
+ var _this42 = this;
4519
4527
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4520
4528
  var LOG_HEADER = 'Meeting:index#updateMedia -->';
4521
4529
  if (!this.canUpdateMedia()) {
@@ -4526,48 +4534,48 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4526
4534
  mediaSettings = options.mediaSettings;
4527
4535
  var previousSendShareStatus = this.mediaProperties.mediaDirection.sendShare;
4528
4536
  return _util.default.validateOptions(options).then(function () {
4529
- return _this41.preMedia(localStream, localShare, mediaSettings);
4537
+ return _this42.preMedia(localStream, localShare, mediaSettings);
4530
4538
  }).then(function () {
4531
- return _media.default.updateMedia(_this41.mediaProperties, {
4532
- meetingId: _this41.id,
4533
- remoteQualityLevel: _this41.mediaProperties.remoteQualityLevel,
4539
+ return _media.default.updateMedia(_this42.mediaProperties, {
4540
+ meetingId: _this42.id,
4541
+ remoteQualityLevel: _this42.mediaProperties.remoteQualityLevel,
4534
4542
  // @ts-ignore - config coming from registerPlugin
4535
- enableRtx: _this41.config.enableRtx,
4543
+ enableRtx: _this42.config.enableRtx,
4536
4544
  // @ts-ignore - config coming from registerPlugin
4537
- enableExtmap: _this41.config.enableExtmap
4545
+ enableExtmap: _this42.config.enableExtmap
4538
4546
  }).then(function (peerConnection) {
4539
4547
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection received from updateMedia, ").concat(peerConnection));
4540
- _this41.setRemoteStream(peerConnection);
4548
+ _this42.setRemoteStream(peerConnection);
4541
4549
  if (mediaSettings.receiveShare || localShare) {
4542
4550
  _peerConnectionManager.default.setContentSlides(peerConnection);
4543
4551
  }
4544
4552
  }).catch(function (error) {
4545
4553
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error updatedMedia, "), error);
4546
4554
  _metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
4547
- correlation_id: _this41.correlationId,
4548
- locus_id: _this41.locusUrl.split('/').pop(),
4555
+ correlation_id: _this42.correlationId,
4556
+ locus_id: _this42.locusUrl.split('/').pop(),
4549
4557
  reason: error.message,
4550
4558
  stack: error.stack
4551
4559
  });
4552
4560
  throw error;
4553
4561
  }).then(function () {
4554
- return logRequest(_this41.roap.sendRoapMediaRequest({
4555
- sdp: _this41.mediaProperties.peerConnection.sdp,
4556
- roapSeq: _this41.roapSeq,
4557
- meeting: _this41 // or can pass meeting ID
4562
+ return logRequest(_this42.roap.sendRoapMediaRequest({
4563
+ sdp: _this42.mediaProperties.peerConnection.sdp,
4564
+ roapSeq: _this42.roapSeq,
4565
+ meeting: _this42 // or can pass meeting ID
4558
4566
  }), {
4559
4567
  header: "".concat(LOG_HEADER, " sendRoapMediaRequest being sent"),
4560
4568
  success: "".concat(LOG_HEADER, " sendRoadMediaRequest successful"),
4561
4569
  failure: "".concat(LOG_HEADER, " Error updateMedia on send roap media request, ")
4562
4570
  });
4563
4571
  }).then(function () {
4564
- return _this41.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4572
+ return _this42.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4565
4573
  }).then(function (startShare) {
4566
4574
  // This is a special case if we do an /floor grant followed by /media
4567
4575
  // we actually get a OFFER from the server and a GLAR condition happens
4568
4576
  if (startShare) {
4569
4577
  // We are assuming that the clients are connected when doing an update
4570
- return _this41.requestScreenShareFloor();
4578
+ return _this42.requestScreenShareFloor();
4571
4579
  }
4572
4580
  return _promise.default.resolve();
4573
4581
  });
@@ -4588,7 +4596,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4588
4596
  key: "updateAudio",
4589
4597
  value: function () {
4590
4598
  var _updateAudio = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(options) {
4591
- var _this42 = this;
4599
+ var _this43 = this;
4592
4600
  var sendAudio, receiveAudio, stream, audioTransceiver, track, bnrEnabled;
4593
4601
  return _regenerator.default.wrap(function _callee5$(_context5) {
4594
4602
  while (1) switch (_context5.prev = _context5.next) {
@@ -4629,13 +4637,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4629
4637
  localStream: stream
4630
4638
  }).then(function () {
4631
4639
  var previousMediaDirection = {};
4632
- if (_this42.mediaProperties.mediaDirection) {
4640
+ if (_this43.mediaProperties.mediaDirection) {
4633
4641
  previousMediaDirection = {
4634
- sendTrack: _this42.mediaProperties.mediaDirection.sendAudio,
4635
- receiveTrack: _this42.mediaProperties.mediaDirection.receiveAudio
4642
+ sendTrack: _this43.mediaProperties.mediaDirection.sendAudio,
4643
+ receiveTrack: _this43.mediaProperties.mediaDirection.receiveAudio
4636
4644
  };
4637
4645
  } else {
4638
- _this42.mediaProperties.mediaDirection = {};
4646
+ _this43.mediaProperties.mediaDirection = {};
4639
4647
  }
4640
4648
  return _util.default.updateTransceiver({
4641
4649
  type: 'audio',
@@ -4643,20 +4651,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4643
4651
  receiveTrack: options.receiveAudio,
4644
4652
  track: track,
4645
4653
  transceiver: audioTransceiver,
4646
- peerConnection: _this42.mediaProperties.peerConnection,
4654
+ peerConnection: _this43.mediaProperties.peerConnection,
4647
4655
  previousMediaDirection: previousMediaDirection
4648
4656
  }, {
4649
- mediaProperties: _this42.mediaProperties,
4650
- meeting: _this42,
4651
- id: _this42.id
4657
+ mediaProperties: _this43.mediaProperties,
4658
+ meeting: _this43,
4659
+ id: _this43.id
4652
4660
  });
4653
4661
  }).then(function () {
4654
- _this42.setLocalAudioTrack(track);
4655
- _this42.mediaProperties.mediaDirection.sendAudio = sendAudio;
4656
- _this42.mediaProperties.mediaDirection.receiveAudio = receiveAudio;
4662
+ _this43.setLocalAudioTrack(track);
4663
+ _this43.mediaProperties.mediaDirection.sendAudio = sendAudio;
4664
+ _this43.mediaProperties.mediaDirection.receiveAudio = receiveAudio;
4657
4665
 
4658
4666
  // audio state could be undefined if you have not sent audio before
4659
- _this42.audio = _this42.audio || (0, _muteState.default)(_constants.AUDIO, _this42, _this42.mediaProperties.mediaDirection);
4667
+ _this43.audio = _this43.audio || (0, _muteState.default)(_constants.AUDIO, _this43, _this43.mediaProperties.mediaDirection);
4660
4668
  }));
4661
4669
  case 16:
4662
4670
  case "end":
@@ -4682,7 +4690,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4682
4690
  }, {
4683
4691
  key: "updateVideo",
4684
4692
  value: function updateVideo(options) {
4685
- var _this43 = this;
4693
+ var _this44 = this;
4686
4694
  if (!this.canUpdateMedia()) {
4687
4695
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.VIDEO, options);
4688
4696
  }
@@ -4704,23 +4712,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4704
4712
  receiveTrack: options.receiveVideo,
4705
4713
  track: track,
4706
4714
  transceiver: videoTransceiver,
4707
- peerConnection: _this43.mediaProperties.peerConnection,
4715
+ peerConnection: _this44.mediaProperties.peerConnection,
4708
4716
  previousMediaDirection: {
4709
- sendTrack: _this43.mediaProperties.mediaDirection.sendVideo,
4710
- receiveTrack: _this43.mediaProperties.mediaDirection.receiveVideo
4717
+ sendTrack: _this44.mediaProperties.mediaDirection.sendVideo,
4718
+ receiveTrack: _this44.mediaProperties.mediaDirection.receiveVideo
4711
4719
  }
4712
4720
  }, {
4713
- mediaProperties: _this43.mediaProperties,
4714
- meeting: _this43,
4715
- id: _this43.id
4721
+ mediaProperties: _this44.mediaProperties,
4722
+ meeting: _this44,
4723
+ id: _this44.id
4716
4724
  });
4717
4725
  }).then(function () {
4718
- _this43.setLocalVideoTrack(track);
4719
- _this43.mediaProperties.mediaDirection.sendVideo = sendVideo;
4720
- _this43.mediaProperties.mediaDirection.receiveVideo = receiveVideo;
4726
+ _this44.setLocalVideoTrack(track);
4727
+ _this44.mediaProperties.mediaDirection.sendVideo = sendVideo;
4728
+ _this44.mediaProperties.mediaDirection.receiveVideo = receiveVideo;
4721
4729
 
4722
4730
  // video state could be undefined if you have not sent video before
4723
- _this43.video = _this43.video || (0, _muteState.default)(_constants.VIDEO, _this43, _this43.mediaProperties.mediaDirection);
4731
+ _this44.video = _this44.video || (0, _muteState.default)(_constants.VIDEO, _this44, _this44.mediaProperties.mediaDirection);
4724
4732
  });
4725
4733
  }
4726
4734
 
@@ -4760,7 +4768,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4760
4768
  }, {
4761
4769
  key: "updateShare",
4762
4770
  value: function updateShare(options) {
4763
- var _this44 = this;
4771
+ var _this45 = this;
4764
4772
  if (!options.skipSignalingCheck && !this.canUpdateMedia()) {
4765
4773
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE, options);
4766
4774
  }
@@ -4778,7 +4786,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4778
4786
  sendShare: sendShare,
4779
4787
  localShare: stream
4780
4788
  }).then(function () {
4781
- return _this44.checkForStopShare(sendShare, previousSendShareStatus);
4789
+ return _this45.checkForStopShare(sendShare, previousSendShareStatus);
4782
4790
  }).then(function (startShare) {
4783
4791
  return _util.default.updateTransceiver({
4784
4792
  type: 'video',
@@ -4786,38 +4794,38 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4786
4794
  receiveTrack: receiveShare,
4787
4795
  track: track,
4788
4796
  transceiver: shareTransceiver,
4789
- peerConnection: _this44.mediaProperties.peerConnection,
4797
+ peerConnection: _this45.mediaProperties.peerConnection,
4790
4798
  previousMediaDirection: {
4791
- sendTrack: _this44.mediaProperties.mediaDirection.sendShare,
4792
- receiveTrack: _this44.mediaProperties.mediaDirection.receiveShare
4799
+ sendTrack: _this45.mediaProperties.mediaDirection.sendShare,
4800
+ receiveTrack: _this45.mediaProperties.mediaDirection.receiveShare
4793
4801
  }
4794
4802
  }, {
4795
- mediaProperties: _this44.mediaProperties,
4796
- meeting: _this44,
4797
- id: _this44.id
4803
+ mediaProperties: _this45.mediaProperties,
4804
+ meeting: _this45,
4805
+ id: _this45.id
4798
4806
  }).then(function () {
4799
4807
  if (startShare) {
4800
- return _this44.requestScreenShareFloor();
4808
+ return _this45.requestScreenShareFloor();
4801
4809
  }
4802
4810
  return _promise.default.resolve();
4803
4811
  });
4804
4812
  }).then(function () {
4805
- _this44.mediaProperties.mediaDirection.sendShare = sendShare;
4806
- _this44.mediaProperties.mediaDirection.receiveShare = receiveShare;
4813
+ _this45.mediaProperties.mediaDirection.sendShare = sendShare;
4814
+ _this45.mediaProperties.mediaDirection.receiveShare = receiveShare;
4807
4815
  }).catch(function (error) {
4808
- _this44.unsetLocalShareTrack();
4816
+ _this45.unsetLocalShareTrack();
4809
4817
  throw error;
4810
4818
  }).finally(function () {
4811
4819
  var delay = 1e3;
4812
4820
  // Check to see if share was stopped natively before onended was assigned.
4813
- var sharingModeIsActive = _this44.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
4814
- var isSharingOutOfSync = sharingModeIsActive && !_this44.isLocalShareLive;
4821
+ var sharingModeIsActive = _this45.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
4822
+ var isSharingOutOfSync = sharingModeIsActive && !_this45.isLocalShareLive;
4815
4823
  if (isSharingOutOfSync) {
4816
4824
  // Adding a delay to avoid a 409 from server
4817
4825
  // which results in user still appearing as if sharing.
4818
4826
  // Also delay give time for changes to peerConnection.
4819
4827
  setTimeout(function () {
4820
- return _this44.handleShareTrackEnded(stream);
4828
+ return _this45.handleShareTrackEnded(stream);
4821
4829
  }, delay);
4822
4830
  }
4823
4831
  });
@@ -4858,7 +4866,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4858
4866
  }, {
4859
4867
  key: "acknowledge",
4860
4868
  value: function acknowledge(type) {
4861
- var _this45 = this;
4869
+ var _this46 = this;
4862
4870
  if (!type) {
4863
4871
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
4864
4872
  }
@@ -4870,10 +4878,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4870
4878
  }).then(function (response) {
4871
4879
  return _promise.default.resolve(response);
4872
4880
  }).then(function (response) {
4873
- _this45.meetingFiniteStateMachine.ring(type);
4881
+ _this46.meetingFiniteStateMachine.ring(type);
4874
4882
  _metrics.default.postEvent({
4875
4883
  event: _config.eventType.ALERT_DISPLAYED,
4876
- meeting: _this45
4884
+ meeting: _this46
4877
4885
  });
4878
4886
  return _promise.default.resolve({
4879
4887
  response: response
@@ -4897,12 +4905,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4897
4905
  }, {
4898
4906
  key: "decline",
4899
4907
  value: function decline(reason) {
4900
- var _this46 = this;
4908
+ var _this47 = this;
4901
4909
  return _util.default.declineMeeting(this, reason).then(function (decline) {
4902
- _this46.meetingFiniteStateMachine.decline();
4910
+ _this47.meetingFiniteStateMachine.decline();
4903
4911
  return _promise.default.resolve(decline);
4904
4912
  }).catch(function (error) {
4905
- _this46.meetingFiniteStateMachine.fail(error);
4913
+ _this47.meetingFiniteStateMachine.fail(error);
4906
4914
  return _promise.default.reject(error);
4907
4915
  });
4908
4916
  }
@@ -4918,7 +4926,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4918
4926
  }, {
4919
4927
  key: "leave",
4920
4928
  value: function leave() {
4921
- var _this47 = this;
4929
+ var _this48 = this;
4922
4930
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4923
4931
  _metrics.default.postEvent({
4924
4932
  event: _config.eventType.LEAVE,
@@ -4931,39 +4939,39 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4931
4939
  var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
4932
4940
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
4933
4941
  return _util.default.leaveMeeting(this, options).then(function (leave) {
4934
- _this47.meetingFiniteStateMachine.leave();
4935
- _this47.clearMeetingData();
4942
+ _this48.meetingFiniteStateMachine.leave();
4943
+ _this48.clearMeetingData();
4936
4944
 
4937
4945
  // upload logs on leave irrespective of meeting delete
4938
- _triggerProxy.default.trigger(_this47, {
4946
+ _triggerProxy.default.trigger(_this48, {
4939
4947
  file: 'meeting/index',
4940
4948
  function: 'leave'
4941
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
4949
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this48);
4942
4950
 
4943
4951
  // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
4944
- if (_this47.wirelessShare || _this47.guest) {
4952
+ if (_this48.wirelessShare || _this48.guest) {
4945
4953
  // If screen sharing clean the meeting object
4946
- _triggerProxy.default.trigger(_this47, {
4954
+ _triggerProxy.default.trigger(_this48, {
4947
4955
  file: 'meeting/index',
4948
4956
  function: 'leave'
4949
4957
  }, _constants.EVENTS.DESTROY_MEETING, {
4950
4958
  reason: options.reason,
4951
- meetingId: _this47.id
4959
+ meetingId: _this48.id
4952
4960
  });
4953
4961
  }
4954
4962
  _loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
4955
4963
  return leave;
4956
4964
  }).catch(function (error) {
4957
- _this47.meetingFiniteStateMachine.fail(error);
4965
+ _this48.meetingFiniteStateMachine.fail(error);
4958
4966
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
4959
4967
  // upload logs on leave irrespective of meeting delete
4960
- _triggerProxy.default.trigger(_this47, {
4968
+ _triggerProxy.default.trigger(_this48, {
4961
4969
  file: 'meeting/index',
4962
4970
  function: 'leave'
4963
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this47);
4971
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this48);
4964
4972
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
4965
- correlation_id: _this47.correlationId,
4966
- locus_id: _this47.locusUrl.split('/').pop(),
4973
+ correlation_id: _this48.correlationId,
4974
+ locus_id: _this48.locusUrl.split('/').pop(),
4967
4975
  reason: error.message,
4968
4976
  stack: error.stack,
4969
4977
  code: error.code
@@ -4983,7 +4991,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4983
4991
  }, {
4984
4992
  key: "startWhiteboardShare",
4985
4993
  value: function startWhiteboardShare(channelUrl, resourceToken) {
4986
- var _this48 = this;
4994
+ var _this49 = this;
4987
4995
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
4988
4996
  return element.name === 'whiteboard';
4989
4997
  });
@@ -5006,13 +5014,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5006
5014
  body.resourceToken = resourceToken;
5007
5015
  }
5008
5016
  return this.meetingRequest.changeMeetingFloor(body).then(function () {
5009
- _this48.isSharing = false;
5017
+ _this49.isSharing = false;
5010
5018
  return _promise.default.resolve();
5011
5019
  }).catch(function (error) {
5012
5020
  _loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
5013
5021
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
5014
- correlation_id: _this48.correlationId,
5015
- locus_id: _this48.locusUrl.split('/').pop(),
5022
+ correlation_id: _this49.correlationId,
5023
+ locus_id: _this49.locusUrl.split('/').pop(),
5016
5024
  reason: error.message,
5017
5025
  stack: error.stack,
5018
5026
  board: {
@@ -5035,7 +5043,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5035
5043
  }, {
5036
5044
  key: "stopWhiteboardShare",
5037
5045
  value: function stopWhiteboardShare(channelUrl) {
5038
- var _this49 = this;
5046
+ var _this50 = this;
5039
5047
  var whiteboard = this.locusInfo.mediaShares.find(function (element) {
5040
5048
  return element.name === 'whiteboard';
5041
5049
  });
@@ -5054,8 +5062,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5054
5062
  _metrics.default.sendBehavioralMetric(
5055
5063
  // @ts-ignore - check if STOP_WHITEBOARD_SHARE_FAILURE exists
5056
5064
  _constants2.default.STOP_WHITEBOARD_SHARE_FAILURE, {
5057
- correlation_id: _this49.correlationId,
5058
- locus_id: _this49.locusUrl.split('/').pop(),
5065
+ correlation_id: _this50.correlationId,
5066
+ locus_id: _this50.locusUrl.split('/').pop(),
5059
5067
  reason: error.message,
5060
5068
  stack: error.stack,
5061
5069
  board: {
@@ -5077,7 +5085,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5077
5085
  }, {
5078
5086
  key: "requestScreenShareFloor",
5079
5087
  value: function requestScreenShareFloor() {
5080
- var _this50 = this;
5088
+ var _this51 = this;
5081
5089
  var content = this.locusInfo.mediaShares.find(function (element) {
5082
5090
  return element.name === _constants.CONTENT;
5083
5091
  });
@@ -5093,13 +5101,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5093
5101
  uri: content.url,
5094
5102
  resourceUrl: this.resourceUrl
5095
5103
  }).then(function () {
5096
- _this50.isSharing = true;
5104
+ _this51.isSharing = true;
5097
5105
  return _promise.default.resolve();
5098
5106
  }).catch(function (error) {
5099
5107
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
5100
5108
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
5101
- correlation_id: _this50.correlationId,
5102
- locus_id: _this50.locusUrl.split('/').pop(),
5109
+ correlation_id: _this51.correlationId,
5110
+ locus_id: _this51.locusUrl.split('/').pop(),
5103
5111
  reason: error.message,
5104
5112
  stack: error.stack
5105
5113
  });
@@ -5136,7 +5144,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5136
5144
  }, {
5137
5145
  key: "releaseScreenShareFloor",
5138
5146
  value: function releaseScreenShareFloor() {
5139
- var _this51 = this;
5147
+ var _this52 = this;
5140
5148
  var content = this.locusInfo.mediaShares.find(function (element) {
5141
5149
  return element.name === _constants.CONTENT;
5142
5150
  });
@@ -5160,14 +5168,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5160
5168
  }).catch(function (error) {
5161
5169
  _loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
5162
5170
  _metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
5163
- correlation_id: _this51.correlationId,
5164
- locus_id: _this51.locusUrl.split('/').pop(),
5171
+ correlation_id: _this52.correlationId,
5172
+ locus_id: _this52.locusUrl.split('/').pop(),
5165
5173
  reason: error.message,
5166
5174
  stack: error.stack
5167
5175
  });
5168
5176
  return _promise.default.reject(error);
5169
5177
  }).finally(function () {
5170
- _this51.isSharing = false;
5178
+ _this52.isSharing = false;
5171
5179
  });
5172
5180
  }
5173
5181
  return _promise.default.reject(new _parameter.default('Cannot stop share without content'));
@@ -5325,7 +5333,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5325
5333
  }, {
5326
5334
  key: "changeVideoLayout",
5327
5335
  value: function changeVideoLayout(layoutType) {
5328
- var _this52 = this;
5336
+ var _this53 = this;
5329
5337
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5330
5338
  var main = renderInfo.main,
5331
5339
  content = renderInfo.content;
@@ -5379,7 +5387,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5379
5387
  }
5380
5388
  this.lastVideoLayoutInfo = (0, _cloneDeep2.default)(layoutInfo);
5381
5389
  this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
5382
- _triggerProxy.default.trigger(_this52, {
5390
+ _triggerProxy.default.trigger(_this53, {
5383
5391
  file: 'meeting/index',
5384
5392
  function: 'changeVideoLayout'
5385
5393
  }, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
@@ -5394,7 +5402,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5394
5402
  content: layoutInfo.content
5395
5403
  }).then(function (response) {
5396
5404
  if (response && response.body && response.body.locus) {
5397
- _this52.locusInfo.onFullLocus(response.body.locus);
5405
+ _this53.locusInfo.onFullLocus(response.body.locus);
5398
5406
  }
5399
5407
  }).catch(function (error) {
5400
5408
  _loggerProxy.default.logger.error('Meeting:index#changeVideoLayout --> Error ', error);
@@ -5410,7 +5418,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5410
5418
  }, {
5411
5419
  key: "setLocalVideoQuality",
5412
5420
  value: function setLocalVideoQuality(level) {
5413
- var _this53 = this;
5421
+ var _this54 = this;
5414
5422
  _loggerProxy.default.logger.log("Meeting:index#setLocalVideoQuality --> Setting quality to ".concat(level));
5415
5423
  if (!_constants.VIDEO_RESOLUTIONS[level]) {
5416
5424
  return this.rejectWithErrorLog("Meeting:index#setLocalVideoQuality --> ".concat(level, " not defined"));
@@ -5446,7 +5454,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5446
5454
  case 0:
5447
5455
  _ref15 = (0, _slicedToArray2.default)(_ref13, 1), localStream = _ref15[0];
5448
5456
  _context6.next = 3;
5449
- return _this53.updateVideo({
5457
+ return _this54.updateVideo({
5450
5458
  sendVideo: true,
5451
5459
  receiveVideo: true,
5452
5460
  stream: localStream
@@ -5503,7 +5511,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5503
5511
  }, {
5504
5512
  key: "setMeetingQuality",
5505
5513
  value: function setMeetingQuality(level) {
5506
- var _this54 = this;
5514
+ var _this55 = this;
5507
5515
  _loggerProxy.default.logger.log("Meeting:index#setMeetingQuality --> Setting quality to ".concat(level));
5508
5516
  if (!_constants.QUALITY_LEVELS[level]) {
5509
5517
  return this.rejectWithErrorLog("Meeting:index#setMeetingQuality --> ".concat(level, " not defined"));
@@ -5525,15 +5533,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5525
5533
  receiveVideo = _this$mediaProperties4.receiveVideo,
5526
5534
  sendVideo = _this$mediaProperties4.sendVideo;
5527
5535
  return (sendVideo ? this.setLocalVideoQuality(level) : _promise.default.resolve()).then(function () {
5528
- return receiveAudio || receiveVideo ? _this54.setRemoteQualityLevel(level) : _promise.default.resolve();
5536
+ return receiveAudio || receiveVideo ? _this55.setRemoteQualityLevel(level) : _promise.default.resolve();
5529
5537
  }).catch(function (error) {
5530
5538
  // From troubleshooting it seems that the stream itself doesn't change the max-fs if the peer connection isn't stable
5531
- _this54.mediaProperties.setLocalQualityLevel(previousLevel.local);
5532
- _this54.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5539
+ _this55.mediaProperties.setLocalQualityLevel(previousLevel.local);
5540
+ _this55.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5533
5541
  _loggerProxy.default.logger.error("Meeting:index#setMeetingQuality --> ".concat(error.message));
5534
5542
  _metrics.default.sendBehavioralMetric(_constants2.default.SET_MEETING_QUALITY_FAILURE, {
5535
- correlation_id: _this54.correlationId,
5536
- locus_id: _this54.locusUrl.split('/').pop(),
5543
+ correlation_id: _this55.correlationId,
5544
+ locus_id: _this55.locusUrl.split('/').pop(),
5537
5545
  reason: error.message,
5538
5546
  stack: error.stack
5539
5547
  }, {
@@ -5556,7 +5564,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5556
5564
  }, {
5557
5565
  key: "shareScreen",
5558
5566
  value: function shareScreen() {
5559
- var _this55 = this;
5567
+ var _this56 = this;
5560
5568
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5561
5569
  _loggerProxy.default.logger.log('Meeting:index#shareScreen --> Getting local share');
5562
5570
  var shareConstraints = _objectSpread({
@@ -5566,9 +5574,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5566
5574
 
5567
5575
  // @ts-ignore - config coming from registerPlugin
5568
5576
  return _media.default.getDisplayMedia(shareConstraints, this.config).then(function (shareStream) {
5569
- return _this55.updateShare({
5577
+ return _this56.updateShare({
5570
5578
  sendShare: true,
5571
- receiveShare: _this55.mediaProperties.mediaDirection.receiveShare,
5579
+ receiveShare: _this56.mediaProperties.mediaDirection.receiveShare,
5572
5580
  stream: shareStream
5573
5581
  });
5574
5582
  }).catch(function (error) {
@@ -5581,8 +5589,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5581
5589
  // TODO: The getDisplayMedia errors need to be moved inside `media.getDisplayMedia`
5582
5590
  var metricName = _constants2.default.GET_DISPLAY_MEDIA_FAILURE;
5583
5591
  var data = {
5584
- correlation_id: _this55.correlationId,
5585
- locus_id: _this55.locusUrl.split('/').pop(),
5592
+ correlation_id: _this56.correlationId,
5593
+ locus_id: _this56.locusUrl.split('/').pop(),
5586
5594
  reason: error.message,
5587
5595
  stack: error.stack
5588
5596
  };
@@ -5867,7 +5875,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5867
5875
  }, {
5868
5876
  key: "endMeetingForAll",
5869
5877
  value: function endMeetingForAll() {
5870
- var _this56 = this;
5878
+ var _this57 = this;
5871
5879
  _metrics.default.postEvent({
5872
5880
  event: _config.eventType.LEAVE,
5873
5881
  meeting: this,
@@ -5882,25 +5890,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5882
5890
  locus_id: this.locusId
5883
5891
  });
5884
5892
  return _util.default.endMeetingForAll(this).then(function (end) {
5885
- _this56.meetingFiniteStateMachine.end();
5886
- _this56.clearMeetingData();
5893
+ _this57.meetingFiniteStateMachine.end();
5894
+ _this57.clearMeetingData();
5887
5895
  // upload logs on leave irrespective of meeting delete
5888
- _triggerProxy.default.trigger(_this56, {
5896
+ _triggerProxy.default.trigger(_this57, {
5889
5897
  file: 'meeting/index',
5890
5898
  function: 'endMeetingForAll'
5891
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
5899
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this57);
5892
5900
  return end;
5893
5901
  }).catch(function (error) {
5894
- _this56.meetingFiniteStateMachine.fail(error);
5902
+ _this57.meetingFiniteStateMachine.fail(error);
5895
5903
  _loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
5896
5904
  // upload logs on leave irrespective of meeting delete
5897
- _triggerProxy.default.trigger(_this56, {
5905
+ _triggerProxy.default.trigger(_this57, {
5898
5906
  file: 'meeting/index',
5899
5907
  function: 'endMeetingForAll'
5900
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this56);
5908
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this57);
5901
5909
  _metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
5902
- correlation_id: _this56.correlationId,
5903
- locus_id: _this56.locusUrl.split('/').pop(),
5910
+ correlation_id: _this57.correlationId,
5911
+ locus_id: _this57.locusUrl.split('/').pop(),
5904
5912
  reason: error.message,
5905
5913
  stack: error.stack,
5906
5914
  code: error.code