@webex/plugin-meetings 1.147.1 → 1.148.0

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.
@@ -961,14 +961,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
961
961
 
962
962
  _this.floorGrantPending = false;
963
963
  /**
964
- * The latest status of the dial in device (can be "JOINED", "CONNECTED", "LEFT" or "")
964
+ * The latest status of the dial in device (can be "JOINED", "CONNECTED", "LEFT",
965
+ * "TRANSFERRING", "SUCCESS" or "")
965
966
  * @instance
966
967
  * @type {String}
967
968
  * @private
968
969
  * @memberof Meeting
969
970
  */
970
971
 
971
- _this.dialInDeviceStatus = '';
972
+ _this.dialInDeviceStatus = _constants.PSTN_STATUS.UNKNOWN;
972
973
  /**
973
974
  * the url for provisioned device used to dial in
974
975
  * @instance
@@ -978,6 +979,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
978
979
  */
979
980
 
980
981
  _this.dialInUrl = '';
982
+ /**
983
+ * The latest status of the dial out device (can be "JOINED", "CONNECTED", "LEFT",
984
+ * "TRANSFERRING", "SUCCESS" or "")
985
+ * @instance
986
+ * @type {String}
987
+ * @private
988
+ * @memberof Meeting
989
+ */
990
+
991
+ _this.dialOutDeviceStatus = _constants.PSTN_STATUS.UNKNOWN;
992
+ /**
993
+ * the url for provisioned device used to dial out
994
+ * @instance
995
+ * @type {String}
996
+ * @private
997
+ * @memberof Meeting
998
+ */
999
+
1000
+ _this.dialOutUrl = '';
981
1001
  /**
982
1002
  * @instance
983
1003
  * @type {MediaMetrics}
@@ -1398,24 +1418,50 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1398
1418
  var _this6 = this;
1399
1419
 
1400
1420
  if (this.locusInfo.self) {
1401
- var _payload$newSelf;
1421
+ var _payload$newSelf, _payload$newSelf2;
1402
1422
 
1403
1423
  var dialInPstnDevice = (_payload$newSelf = payload.newSelf) === null || _payload$newSelf === void 0 ? void 0 : _payload$newSelf.pstnDevices.find(function (device) {
1404
1424
  return device.url === _this6.dialInUrl;
1405
1425
  });
1426
+ var dialOutPstnDevice = (_payload$newSelf2 = payload.newSelf) === null || _payload$newSelf2 === void 0 ? void 0 : _payload$newSelf2.pstnDevices.find(function (device) {
1427
+ return device.url === _this6.dialOutUrl;
1428
+ });
1429
+ var changed = false;
1406
1430
 
1407
1431
  if (dialInPstnDevice) {
1408
1432
  var _dialInPstnDevice$dia;
1409
1433
 
1410
- this.dialInDeviceStatus = (_dialInPstnDevice$dia = dialInPstnDevice.dialingStatus) !== null && _dialInPstnDevice$dia !== void 0 ? _dialInPstnDevice$dia : dialInPstnDevice.state;
1434
+ var newStatus = (_dialInPstnDevice$dia = dialInPstnDevice.dialingStatus) !== null && _dialInPstnDevice$dia !== void 0 ? _dialInPstnDevice$dia : dialInPstnDevice.state;
1411
1435
 
1436
+ if (newStatus !== this.dialInDeviceStatus) {
1437
+ this.dialInDeviceStatus = newStatus;
1438
+ changed = true;
1439
+ }
1440
+ }
1441
+
1442
+ if (dialOutPstnDevice) {
1443
+ var _dialOutPstnDevice$di;
1444
+
1445
+ var _newStatus = (_dialOutPstnDevice$di = dialOutPstnDevice.dialingStatus) !== null && _dialOutPstnDevice$di !== void 0 ? _dialOutPstnDevice$di : dialOutPstnDevice.state;
1446
+
1447
+ if (_newStatus !== this.dialOutDeviceStatus) {
1448
+ this.dialOutDeviceStatus = _newStatus;
1449
+ changed = true;
1450
+ }
1451
+ }
1452
+
1453
+ if (changed) {
1412
1454
  _triggerProxy.default.trigger(this, {
1413
1455
  file: 'meeting/index',
1414
1456
  function: 'setUpLocusSelfListener'
1415
1457
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_PHONE_AUDIO_UPDATE, {
1416
1458
  dialIn: {
1417
1459
  status: this.dialInDeviceStatus,
1418
- attendeeId: dialInPstnDevice.attendeeId
1460
+ attendeeId: dialInPstnDevice === null || dialInPstnDevice === void 0 ? void 0 : dialInPstnDevice.attendeeId
1461
+ },
1462
+ dialOut: {
1463
+ status: this.dialOutDeviceStatus,
1464
+ attendeeId: dialOutPstnDevice === null || dialOutPstnDevice === void 0 ? void 0 : dialOutPstnDevice.attendeeId
1419
1465
  }
1420
1466
  });
1421
1467
  }
@@ -3655,7 +3701,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3655
3701
  /**
3656
3702
  * Use phone for meeting audio
3657
3703
  * @param {String} phoneNumber If provided, it will dial-out using this number. If not provided, dial-in will be used
3658
- * @returns {Promise} Resolves once the dial-in or dial-out request has completed
3704
+ * @returns {Promise} Resolves once the dial-in or dial-out request has completed, or rejects if it failed
3659
3705
  * @public
3660
3706
  * @memberof Meeting
3661
3707
  */
@@ -3667,11 +3713,24 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3667
3713
  return this.dialInPstn();
3668
3714
  }
3669
3715
 
