@webex/plugin-meetings 1.146.1 → 1.149.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}
@@ -1285,6 +1305,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1285
1305
  };
1286
1306
  }
1287
1307
 
1308
+ var joinRespTxStartAudio = this.getSendingMediaDelayDuration('audio');
1309
+
1310
+ if (joinRespTxStartAudio) {
1311
+ options.audioSetupDelay = _objectSpread(_objectSpread({}, options.audioSetupDelay), {}, {
1312
+ joinRespTxStart: joinRespTxStartAudio
1313
+ });
1314
+ }
1315
+
1316
+ var joinRespTxStartVideo = this.getSendingMediaDelayDuration('video');
1317
+
1318
+ if (joinRespTxStartVideo) {
1319
+ options.videoSetupDelay = _objectSpread(_objectSpread({}, options.videoSetupDelay), {}, {
1320
+ joinRespTxStart: joinRespTxStartVideo
1321
+ });
1322
+ }
1323
+
1288
1324
  if (options.type === _constants.MQA_STATS.CA_TYPE) {
1289
1325
  payload = _metrics.default.initMediaPayload(options.event, identifiers, options);
1290
1326
  } else {
@@ -1398,24 +1434,50 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
1398
1434
  var _this6 = this;
1399
1435
 
1400
1436
  if (this.locusInfo.self) {
1401
- var _payload$newSelf;
1437
+ var _payload$newSelf, _payload$newSelf2;
1402
1438
 
1403
1439
  var dialInPstnDevice = (_payload$newSelf = payload.newSelf) === null || _payload$newSelf === void 0 ? void 0 : _payload$newSelf.pstnDevices.find(function (device) {
1404
1440
  return device.url === _this6.dialInUrl;
1405
1441
  });
1442
+ var dialOutPstnDevice = (_payload$newSelf2 = payload.newSelf) === null || _payload$newSelf2 === void 0 ? void 0 : _payload$newSelf2.pstnDevices.find(function (device) {
1443
+ return device.url === _this6.dialOutUrl;
1444
+ });
1445
+ var changed = false;
1406
1446
 
1407
1447
  if (dialInPstnDevice) {
1408
1448
  var _dialInPstnDevice$dia;
1409
1449
 
1410
- this.dialInDeviceStatus = (_dialInPstnDevice$dia = dialInPstnDevice.dialingStatus) !== null && _dialInPstnDevice$dia !== void 0 ? _dialInPstnDevice$dia : dialInPstnDevice.state;
1450
+ var newStatus = (_dialInPstnDevice$dia = dialInPstnDevice.dialingStatus) !== null && _dialInPstnDevice$dia !== void 0 ? _dialInPstnDevice$dia : dialInPstnDevice.state;
1451
+
1452
+ if (newStatus !== this.dialInDeviceStatus) {
1453
+ this.dialInDeviceStatus = newStatus;
1454
+ changed = true;
1455
+ }
1456
+ }
1457
+
1458
+ if (dialOutPstnDevice) {
1459
+ var _dialOutPstnDevice$di;
1460
+
1461
+ var _newStatus = (_dialOutPstnDevice$di = dialOutPstnDevice.dialingStatus) !== null && _dialOutPstnDevice$di !== void 0 ? _dialOutPstnDevice$di : dialOutPstnDevice.state;
1411
1462
 
1463
+ if (_newStatus !== this.dialOutDeviceStatus) {
1464
+ this.dialOutDeviceStatus = _newStatus;
1465
+ changed = true;
1466
+ }
1467
+ }
1468
+
1469
+ if (changed) {
1412
1470
  _triggerProxy.default.trigger(this, {
1413
1471
  file: 'meeting/index',
1414
1472
  function: 'setUpLocusSelfListener'
1415
1473
  }, _constants.EVENT_TRIGGERS.MEETING_SELF_PHONE_AUDIO_UPDATE, {
1416
1474
  dialIn: {
1417
1475
  status: this.dialInDeviceStatus,
1418
- attendeeId: dialInPstnDevice.attendeeId
1476
+ attendeeId: dialInPstnDevice === null || dialInPstnDevice === void 0 ? void 0 : dialInPstnDevice.attendeeId
1477
+ },
1478
+ dialOut: {
1479
+ status: this.dialOutDeviceStatus,
1480
+ attendeeId: dialOutPstnDevice === null || dialOutPstnDevice === void 0 ? void 0 : dialOutPstnDevice.attendeeId
1419
1481
  }
1420
1482
  });
1421
1483
  }
@@ -3655,7 +3717,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3655
3717
  /**
3656
3718
  * Use phone for meeting audio
3657
3719
  * @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
3720
+ * @returns {Promise} Resolves once the dial-in or dial-out request has completed, or rejects if it failed
3659
3721
  * @public
3660
3722
  * @memberof Meeting
3661
3723
  */
@@ -3667,11 +3729,24 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3667
3729
  return this.dialInPstn();
3668
3730
  }
3669
3731
 
3670
- return _promise.default.reject(new Error('Dial-out is not supported yet'));
3732
+ return this.dialOutPstn(phoneNumber);
3733
+ }
3734
+ /**
3735
+ * Determines if the given pstnStatus is in a state which implies the phone is provisioned
3736
+ * @param {String} pstnStatus
3737
+ * @returns {Boolean}
3738
+ * @private
3739
+ * @memberof Meeting
3740
+ */
3741
+
3742
+ }, {
3743
+ key: "isPhoneProvisioned",
3744
+ value: function isPhoneProvisioned(pstnStatus) {
3745
+ return [_constants.PSTN_STATUS.JOINED, _constants.PSTN_STATUS.CONNECTED, _constants.PSTN_STATUS.SUCCESS].includes(pstnStatus);
3671
3746
  }
3672
3747
  /**
3673
3748
  * Enable dial-in for audio
3674
- * @returns {Promise} Resolves once the dial-in request has completed
3749
+ * @returns {Promise} Resolves once the dial-in request has completed, or rejects if it failed
3675
3750
  * @private
3676
3751
  * @memberof Meeting
3677
3752
  */
@@ -3681,7 +3756,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3681
3756
  value: function dialInPstn() {
3682
3757
  var _this33 = this;
3683
3758
 
3684
- if (this.dialInDeviceStatus === 'CONNECTED' || this.dialInDeviceStatus === 'JOINED') return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
3759
+ if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
3685
3760
 
3686
3761
  var correlationId = this.correlationId,
3687
3762
  locusUrl = this.locusUrl;
@@ -3704,6 +3779,49 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3704
3779
  reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
3705
3780
  stack: error.stack
3706
3781
  });
