@webex/plugin-meetings 1.146.0 → 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.
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +18 -2
- package/dist/constants.js.map +1 -1
- package/dist/media/index.js +16 -8
- package/dist/media/index.js.map +1 -1
- package/dist/meeting/index.js +278 -179
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +72 -29
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +8 -16
- package/dist/meeting/util.js.map +1 -1
- package/dist/metrics/index.js +0 -2
- package/dist/metrics/index.js.map +1 -1
- package/dist/peer-connection-manager/index.js +8 -7
- package/dist/peer-connection-manager/index.js.map +1 -1
- package/dist/reconnection-manager/index.js +2 -1
- package/dist/reconnection-manager/index.js.map +1 -1
- package/package.json +5 -5
- package/src/config.js +1 -0
- package/src/constants.js +11 -1
- package/src/media/index.js +58 -10
- package/src/meeting/index.js +114 -17
- package/src/meeting/request.js +53 -9
- package/src/meeting/util.js +7 -20
- package/src/metrics/index.js +0 -2
- package/src/peer-connection-manager/index.js +13 -9
- package/src/reconnection-manager/index.js +2 -1
- package/test/unit/spec/meeting/index.js +65 -1
- package/test/unit/spec/meeting/request.js +30 -5
package/dist/meeting/index.js
CHANGED
|
@@ -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"
|
|
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
|
-
|
|
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
|
|
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.
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
3873
|
+
_this35.meetingFiniteStateMachine.join();
|
|
3777
3874
|
|
|
3778
|
-
return
|
|
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(
|
|
3885
|
+
return _promise.default.resolve(_this35);
|
|
3789
3886
|
});
|
|
3790
3887
|
}).catch(function (error) {
|
|
3791
|
-
|
|
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
|
|
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
|
|
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
|
|
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(
|
|
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
|
-
|
|
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
|
|
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,52 +4050,53 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3953
4050
|
});
|
|
3954
4051
|
|
|
3955
4052
|
return _util.default.validateOptions(options).then(function () {
|
|
3956
|
-
|
|
4053
|
+
_this37.mediaProperties.setMediaPeerConnection(_util2.default.createPeerConnection());
|
|
3957
4054
|
|
|
3958
|
-
|
|
4055
|
+
_this37.setMercuryListener();
|
|
3959
4056
|
|
|
3960
|
-
_peerConnectionManager.default.setPeerConnectionEvents(
|
|
4057
|
+
_peerConnectionManager.default.setPeerConnectionEvents(_this37);
|
|
3961
4058
|
|
|
3962
|
-
return
|
|
4059
|
+
return _this37.preMedia(localStream, localShare, mediaSettings);
|
|
3963
4060
|
}).then(function () {
|
|
3964
|
-
return _media.default.attachMedia(
|
|
3965
|
-
meetingId:
|
|
3966
|
-
remoteQualityLevel:
|
|
3967
|
-
enableRtx:
|
|
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
|
|
3968
4066
|
}).then(function (peerConnection) {
|
|
3969
|
-
return
|
|
4067
|
+
return _this37.getDevices().then(function (devices) {
|
|
3970
4068
|
_util.default.handleDeviceLogging(devices);
|
|
3971
4069
|
|
|
3972
4070
|
return peerConnection;
|
|
3973
4071
|
});
|
|
3974
4072
|
}).then(function (peerConnection) {
|
|
3975
|
-
|
|
4073
|
+
_this37.handleMediaLogging(_this37.mediaProperties);
|
|
3976
4074
|
|
|
3977
4075
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection Received from attachMedia "));
|
|
3978
4076
|
|
|
3979
|
-
|
|
4077
|
+
_this37.setRemoteStream(peerConnection);
|
|
3980
4078
|
|
|
3981
|
-
_util.default.startInternalStats(
|
|
4079
|
+
_util.default.startInternalStats(_this37);
|
|
3982
4080
|
|
|
3983
|
-
if (
|
|
3984
|
-
|
|
4081
|
+
if (_this37.config.metrics.autoSendMQA) {
|
|
4082
|
+
_this37.startMediaQualityMetrics();
|
|
3985
4083
|
}
|
|
3986
4084
|
|
|
3987
|
-
if (
|
|
4085
|
+
if (_this37.config.stats.enableStatsAnalyzer) {
|
|
3988
4086
|
// TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
|
|
3989
|
-
|
|
3990
|
-
|
|
4087
|
+
_this37.networkQualityMonitor = new _networkQualityMonitor.default(_this37.config.stats);
|
|
4088
|
+
_this37.statsAnalyzer = new _statsAnalyzer.default(_this37.config.stats, _this37.networkQualityMonitor);
|
|
3991
4089
|
|
|
3992
|
-
|
|
3993
|
-
var
|
|
4090
|
+
_this37.statsAnalyzer.on(_constants.EVENT_TRIGGERS.MEDIA_QUALITY, function (options) {
|
|
4091
|
+
var _this37$webex$meeting;
|
|
3994
4092
|
|
|
3995
4093
|
// TODO: might have to send the same event to the developer
|
|
3996
4094
|
// Add ip address info if geo hint is present
|
|
3997
|
-
options.data.intervalMetadata.peerReflexiveIP = ((
|
|
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;
|
|
3998
4096
|
|
|
3999
4097
|
_metrics.default.postEvent({
|
|
4000
4098
|
event: _config.eventType.MEDIA_QUALITY,
|
|
4001
|
-
meeting:
|
|
4099
|
+
meeting: _this37,
|
|
4002
4100
|
data: {
|
|
4003
4101
|
intervalData: options.data,
|
|
4004
4102
|
networkType: options.networkType
|
|
@@ -4006,14 +4104,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4006
4104
|
});
|
|
4007
4105
|
});
|
|
4008
4106
|
|
|
4009
|
-
|
|
4107
|
+
_this37.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this37.sendNetworkQualityEvent.bind(_this37));
|
|
4010
4108
|
}
|
|
4011
4109
|
}).catch(function (error) {
|
|
4012
4110
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
|
|
4013
4111
|
|
|
4014
4112
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_MEDIA_FAILURE, {
|
|
4015
|
-
correlation_id:
|
|
4016
|
-
locus_id:
|
|
4113
|
+
correlation_id: _this37.correlationId,
|
|
4114
|
+
locus_id: _this37.locusUrl.split('/').pop(),
|
|
4017
4115
|
reason: error.message,
|
|
4018
4116
|
stack: error.stack
|
|
4019
4117
|
});
|
|
@@ -4024,14 +4122,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4024
4122
|
var timerCount = 0; // eslint-disable-next-line func-names
|
|
4025
4123
|
// eslint-disable-next-line prefer-arrow-callback
|
|
4026
4124
|
|
|
4027
|
-
if (
|
|
4125
|
+
if (_this37.type === _constants._CALL_) {
|
|
4028
4126
|
resolve();
|
|
4029
4127
|
}
|
|
4030
4128
|
|
|
4031
4129
|
var joiningTimer = setInterval(function () {
|
|
4032
4130
|
timerCount += 1;
|
|
4033
4131
|
|
|
4034
|
-
if (
|
|
4132
|
+
if (_this37.meetingState === _constants.FULL_STATE.ACTIVE) {
|
|
4035
4133
|
clearInterval(joiningTimer);
|
|
4036
4134
|
resolve();
|
|
4037
4135
|
}
|
|
@@ -4043,10 +4141,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4043
4141
|
}, 1000);
|
|
4044
4142
|
});
|
|
4045
4143
|
}).then(function () {
|
|
4046
|
-
return logRequest(
|
|
4047
|
-
sdp:
|
|
4048
|
-
roapSeq:
|
|
4049
|
-
meeting:
|
|
4144
|
+
return logRequest(_this37.roap.sendRoapMediaRequest({
|
|
4145
|
+
sdp: _this37.mediaProperties.peerConnection.sdp,
|
|
4146
|
+
roapSeq: _this37.roapSeq,
|
|
4147
|
+
meeting: _this37 // or can pass meeting ID
|
|
4050
4148
|
|
|
4051
4149
|
}), {
|
|
4052
4150
|
header: "".concat(LOG_HEADER, " Send Roap Media Request."),
|
|
@@ -4054,7 +4152,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4054
4152
|
failure: "".concat(LOG_HEADER, " Error joining the call on send roap media request, ")
|
|
4055
4153
|
});
|
|
4056
4154
|
}).then(function () {
|
|
4057
|
-
var peerConnection =
|
|
4155
|
+
var peerConnection = _this37.mediaProperties.peerConnection;
|
|
4058
4156
|
return new _promise.default(function (resolve, reject) {
|
|
4059
4157
|
if (peerConnection.connectionState === _constants.CONNECTION_STATE.CONNECTED) {
|
|
4060
4158
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
|
|
@@ -4075,7 +4173,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4075
4173
|
}
|
|
4076
4174
|
}, _constants.PC_BAIL_TIMEOUT);
|
|
4077
4175
|
|
|
4078
|
-
|
|
4176
|
+
_this37.once(_constants.EVENT_TRIGGERS.MEDIA_READY, function () {
|
|
4079
4177
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED, clearing stability timer."));
|
|
4080
4178
|
|
|
4081
4179
|
clearTimeout(stabilityTimeout);
|
|
@@ -4084,51 +4182,51 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4084
4182
|
});
|
|
4085
4183
|
}).then(function () {
|
|
4086
4184
|
if (mediaSettings && mediaSettings.sendShare && localShare) {
|
|
4087
|
-
if (
|
|
4088
|
-
return
|
|
4185
|
+
if (_this37.state === _constants.MEETING_STATE.STATES.JOINED) {
|
|
4186
|
+
return _this37.share();
|
|
4089
4187
|
} // When the self state changes to JOINED then request the floor
|
|
4090
4188
|
|
|
4091
4189
|
|
|
4092
|
-
|
|
4190
|
+
_this37.floorGrantPending = true;
|
|
4093
4191
|
}
|
|
4094
4192
|
|
|
4095
4193
|
return _promise.default.resolve();
|
|
4096
4194
|
});
|
|
4097
4195
|
}).catch(function (error) {
|
|
4098
4196
|
// Clean up stats analyzer, peer connection, and turn off listeners
|
|
4099
|
-
if (
|
|
4100
|
-
|
|
4197
|
+
if (_this37.statsAnalyzer) {
|
|
4198
|
+
_this37.statsAnalyzer.stopAnalyzer();
|
|
4101
4199
|
|
|
4102
|
-
|
|
4200
|
+
_this37.statsAnalyzer = null;
|
|
4103
4201
|
}
|
|
4104
4202
|
|
|
4105
|
-
if (
|
|
4106
|
-
|
|
4203
|
+
if (_this37.mediaProperties.peerConnection) {
|
|
4204
|
+
_this37.closePeerConnections();
|
|
4107
4205
|
|
|
4108
|
-
|
|
4206
|
+
_this37.unsetPeerConnections();
|
|
4109
4207
|
}
|
|
4110
4208
|
|
|
4111
4209
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
|
|
4112
4210
|
|
|
4113
4211
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.ADD_MEDIA_FAILURE, {
|
|
4114
|
-
correlation_id:
|
|
4115
|
-
locus_id:
|
|
4212
|
+
correlation_id: _this37.correlationId,
|
|
4213
|
+
locus_id: _this37.locusUrl.split('/').pop(),
|
|
4116
4214
|
reason: error.message,
|
|
4117
4215
|
stack: error.stack,
|
|
4118
4216
|
code: error.code
|
|
4119
4217
|
}); // Upload logs on error while adding media
|
|
4120
4218
|
|
|
4121
4219
|
|
|
4122
|
-
_triggerProxy.default.trigger(
|
|
4220
|
+
_triggerProxy.default.trigger(_this37, {
|
|
4123
4221
|
file: 'meeting/index',
|
|
4124
4222
|
function: 'addMedia'
|
|
4125
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
4223
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this37); // If addMedia failes for not establishing connection then
|
|
4126
4224
|
// leave the meeting with reson connection failed as meeting anyways will end
|
|
4127
4225
|
// and cannot be connected unless network condition is checked for firewall
|
|
4128
4226
|
|
|
4129
4227
|
|
|
4130
4228
|
if (error.code === _webexErrors.InvalidSdpError.CODE) {
|
|
4131
|
-
|
|
4229
|
+
_this37.leave({
|
|
4132
4230
|
reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
|
|
4133
4231
|
});
|
|
4134
4232
|
}
|
|
@@ -4158,7 +4256,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4158
4256
|
}, {
|
|
4159
4257
|
key: "enqueueMediaUpdate",
|
|
4160
4258
|
value: function enqueueMediaUpdate(mediaUpdateType, options) {
|
|
4161
|
-
var
|
|
4259
|
+
var _this38 = this;
|
|
4162
4260
|
|
|
4163
4261
|
return new _promise.default(function (resolve, reject) {
|
|
4164
4262
|
var queueItem = {
|
|
@@ -4170,7 +4268,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4170
4268
|
|
|
4171
4269
|
_loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
|
|
4172
4270
|
|
|
4173
|
-
|
|
4271
|
+
_this38.queuedMediaUpdates.push(queueItem);
|
|
4174
4272
|
});
|
|
4175
4273
|
}
|
|
4176
4274
|
/**
|
|
@@ -4196,7 +4294,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4196
4294
|
* @memberof Meeting
|
|
4197
4295
|
*/
|
|
4198
4296
|
function updateMedia() {
|
|
4199
|
-
var
|
|
4297
|
+
var _this39 = this;
|
|
4200
4298
|
|
|
4201
4299
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4202
4300
|
var LOG_HEADER = 'Meeting:index#updateMedia -->';
|
|
@@ -4210,16 +4308,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4210
4308
|
mediaSettings = options.mediaSettings;
|
|
4211
4309
|
var previousSendShareStatus = this.mediaProperties.mediaDirection.sendShare;
|
|
4212
4310
|
return _util.default.validateOptions(options).then(function () {
|
|
4213
|
-
return
|
|
4311
|
+
return _this39.preMedia(localStream, localShare, mediaSettings);
|
|
4214
4312
|
}).then(function () {
|
|
4215
|
-
return _media.default.updateMedia(
|
|
4216
|
-
meetingId:
|
|
4217
|
-
remoteQualityLevel:
|
|
4218
|
-
enableRtx:
|
|
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
|
|
4219
4318
|
}).then(function (peerConnection) {
|
|
4220
4319
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection received from updateMedia, ").concat(peerConnection));
|
|
4221
4320
|
|
|
4222
|
-
|
|
4321
|
+
_this39.setRemoteStream(peerConnection);
|
|
4223
4322
|
|
|
4224
4323
|
if (mediaSettings.receiveShare || localShare) {
|
|
4225
4324
|
_peerConnectionManager.default.setContentSlides(peerConnection);
|
|
@@ -4228,18 +4327,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4228
4327
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error updatedMedia, "), error);
|
|
4229
4328
|
|
|
4230
4329
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.UPDATE_MEDIA_FAILURE, {
|
|
4231
|
-
correlation_id:
|
|
4232
|
-
locus_id:
|
|
4330
|
+
correlation_id: _this39.correlationId,
|
|
4331
|
+
locus_id: _this39.locusUrl.split('/').pop(),
|
|
4233
4332
|
reason: error.message,
|
|
4234
4333
|
stack: error.stack
|
|
4235
4334
|
});
|
|
4236
4335
|
|
|
4237
4336
|
throw error;
|
|
4238
4337
|
}).then(function () {
|
|
4239
|
-
return logRequest(
|
|
4240
|
-
sdp:
|
|
4241
|
-
roapSeq:
|
|
4242
|
-
meeting:
|
|
4338
|
+
return logRequest(_this39.roap.sendRoapMediaRequest({
|
|
4339
|
+
sdp: _this39.mediaProperties.peerConnection.sdp,
|
|
4340
|
+
roapSeq: _this39.roapSeq,
|
|
4341
|
+
meeting: _this39 // or can pass meeting ID
|
|
4243
4342
|
|
|
4244
4343
|
}), {
|
|
4245
4344
|
header: "".concat(LOG_HEADER, " sendRoapMediaRequest being sent"),
|
|
@@ -4247,13 +4346,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4247
4346
|
failure: "".concat(LOG_HEADER, " Error updateMedia on send roap media request, ")
|
|
4248
4347
|
});
|
|
4249
4348
|
}).then(function () {
|
|
4250
|
-
return
|
|
4349
|
+
return _this39.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
|
|
4251
4350
|
}).then(function (startShare) {
|
|
4252
4351
|
// This is a special case if we do an /floor grant followed by /media
|
|
4253
4352
|
// we actually get a OFFER from the server and a GLAR condition happens
|
|
4254
4353
|
if (startShare) {
|
|
4255
4354
|
// We are assuming that the clients are connected when doing an update
|
|
4256
|
-
return
|
|
4355
|
+
return _this39.share();
|
|
4257
4356
|
}
|
|
4258
4357
|
|
|
4259
4358
|
return _promise.default.resolve();
|
|
@@ -4274,7 +4373,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4274
4373
|
}, {
|
|
4275
4374
|
key: "updateAudio",
|
|
4276
4375
|
value: function updateAudio(options) {
|
|
4277
|
-
var
|
|
4376
|
+
var _this40 = this;
|
|
4278
4377
|
|
|
4279
4378
|
if (!this.canUpdateMedia()) {
|
|
4280
4379
|
return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.AUDIO, options);
|
|
@@ -4297,13 +4396,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4297
4396
|
}).then(function () {
|
|
4298
4397
|
var previousMediaDirection = {};
|
|
4299
4398
|
|
|
4300
|
-
if (
|
|
4399
|
+
if (_this40.mediaProperties.mediaDirection) {
|
|
4301
4400
|
previousMediaDirection = {
|
|
4302
|
-
sendTrack:
|
|
4303
|
-
receiveTrack:
|
|
4401
|
+
sendTrack: _this40.mediaProperties.mediaDirection.sendAudio,
|
|
4402
|
+
receiveTrack: _this40.mediaProperties.mediaDirection.receiveAudio
|
|
4304
4403
|
};
|
|
4305
4404
|
} else {
|
|
4306
|
-
|
|
4405
|
+
_this40.mediaProperties.mediaDirection = {};
|
|
4307
4406
|
}
|
|
4308
4407
|
|
|
4309
4408
|
return _util.default.updateTransceiver({
|
|
@@ -4312,20 +4411,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4312
4411
|
receiveTrack: options.receiveAudio,
|
|
4313
4412
|
track: track,
|
|
4314
4413
|
transceiver: audioTransceiver,
|
|
4315
|
-
peerConnection:
|
|
4414
|
+
peerConnection: _this40.mediaProperties.peerConnection,
|
|
4316
4415
|
previousMediaDirection: previousMediaDirection
|
|
4317
4416
|
}, {
|
|
4318
|
-
mediaProperties:
|
|
4319
|
-
meeting:
|
|
4320
|
-
id:
|
|
4417
|
+
mediaProperties: _this40.mediaProperties,
|
|
4418
|
+
meeting: _this40,
|
|
4419
|
+
id: _this40.id
|
|
4321
4420
|
});
|
|
4322
4421
|
}).then(function () {
|
|
4323
|
-
|
|
4422
|
+
_this40.setLocalAudioTrack(track);
|
|
4324
4423
|
|
|
4325
|
-
|
|
4326
|
-
|
|
4424
|
+
_this40.mediaProperties.mediaDirection.sendAudio = sendAudio;
|
|
4425
|
+
_this40.mediaProperties.mediaDirection.receiveAudio = receiveAudio; // audio state could be undefined if you have not sent audio before
|
|
4327
4426
|
|
|
4328
|
-
|
|
4427
|
+
_this40.audio = _this40.audio || (0, _muteState.default)(_constants.AUDIO, _this40, _this40.mediaProperties.mediaDirection);
|
|
4329
4428
|
});
|
|
4330
4429
|
}
|
|
4331
4430
|
/**
|
|
@@ -4342,7 +4441,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4342
4441
|
}, {
|
|
4343
4442
|
key: "updateVideo",
|
|
4344
4443
|
value: function updateVideo(options) {
|
|
4345
|
-
var
|
|
4444
|
+
var _this41 = this;
|
|
4346
4445
|
|
|
4347
4446
|
if (!this.canUpdateMedia()) {
|
|
4348
4447
|
return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.VIDEO, options);
|
|
@@ -4369,23 +4468,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4369
4468
|
receiveTrack: options.receiveVideo,
|
|
4370
4469
|
track: track,
|
|
4371
4470
|
transceiver: videoTransceiver,
|
|
4372
|
-
peerConnection:
|
|
4471
|
+
peerConnection: _this41.mediaProperties.peerConnection,
|
|
4373
4472
|
previousMediaDirection: {
|
|
4374
|
-
sendTrack:
|
|
4375
|
-
receiveTrack:
|
|
4473
|
+
sendTrack: _this41.mediaProperties.mediaDirection.sendVideo,
|
|
4474
|
+
receiveTrack: _this41.mediaProperties.mediaDirection.receiveVideo
|
|
4376
4475
|
}
|
|
4377
4476
|
}, {
|
|
4378
|
-
mediaProperties:
|
|
4379
|
-
meeting:
|
|
4380
|
-
id:
|
|
4477
|
+
mediaProperties: _this41.mediaProperties,
|
|
4478
|
+
meeting: _this41,
|
|
4479
|
+
id: _this41.id
|
|
4381
4480
|
});
|
|
4382
4481
|
}).then(function () {
|
|
4383
|
-
|
|
4482
|
+
_this41.setLocalVideoTrack(track);
|
|
4384
4483
|
|
|
4385
|
-
|
|
4386
|
-
|
|
4484
|
+
_this41.mediaProperties.mediaDirection.sendVideo = sendVideo;
|
|
4485
|
+
_this41.mediaProperties.mediaDirection.receiveVideo = receiveVideo; // video state could be undefined if you have not sent video before
|
|
4387
4486
|
|
|
4388
|
-
|
|
4487
|
+
_this41.video = _this41.video || (0, _muteState.default)(_constants.VIDEO, _this41, _this41.mediaProperties.mediaDirection);
|
|
4389
4488
|
});
|
|
4390
4489
|
}
|
|
4391
4490
|
/**
|
|
@@ -4427,7 +4526,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4427
4526
|
}, {
|
|
4428
4527
|
key: "updateShare",
|
|
4429
4528
|
value: function updateShare(options) {
|
|
4430
|
-
var
|
|
4529
|
+
var _this42 = this;
|
|
4431
4530
|
|
|
4432
4531
|
if (!options.skipSignalingCheck && !this.canUpdateMedia()) {
|
|
4433
4532
|
return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE, options);
|
|
@@ -4450,7 +4549,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4450
4549
|
sendShare: sendShare,
|
|
4451
4550
|
localShare: stream
|
|
4452
4551
|
}).then(function () {
|
|
4453
|
-
return
|
|
4552
|
+
return _this42.checkForStopShare(sendShare, previousSendShareStatus);
|
|
4454
4553
|
}).then(function (startShare) {
|
|
4455
4554
|
return _util.default.updateTransceiver({
|
|
4456
4555
|
type: 'video',
|
|
@@ -4458,41 +4557,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4458
4557
|
receiveTrack: receiveShare,
|
|
4459
4558
|
track: track,
|
|
4460
4559
|
transceiver: shareTransceiver,
|
|
4461
|
-
peerConnection:
|
|
4560
|
+
peerConnection: _this42.mediaProperties.peerConnection,
|
|
4462
4561
|
previousMediaDirection: {
|
|
4463
|
-
sendTrack:
|
|
4464
|
-
receiveTrack:
|
|
4562
|
+
sendTrack: _this42.mediaProperties.mediaDirection.sendShare,
|
|
4563
|
+
receiveTrack: _this42.mediaProperties.mediaDirection.receiveShare
|
|
4465
4564
|
}
|
|
4466
4565
|
}, {
|
|
4467
|
-
mediaProperties:
|
|
4468
|
-
meeting:
|
|
4469
|
-
id:
|
|
4566
|
+
mediaProperties: _this42.mediaProperties,
|
|
4567
|
+
meeting: _this42,
|
|
4568
|
+
id: _this42.id
|
|
4470
4569
|
}).then(function () {
|
|
4471
4570
|
if (startShare) {
|
|
4472
|
-
return
|
|
4571
|
+
return _this42.share();
|
|
4473
4572
|
}
|
|
4474
4573
|
|
|
4475
4574
|
return _promise.default.resolve();
|
|
4476
4575
|
});
|
|
4477
4576
|
}).then(function () {
|
|
4478
|
-
|
|
4479
|
-
|
|
4577
|
+
_this42.mediaProperties.mediaDirection.sendShare = sendShare;
|
|
4578
|
+
_this42.mediaProperties.mediaDirection.receiveShare = receiveShare;
|
|
4480
4579
|
}).catch(function (error) {
|
|
4481
|
-
|
|
4580
|
+
_this42.unsetLocalShareTrack(stream);
|
|
4482
4581
|
|
|
4483
4582
|
throw error;
|
|
4484
4583
|
}).finally(function () {
|
|
4485
4584
|
var delay = 1e3; // Check to see if share was stopped natively before onended was assigned.
|
|
4486
4585
|
|
|
4487
|
-
var sharingModeIsActive =
|
|
4488
|
-
var isSharingOutOfSync = sharingModeIsActive && !
|
|
4586
|
+
var sharingModeIsActive = _this42.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
|
|
4587
|
+
var isSharingOutOfSync = sharingModeIsActive && !_this42.isLocalShareLive;
|
|
4489
4588
|
|
|
4490
4589
|
if (isSharingOutOfSync) {
|
|
4491
4590
|
// Adding a delay to avoid a 409 from server
|
|
4492
4591
|
// which results in user still appearing as if sharing.
|
|
4493
4592
|
// Also delay give time for changes to peerConnection.
|
|
4494
4593
|
setTimeout(function () {
|
|
4495
|
-
return
|
|
4594
|
+
return _this42.handleShareTrackEnded(stream);
|
|
4496
4595
|
}, delay);
|
|
4497
4596
|
}
|
|
4498
4597
|
});
|
|
@@ -4532,7 +4631,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4532
4631
|
}, {
|
|
4533
4632
|
key: "acknowledge",
|
|
4534
4633
|
value: function acknowledge(type) {
|
|
4535
|
-
var
|
|
4634
|
+
var _this43 = this;
|
|
4536
4635
|
|
|
4537
4636
|
if (!type) {
|
|
4538
4637
|
return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
|
|
@@ -4546,11 +4645,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4546
4645
|
}).then(function (response) {
|
|
4547
4646
|
return _promise.default.resolve(response);
|
|
4548
4647
|
}).then(function (response) {
|
|
4549
|
-
|
|
4648
|
+
_this43.meetingFiniteStateMachine.ring(type);
|
|
4550
4649
|
|
|
4551
4650
|
_metrics.default.postEvent({
|
|
4552
4651
|
event: _config.eventType.ALERT_DISPLAYED,
|
|
4553
|
-
meeting:
|
|
4652
|
+
meeting: _this43
|
|
4554
4653
|
});
|
|
4555
4654
|
|
|
4556
4655
|
return _promise.default.resolve({
|
|
@@ -4575,14 +4674,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4575
4674
|
}, {
|
|
4576
4675
|
key: "decline",
|
|
4577
4676
|
value: function decline(reason) {
|
|
4578
|
-
var
|
|
4677
|
+
var _this44 = this;
|
|
4579
4678
|
|
|
4580
4679
|
return _util.default.declineMeeting(this, reason).then(function (decline) {
|
|
4581
|
-
|
|
4680
|
+
_this44.meetingFiniteStateMachine.decline();
|
|
4582
4681
|
|
|
4583
4682
|
return _promise.default.resolve(decline);
|
|
4584
4683
|
}).catch(function (error) {
|
|
4585
|
-
|
|
4684
|
+
_this44.meetingFiniteStateMachine.fail(error);
|
|
4586
4685
|
|
|
4587
4686
|
return _promise.default.reject(error);
|
|
4588
4687
|
});
|
|
@@ -4599,7 +4698,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4599
4698
|
}, {
|
|
4600
4699
|
key: "leave",
|
|
4601
4700
|
value: function leave() {
|
|
4602
|
-
var
|
|
4701
|
+
var _this45 = this;
|
|
4603
4702
|
|
|
4604
4703
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4605
4704
|
|
|
@@ -4617,41 +4716,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4617
4716
|
_loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
|
|
4618
4717
|
|
|
4619
4718
|
return _util.default.leaveMeeting(this, options).then(function (leave) {
|
|
4620
|
-
|
|
4719
|
+
_this45.meetingFiniteStateMachine.leave();
|
|
4621
4720
|
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4721
|
+
_this45.audio = null;
|
|
4722
|
+
_this45.video = null;
|
|
4723
|
+
_this45.isSharing = false;
|
|
4625
4724
|
|
|
4626
|
-
if (
|
|
4627
|
-
|
|
4725
|
+
if (_this45.shareStatus === _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE) {
|
|
4726
|
+
_this45.shareStatus = _constants.SHARE_STATUS.NO_SHARE;
|
|
4628
4727
|
}
|
|
4629
4728
|
|
|
4630
|
-
|
|
4729
|
+
_this45.queuedMediaUpdates = [];
|
|
4631
4730
|
|
|
4632
|
-
if (
|
|
4633
|
-
|
|
4731
|
+
if (_this45.transcription) {
|
|
4732
|
+
_this45.transcription.closeSocket();
|
|
4634
4733
|
|
|
4635
|
-
|
|
4734
|
+
_this45.triggerStopReceivingTranscriptionEvent();
|
|
4636
4735
|
|
|
4637
|
-
|
|
4736
|
+
_this45.transcription = undefined;
|
|
4638
4737
|
} // upload logs on leave irrespective of meeting delete
|
|
4639
4738
|
|
|
4640
4739
|
|
|
4641
|
-
_triggerProxy.default.trigger(
|
|
4740
|
+
_triggerProxy.default.trigger(_this45, {
|
|
4642
4741
|
file: 'meeting/index',
|
|
4643
4742
|
function: 'leave'
|
|
4644
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
4743
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this45); // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
|
|
4645
4744
|
|
|
4646
4745
|
|
|
4647
|
-
if (
|
|
4746
|
+
if (_this45.wirelessShare || _this45.guest) {
|
|
4648
4747
|
// If screen sharing clean the meeting object
|
|
4649
|
-
_triggerProxy.default.trigger(
|
|
4748
|
+
_triggerProxy.default.trigger(_this45, {
|
|
4650
4749
|
file: 'meeting/index',
|
|
4651
4750
|
function: 'leave'
|
|
4652
4751
|
}, _constants.EVENTS.DESTROY_MEETING, {
|
|
4653
4752
|
reason: options.reason,
|
|
4654
|
-
meetingId:
|
|
4753
|
+
meetingId: _this45.id
|
|
4655
4754
|
});
|
|
4656
4755
|
}
|
|
4657
4756
|
|
|
@@ -4659,19 +4758,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4659
4758
|
|
|
4660
4759
|
return leave;
|
|
4661
4760
|
}).catch(function (error) {
|
|
4662
|
-
|
|
4761
|
+
_this45.meetingFiniteStateMachine.fail(error);
|
|
4663
4762
|
|
|
4664
4763
|
_loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error); // upload logs on leave irrespective of meeting delete
|
|
4665
4764
|
|
|
4666
4765
|
|
|
4667
|
-
_triggerProxy.default.trigger(
|
|
4766
|
+
_triggerProxy.default.trigger(_this45, {
|
|
4668
4767
|
file: 'meeting/index',
|
|
4669
4768
|
function: 'leave'
|
|
4670
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
4769
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this45);
|
|
4671
4770
|
|
|
4672
4771
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_LEAVE_FAILURE, {
|
|
4673
|
-
correlation_id:
|
|
4674
|
-
locus_id:
|
|
4772
|
+
correlation_id: _this45.correlationId,
|
|
4773
|
+
locus_id: _this45.locusUrl.split('/').pop(),
|
|
4675
4774
|
reason: error.message,
|
|
4676
4775
|
stack: error.stack,
|
|
4677
4776
|
code: error.code
|
|
@@ -4690,7 +4789,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4690
4789
|
}, {
|
|
4691
4790
|
key: "share",
|
|
4692
4791
|
value: function share() {
|
|
4693
|
-
var
|
|
4792
|
+
var _this46 = this;
|
|
4694
4793
|
|
|
4695
4794
|
var content = this.locusInfo.mediaShares.find(function (element) {
|
|
4696
4795
|
return element.name === _constants.CONTENT;
|
|
@@ -4709,14 +4808,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4709
4808
|
uri: content.url,
|
|
4710
4809
|
resourceUrl: this.resourceUrl
|
|
4711
4810
|
}).then(function () {
|
|
4712
|
-
|
|
4811
|
+
_this46.isSharing = true;
|
|
4713
4812
|
return _promise.default.resolve();
|
|
4714
4813
|
}).catch(function (error) {
|
|
4715
4814
|
_loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
|
|
4716
4815
|
|
|
4717
4816
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.MEETING_SHARE_FAILURE, {
|
|
4718
|
-
correlation_id:
|
|
4719
|
-
locus_id:
|
|
4817
|
+
correlation_id: _this46.correlationId,
|
|
4818
|
+
locus_id: _this46.locusUrl.split('/').pop(),
|
|
4720
4819
|
reason: error.message,
|
|
4721
4820
|
stack: error.stack
|
|
4722
4821
|
});
|
|
@@ -4755,7 +4854,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4755
4854
|
}, {
|
|
4756
4855
|
key: "stopFloorRequest",
|
|
4757
4856
|
value: function stopFloorRequest() {
|
|
4758
|
-
var
|
|
4857
|
+
var _this47 = this;
|
|
4759
4858
|
|
|
4760
4859
|
var content = this.locusInfo.mediaShares.find(function (element) {
|
|
4761
4860
|
return element.name === _constants.CONTENT;
|
|
@@ -4785,15 +4884,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4785
4884
|
_loggerProxy.default.logger.error('Meeting:index#stopFloorRequest --> Error ', error);
|
|
4786
4885
|
|
|
4787
4886
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.STOP_FLOOR_REQUEST_FAILURE, {
|
|
4788
|
-
correlation_id:
|
|
4789
|
-
locus_id:
|
|
4887
|
+
correlation_id: _this47.correlationId,
|
|
4888
|
+
locus_id: _this47.locusUrl.split('/').pop(),
|
|
4790
4889
|
reason: error.message,
|
|
4791
4890
|
stack: error.stack
|
|
4792
4891
|
});
|
|
4793
4892
|
|
|
4794
4893
|
return _promise.default.reject(error);
|
|
4795
4894
|
}).finally(function () {
|
|
4796
|
-
|
|
4895
|
+
_this47.isSharing = false;
|
|
4797
4896
|
});
|
|
4798
4897
|
}
|
|
4799
4898
|
|
|
@@ -4929,7 +5028,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4929
5028
|
}, {
|
|
4930
5029
|
key: "changeVideoLayout",
|
|
4931
5030
|
value: function changeVideoLayout(layoutType) {
|
|
4932
|
-
var
|
|
5031
|
+
var _this48 = this;
|
|
4933
5032
|
|
|
4934
5033
|
var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4935
5034
|
var main = renderInfo.main,
|
|
@@ -4992,7 +5091,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4992
5091
|
content: layoutInfo.content
|
|
4993
5092
|
}).then(function (response) {
|
|
4994
5093
|
if (response && response.body && response.body.locus) {
|
|
4995
|
-
|
|
5094
|
+
_this48.locusInfo.onFullLocus(response.body.locus);
|
|
4996
5095
|
}
|
|
4997
5096
|
}).catch(function (error) {
|
|
4998
5097
|
_loggerProxy.default.logger.error('Meeting:index#changeVideoLayout --> Error ', error);
|
|
@@ -5009,7 +5108,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5009
5108
|
}, {
|
|
5010
5109
|
key: "setLocalVideoQuality",
|
|
5011
5110
|
value: function setLocalVideoQuality(level) {
|
|
5012
|
-
var
|
|
5111
|
+
var _this49 = this;
|
|
5013
5112
|
|
|
5014
5113
|
_loggerProxy.default.logger.log("Meeting:index#setLocalVideoQuality --> Setting quality to ".concat(level));
|
|
5015
5114
|
|
|
@@ -5039,7 +5138,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5039
5138
|
var _ref11 = (0, _slicedToArray2.default)(_ref10, 1),
|
|
5040
5139
|
localStream = _ref11[0];
|
|
5041
5140
|
|
|
5042
|
-
return
|
|
5141
|
+
return _this49.updateVideo({
|
|
5043
5142
|
sendVideo: true,
|
|
5044
5143
|
receiveVideo: true,
|
|
5045
5144
|
stream: localStream
|
|
@@ -5087,7 +5186,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5087
5186
|
}, {
|
|
5088
5187
|
key: "setMeetingQuality",
|
|
5089
5188
|
value: function setMeetingQuality(level) {
|
|
5090
|
-
var
|
|
5189
|
+
var _this50 = this;
|
|
5091
5190
|
|
|
5092
5191
|
_loggerProxy.default.logger.log("Meeting:index#setMeetingQuality --> Setting quality to ".concat(level));
|
|
5093
5192
|
|
|
@@ -5112,18 +5211,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5112
5211
|
receiveVideo = _this$mediaProperties4.receiveVideo,
|
|
5113
5212
|
sendVideo = _this$mediaProperties4.sendVideo;
|
|
5114
5213
|
return (sendVideo ? this.setLocalVideoQuality(level) : _promise.default.resolve()).then(function () {
|
|
5115
|
-
return receiveAudio || receiveVideo ?
|
|
5214
|
+
return receiveAudio || receiveVideo ? _this50.setRemoteQualityLevel(level) : _promise.default.resolve();
|
|
5116
5215
|
}).catch(function (error) {
|
|
5117
5216
|
// From troubleshooting it seems that the stream itself doesn't change the max-fs if the peer connection isn't stable
|
|
5118
|
-
|
|
5217
|
+
_this50.mediaProperties.setLocalQualityLevel(previousLevel.local);
|
|
5119
5218
|
|
|
5120
|
-
|
|
5219
|
+
_this50.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
|
|
5121
5220
|
|
|
5122
5221
|
_loggerProxy.default.logger.error("Meeting:index#setMeetingQuality --> ".concat(error.message));
|
|
5123
5222
|
|
|
5124
5223
|
_metrics.default.sendOperationalMetric(_constants.METRICS_OPERATIONAL_MEASURES.SET_MEETING_QUALITY_FAILURE, {
|
|
5125
|
-
correlation_id:
|
|
5126
|
-
locus_id:
|
|
5224
|
+
correlation_id: _this50.correlationId,
|
|
5225
|
+
locus_id: _this50.locusUrl.split('/').pop(),
|
|
5127
5226
|
reason: error.message,
|
|
5128
5227
|
stack: error.stack
|
|
5129
5228
|
}, {
|
|
@@ -5147,7 +5246,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5147
5246
|
}, {
|
|
5148
5247
|
key: "shareScreen",
|
|
5149
5248
|
value: function shareScreen() {
|
|
5150
|
-
var
|
|
5249
|
+
var _this51 = this;
|
|
5151
5250
|
|
|
5152
5251
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5153
5252
|
|
|
@@ -5159,9 +5258,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5159
5258
|
}, options);
|
|
5160
5259
|
|
|
5161
5260
|
return _media.default.getDisplayMedia(shareConstraints, this.config).then(function (shareStream) {
|
|
5162
|
-
return
|
|
5261
|
+
return _this51.updateShare({
|
|
5163
5262
|
sendShare: true,
|
|
5164
|
-
receiveShare:
|
|
5263
|
+
receiveShare: _this51.mediaProperties.mediaDirection.receiveShare,
|
|
5165
5264
|
stream: shareStream
|
|
5166
5265
|
});
|
|
5167
5266
|
}).catch(function (error) {
|
|
@@ -5173,8 +5272,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5173
5272
|
// TODO: The getDisplayMedia errors need to be moved inside `media.getDisplayMedia`
|
|
5174
5273
|
var metricName = _constants.METRICS_OPERATIONAL_MEASURES.GET_DISPLAY_MEDIA_FAILURE;
|
|
5175
5274
|
var data = {
|
|
5176
|
-
correlation_id:
|
|
5177
|
-
locus_id:
|
|
5275
|
+
correlation_id: _this51.correlationId,
|
|
5276
|
+
locus_id: _this51.locusUrl.split('/').pop(),
|
|
5178
5277
|
reason: error.message,
|
|
5179
5278
|
stack: error.stack
|
|
5180
5279
|
};
|