@webex/plugin-meetings 2.52.12 → 2.52.13

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