3782
+
3783
+ return _promise.default.reject(error);
3784
+ });
3785
+ }
3786
+ /**
3787
+ * Enable dial-out for audio
3788
+ * @param {String} phoneNumber Phone number to dial out to
3789
+ * @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
3790
+ * @private
3791
+ * @memberof Meeting
3792
+ */
3793
+
3794
+ }, {
3795
+ key: "dialOutPstn",
3796
+ value: function dialOutPstn(phoneNumber) {
3797
+ var _this34 = this;
3798
+
3799
+ if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
3800
+
3801
+ var correlationId = this.correlationId,
3802
+ locusUrl = this.locusUrl;
3803
+ if (!this.dialOutUrl) this.dialOutUrl = "dialout:///".concat(_uuid.default.v4());
3804
+ return this.meetingRequest.dialOut({
3805
+ correlationId: correlationId,
3806
+ dialOutUrl: this.dialOutUrl,
3807
+ phoneNumber: phoneNumber,
3808
+ locusUrl: locusUrl,
3809
+ clientUrl: this.deviceUrl
3810
+ }).then(function (res) {
3811
+ _this34.locusInfo.onFullLocus(res.body.locus);
3812
+ }).catch(function (error) {
3813
+ var _error$error3;
3814
+
3815
+ _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_DIAL_OUT_FAILURE, {
3816
+ correlation_id: _this34.correlationId,
3817
+ dial_out_url: _this34.dialOutUrl,
3818
+ locus_id: locusUrl.split('/').pop(),
3819
+ client_url: _this34.deviceUrl,
3820
+ reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
3821
+ stack: error.stack
3822
+ });
3823
+
3824
+ return _promise.default.reject(error);
3707
3825
  });
3708
3826
  }
3709
3827
  /**
@@ -3717,12 +3835,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3717
3835
  }, {
3718
3836
  key: "disconnectPhoneAudio",
3719
3837
  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();
3838
+ 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
3839
  }
3727
3840
  /**
3728
3841
  * Moves the call to the specified resourceId
@@ -3735,7 +3848,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3735
3848
  }, {
3736
3849
  key: "moveTo",
3737
3850
  value: function moveTo(resourceId) {
3738
- var _this34 = this;
3851
+ var _this35 = this;
3739
3852
 
3740
3853
  if (!resourceId) {
3741
3854
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -3773,9 +3886,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3773
3886
  resourceId: resourceId,
3774
3887
  moveToResource: true
3775
3888
  }).then(function () {
3776
- _this34.meetingFiniteStateMachine.join();
3889
+ _this35.meetingFiniteStateMachine.join();
3777
3890
 
3778
- return _this34.updateMedia({
3891
+ return _this35.updateMedia({
3779
3892
  mediaSettings: {
3780
3893
  sendVideo: false,
3781
3894
  receiveVideo: false,
@@ -3785,10 +3898,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3785
3898
  receiveShare: false
3786
3899
  }
3787
3900
  }).then(function () {
3788
- return _promise.default.resolve(_this34);
3901
+ return _promise.default.resolve(_this35);
3789
3902
  });
3790
3903
  }).catch(function (error) {
3791
- _this34.meetingFiniteStateMachine.fail(error);
3904
+ _this35.meetingFiniteStateMachine.fail(error);
3792
3905
 
3793
3906
  return _promise.default.reject(error);
3794
3907
  });
@@ -3804,7 +3917,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3804
3917
  }, {
3805
3918
  key: "moveFrom",
3806
3919
  value: function moveFrom(resourceId) {
3807
- var _this35 = this;
3920
+ var _this36 = this;
3808
3921
 
3809
3922
  if (!resourceId) {
3810
3923
  throw new _parameter.default('Cannot move call without a resourceId.');
@@ -3843,7 +3956,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3843
3956
  });
3844
3957
 
3845
3958
  return _util.default.joinMeetingOptions(this).then(function (join) {
3846
- return _this35.getMediaStreams({
3959
+ return _this36.getMediaStreams({
3847
3960
  sendAudio: true,
3848
3961
  sendVideo: true,
3849
3962
  sendShare: false
@@ -3852,7 +3965,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3852
3965
  localStream = _ref9[0],
3853
3966
  localShare = _ref9[1];
3854
3967
 
3855
- return _this35.updateMedia({
3968
+ return _this36.updateMedia({
3856
3969
  mediaSettings: {
3857
3970
  sendAudio: true,
3858
3971
  receiveAudio: true,
@@ -3867,14 +3980,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3867
3980
  return _promise.default.resolve(join);
3868
3981
  });
3869
3982
  }).then(function () {
3870
- return _util.default.leaveMeeting(_this35, {
3983
+ return _util.default.leaveMeeting(_this36, {
3871
3984
  resourceId: resourceId,
3872
3985
  correlationId: oldCorrelationId,
3873
3986
  moveMeeting: true
3874
3987
  });
3875
3988
  });
3876
3989
  }).then(function () {
3877
- _this35.webex.meetings.meetingCollection.delete(_this35.id);
3990
+ _this36.webex.meetings.meetingCollection.delete(_this36.id);
3878
3991
 
3879
3992
  return _promise.default.resolve();
3880
3993
  });
@@ -3905,7 +4018,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3905
4018
  * @memberof Meeting
3906
4019
  */
3907
4020
  function addMedia() {
3908
- var _this36 = this;
4021
+ var _this37 = this;
3909
4022
 
3910
4023
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3911
4024
  var LOG_HEADER = 'Meeting:index#addMedia -->';
@@ -3953,52 +4066,53 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
3953
4066
  });
3954
4067
 
