@webex/calling 3.12.0-next.83 → 3.12.0-next.85
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/CallingClient/CallingClient.js +13 -13
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/calling/call.js +45 -9
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +544 -454
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/calling/callManager.js +25 -4
- package/dist/CallingClient/calling/callManager.js.map +1 -1
- package/dist/CallingClient/calling/callManager.test.js +17 -0
- package/dist/CallingClient/calling/callManager.test.js.map +1 -1
- package/dist/CallingClient/calling/types.js +3 -0
- package/dist/CallingClient/calling/types.js.map +1 -1
- package/dist/CallingClient/constants.js +4 -2
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/types.js +7 -0
- package/dist/CallingClient/types.js.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/module/CallingClient/CallingClient.js +1 -1
- package/dist/module/CallingClient/calling/call.js +20 -4
- package/dist/module/CallingClient/calling/callManager.js +12 -4
- package/dist/module/CallingClient/constants.js +1 -0
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts +5 -3
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/callManager.d.ts +5 -3
- package/dist/types/CallingClient/calling/callManager.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/types.d.ts +4 -0
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +1 -0
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/types.d.ts +3 -2
- package/dist/types/CallingClient/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -53,7 +53,7 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
53
53
|
/**
|
|
54
54
|
* @ignore
|
|
55
55
|
*/
|
|
56
|
-
function Call(activeUrl, webex, direction, deviceId, lineId, deleteCb, indicator, destination) {
|
|
56
|
+
function Call(activeUrl, webex, direction, deviceId, lineId, deleteCb, indicator, destination, iceGatheringConfig) {
|
|
57
57
|
var _this;
|
|
58
58
|
(0, _classCallCheck2.default)(this, Call);
|
|
59
59
|
_this = _callSuper(this, Call);
|
|
@@ -99,6 +99,7 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
99
99
|
(0, _defineProperty2.default)(_this, "rtcMetrics", void 0);
|
|
100
100
|
(0, _defineProperty2.default)(_this, "callKeepaliveRetryCount", 0);
|
|
101
101
|
(0, _defineProperty2.default)(_this, "apiRequest", void 0);
|
|
102
|
+
(0, _defineProperty2.default)(_this, "iceGatheringConfig", void 0);
|
|
102
103
|
(0, _defineProperty2.default)(_this, "handleMediaRoapEvent", /*#__PURE__*/function () {
|
|
103
104
|
var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(event) {
|
|
104
105
|
var _event$roapMessage, _event$roapMessage2;
|
|
@@ -650,6 +651,7 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
650
651
|
_this.deviceId = deviceId;
|
|
651
652
|
_this.serviceIndicator = indicator;
|
|
652
653
|
_this.lineId = lineId;
|
|
654
|
+
_this.iceGatheringConfig = iceGatheringConfig;
|
|
653
655
|
|
|
654
656
|
/* istanbul ignore else */
|
|
655
657
|
if (!_this.sdkConnector.getWebex()) {
|
|
@@ -2716,8 +2718,40 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
2716
2718
|
}
|
|
2717
2719
|
}
|
|
2718
2720
|
}, {
|
|
2719
|
-
key: "
|
|
2720
|
-
value:
|
|
2721
|
+
key: "getIceCandidatesTimeout",
|
|
2722
|
+
value:
|
|
2723
|
+
/**
|
|
2724
|
+
* Determines the ICE candidate gathering timeout to use for the media connection.
|
|
2725
|
+
*
|
|
2726
|
+
* When the remote peer advertises itself as an ICE-lite agent (a=ice-lite) in its ROAP offer,
|
|
2727
|
+
* it only provides host candidates and does not perform connectivity checks, so there is no
|
|
2728
|
+
* need to wait the full ICE_CANDIDATES_TIMEOUT for local candidate gathering. In that case a
|
|
2729
|
+
* shorter timeout is returned to avoid stalling media negotiation for ~3 seconds.
|
|
2730
|
+
*
|
|
2731
|
+
* This optimization is opt-in: it only applies when the SDK is initialized with
|
|
2732
|
+
* `iceGathering.reduceTimeoutForIceLite` set to `true`. Otherwise the default
|
|
2733
|
+
* ICE_CANDIDATES_TIMEOUT is always used.
|
|
2734
|
+
*
|
|
2735
|
+
* @returns The ICE candidates timeout in milliseconds.
|
|
2736
|
+
*/
|
|
2737
|
+
function getIceCandidatesTimeout() {
|
|
2738
|
+
var _this$iceGatheringCon, _this$remoteRoapMessa2;
|
|
2739
|
+
if (!((_this$iceGatheringCon = this.iceGatheringConfig) !== null && _this$iceGatheringCon !== void 0 && _this$iceGatheringCon.reduceTimeoutForIceLite)) {
|
|
2740
|
+
return _constants.ICE_CANDIDATES_TIMEOUT;
|
|
2741
|
+
}
|
|
2742
|
+
var remoteSdp = (_this$remoteRoapMessa2 = this.remoteRoapMessage) === null || _this$remoteRoapMessa2 === void 0 ? void 0 : _this$remoteRoapMessa2.sdp;
|
|
2743
|
+
if (remoteSdp && /^a=ice-lite[\r\n]*$/im.test(remoteSdp)) {
|
|
2744
|
+
var _this$iceGatheringCon2;
|
|
2745
|
+
_Logger.default.info('Remote offer advertises ice-lite, using reduced ICE candidates timeout', {
|
|
2746
|
+
file: _constants.CALL_FILE,
|
|
2747
|
+
method: _constants.METHODS.INIT_MEDIA_CONNECTION
|
|
2748
|
+
});
|
|
2749
|
+
return (_this$iceGatheringCon2 = this.iceGatheringConfig.iceLiteTimeout) !== null && _this$iceGatheringCon2 !== void 0 ? _this$iceGatheringCon2 : _constants.ICE_LITE_CANDIDATES_TIMEOUT;
|
|
2750
|
+
}
|
|
2751
|
+
return _constants.ICE_CANDIDATES_TIMEOUT;
|
|
2752
|
+
}
|
|
2753
|
+
|
|
2754
|
+
/* istanbul ignore next */
|
|
2721
2755
|
/**
|
|
2722
2756
|
* Initialize Media Connection.
|
|
2723
2757
|
*
|
|
@@ -2725,12 +2759,14 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
2725
2759
|
* @param settings.localAudioTrack - MediaStreamTrack.
|
|
2726
2760
|
* @param settings.debugId - String.
|
|
2727
2761
|
*/
|
|
2728
|
-
|
|
2762
|
+
}, {
|
|
2763
|
+
key: "initMediaConnection",
|
|
2764
|
+
value: function initMediaConnection(localAudioTrack, debugId) {
|
|
2729
2765
|
var _this10 = this;
|
|
2730
2766
|
var mediaConnection = new _internalMediaCore.RoapMediaConnection({
|
|
2731
2767
|
skipInactiveTransceivers: true,
|
|
2732
2768
|
iceServers: [],
|
|
2733
|
-
iceCandidatesTimeout:
|
|
2769
|
+
iceCandidatesTimeout: this.getIceCandidatesTimeout(),
|
|
2734
2770
|
sdpMunging: {
|
|
2735
2771
|
convertPort9to0: true,
|
|
2736
2772
|
addContentSlides: false,
|
|
@@ -3416,8 +3452,8 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
3416
3452
|
if (error.getCallError().errorLayer === _types.ERROR_LAYER.CALL_CONTROL) {
|
|
3417
3453
|
this.metricManager.submitCallMetric(_types5.METRIC_EVENT.CALL_ERROR, transferMetricAction || this.callStateMachine.state.value.toString(), _types5.METRIC_TYPE.BEHAVIORAL, this.callId, this.correlationId, error);
|
|
3418
3454
|
} else {
|
|
3419
|
-
var _this$
|
|
3420
|
-
this.metricManager.submitMediaMetric(_types5.METRIC_EVENT.MEDIA_ERROR, this.mediaStateMachine.state.value.toString(), _types5.METRIC_TYPE.BEHAVIORAL, this.callId, this.correlationId, this.localRoapMessage.sdp, (_this$
|
|
3455
|
+
var _this$remoteRoapMessa3;
|
|
3456
|
+
this.metricManager.submitMediaMetric(_types5.METRIC_EVENT.MEDIA_ERROR, this.mediaStateMachine.state.value.toString(), _types5.METRIC_TYPE.BEHAVIORAL, this.callId, this.correlationId, this.localRoapMessage.sdp, (_this$remoteRoapMessa3 = this.remoteRoapMessage) === null || _this$remoteRoapMessa3 === void 0 ? void 0 : _this$remoteRoapMessa3.sdp, undefined, error);
|
|
3421
3457
|
}
|
|
3422
3458
|
}
|
|
3423
3459
|
|
|
@@ -3624,7 +3660,7 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
|
|
|
3624
3660
|
* @param indicator - Service Indicator.
|
|
3625
3661
|
* @param dest -.
|
|
3626
3662
|
*/
|
|
3627
|
-
var createCall = exports.createCall = function createCall(activeUrl, webex, dir, deviceId, lineId, deleteCb, indicator, dest) {
|
|
3628
|
-
return new Call(activeUrl, webex, dir, deviceId, lineId, deleteCb, indicator, dest);
|
|
3663
|
+
var createCall = exports.createCall = function createCall(activeUrl, webex, dir, deviceId, lineId, deleteCb, indicator, dest, iceGatheringConfig) {
|
|
3664
|
+
return new Call(activeUrl, webex, dir, deviceId, lineId, deleteCb, indicator, dest, iceGatheringConfig);
|
|
3629
3665
|
};
|
|
3630
3666
|
//# sourceMappingURL=call.js.map
|