3670
- return _promise.default.reject(new Error('Dial-out is not supported yet'));
3716
+ return this.dialOutPstn(phoneNumber);
3717
+ }
3718
+ /**
3719
+ * Determines if the given pstnStatus is in a state which implies the phone is provisioned
3720
+ * @param {String} pstnStatus
3721
+ * @returns {Boolean}
3722
+ * @private
3723
+ * @memberof Meeting
3724
+ */
3725
+
3726
+ }, {
3727
+ key: "isPhoneProvisioned",
3728
+ value: function isPhoneProvisioned(pstnStatus) {
3729
+ return [_constants.PSTN_STATUS.JOINED, _constants.PSTN_STATUS.CONNECTED, _constants.PSTN_STATUS.SUCCESS].includes(pstnStatus);
3671
3730
  }
3672
3731
  /**
3673
3732
  * Enable dial-in for audio
3674
- * @returns {Promise} Resolves once the dial-in request has completed
3733
+ * @returns {Promise} Resolves once the dial-in request has completed, or rejects if it failed
3675
3734
  * @private
3676
3735
  * @memberof Meeting
3677
3736
  */
@@ -3681,7 +3740,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3681
3740
  value: function dialInPstn() {
3682
3741
  var _this33 = this;
3683
3742
 
3684
- if (this.dialInDeviceStatus === 'CONNECTED' || this.dialInDeviceStatus === 'JOINED') return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
3743
+ if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
3685
3744
 
3686
3745
  var correlationId = this.correlationId,
3687
3746
  locusUrl = this.locusUrl;
@@ -3704,6 +3763,49 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3704
3763
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
3705
3764
  stack: error.stack
3706
3765
  });
3766
+
3767
+ return _promise.default.reject(error);
3768
+ });
3769
+ }
3770
+ /**
3771
+ * Enable dial-out for audio
3772
+ * @param {String} phoneNumber Phone number to dial out to
3773
+ * @returns {Promise} Resolves once the dial-out request has completed (it doesn't wait for the user to answer the phone), or rejects if it failed
3774
+ * @private
3775
+ * @memberof Meeting
3776
+ */
3777
+
3778
+ }, {
3779
+ key: "dialOutPstn",
3780
+ value: function dialOutPstn(phoneNumber) {
3781
+ var _this34 = this;
3782
+
3783
+ if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
3784
+
3785
+ var correlationId = this.correlationId,
3786
+ locusUrl = this.locusUrl;
3787
+ if (!this.dialOutUrl) this.dialOutUrl = "dialout:///".concat(_uuid.default.v4());
3788
+ return this.meetingRequest.dialOut({
3789
+ correlationId: correlationId,
3790
+ dialOutUrl: this.dialOutUrl,
3791
+ phoneNumber: phoneNumber,
3792
+ locusUrl: locusUrl,
3793
+ clientUrl: this.deviceUrl
3794
+ }).then(function (res) {
3795
+ _this34.locusInfo.onFullLocus(res.body.locus);
3796
+ }).catch(function (error) {
3797
+ var _error$error3;
3798
+
3799
+ _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_DIAL_OUT_FAILURE, {
3800
+ correlation_id: _this34.correlationId,
3801
+ dial_out_url: _this34.dialOutUrl,
3802
+ locus_id: locusUrl.split('/').pop(),
3803
+ client_url: _this34.deviceUrl,
3804
+ reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
3805
+ stack: error.stack
3806
+ });
3807
+
3808
+ return _promise.default.reject(error);
3707
3809
  });
3708
3810
  }
3709
3811
  /**
@@ -3717,12 +3819,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3717
3819
  }, {
3718
3820
  key: "disconnectPhoneAudio",
3719
3821
  value: function disconnectPhoneAudio() {
3720
- if (this.dialInDeviceStatus === 'CONNECTED') {
3721
- return _util.default.leavePstn(this, this.dialInUrl);
3722
- } // TODO: handle dial out
3723
-
3724
-
3725
- return _promise.default.resolve();
3822
+ return _promise.default.all([this.isPhoneProvisioned(this.dialInDeviceStatus) ? _util.default.disconnectPhoneAudio(this, this.dialInUrl) : _promise.default.resolve(), this.isPhoneProvisioned(this.dialOutDeviceStatus) ? _util.default.disconnectPhoneAudio(this, this.dialOutUrl) : _promise.default.resolve()]);
3726
3823
  }
3727
3824
  /**
3728
3825
  * Moves the call to the specified resourceId
@@ -3735,7 +3832,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3735
3832
  }, {
3736
3833
  key: "moveTo",
3737
3834
  value: function moveTo(resourceId) {
3738
- var _this34 = this;
3835
+ var _this35 = this;
3739
3836
 
3740
3837
  if (!resourceId) {
3741
3838
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -3773,9 +3870,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3773
3870
  resourceId: resourceId,
3774
3871
  moveToResource: true
3775
3872
  }).then(function () {
3776
- _this34.meetingFiniteStateMachine.join();
3873
+ _this35.meetingFiniteStateMachine.join();
3777
3874
 
3778
- return _this34.updateMedia({
3875
+ return _this35.updateMedia({
3779
3876
  mediaSettings: {
3780
3877
  sendVideo: false,
3781
3878
  receiveVideo: false,
@@ -3785,10 +3882,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3785
3882
  receiveShare: false
3786
3883
  }
3787
3884
  }).then(function () {
3788
- return _promise.default.resolve(_this34);
3885
+ return _promise.default.resolve(_this35);
3789
3886
  });
3790
3887
  }).catch(function (error) {
3791
- _this34.meetingFiniteStateMachine.fail(error);
3888
+ _this35.meetingFiniteStateMachine.fail(error);
3792
3889
 
3793
3890
  return _promise.default.reject(error);
3794
3891
  });
@@ -3804,7 +3901,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3804
3901
  }, {
3805
3902
  key: "moveFrom",
3806
3903
  value: function moveFrom(resourceId) {
3807
- var _this35 = this;
3904
+ var _this36 = this;
3808
3905
 
3809
3906
  if (!resourceId) {
3810
3907
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -3843,7 +3940,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3843
3940
  });
3844
3941
 
3845
3942
  return _util.default.joinMeetingOptions(this).then(function (join) {
3846
- return _this35.getMediaStreams({
3943
+ return _this36.getMediaStreams({
3847
3944
  sendAudio: true,
3848
3945
  sendVideo: true,
3849
3946
  sendShare: false
@@ -3852,7 +3949,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3852
3949
  localStream = _ref9[0],
3853
3950
  localShare = _ref9[1];
3854
3951
 
3855
- return _this35.updateMedia({
3952
+ return _this36.updateMedia({
3856
3953
  mediaSettings: {
3857
3954
  sendAudio: true,
3858
3955
  receiveAudio: true,
@@ -3867,14 +3964,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3867
3964
  return _promise.default.resolve(join);
3868
3965
  });
3869
3966
  }).then(function () {
3870
- return _util.default.leaveMeeting(_this35, {
3967
+ return _util.default.leaveMeeting(_this36, {
3871
3968
  resourceId: resourceId,
3872
3969
  correlationId: oldCorrelationId,
3873
3970
  moveMeeting: true
3874
3971
  });
3875
3972
  });
3876
3973
  }).then(function () {
3877
- _this35.webex.meetings.meetingCollection.delete(_this35.id);
3974
+ _this36.webex.meetings.meetingCollection.delete(_this36.id);
3878
3975
 
3879
3976
  return _promise.default.resolve();
3880
3977
  });
@@ -3905,7 +4002,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3905
4002
  * @memberof Meeting
3906
4003
  */