3955
4068
  return _util.default.validateOptions(options).then(function () {
3956
- _this36.mediaProperties.setMediaPeerConnection(_util2.default.createPeerConnection());
4069
+ _this37.mediaProperties.setMediaPeerConnection(_util2.default.createPeerConnection());
3957
4070
 
3958
- _this36.setMercuryListener();
4071
+ _this37.setMercuryListener();
3959
4072
 
3960
- _peerConnectionManager.default.setPeerConnectionEvents(_this36);
4073
+ _peerConnectionManager.default.setPeerConnectionEvents(_this37);
3961
4074
 
3962
- return _this36.preMedia(localStream, localShare, mediaSettings);
4075
+ return _this37.preMedia(localStream, localShare, mediaSettings);
3963
4076
  }).then(function () {
3964
- return _media.default.attachMedia(_this36.mediaProperties, {
3965
- meetingId: _this36.id,
3966
- remoteQualityLevel: _this36.mediaProperties.remoteQualityLevel,
3967
- enableRtx: _this36.config.enableRtx
4077
+ return _media.default.attachMedia(_this37.mediaProperties, {
4078
+ meetingId: _this37.id,
4079
+ remoteQualityLevel: _this37.mediaProperties.remoteQualityLevel,
4080
+ enableRtx: _this37.config.enableRtx,
4081
+ enableExtmap: _this37.config.enableExtmap
3968
4082
  }).then(function (peerConnection) {
3969
- return _this36.getDevices().then(function (devices) {
4083
+ return _this37.getDevices().then(function (devices) {
3970
4084
  _util.default.handleDeviceLogging(devices);
3971
4085
 
3972
4086
  return peerConnection;
3973
4087
  });
3974
4088
  }).then(function (peerConnection) {
3975
- _this36.handleMediaLogging(_this36.mediaProperties);
4089
+ _this37.handleMediaLogging(_this37.mediaProperties);
3976
4090
 
3977
4091
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection Received from attachMedia "));
3978
4092
 
3979
- _this36.setRemoteStream(peerConnection);
4093
+ _this37.setRemoteStream(peerConnection);
3980
4094
 
3981
- _util.default.startInternalStats(_this36);
4095
+ _util.default.startInternalStats(_this37);
3982
4096
 
3983
- if (_this36.config.metrics.autoSendMQA) {
3984
- _this36.startMediaQualityMetrics();
4097
+ if (_this37.config.metrics.autoSendMQA) {
4098
+ _this37.startMediaQualityMetrics();
3985
4099
  }
3986
4100
 
3987
- if (_this36.config.stats.enableStatsAnalyzer) {
4101
+ if (_this37.config.stats.enableStatsAnalyzer) {
3988
4102
  // TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
3989
- _this36.networkQualityMonitor = new _networkQualityMonitor.default(_this36.config.stats);
3990
- _this36.statsAnalyzer = new _statsAnalyzer.default(_this36.config.stats, _this36.networkQualityMonitor);
4103
+ _this37.networkQualityMonitor = new _networkQualityMonitor.default(_this37.config.stats);
4104
+ _this37.statsAnalyzer = new _statsAnalyzer.default(_this37.config.stats, _this37.networkQualityMonitor);
3991
4105
 
3992
- _this36.statsAnalyzer.on(_constants.EVENT_TRIGGERS.MEDIA_QUALITY, function (options) {
3993
- var _this36$webex$meeting;
4106
+ _this37.statsAnalyzer.on(_constants.EVENT_TRIGGERS.MEDIA_QUALITY, function (options) {
4107
+ var _this37$webex$meeting;
3994
4108
 
3995
4109
  // TODO: might have to send the same event to the developer
3996
4110
  // Add ip address info if geo hint is present
3997
- 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;
4111
+ 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;
3998
4112
 
3999
4113
  _metrics.default.postEvent({
4000
4114
  event: _config.eventType.MEDIA_QUALITY,
4001
- meeting: _this36,
4115
+ meeting: _this37,
4002
4116
  data: {
4003
4117
  intervalData: options.data,
4004
4118
  networkType: options.networkType
@@ -4006,14 +4120,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4006
4120
  });
4007
4121
  });
4008
4122
 
4009
- _this36.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this36.sendNetworkQualityEvent.bind(_this36));
4123
+ _this37.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this37.sendNetworkQualityEvent.bind(_this37));
4010
4124
  }
4011
4125
  }).catch(function (error) {
4012
4126
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
4013
4127
 
4014
4128
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_MEDIA_FAILURE, {
4015
- correlation_id: _this36.correlationId,
4016
- locus_id: _this36.locusUrl.split('/').pop(),
4129
+ correlation_id: _this37.correlationId,
4130
+ locus_id: _this37.locusUrl.split('/').pop(),
4017
4131
  reason: error.message,
4018
4132
  stack: error.stack
4019
4133
  });
@@ -4024,14 +4138,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4024
4138
  var timerCount = 0; // eslint-disable-next-line func-names
4025
4139
  // eslint-disable-next-line prefer-arrow-callback
4026
4140
 
4027
- if (_this36.type === _constants._CALL_) {
4141
+ if (_this37.type === _constants._CALL_) {
4028
4142
  resolve();
4029
4143
  }
4030
4144
 
4031
4145
  var joiningTimer = setInterval(function () {
4032
4146
  timerCount += 1;
4033
4147
 
4034
- if (_this36.meetingState === _constants.FULL_STATE.ACTIVE) {
4148
+ if (_this37.meetingState === _constants.FULL_STATE.ACTIVE) {
4035
4149
  clearInterval(joiningTimer);
4036
4150
  resolve();
4037
4151
  }
@@ -4043,10 +4157,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4043
4157
  }, 1000);
4044
4158
  });
4045
4159
  }).then(function () {
4046
- return logRequest(_this36.roap.sendRoapMediaRequest({
4047
- sdp: _this36.mediaProperties.peerConnection.sdp,
4048
- roapSeq: _this36.roapSeq,
4049
- meeting: _this36 // or can pass meeting ID
4160
+ return logRequest(_this37.roap.sendRoapMediaRequest({
4161
+ sdp: _this37.mediaProperties.peerConnection.sdp,
4162
+ roapSeq: _this37.roapSeq,
4163
+ meeting: _this37 // or can pass meeting ID
4050
4164
 
4051
4165
  }), {
4052
4166
  header: "".concat(LOG_HEADER, " Send Roap Media Request."),
@@ -4054,7 +4168,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4054
4168
  failure: "".concat(LOG_HEADER, " Error joining the call on send roap media request, ")
4055
4169
  });
4056
4170
  }).then(function () {
4057
- var peerConnection = _this36.mediaProperties.peerConnection;
4171
+ var peerConnection = _this37.mediaProperties.peerConnection;
4058
4172
  return new _promise.default(function (resolve, reject) {
4059
4173
  if (peerConnection.connectionState === _constants.CONNECTION_STATE.CONNECTED) {
4060
4174
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
@@ -4075,7 +4189,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4075
4189
  }
4076
4190
  }, _constants.PC_BAIL_TIMEOUT);
4077
4191
 
4078
- _this36.once(_constants.EVENT_TRIGGERS.MEDIA_READY, function () {
4192
+ _this37.once(_constants.EVENT_TRIGGERS.MEDIA_READY, function () {
4079
4193
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED, clearing stability timer."));
4080
4194
 
4081
4195
  clearTimeout(stabilityTimeout);
@@ -4084,51 +4198,51 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4084
4198
  });
4085
4199
  }).then(function () {
4086
4200
  if (mediaSettings && mediaSettings.sendShare && localShare) {
4087
- if (_this36.state === _constants.MEETING_STATE.STATES.JOINED) {
4088
- return _this36.share();
4201
+ if (_this37.state === _constants.MEETING_STATE.STATES.JOINED) {
4202
+ return _this37.share();
4089
4203
  } // When the self state changes to JOINED then request the floor
4090
4204
 
4091
4205
 
4092
- _this36.floorGrantPending = true;
4206
+ _this37.floorGrantPending = true;
4093
4207
  }
4094
4208
 
4095
4209
  return _promise.default.resolve();
4096
4210
  });
4097
4211
  }).catch(function (error) {
4098
4212
  // Clean up stats analyzer, peer connection, and turn off listeners
4099
- if (_this36.statsAnalyzer) {
4100
- _this36.statsAnalyzer.stopAnalyzer();
4213
+ if (_this37.statsAnalyzer) {
4214
+ _this37.statsAnalyzer.stopAnalyzer();
4101
4215
 
4102
- _this36.statsAnalyzer = null;
4216
+ _this37.statsAnalyzer = null;
4103
4217
  }
4104
4218
 
4105
- if (_this36.mediaProperties.peerConnection) {
4106
- _this36.closePeerConnections();
4219
+ if (_this37.mediaProperties.peerConnection) {
4220
+ _this37.closePeerConnections();
4107
4221
 
4108
- _this36.unsetPeerConnections();
4222
+ _this37.unsetPeerConnections();
4109
4223
  }
4110
4224
 
4111
4225
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
4112
4226
 
4113
4227
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_MEDIA_FAILURE, {
4114
- correlation_id: _this36.correlationId,
4115
- locus_id: _this36.locusUrl.split('/').pop(),
4228
+ correlation_id: _this37.correlationId,
4229
+ locus_id: _this37.locusUrl.split('/').pop(),
4116
4230
  reason: error.message,
4117
4231
  stack: error.stack,
4118
4232
  code: error.code
4119
4233
  }); // Upload logs on error while adding media
4120
4234
 
4121
4235
 
4122
- _triggerProxy.default.trigger(_this36, {
4236
+ _triggerProxy.default.trigger(_this37, {
4123
4237
  file: 'meeting/index',
4124
4238
  function: 'addMedia'
4125
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this36); // If addMedia failes for not establishing connection then
4239
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this37); // If addMedia failes for not establishing connection then
4126
4240
  // leave the meeting with reson connection failed as meeting anyways will end
4127
4241
  // and cannot be connected unless network condition is checked for firewall
4128
4242
 
4129
4243
 
4130
4244
  if (error.code === _webexErrors.InvalidSdpError.CODE) {
4131
- _this36.leave({
4245
+ _this37.leave({
4132
4246
  reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
4133
4247
  });
4134
4248
  }
@@ -4158,7 +4272,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4158
4272
  }, {
4159
4273
  key: "enqueueMediaUpdate",
4160
4274
  value: function enqueueMediaUpdate(mediaUpdateType, options) {
4161
- var _this37 = this;
4275
+ var _this38 = this;
4162
4276
 
4163
4277
  return new _promise.default(function (resolve, reject) {
4164
4278
  var queueItem = {
@@ -4170,7 +4284,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4170
4284
 
4171
4285
  _loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
4172
4286
 
4173
- _this37.queuedMediaUpdates.push(queueItem);
4287
+ _this38.queuedMediaUpdates.push(queueItem);
4174
4288
  });
4175
4289
  }
4176
4290
  /**
@@ -4196,7 +4310,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4196
4310
  * @memberof Meeting
4197
4311
  */
4198
4312
  function updateMedia() {
4199
- var _this38 = this;
4313
+ var _this39 = this;
4200
4314
 
4201
4315
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4202
4316
  var LOG_HEADER = 'Meeting:index#updateMedia -->';
@@ -4210,16 +4324,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4210
4324
  mediaSettings = options.mediaSettings;
4211
4325
  var previousSendShareStatus = this.mediaProperties.mediaDirection.sendShare;
4212
4326
  return _util.default.validateOptions(options).then(function () {
4213
- return _this38.preMedia(localStream, localShare, mediaSettings);
4327
+ return _this39.preMedia(localStream, localShare, mediaSettings);
4214
4328
  }).then(function () {
4215
- return _media.default.updateMedia(_this38.mediaProperties, {
4216
- meetingId: _this38.id,
4217
- remoteQualityLevel: _this38.mediaProperties.remoteQualityLevel,
4218
- enableRtx: _this38.config.enableRtx
4329
+ return _media.default.updateMedia(_this39.mediaProperties, {
4330
+ meetingId: _this39.id,
4331
+ remoteQualityLevel: _this39.mediaProperties.remoteQualityLevel,
4332
+ enableRtx: _this39.config.enableRtx,
4333
+ enableExtmap: _this39.config.enableExtmap
4219
4334
  }).then(function (peerConnection) {
4220
4335
  _loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection received from updateMedia, ").concat(peerConnection));
4221
4336
 
4222
- _this38.setRemoteStream(peerConnection);
4337
+ _this39.setRemoteStream(peerConnection);
4223
4338
 
4224
4339
  if (mediaSettings.receiveShare || localShare) {
4225
4340
  _peerConnectionManager.default.setContentSlides(peerConnection);
@@ -4228,18 +4343,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4228
4343
  _loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error updatedMedia, "), error);
4229
4344
 
4230
4345
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.UPDATE_MEDIA_FAILURE, {
4231
- correlation_id: _this38.correlationId,
4232
- locus_id: _this38.locusUrl.split('/').pop(),
4346
+ correlation_id: _this39.correlationId,
4347
+ locus_id: _this39.locusUrl.split('/').pop(),
4233
4348
  reason: error.message,
4234
4349
  stack: error.stack
4235
4350
  });
4236
4351
 
4237
4352
  throw error;
4238
4353
  }).then(function () {
4239
- return logRequest(_this38.roap.sendRoapMediaRequest({
4240
- sdp: _this38.mediaProperties.peerConnection.sdp,
4241
- roapSeq: _this38.roapSeq,
4242
- meeting: _this38 // or can pass meeting ID
4354
+ return logRequest(_this39.roap.sendRoapMediaRequest({
4355
+ sdp: _this39.mediaProperties.peerConnection.sdp,
4356
+ roapSeq: _this39.roapSeq,
4357
+ meeting: _this39 // or can pass meeting ID
4243
4358
 
4244
4359
  }), {
4245
4360
  header: "".concat(LOG_HEADER, " sendRoapMediaRequest being sent"),
@@ -4247,13 +4362,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4247
4362
  failure: "".concat(LOG_HEADER, " Error updateMedia on send roap media request, ")
4248
4363
  });
4249
4364
  }).then(function () {
4250
- return _this38.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4365
+ return _this39.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
4251
4366
  }).then(function (startShare) {
4252
4367
  // This is a special case if we do an /floor grant followed by /media
4253
4368
  // we actually get a OFFER from the server and a GLAR condition happens
4254
4369
  if (startShare) {
4255
4370
  // We are assuming that the clients are connected when doing an update
4256
- return _this38.share();
4371
+ return _this39.share();
4257
4372
  }
4258
4373
 
4259
4374
  return _promise.default.resolve();
@@ -4274,7 +4389,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4274
4389
  }, {
4275
4390
  key: "updateAudio",
4276
4391
  value: function updateAudio(options) {
4277
- var _this39 = this;
4392
+ var _this40 = this;
4278
4393
 
4279
4394
  if (!this.canUpdateMedia()) {
4280
4395
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.AUDIO, options);
@@ -4297,13 +4412,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4297
4412
  }).then(function () {
4298
4413
  var previousMediaDirection = {};
4299
4414
 
4300
- if (_this39.mediaProperties.mediaDirection) {
4415
+ if (_this40.mediaProperties.mediaDirection) {
4301
4416
  previousMediaDirection = {
4302
- sendTrack: _this39.mediaProperties.mediaDirection.sendAudio,
4303
- receiveTrack: _this39.mediaProperties.mediaDirection.receiveAudio
4417
+ sendTrack: _this40.mediaProperties.mediaDirection.sendAudio,
4418
+ receiveTrack: _this40.mediaProperties.mediaDirection.receiveAudio
4304
4419
  };
4305
4420
  } else {
4306
- _this39.mediaProperties.mediaDirection = {};
4421
+ _this40.mediaProperties.mediaDirection = {};
4307
4422
  }
4308
4423
 
4309
4424
  return _util.default.updateTransceiver({
@@ -4312,20 +4427,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4312
4427
  receiveTrack: options.receiveAudio,
4313
4428
  track: track,
4314
4429
  transceiver: audioTransceiver,
4315
- peerConnection: _this39.mediaProperties.peerConnection,
4430
+ peerConnection: _this40.mediaProperties.peerConnection,
4316
4431
  previousMediaDirection: previousMediaDirection
4317
4432
  }, {
4318
- mediaProperties: _this39.mediaProperties,
4319
- meeting: _this39,
4320
- id: _this39.id
4433
+ mediaProperties: _this40.mediaProperties,
4434
+ meeting: _this40,
4435
+ id: _this40.id
4321
4436
  });
4322
4437
  }).then(function () {
4323
- _this39.setLocalAudioTrack(track);
4438
+ _this40.setLocalAudioTrack(track);
4324
4439
 
4325
- _this39.mediaProperties.mediaDirection.sendAudio = sendAudio;
4326
- _this39.mediaProperties.mediaDirection.receiveAudio = receiveAudio; // audio state could be undefined if you have not sent audio before
4440
+ _this40.mediaProperties.mediaDirection.sendAudio = sendAudio;
4441
+ _this40.mediaProperties.mediaDirection.receiveAudio = receiveAudio; // audio state could be undefined if you have not sent audio before
4327
4442
 
4328
- _this39.audio = _this39.audio || (0, _muteState.default)(_constants.AUDIO, _this39, _this39.mediaProperties.mediaDirection);
4443
+ _this40.audio = _this40.audio || (0, _muteState.default)(_constants.AUDIO, _this40, _this40.mediaProperties.mediaDirection);
4329
4444
  });
4330
4445
  }
4331
4446
  /**
@@ -4342,7 +4457,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4342
4457
  }, {
4343
4458
  key: "updateVideo",
4344
4459
  value: function updateVideo(options) {
4345
- var _this40 = this;
4460
+ var _this41 = this;
4346
4461
 
4347
4462
  if (!this.canUpdateMedia()) {
4348
4463
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.VIDEO, options);
@@ -4369,23 +4484,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4369
4484
  receiveTrack: options.receiveVideo,
4370
4485
  track: track,
4371
4486
  transceiver: videoTransceiver,
4372
- peerConnection: _this40.mediaProperties.peerConnection,
4487
+ peerConnection: _this41.mediaProperties.peerConnection,
4373
4488
  previousMediaDirection: {
4374
- sendTrack: _this40.mediaProperties.mediaDirection.sendVideo,
4375
- receiveTrack: _this40.mediaProperties.mediaDirection.receiveVideo
4489
+ sendTrack: _this41.mediaProperties.mediaDirection.sendVideo,
4490
+ receiveTrack: _this41.mediaProperties.mediaDirection.receiveVideo
4376
4491
  }
4377
4492
  }, {
4378
- mediaProperties: _this40.mediaProperties,
4379
- meeting: _this40,
4380
- id: _this40.id
4493
+ mediaProperties: _this41.mediaProperties,
4494
+ meeting: _this41,
4495
+ id: _this41.id
4381
4496
  });
4382
4497
  }).then(function () {
4383
- _this40.setLocalVideoTrack(track);
4498
+ _this41.setLocalVideoTrack(track);
4384
4499
 
4385
- _this40.mediaProperties.mediaDirection.sendVideo = sendVideo;
4386
- _this40.mediaProperties.mediaDirection.receiveVideo = receiveVideo; // video state could be undefined if you have not sent video before
4500
+ _this41.mediaProperties.mediaDirection.sendVideo = sendVideo;
4501
+ _this41.mediaProperties.mediaDirection.receiveVideo = receiveVideo; // video state could be undefined if you have not sent video before
4387
4502
 
4388
- _this40.video = _this40.video || (0, _muteState.default)(_constants.VIDEO, _this40, _this40.mediaProperties.mediaDirection);
4503
+ _this41.video = _this41.video || (0, _muteState.default)(_constants.VIDEO, _this41, _this41.mediaProperties.mediaDirection);
4389
4504
  });
4390
4505
  }
4391
4506
  /**
@@ -4427,7 +4542,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4427
4542
  }, {
4428
4543
  key: "updateShare",
4429
4544
  value: function updateShare(options) {
4430
- var _this41 = this;
4545
+ var _this42 = this;
4431
4546
 
4432
4547
  if (!options.skipSignalingCheck && !this.canUpdateMedia()) {
4433
4548
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE, options);
@@ -4450,7 +4565,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4450
4565
  sendShare: sendShare,
4451
4566
  localShare: stream
4452
4567
  }).then(function () {
4453
- return _this41.checkForStopShare(sendShare, previousSendShareStatus);
4568
+ return _this42.checkForStopShare(sendShare, previousSendShareStatus);
4454
4569
  }).then(function (startShare) {
4455
4570
  return _util.default.updateTransceiver({
4456
4571
  type: 'video',
@@ -4458,41 +4573,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4458
4573
  receiveTrack: receiveShare,
4459
4574
  track: track,
4460
4575
  transceiver: shareTransceiver,
4461
- peerConnection: _this41.mediaProperties.peerConnection,
4576
+ peerConnection: _this42.mediaProperties.peerConnection,
4462
4577
  previousMediaDirection: {
4463
- sendTrack: _this41.mediaProperties.mediaDirection.sendShare,
4464
- receiveTrack: _this41.mediaProperties.mediaDirection.receiveShare
4578
+ sendTrack: _this42.mediaProperties.mediaDirection.sendShare,
4579
+ receiveTrack: _this42.mediaProperties.mediaDirection.receiveShare
4465
4580
  }
4466
4581
  }, {
4467
- mediaProperties: _this41.mediaProperties,
4468
- meeting: _this41,
4469
- id: _this41.id
4582
+ mediaProperties: _this42.mediaProperties,
4583
+ meeting: _this42,
4584
+ id: _this42.id
4470
4585
  }).then(function () {
4471
4586
  if (startShare) {
4472
- return _this41.share();
4587
+ return _this42.share();
4473
4588
  }
4474
4589
 
4475
4590
  return _promise.default.resolve();
4476
4591
  });
4477
4592
  }).then(function () {
4478
- _this41.mediaProperties.mediaDirection.sendShare = sendShare;
4479
- _this41.mediaProperties.mediaDirection.receiveShare = receiveShare;
4593
+ _this42.mediaProperties.mediaDirection.sendShare = sendShare;
4594
+ _this42.mediaProperties.mediaDirection.receiveShare = receiveShare;
4480
4595
  }).catch(function (error) {
4481
- _this41.unsetLocalShareTrack(stream);
4596
+ _this42.unsetLocalShareTrack(stream);
4482
4597
 
4483
4598
  throw error;
4484
4599
  }).finally(function () {
4485
4600
  var delay = 1e3; // Check to see if share was stopped natively before onended was assigned.
4486
4601
 
4487
- var sharingModeIsActive = _this41.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
4488
- var isSharingOutOfSync = sharingModeIsActive && !_this41.isLocalShareLive;
4602
+ var sharingModeIsActive = _this42.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
4603
+ var isSharingOutOfSync = sharingModeIsActive && !_this42.isLocalShareLive;
4489
4604
 
4490
4605
  if (isSharingOutOfSync) {
4491
4606
  // Adding a delay to avoid a 409 from server
4492
4607
  // which results in user still appearing as if sharing.
4493
4608
  // Also delay give time for changes to peerConnection.
4494
4609
  setTimeout(function () {
4495
- return _this41.handleShareTrackEnded(stream);
4610
+ return _this42.handleShareTrackEnded(stream);
4496
4611
  }, delay);
4497
4612
  }
4498
4613
  });
@@ -4532,7 +4647,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4532
4647
  }, {
4533
4648
  key: "acknowledge",
4534
4649
  value: function acknowledge(type) {
4535
- var _this42 = this;
4650
+ var _this43 = this;
4536
4651
 
4537
4652
  if (!type) {
4538
4653
  return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
@@ -4546,11 +4661,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4546
4661
  }).then(function (response) {
4547
4662
  return _promise.default.resolve(response);
4548
4663
  }).then(function (response) {
4549
- _this42.meetingFiniteStateMachine.ring(type);
4664
+ _this43.meetingFiniteStateMachine.ring(type);
4550
4665
 
4551
4666
  _metrics.default.postEvent({
4552
4667
  event: _config.eventType.ALERT_DISPLAYED,
4553
- meeting: _this42
4668
+ meeting: _this43
4554
4669
  });
4555
4670
 
4556
4671
  return _promise.default.resolve({
@@ -4575,14 +4690,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4575
4690
  }, {
4576
4691
  key: "decline",
4577
4692
  value: function decline(reason) {
4578
- var _this43 = this;
4693
+ var _this44 = this;
4579
4694
 
4580
4695
  return _util.default.declineMeeting(this, reason).then(function (decline) {
4581
- _this43.meetingFiniteStateMachine.decline();
4696
+ _this44.meetingFiniteStateMachine.decline();
4582
4697
 
4583
4698
  return _promise.default.resolve(decline);
4584
4699
  }).catch(function (error) {
4585
- _this43.meetingFiniteStateMachine.fail(error);
4700
+ _this44.meetingFiniteStateMachine.fail(error);
4586
4701
 
4587
4702
  return _promise.default.reject(error);
4588
4703
  });
@@ -4599,7 +4714,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4599
4714
  }, {
4600
4715
  key: "leave",
4601
4716
  value: function leave() {
4602
- var _this44 = this;
4717
+ var _this45 = this;
4603
4718
 
4604
4719
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4605
4720
 
@@ -4617,41 +4732,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4617
4732
  _loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
4618
4733
 
4619
4734
  return _util.default.leaveMeeting(this, options).then(function (leave) {
4620
- _this44.meetingFiniteStateMachine.leave();
4735
+ _this45.meetingFiniteStateMachine.leave();
4621
4736
 
4622
- _this44.audio = null;
4623
- _this44.video = null;
4624
- _this44.isSharing = false;
4737
+ _this45.audio = null;
4738
+ _this45.video = null;
4739
+ _this45.isSharing = false;
4625
4740
 
4626
- if (_this44.shareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
4627
- _this44.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
4741
+ if (_this45.shareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
4742
+ _this45.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
4628
4743
  }
4629
4744
 
4630
- _this44.queuedMediaUpdates = [];
4745
+ _this45.queuedMediaUpdates = [];
4631
4746
 
4632
- if (_this44.transcription) {
4633
- _this44.transcription.closeSocket();
4747
+ if (_this45.transcription) {
4748
+ _this45.transcription.closeSocket();
4634
4749
 
4635
- _this44.triggerStopReceivingTranscriptionEvent();
4750
+ _this45.triggerStopReceivingTranscriptionEvent();
4636
4751
 
4637
- _this44.transcription = undefined;
4752
+ _this45.transcription = undefined;
4638
4753
  } // upload logs on leave irrespective of meeting delete
4639
4754
 
4640
4755
 
4641
- _triggerProxy.default.trigger(_this44, {
4756
+ _triggerProxy.default.trigger(_this45, {
4642
4757
  file: 'meeting/index',
4643
4758
  function: 'leave'
4644
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this44); // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
4759
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this45); // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
4645
4760
 
4646
4761
 
4647
- if (_this44.wirelessShare || _this44.guest) {
4762
+ if (_this45.wirelessShare || _this45.guest) {
4648
4763
  // If screen sharing clean the meeting object
4649
- _triggerProxy.default.trigger(_this44, {
4764
+ _triggerProxy.default.trigger(_this45, {
4650
4765
  file: 'meeting/index',
4651
4766
  function: 'leave'
4652
4767
  }, _constants.EVENTS.DESTROY_MEETING, {
4653
4768
  reason: options.reason,
4654
- meetingId: _this44.id
4769
+ meetingId: _this45.id
4655
4770
  });
4656
4771
  }
4657
4772
 
@@ -4659,19 +4774,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4659
4774
 
4660
4775
  return leave;
4661
4776
  }).catch(function (error) {
4662
- _this44.meetingFiniteStateMachine.fail(error);
4777
+ _this45.meetingFiniteStateMachine.fail(error);
4663
4778
 
4664
4779
  _loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error); // upload logs on leave irrespective of meeting delete
4665
4780
 
4666
4781
 
4667
- _triggerProxy.default.trigger(_this44, {
4782
+ _triggerProxy.default.trigger(_this45, {
4668
4783
  file: 'meeting/index',
4669
4784
  function: 'leave'
4670
- }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this44);
4785
+ }, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this45);
4671
4786
 
4672
4787
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_LEAVE_FAILURE, {
4673
- correlation_id: _this44.correlationId,
4674
- locus_id: _this44.locusUrl.split('/').pop(),
4788
+ correlation_id: _this45.correlationId,
4789
+ locus_id: _this45.locusUrl.split('/').pop(),
4675
4790
  reason: error.message,
4676
4791
  stack: error.stack,
4677
4792
  code: error.code
@@ -4690,7 +4805,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4690
4805
  }, {
4691
4806
  key: "share",
4692
4807
  value: function share() {
4693
- var _this45 = this;
4808
+ var _this46 = this;
4694
4809
 
4695
4810
  var content = this.locusInfo.mediaShares.find(function (element) {
4696
4811
  return element.name === _constants.CONTENT;
@@ -4709,14 +4824,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4709
4824
  uri: content.url,
4710
4825
  resourceUrl: this.resourceUrl
4711
4826
  }).then(function () {
4712
- _this45.isSharing = true;
4827
+ _this46.isSharing = true;
4713
4828
  return _promise.default.resolve();
4714
4829
  }).catch(function (error) {
4715
4830
  _loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
4716
4831
 
4717
4832
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_SHARE_FAILURE, {
4718
- correlation_id: _this45.correlationId,
4719
- locus_id: _this45.locusUrl.split('/').pop(),
4833
+ correlation_id: _this46.correlationId,
4834
+ locus_id: _this46.locusUrl.split('/').pop(),
4720
4835
  reason: error.message,
4721
4836
  stack: error.stack
4722
4837
  });
@@ -4755,7 +4870,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4755
4870
  }, {
4756
4871
  key: "stopFloorRequest",
4757
4872
  value: function stopFloorRequest() {
4758
- var _this46 = this;
4873
+ var _this47 = this;
4759
4874
 
4760
4875
  var content = this.locusInfo.mediaShares.find(function (element) {
4761
4876
  return element.name === _constants.CONTENT;
@@ -4785,15 +4900,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4785
4900
  _loggerProxy.default.logger.error('Meeting:index#stopFloorRequest --> Error ', error);
4786
4901
 
4787
4902
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.STOP_FLOOR_REQUEST_FAILURE, {
4788
- correlation_id: _this46.correlationId,
4789
- locus_id: _this46.locusUrl.split('/').pop(),
4903
+ correlation_id: _this47.correlationId,
4904
+ locus_id: _this47.locusUrl.split('/').pop(),
4790
4905
  reason: error.message,
4791
4906
  stack: error.stack
4792
4907
  });
4793
4908
 
4794
4909
  return _promise.default.reject(error);
4795
4910
  }).finally(function () {
4796
- _this46.isSharing = false;
4911
+ _this47.isSharing = false;
4797
4912
  });
4798
4913
  }
4799
4914
 
@@ -4929,7 +5044,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4929
5044
  }, {
4930
5045
  key: "changeVideoLayout",
4931
5046
  value: function changeVideoLayout(layoutType) {
4932
- var _this47 = this;
5047
+ var _this48 = this;
4933
5048
 
4934
5049
  var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4935
5050
  var main = renderInfo.main,
@@ -4992,7 +5107,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
4992
5107
  content: layoutInfo.content
4993
5108
  }).then(function (response) {
4994
5109
  if (response && response.body && response.body.locus) {
4995
- _this47.locusInfo.onFullLocus(response.body.locus);
5110
+ _this48.locusInfo.onFullLocus(response.body.locus);
4996
5111
  }
4997
5112
  }).catch(function (error) {
4998
5113
  _loggerProxy.default.logger.error('Meeting:index#changeVideoLayout --> Error ', error);
@@ -5009,7 +5124,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5009
5124
  }, {
5010
5125
  key: "setLocalVideoQuality",
5011
5126
  value: function setLocalVideoQuality(level) {
5012
- var _this48 = this;
5127
+ var _this49 = this;
5013
5128
 
5014
5129
  _loggerProxy.default.logger.log("Meeting:index#setLocalVideoQuality --> Setting quality to ".concat(level));
5015
5130
 
@@ -5039,7 +5154,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5039
5154
  var _ref11 = (0, _slicedToArray2.default)(_ref10, 1),
5040
5155
  localStream = _ref11[0];
5041
5156
 
5042
- return _this48.updateVideo({
5157
+ return _this49.updateVideo({
5043
5158
  sendVideo: true,
5044
5159
  receiveVideo: true,
5045
5160
  stream: localStream
@@ -5087,7 +5202,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5087
5202
  }, {
5088
5203
  key: "setMeetingQuality",
5089
5204
  value: function setMeetingQuality(level) {
5090
- var _this49 = this;
5205
+ var _this50 = this;
5091
5206
 
5092
5207
  _loggerProxy.default.logger.log("Meeting:index#setMeetingQuality --> Setting quality to ".concat(level));
5093
5208
 
@@ -5112,18 +5227,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5112
5227
  receiveVideo = _this$mediaProperties4.receiveVideo,
5113
5228
  sendVideo = _this$mediaProperties4.sendVideo;
5114
5229
  return (sendVideo ? this.setLocalVideoQuality(level) : _promise.default.resolve()).then(function () {
5115
- return receiveAudio || receiveVideo ? _this49.setRemoteQualityLevel(level) : _promise.default.resolve();
5230
+ return receiveAudio || receiveVideo ? _this50.setRemoteQualityLevel(level) : _promise.default.resolve();
5116
5231
  }).catch(function (error) {
5117
5232
  // From troubleshooting it seems that the stream itself doesn't change the max-fs if the peer connection isn't stable
5118
- _this49.mediaProperties.setLocalQualityLevel(previousLevel.local);
5233
+ _this50.mediaProperties.setLocalQualityLevel(previousLevel.local);
5119
5234
 
5120
- _this49.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5235
+ _this50.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
5121
5236
 
5122
5237
  _loggerProxy.default.logger.error("Meeting:index#setMeetingQuality --> ".concat(error.message));
5123
5238
 
5124
5239
  _metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.SET_MEETING_QUALITY_FAILURE, {
5125
- correlation_id: _this49.correlationId,
5126
- locus_id: _this49.locusUrl.split('/').pop(),
5240
+ correlation_id: _this50.correlationId,
5241
+ locus_id: _this50.locusUrl.split('/').pop(),
5127
5242
  reason: error.message,
5128
5243
  stack: error.stack
5129
5244
  }, {
@@ -5147,7 +5262,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5147
5262
  }, {
5148
5263
  key: "shareScreen",
5149
5264
  value: function shareScreen() {
5150
- var _this50 = this;
5265
+ var _this51 = this;
5151
5266
 
5152
5267
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5153
5268
 
@@ -5159,9 +5274,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5159
5274
  }, options);
5160
5275
 
5161
5276
  return _media.default.getDisplayMedia(shareConstraints, this.config).then(function (shareStream) {
5162
- return _this50.updateShare({
5277
+ return _this51.updateShare({
5163
5278
  sendShare: true,
5164
- receiveShare: _this50.mediaProperties.mediaDirection.receiveShare,
5279
+ receiveShare: _this51.mediaProperties.mediaDirection.receiveShare,
5165
5280
  stream: shareStream
5166
5281
  });
5167
5282
  }).catch(function (error) {
@@ -5173,8 +5288,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5173
5288
  // TODO: The getDisplayMedia errors need to be moved inside `media.getDisplayMedia`
5174
5289
  var metricName = _constants.METRICS_OPERATIONAL_MEASURES.GET_DISPLAY_MEDIA_FAILURE;
5175
5290
  var data = {
5176
- correlation_id: _this50.correlationId,
5177
- locus_id: _this50.locusUrl.split('/').pop(),
5291
+ correlation_id: _this51.correlationId,
5292
+ locus_id: _this51.locusUrl.split('/').pop(),
5178
5293
  reason: error.message,
5179
5294
  stack: error.stack
5180
5295
  };
@@ -5294,6 +5409,39 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
5294
5409
  var end = this["endSetupDelay".concat(typeMedia)];
5295
5410
  return start && end ? end - start : undefined;
5296
5411
  }
5412
+ /**
5413
+ * @param {string} typeMedia 'audio' or 'video'
5414
+ * @returns {undefined}
5415
+ */
5416
+
5417
+ }, {
5418
+ key: "setStartSendingMediaDelay",
5419
+ value: function setStartSendingMediaDelay(typeMedia) {
5420
+ this["startSendingMediaDelay".concat(typeMedia)] = performance.now();
5421
+ this["endSendingMediaDelay".concat(typeMedia)] = undefined;
5422
+ }
5423
+ /**
5424
+ * @param {string} typeMedia 'audio' or 'video'
5425
+ * @returns {undefined}
5426
+ */
5427
+
5428
+ }, {
5429
+ key: "setEndSendingMediaDelay",
5430
+ value: function setEndSendingMediaDelay(typeMedia) {
5431
+ this["endSendingMediaDelay".concat(typeMedia)] = performance.now();
5432
+ }
5433
+ /**
5434
+ * @param {string} typeMedia 'audio' or 'video'
5435
+ * @returns {string} duration between join response and first media tx
5436
+ */
5437
+
5438
+ }, {
5439
+ key: "getSendingMediaDelayDuration",
5440
+ value: function getSendingMediaDelayDuration(typeMedia) {
5441
+ var start = this["startSendingMediaDelay".concat(typeMedia)];
5442
+ var end = this["endSendingMediaDelay".concat(typeMedia)];
5443
+ return start && end ? end - start : undefined;
5444
+ }
5297
5445
  }]);
5298
5446
  return Meeting;
5299
5447
  }(_webexCore.StatelessWebexPlugin);