3907
4004
  function addMedia() {
3908
- var _this36 = this;
4005
+ var _this37 = this;
3909
4006
 
3910
4007
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3911
4008
  var LOG_HEADER = 'Meeting:index#addMedia -->';
@@ -3953,53 +4050,53 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3953
4050
  });
3954
4051
 
3955
4052
  return _util.default.validateOptions(options).then(function () {
3956
- _this36.mediaProperties.setMediaPeerConnection(_util2.default.createPeerConnection());
4053
+ _this37.mediaProperties.setMediaPeerConnection(_util2.default.createPeerConnection());
3957
4054
 
3958
- _this36.setMercuryListener();
4055
+ _this37.setMercuryListener();
3959
4056
 
3960
- _peerConnectionManager.default.setPeerConnectionEvents(_this36);
4057
+ _peerConnectionManager.default.setPeerConnectionEvents(_this37);
3961
4058
 
3962
- return _this36.preMedia(localStream, localShare, mediaSettings);
4059
+ return _this37.preMedia(localStream, localShare, mediaSettings);
3963
4060
  }).then(function () {
3964
- return _media.default.attachMedia(_this36.mediaProperties, {
3965
- meetingId: _this36.id,
3966
- remoteQualityLevel: _this36.mediaProperties.remoteQualityLevel,
3967
- enableRtx: _this36.config.enableRtx,
3968
- enableExtmap: _this36.config.enableExtmap
4061
+ return _media.default.attachMedia(_this37.mediaProperties, {
4062
+ meetingId: _this37.id,
4063
+ remoteQualityLevel: _this37.mediaProperties.remoteQualityLevel,
4064
+ enableRtx: _this37.config.enableRtx,
4065
+ enableExtmap: _this37.config.enableExtmap
3969
4066
  }).then(function (peerConnection) {
3970
- return _this36.getDevices().then(function (devices) {
4067
+ return _this37.getDevices().then(function (devices) {
3971
4068
  _util.default.handleDeviceLogging(devices);
3972
4069
 
3973
4070
  return peerConnection;
3974
4071
  });
3975
4072
  }).then(function (peerConnection) {
3976
- _this36.handleMediaLogging(_this36.mediaProperties);
4073
+ _this37.handleMediaLogging(_this37.mediaProperties);
3977
4074
 
3978
4075
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection Received from attachMedia "));
3979
4076
 
3980
- _this36.setRemoteStream(peerConnection);
4077
+ _this37.setRemoteStream(peerConnection);
3981
4078
 
3982
- _util.default.startInternalStats(_this36);
4079
+ _util.default.startInternalStats(_this37);
3983
4080
 
3984
- if (_this36.config.metrics.autoSendMQA) {
3985
- _this36.startMediaQualityMetrics();
4081
+ if (_this37.config.metrics.autoSendMQA) {
4082
+ _this37.startMediaQualityMetrics();
3986
4083
  }
3987
4084
 
3988
- if (_this36.config.stats.enableStatsAnalyzer) {
4085
+ if (_this37.config.stats.enableStatsAnalyzer) {
3989
4086
  // TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
3990
- _this36.networkQualityMonitor = new _networkQualityMonitor.default(_this36.config.stats);
3991
- _this36.statsAnalyzer = new _statsAnalyzer.default(_this36.config.stats, _this36.networkQualityMonitor);
4087
+ _this37.networkQualityMonitor = new _networkQualityMonitor.default(_this37.config.stats);
4088
+ _this37.statsAnalyzer = new _statsAnalyzer.default(_this37.config.stats, _this37.networkQualityMonitor);
3992
4089
 
3993
- _this36.statsAnalyzer.on(_constants.EVENT_TRIGGERS.MEDIA_QUALITY, function (options) {
3994
- var _this36$webex$meeting;
4090
+ _this37.statsAnalyzer.on(_constants.EVENT_TRIGGERS.MEDIA_QUALITY, function (options) {
4091
+ var _this37$webex$meeting;
3995
4092
 
3996
4093
  // TODO: might have to send the same event to the developer
3997
4094
  // Add ip address info if geo hint is present
3998
- options.data.intervalMetadata.peerReflexiveIP = ((_this36$webex$meeting = _this36.webex.meetings.geoHintInfo) === null || _this36$webex$meeting === void 0 ? void 0 : _this36$webex$meeting.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
4095
+ options.data.intervalMetadata.peerReflexiveIP = ((_this37$webex$meeting = _this37.webex.meetings.geoHintInfo) === null || _this37$webex$meeting === void 0 ? void 0 : _this37$webex$meeting.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
3999
4096
 
4000
4097
  _metrics.default.postEvent({
4001
4098
  event: _config.eventType.MEDIA_QUALITY,
4002
- meeting: _this36,
4099
+ meeting: _this37,
4003
4100
  data: {
4004
4101
  intervalData: options.data,
4005
4102
  networkType: options.networkType
@@ -4007,14 +4104,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4007
4104
  });
4008
4105
  });
4009
4106
 
4010
- _this36.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this36.sendNetworkQualityEvent.bind(_this36));
4107
+ _this37.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this37.sendNetworkQualityEvent.bind(_this37));
4011
4108
  }
4012
4109
  }).catch(function (error) {
4013
4110
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
4014
4111
 
4015
4112
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_MEDIA_FAILURE, {
4016
- correlation_id: _this36.correlationId,
4017
- locus_id: _this36.locusUrl.split('/').pop(),
4113
+ correlation_id: _this37.correlationId,
4114
+ locus_id: _this37.locusUrl.split('/').pop(),
4018
4115
  reason: error.message,
4019
4116
  stack: error.stack
4020
4117
  });
@@ -4025,14 +4122,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4025
4122
  var timerCount = 0; // eslint-disable-next-line func-names
4026
4123
  // eslint-disable-next-line prefer-arrow-callback
4027
4124
 
4028
- if (_this36.type === _constants._CALL_) {
4125
+ if (_this37.type === _constants._CALL_) {
4029
4126
  resolve();
4030
4127
  }
4031
4128
 
4032
4129
  var joiningTimer = setInterval(function () {
4033
4130
  timerCount += 1;
4034
4131
 
4035
- if (_this36.meetingState === _constants.FULL_STATE.ACTIVE) {
4132
+ if (_this37.meetingState === _constants.FULL_STATE.ACTIVE) {
4036
4133
  clearInterval(joiningTimer);
4037
4134
  resolve();
4038
4135
  }
@@ -4044,10 +4141,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4044
4141
  }, 1000);
4045
4142
  });
4046
4143
  }).then(function () {
4047
- return logRequest(_this36.roap.sendRoapMediaRequest({
4048
- sdp: _this36.mediaProperties.peerConnection.sdp,
4049
- roapSeq: _this36.roapSeq,
4050
- meeting: _this36 // or can pass meeting ID
4144
+ return logRequest(_this37.roap.sendRoapMediaRequest({
4145
+ sdp: _this37.mediaProperties.peerConnection.sdp,
4146
+ roapSeq: _this37.roapSeq,
4147
+ meeting: _this37 // or can pass meeting ID
4051
4148
 
4052
4149
  }), {
4053
4150
  header: "".concat(LOG_HEADER, " Send Roap Media Request."),
@@ -4055,7 +4152,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4055
4152
  failure: "".concat(LOG_HEADER, " Error joining the call on send roap media request, ")
4056
4153
  });
4057
4154
  }).then(function () {
4058
- var peerConnection = _this36.mediaProperties.peerConnection;
4155
+ var peerConnection = _this37.mediaProperties.peerConnection;
4059
4156
  return new _promise.default(function (resolve, reject) {
4060
4157
  if (peerConnection.connectionState === _constants.CONNECTION_STATE.CONNECTED) {
4061
4158
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
@@ -4076,7 +4173,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4076
4173
  }
4077
4174
  }, _constants.PC_BAIL_TIMEOUT);
4078
4175
 
4079
- _this36.once(_constants.EVENT_TRIGGERS.MEDIA_READY, function () {
4176
+ _this37.once(_constants.EVENT_TRIGGERS.MEDIA_READY, function () {
4080
4177
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED, clearing stability timer."));
4081
4178
 
4082
4179
  clearTimeout(stabilityTimeout);
@@ -4085,51 +4182,51 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4085
4182
  });
4086
4183
  }).then(function () {
4087
4184
  if (mediaSettings && mediaSettings.sendShare && localShare) {
4088
- if (_this36.state === _constants.MEETING_STATE.STATES.JOINED) {
4089
- return _this36.share();
4185
+ if (_this37.state === _constants.MEETING_STATE.STATES.JOINED) {
4186
+ return _this37.share();
4090
4187
  } // When the self state changes to JOINED then request the floor
4091
4188
 
4092
4189
 
4093
- _this36.floorGrantPending = true;
4190
+ _this37.floorGrantPending = true;
4094
4191
  }
4095
4192
 
4096
4193
  return _promise.default.resolve();
4097
4194
  });
4098
4195
  }).catch(function (error) {
4099
4196
  // Clean up stats analyzer, peer connection, and turn off listeners
4100
- if (_this36.statsAnalyzer) {
4101
- _this36.statsAnalyzer.stopAnalyzer();
4197
+ if (_this37.statsAnalyzer) {
4198
+ _this37.statsAnalyzer.stopAnalyzer();
4102
4199
 
4103
- _this36.statsAnalyzer = null;
4200
+ _this37.statsAnalyzer = null;
4104
4201
  }
4105
4202
 
4106
- if (_this36.mediaProperties.peerConnection) {
4107
- _this36.closePeerConnections();
4203
+ if (_this37.mediaProperties.peerConnection) {
4204
+ _this37.closePeerConnections();
4108
4205
 
4109
- _this36.unsetPeerConnections();
4206
+ _this37.unsetPeerConnections();
4110
4207
  }
4111
4208
 
4112
4209
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
4113
4210
 
4114
4211
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_MEDIA_FAILURE, {
4115
- correlation_id: _this36.correlationId,
4116
- locus_id: _this36.locusUrl.split('/').pop(),
4212
+ correlation_id: _this37.correlationId,
4213
+ locus_id: _this37.locusUrl.split('/').pop(),
4117
4214
  reason: error.message,
4118
4215
  stack: error.stack,
4119
4216
  code: error.code
4120
4217
  }); // Upload logs on error while adding media
4121
4218
 
4122
4219
 
4123
- _triggerProxy.default.trigger(_this36, {
4220
+ _triggerProxy.default.trigger(_this37, {
4124
4221
  file: 'meeting/index',
4125
4222
  function: 'addMedia'
4126
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this36); // If addMedia failes for not establishing connection then
4223
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this37); // If addMedia failes for not establishing connection then
4127
4224
  // leave the meeting with reson connection failed as meeting anyways will end
4128
4225
  // and cannot be connected unless network condition is checked for firewall
4129
4226
 
4130
4227
 
4131
4228
  if (error.code === _webexErrors.InvalidSdpError.CODE) {
4132
- _this36.leave({
4229
+ _this37.leave({
4133
4230
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
4134
4231
  });
4135
4232
  }
@@ -4159,7 +4256,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4159
4256
  }, {
4160
4257
  key: "enqueueMediaUpdate",
4161
4258
  value: function enqueueMediaUpdate(mediaUpdateType, options) {
4162
- var _this37 = this;
4259
+ var _this38 = this;
4163
4260
 
4164
4261
  return new _promise.default(function (resolve, reject) {
4165
4262
  var queueItem = {
@@ -4171,7 +4268,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4171
4268
 
4172
4269
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
4173
4270
 
4174
- _this37.queuedMediaUpdates.push(queueItem);
4271
+ _this38.queuedMediaUpdates.push(queueItem);
4175
4272
  });
4176
4273
  }
4177
4274
  /**
@@ -4197,7 +4294,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4197
4294
  * @memberof Meeting
4198
4295
  */
4199
4296
  function updateMedia() {
4200
- var _this38 = this;
4297
+ var _this39 = this;
4201
4298
 
4202
4299
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4203
4300
  var LOG_HEADER = 'Meeting:index#updateMedia -->';
@@ -4211,17 +4308,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4211
4308
  mediaSettings = options.mediaSettings;
4212
4309
  var previousSendShareStatus = this.mediaProperties.mediaDirection.sendShare;
4213
4310
  return _util.default.validateOptions(options).then(function () {
4214
- return _this38.preMedia(localStream, localShare, mediaSettings);
4311
+ return _this39.preMedia(localStream, localShare, mediaSettings);
4215
4312
  }).then(function () {
4216
- return _media.default.updateMedia(_this38.mediaProperties, {
4217
- meetingId: _this38.id,
4218
- remoteQualityLevel: _this38.mediaProperties.remoteQualityLevel,
4219
- enableRtx: _this38.config.enableRtx,
4220
- enableExtmap: _this38.config.enableExtmap
4313
+ return _media.default.updateMedia(_this39.mediaProperties, {
4314
+ meetingId: _this39.id,
4315
+ remoteQualityLevel: _this39.mediaProperties.remoteQualityLevel,
4316
+ enableRtx: _this39.config.enableRtx,
4317
+ enableExtmap: _this39.config.enableExtmap
4221
4318
  }).then(function (peerConnection) {
4222
4319
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection received from updateMedia, ").concat(peerConnection));
4223
4320
 
4224
- _this38.setRemoteStream(peerConnection);
4321
+ _this39.setRemoteStream(peerConnection);
4225
4322
 
4226
4323
  if (mediaSettings.receiveShare || localShare) {
4227
4324
  _peerConnectionManager.default.setContentSlides(peerConnection);
@@ -4230,18 +4327,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4230
4327
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error updatedMedia, "), error);
4231
4328
 
4232
4329
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.UPDATE_MEDIA_FAILURE, {
4233
- correlation_id: _this38.correlationId,
4234
- locus_id: _this38.locusUrl.split('/').pop(),
4330
+ correlation_id: _this39.correlationId,
4331
+ locus_id: _this39.locusUrl.split('/').pop(),
4235
4332
  reason: error.message,
4236
4333
  stack: error.stack
4237
4334
  });
4238
4335
 
4239
4336
  throw error;
4240
4337
  }).then(function () {
4241
- return logRequest(_this38.roap.sendRoapMediaRequest({
4242
- sdp: _this38.mediaProperties.peerConnection.sdp,
4243
- roapSeq: _this38.roapSeq,
4244
- meeting: _this38 // or can pass meeting ID
4338
+ return logRequest(_this39.roap.sendRoapMediaRequest({
4339
+ sdp: _this39.mediaProperties.peerConnection.sdp,
4340
+ roapSeq: _this39.roapSeq,
4341
+ meeting: _this39 // or can pass meeting ID
4245
4342
 
4246
4343
  }), {
4247
4344
  header: "".concat(LOG_HEADER, " sendRoapMediaRequest being sent"),
@@ -4249,13 +4346,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4249
4346
  failure: "".concat(LOG_HEADER, " Error updateMedia on send roap media request, ")
4250
4347
  });
4251
4348
  }).then(function () {
4252
- return _this38.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4349
+ return _this39.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4253
4350
  }).then(function (startShare) {
4254
4351
  // This is a special case if we do an /floor grant followed by /media
4255
4352
  // we actually get a OFFER from the server and a GLAR condition happens
4256
4353
  if (startShare) {
4257
4354
  // We are assuming that the clients are connected when doing an update
4258
- return _this38.share();
4355
+ return _this39.share();
4259
4356
  }
4260
4357
 
4261
4358
  return _promise.default.resolve();
@@ -4276,7 +4373,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4276
4373
  }, {
4277
4374
  key: "updateAudio",
4278
4375
  value: function updateAudio(options) {
4279
- var _this39 = this;
4376
+ var _this40 = this;
4280
4377
 
4281
4378
  if (!this.canUpdateMedia()) {
4282
4379
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.AUDIO, options);
@@ -4299,13 +4396,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4299
4396
  }).then(function () {
4300
4397
  var previousMediaDirection = {};
4301
4398
 
4302
- if (_this39.mediaProperties.mediaDirection) {
4399
+ if (_this40.mediaProperties.mediaDirection) {
4303
4400
  previousMediaDirection = {
4304
- sendTrack: _this39.mediaProperties.mediaDirection.sendAudio,
4305
- receiveTrack: _this39.mediaProperties.mediaDirection.receiveAudio
4401
+ sendTrack: _this40.mediaProperties.mediaDirection.sendAudio,
4402
+ receiveTrack: _this40.mediaProperties.mediaDirection.receiveAudio
4306
4403
  };
4307
4404
  } else {
4308
- _this39.mediaProperties.mediaDirection = {};
4405
+ _this40.mediaProperties.mediaDirection = {};
4309
4406
  }
4310
4407
 
4311
4408
  return _util.default.updateTransceiver({
@@ -4314,20 +4411,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4314
4411
  receiveTrack: options.receiveAudio,
4315
4412
  track: track,
4316
4413
  transceiver: audioTransceiver,
4317
- peerConnection: _this39.mediaProperties.peerConnection,
4414
+ peerConnection: _this40.mediaProperties.peerConnection,
4318
4415
  previousMediaDirection: previousMediaDirection
4319
4416
  }, {
4320
- mediaProperties: _this39.mediaProperties,
4321
- meeting: _this39,
4322
- id: _this39.id
4417
+ mediaProperties: _this40.mediaProperties,
4418
+ meeting: _this40,
4419
+ id: _this40.id
4323
4420
  });
4324
4421
  }).then(function () {
4325
- _this39.setLocalAudioTrack(track);
4422
+ _this40.setLocalAudioTrack(track);
4326
4423
 
4327
- _this39.mediaProperties.mediaDirection.sendAudio = sendAudio;
4328
- _this39.mediaProperties.mediaDirection.receiveAudio = receiveAudio; // audio state could be undefined if you have not sent audio before
4424
+ _this40.mediaProperties.mediaDirection.sendAudio = sendAudio;
4425
+ _this40.mediaProperties.mediaDirection.receiveAudio = receiveAudio; // audio state could be undefined if you have not sent audio before
4329
4426
 
4330
- _this39.audio = _this39.audio || (0, _muteState.default)(_constants.AUDIO, _this39, _this39.mediaProperties.mediaDirection);
4427
+ _this40.audio = _this40.audio || (0, _muteState.default)(_constants.AUDIO, _this40, _this40.mediaProperties.mediaDirection);
4331
4428
  });
4332
4429
  }
4333
4430
  /**
@@ -4344,7 +4441,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4344
4441
  }, {
4345
4442
  key: "updateVideo",
4346
4443
  value: function updateVideo(options) {
4347
- var _this40 = this;
4444
+ var _this41 = this;
4348
4445
 
4349
4446
  if (!this.canUpdateMedia()) {
4350
4447
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.VIDEO, options);
@@ -4371,23 +4468,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4371
4468
  receiveTrack: options.receiveVideo,
4372
4469
  track: track,
4373
4470
  transceiver: videoTransceiver,
4374
- peerConnection: _this40.mediaProperties.peerConnection,
4471
+ peerConnection: _this41.mediaProperties.peerConnection,
4375
4472
  previousMediaDirection: {
4376
- sendTrack: _this40.mediaProperties.mediaDirection.sendVideo,
4377
- receiveTrack: _this40.mediaProperties.mediaDirection.receiveVideo
4473
+ sendTrack: _this41.mediaProperties.mediaDirection.sendVideo,
4474
+ receiveTrack: _this41.mediaProperties.mediaDirection.receiveVideo
4378
4475
  }
4379
4476
  }, {
4380
- mediaProperties: _this40.mediaProperties,
4381
- meeting: _this40,
4382
- id: _this40.id
4477
+ mediaProperties: _this41.mediaProperties,
4478
+ meeting: _this41,
4479
+ id: _this41.id
4383
4480
  });
4384
4481
  }).then(function () {
4385
- _this40.setLocalVideoTrack(track);
4482
+ _this41.setLocalVideoTrack(track);
4386
4483
 
4387
- _this40.mediaProperties.mediaDirection.sendVideo = sendVideo;
4388
- _this40.mediaProperties.mediaDirection.receiveVideo = receiveVideo; // video state could be undefined if you have not sent video before
4484
+ _this41.mediaProperties.mediaDirection.sendVideo = sendVideo;
4485
+ _this41.mediaProperties.mediaDirection.receiveVideo = receiveVideo; // video state could be undefined if you have not sent video before
4389
4486
 
4390
- _this40.video = _this40.video || (0, _muteState.default)(_constants.VIDEO, _this40, _this40.mediaProperties.mediaDirection);
4487
+ _this41.video = _this41.video || (0, _muteState.default)(_constants.VIDEO, _this41, _this41.mediaProperties.mediaDirection);
4391
4488
  });
4392
4489
  }
4393
4490
  /**
@@ -4429,7 +4526,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4429
4526
  }, {
4430
4527
  key: "updateShare",
4431
4528
  value: function updateShare(options) {
4432
- var _this41 = this;
4529
+ var _this42 = this;
4433
4530
 
4434
4531
  if (!options.skipSignalingCheck && !this.canUpdateMedia()) {
4435
4532
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE, options);
@@ -4452,7 +4549,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4452
4549
  sendShare: sendShare,
4453
4550
  localShare: stream
4454
4551
  }).then(function () {
4455
- return _this41.checkForStopShare(sendShare, previousSendShareStatus);
4552
+ return _this42.checkForStopShare(sendShare, previousSendShareStatus);
4456
4553
  }).then(function (startShare) {
4457
4554
  return _util.default.updateTransceiver({
4458
4555
  type: 'video',
@@ -4460,41 +4557,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4460
4557
  receiveTrack: receiveShare,
4461
4558
  track: track,
4462
4559
  transceiver: shareTransceiver,
4463
- peerConnection: _this41.mediaProperties.peerConnection,
4560
+ peerConnection: _this42.mediaProperties.peerConnection,
4464
4561
  previousMediaDirection: {
4465
- sendTrack: _this41.mediaProperties.mediaDirection.sendShare,
4466
- receiveTrack: _this41.mediaProperties.mediaDirection.receiveShare
4562
+ sendTrack: _this42.mediaProperties.mediaDirection.sendShare,
4563
+ receiveTrack: _this42.mediaProperties.mediaDirection.receiveShare
4467
4564
  }
4468
4565
  }, {
4469
- mediaProperties: _this41.mediaProperties,
4470
- meeting: _this41,
4471
- id: _this41.id
4566
+ mediaProperties: _this42.mediaProperties,
4567
+ meeting: _this42,
4568
+ id: _this42.id
4472
4569
  }).then(function () {
4473
4570
  if (startShare) {
4474
- return _this41.share();
4571
+ return _this42.share();
4475
4572
  }
4476
4573
 
4477
4574
  return _promise.default.resolve();
4478
4575
  });
4479
4576
  }).then(function () {
4480
- _this41.mediaProperties.mediaDirection.sendShare = sendShare;
4481
- _this41.mediaProperties.mediaDirection.receiveShare = receiveShare;
4577
+ _this42.mediaProperties.mediaDirection.sendShare = sendShare;
4578
+ _this42.mediaProperties.mediaDirection.receiveShare = receiveShare;
4482
4579
  }).catch(function (error) {
4483
- _this41.unsetLocalShareTrack(stream);
4580
+ _this42.unsetLocalShareTrack(stream);
4484
4581
 
4485
4582
  throw error;
4486
4583
  }).finally(function () {
4487
4584
  var delay = 1e3; // Check to see if share was stopped natively before onended was assigned.
4488
4585
 
4489
- var sharingModeIsActive = _this41.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
4490
- var isSharingOutOfSync = sharingModeIsActive && !_this41.isLocalShareLive;
4586
+ var sharingModeIsActive = _this42.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
4587
+ var isSharingOutOfSync = sharingModeIsActive && !_this42.isLocalShareLive;
4491
4588
 
4492
4589
  if (isSharingOutOfSync) {
4493
4590
  // Adding a delay to avoid a 409 from server
4494
4591
  // which results in user still appearing as if sharing.
4495
4592
  // Also delay give time for changes to peerConnection.
4496
4593
  setTimeout(function () {
4497
- return _this41.handleShareTrackEnded(stream);
4594
+ return _this42.handleShareTrackEnded(stream);
4498
4595
  }, delay);
4499
4596
  }
4500
4597
  });
@@ -4534,7 +4631,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4534
4631
  }, {
4535
4632
  key: "acknowledge",
4536
4633
  value: function acknowledge(type) {
4537
- var _this42 = this;
4634
+ var _this43 = this;
4538
4635
 
4539
4636
  if (!type) {
4540
4637
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
@@ -4548,11 +4645,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4548
4645
  }).then(function (response) {
4549
4646
  return _promise.default.resolve(response);
4550
4647
  }).then(function (response) {
4551
- _this42.meetingFiniteStateMachine.ring(type);
4648
+ _this43.meetingFiniteStateMachine.ring(type);
4552
4649
 
4553
4650
  _metrics.default.postEvent({
4554
4651
  event: _config.eventType.ALERT_DISPLAYED,
4555
- meeting: _this42
4652
+ meeting: _this43
4556
4653
  });
4557
4654
 
4558
4655
  return _promise.default.resolve({
@@ -4577,14 +4674,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4577
4674
  }, {
4578
4675
  key: "decline",
4579
4676
  value: function decline(reason) {
4580
- var _this43 = this;
4677
+ var _this44 = this;
4581
4678
 
4582
4679
  return _util.default.declineMeeting(this, reason).then(function (decline) {
4583
- _this43.meetingFiniteStateMachine.decline();
4680
+ _this44.meetingFiniteStateMachine.decline();
4584
4681
 
4585
4682
  return _promise.default.resolve(decline);
4586
4683
  }).catch(function (error) {
4587
- _this43.meetingFiniteStateMachine.fail(error);
4684
+ _this44.meetingFiniteStateMachine.fail(error);
4588
4685
 
4589
4686
  return _promise.default.reject(error);
4590
4687
  });
@@ -4601,7 +4698,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4601
4698
  }, {
4602
4699
  key: "leave",
4603
4700
  value: function leave() {
4604
- var _this44 = this;
4701
+ var _this45 = this;
4605
4702
 
4606
4703
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4607
4704
 
@@ -4619,41 +4716,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4619
4716
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
4620
4717
 
4621
4718
  return _util.default.leaveMeeting(this, options).then(function (leave) {
4622
- _this44.meetingFiniteStateMachine.leave();
4719
+ _this45.meetingFiniteStateMachine.leave();
4623
4720
 
4624
- _this44.audio = null;
4625
- _this44.video = null;
4626
- _this44.isSharing = false;
4721
+ _this45.audio = null;
4722
+ _this45.video = null;
4723
+ _this45.isSharing = false;
4627
4724
 
4628
- if (_this44.shareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
4629
- _this44.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
4725
+ if (_this45.shareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
4726
+ _this45.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
4630
4727
  }
4631
4728
 
4632
- _this44.queuedMediaUpdates = [];
4729
+ _this45.queuedMediaUpdates = [];
4633
4730
 
4634
- if (_this44.transcription) {
4635
- _this44.transcription.closeSocket();
4731
+ if (_this45.transcription) {
4732
+ _this45.transcription.closeSocket();
4636
4733
 
4637
- _this44.triggerStopReceivingTranscriptionEvent();
4734
+ _this45.triggerStopReceivingTranscriptionEvent();
4638
4735
 
4639
- _this44.transcription = undefined;
4736
+ _this45.transcription = undefined;
4640
4737
  } // upload logs on leave irrespective of meeting delete
4641
4738
 
4642
4739
 
4643
- _triggerProxy.default.trigger(_this44, {
4740
+ _triggerProxy.default.trigger(_this45, {
4644
4741
  file: 'meeting/index',
4645
4742
  function: 'leave'
4646
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this44); // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
4743
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this45); // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
4647
4744
 
4648
4745
 
4649
- if (_this44.wirelessShare || _this44.guest) {
4746
+ if (_this45.wirelessShare || _this45.guest) {
4650
4747
  // If screen sharing clean the meeting object
4651
- _triggerProxy.default.trigger(_this44, {
4748
+ _triggerProxy.default.trigger(_this45, {
4652
4749
  file: 'meeting/index',
4653
4750
  function: 'leave'
4654
4751
  }, _constants.EVENTS.DESTROY_MEETING, {
4655
4752
  reason: options.reason,
4656
- meetingId: _this44.id
4753
+ meetingId: _this45.id
4657
4754
  });
4658
4755
  }
4659
4756
 
@@ -4661,19 +4758,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4661
4758
 
4662
4759
  return leave;
4663
4760
  }).catch(function (error) {
4664
- _this44.meetingFiniteStateMachine.fail(error);
4761
+ _this45.meetingFiniteStateMachine.fail(error);
4665
4762
 
4666
4763
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error); // upload logs on leave irrespective of meeting delete
4667
4764
 
4668
4765
 
4669
- _triggerProxy.default.trigger(_this44, {
4766
+ _triggerProxy.default.trigger(_this45, {
4670
4767
  file: 'meeting/index',
4671
4768
  function: 'leave'
4672
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this44);
4769
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this45);
4673
4770
 
4674
4771
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_LEAVE_FAILURE, {
4675
- correlation_id: _this44.correlationId,
4676
- locus_id: _this44.locusUrl.split('/').pop(),
4772
+ correlation_id: _this45.correlationId,
4773
+ locus_id: _this45.locusUrl.split('/').pop(),
4677
4774
  reason: error.message,
4678
4775
  stack: error.stack,
4679
4776
  code: error.code
@@ -4692,7 +4789,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4692
4789
  }, {
4693
4790
  key: "share",
4694
4791
  value: function share() {
4695
- var _this45 = this;
4792
+ var _this46 = this;
4696
4793
 
4697
4794
  var content = this.locusInfo.mediaShares.find(function (element) {
4698
4795
  return element.name === _constants.CONTENT;
@@ -4711,14 +4808,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4711
4808
  uri: content.url,
4712
4809
  resourceUrl: this.resourceUrl
4713
4810
  }).then(function () {
4714
- _this45.isSharing = true;
4811
+ _this46.isSharing = true;
4715
4812
  return _promise.default.resolve();
4716
4813
  }).catch(function (error) {
4717
4814
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
4718
4815
 
4719
4816
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_SHARE_FAILURE, {
4720
- correlation_id: _this45.correlationId,
4721
- locus_id: _this45.locusUrl.split('/').pop(),
4817
+ correlation_id: _this46.correlationId,
4818
+ locus_id: _this46.locusUrl.split('/').pop(),
4722
4819
  reason: error.message,
4723
4820
  stack: error.stack
4724
4821
  });
@@ -4757,7 +4854,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4757
4854
  }, {
4758
4855
  key: "stopFloorRequest",
4759
4856
  value: function stopFloorRequest() {
4760
- var _this46 = this;
4857
+ var _this47 = this;
4761
4858
 
4762
4859
  var content = this.locusInfo.mediaShares.find(function (element) {
4763
4860
  return element.name === _constants.CONTENT;
@@ -4787,15 +4884,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4787
4884
  _loggerProxy.default.logger.error('Meeting:index#stopFloorRequest --> Error ', error);
4788
4885
 
4789
4886
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.STOP_FLOOR_REQUEST_FAILURE, {
4790
- correlation_id: _this46.correlationId,
4791
- locus_id: _this46.locusUrl.split('/').pop(),
4887
+ correlation_id: _this47.correlationId,
4888
+ locus_id: _this47.locusUrl.split('/').pop(),
4792
4889
  reason: error.message,
4793
4890
  stack: error.stack
4794
4891
  });
4795
4892
 
4796
4893
  return _promise.default.reject(error);
4797
4894
  }).finally(function () {
4798
- _this46.isSharing = false;
4895
+ _this47.isSharing = false;
4799
4896
  });
4800
4897
  }
4801
4898
 
@@ -4931,7 +5028,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4931
5028
  }, {
4932
5029
  key: "changeVideoLayout",
4933
5030
  value: function changeVideoLayout(layoutType) {
4934
- var _this47 = this;
5031
+ var _this48 = this;
4935
5032
 
4936
5033
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4937
5034
  var main = renderInfo.main,
@@ -4994,7 +5091,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4994
5091
  content: layoutInfo.content
4995
5092
  }).then(function (response) {
4996
5093
  if (response && response.body && response.body.locus) {
4997
- _this47.locusInfo.onFullLocus(response.body.locus);
5094
+ _this48.locusInfo.onFullLocus(response.body.locus);
4998
5095
  }
4999
5096
  }).catch(function (error) {
5000
5097
  _loggerProxy.default.logger.error('Meeting:index#changeVideoLayout --> Error ', error);
@@ -5011,7 +5108,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5011
5108
  }, {
5012
5109
  key: "setLocalVideoQuality",
5013
5110
  value: function setLocalVideoQuality(level) {
5014
- var _this48 = this;
5111
+ var _this49 = this;
5015
5112
 
5016
5113
  _loggerProxy.default.logger.log("Meeting:index#setLocalVideoQuality --> Setting quality to ".concat(level));
5017
5114
 
@@ -5041,7 +5138,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5041
5138
  var _ref11 = (0, _slicedToArray2.default)(_ref10, 1),
5042
5139
  localStream = _ref11[0];
5043
5140
 
5044
- return _this48.updateVideo({
5141
+ return _this49.updateVideo({
5045
5142
  sendVideo: true,
5046
5143
  receiveVideo: true,
5047
5144
  stream: localStream
@@ -5089,7 +5186,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5089
5186
  }, {
5090
5187
  key: "setMeetingQuality",
5091
5188
  value: function setMeetingQuality(level) {
5092
- var _this49 = this;
5189
+ var _this50 = this;
5093
5190
 
5094
5191
  _loggerProxy.default.logger.log("Meeting:index#setMeetingQuality --> Setting quality to ".concat(level));
5095
5192
 
@@ -5114,18 +5211,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5114
5211
  receiveVideo = _this$mediaProperties4.receiveVideo,
5115
5212
  sendVideo = _this$mediaProperties4.sendVideo;
5116
5213
  return (sendVideo ? this.setLocalVideoQuality(level) : _promise.default.resolve()).then(function () {
5117
- return receiveAudio || receiveVideo ? _this49.setRemoteQualityLevel(level) : _promise.default.resolve();
5214
+ return receiveAudio || receiveVideo ? _this50.setRemoteQualityLevel(level) : _promise.default.resolve();
5118
5215
  }).catch(function (error) {
5119
5216
  // From troubleshooting it seems that the stream itself doesn't change the max-fs if the peer connection isn't stable
5120
- _this49.mediaProperties.setLocalQualityLevel(previousLevel.local);
5217
+ _this50.mediaProperties.setLocalQualityLevel(previousLevel.local);
5121
5218
 
5122
- _this49.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5219
+ _this50.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5123
5220
 
5124
5221
  _loggerProxy.default.logger.error("Meeting:index#setMeetingQuality --> ".concat(error.message));
5125
5222
 
5126
5223
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.SET_MEETING_QUALITY_FAILURE, {
5127
- correlation_id: _this49.correlationId,
5128
- locus_id: _this49.locusUrl.split('/').pop(),
5224
+ correlation_id: _this50.correlationId,
5225
+ locus_id: _this50.locusUrl.split('/').pop(),
5129
5226
  reason: error.message,
5130
5227
  stack: error.stack
5131
5228
  }, {
@@ -5149,7 +5246,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5149
5246
  }, {
5150
5247
  key: "shareScreen",
5151
5248
  value: function shareScreen() {
5152
- var _this50 = this;
5249
+ var _this51 = this;
5153
5250
 
5154
5251
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5155
5252
 
@@ -5161,9 +5258,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5161
5258
  }, options);
5162
5259
 
5163
5260
  return _media.default.getDisplayMedia(shareConstraints, this.config).then(function (shareStream) {
5164
- return _this50.updateShare({
5261
+ return _this51.updateShare({
5165
5262
  sendShare: true,
5166
- receiveShare: _this50.mediaProperties.mediaDirection.receiveShare,
5263
+ receiveShare: _this51.mediaProperties.mediaDirection.receiveShare,
5167
5264
  stream: shareStream
5168
5265
  });
5169
5266
  }).catch(function (error) {
@@ -5175,8 +5272,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5175
5272
  // TODO: The getDisplayMedia errors need to be moved inside `media.getDisplayMedia`
5176
5273
  var metricName = _constants.METRICS_OPERATIONAL_MEASURES.GET_DISPLAY_MEDIA_FAILURE;
5177
5274
  var data = {
5178
- correlation_id: _this50.correlationId,
5179
- locus_id: _this50.locusUrl.split('/').pop(),
5275
+ correlation_id: _this51.correlationId,
5276
+ locus_id: _this51.locusUrl.split('/').pop(),
5180
5277
  reason: error.message,
5181
5278
  stack: error.stack
5182
5279
  };