@webex/plugin-meetings 3.3.1-next.3 → 3.3.1-next.30
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/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +7 -2
- package/dist/breakouts/index.js.map +1 -1
- package/dist/constants.js +12 -2
- package/dist/constants.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/media/MediaConnectionAwaiter.js +68 -13
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +16 -6
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/connectionStateHandler.js +67 -0
- package/dist/meeting/connectionStateHandler.js.map +1 -0
- package/dist/meeting/index.js +242 -133
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +7 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/util.js +1 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/index.js +4 -4
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +2 -2
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/util.js +17 -17
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +16 -16
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +1 -1
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +37 -33
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +8 -0
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/util.js +3 -2
- package/dist/meetings/util.js.map +1 -1
- package/dist/metrics/constants.js +2 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +57 -0
- package/dist/metrics/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +1 -1
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/reachability/clusterReachability.js +108 -53
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +415 -56
- package/dist/reachability/index.js.map +1 -1
- package/dist/statsAnalyzer/index.js +81 -27
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +36 -10
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/constants.d.ts +11 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +24 -4
- package/dist/types/mediaQualityMetrics/config.d.ts +11 -0
- package/dist/types/meeting/connectionStateHandler.d.ts +30 -0
- package/dist/types/meeting/index.d.ts +13 -3
- package/dist/types/meeting/locusMediaRequest.d.ts +2 -0
- package/dist/types/meeting-info/index.d.ts +3 -2
- package/dist/types/meeting-info/meeting-info-v2.d.ts +3 -2
- package/dist/types/meeting-info/util.d.ts +5 -4
- package/dist/types/meeting-info/utilv2.d.ts +3 -2
- package/dist/types/meetings/collection.d.ts +3 -2
- package/dist/types/meetings/index.d.ts +4 -3
- package/dist/types/meetings/meetings.types.d.ts +9 -0
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/types/metrics/index.d.ts +15 -0
- package/dist/types/reachability/clusterReachability.d.ts +31 -3
- package/dist/types/reachability/index.d.ts +93 -2
- package/dist/types/statsAnalyzer/index.d.ts +15 -6
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +17 -4
- package/dist/webinar/index.js +1 -1
- package/package.json +23 -23
- package/src/breakouts/index.ts +7 -1
- package/src/constants.ts +13 -0
- package/src/media/MediaConnectionAwaiter.ts +86 -11
- package/src/mediaQualityMetrics/config.ts +14 -3
- package/src/meeting/connectionStateHandler.ts +65 -0
- package/src/meeting/index.ts +166 -63
- package/src/meeting/locusMediaRequest.ts +5 -0
- package/src/meeting/util.ts +1 -0
- package/src/meeting-info/index.ts +9 -6
- package/src/meeting-info/meeting-info-v2.ts +4 -4
- package/src/meeting-info/util.ts +23 -28
- package/src/meeting-info/utilv2.ts +18 -24
- package/src/meetings/collection.ts +3 -3
- package/src/meetings/index.ts +39 -40
- package/src/meetings/meetings.types.ts +11 -0
- package/src/meetings/util.ts +5 -4
- package/src/metrics/constants.ts +1 -0
- package/src/metrics/index.ts +44 -0
- package/src/personal-meeting-room/index.ts +2 -2
- package/src/reachability/clusterReachability.ts +86 -25
- package/src/reachability/index.ts +316 -27
- package/src/statsAnalyzer/index.ts +85 -24
- package/src/statsAnalyzer/mqaUtil.ts +55 -7
- package/test/unit/spec/breakouts/index.ts +51 -32
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +131 -32
- package/test/unit/spec/meeting/connectionStateHandler.ts +102 -0
- package/test/unit/spec/meeting/index.js +323 -56
- package/test/unit/spec/meeting/locusMediaRequest.ts +7 -0
- package/test/unit/spec/meeting-info/index.js +4 -4
- package/test/unit/spec/meeting-info/meetinginfov2.js +24 -28
- package/test/unit/spec/meeting-info/request.js +2 -2
- package/test/unit/spec/meeting-info/utilv2.js +41 -49
- package/test/unit/spec/meetings/index.js +14 -0
- package/test/unit/spec/metrics/index.js +126 -0
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -2
- package/test/unit/spec/reachability/clusterReachability.ts +116 -22
- package/test/unit/spec/reachability/index.ts +1153 -84
- package/test/unit/spec/stats-analyzer/index.js +647 -319
package/dist/meeting/index.js
CHANGED
|
@@ -19,6 +19,7 @@ exports.default = exports.ScreenShareFloorStatus = exports.MEDIA_UPDATE_TYPE = v
|
|
|
19
19
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
20
20
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
21
21
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
22
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/map"));
|
|
22
23
|
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
23
24
|
var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
|
|
24
25
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/typeof"));
|
|
@@ -83,6 +84,7 @@ var _recordingController = _interopRequireDefault(require("../recording-controll
|
|
|
83
84
|
var _controlsOptionsManager = _interopRequireDefault(require("../controls-options-manager"));
|
|
84
85
|
var _permission = _interopRequireDefault(require("../common/errors/permission"));
|
|
85
86
|
var _locusMediaRequest = require("./locusMediaRequest");
|
|
87
|
+
var _connectionStateHandler = require("./connectionStateHandler");
|
|
86
88
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && o[_Symbol$iterator] || o["@@iterator"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
87
89
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
88
90
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
@@ -530,6 +532,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
530
532
|
(0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "sdpResponseTimer", void 0);
|
|
531
533
|
(0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "hasMediaConnectionConnectedAtLeastOnce", void 0);
|
|
532
534
|
(0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "joinWithMediaRetryInfo", void 0);
|
|
535
|
+
(0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "connectionStateHandler", void 0);
|
|
536
|
+
(0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "iceCandidateErrors", void 0);
|
|
533
537
|
/**
|
|
534
538
|
* Callback called when a relay event is received from meeting LLM Connection
|
|
535
539
|
* @param {RelayEvent} e Event object coming from LLM Connection
|
|
@@ -832,7 +836,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
832
836
|
}
|
|
833
837
|
}
|
|
834
838
|
});
|
|
835
|
-
_this.
|
|
839
|
+
_this.connectionStateHandler = new _connectionStateHandler.ConnectionStateHandler(_this.mediaProperties.webrtcMediaConnection);
|
|
840
|
+
_this.connectionStateHandler.on(_connectionStateHandler.ConnectionStateEvent.stateChanged, function (event) {
|
|
836
841
|
var connectionFailed = function connectionFailed() {
|
|
837
842
|
_metrics.default.sendBehavioralMetric(_constants2.default.CONNECTION_FAILURE, {
|
|
838
843
|
correlation_id: _this.correlationId,
|
|
@@ -947,6 +952,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
947
952
|
mediaContent: mediaContent
|
|
948
953
|
});
|
|
949
954
|
});
|
|
955
|
+
_this.iceCandidateErrors.clear();
|
|
956
|
+
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.ICE_CANDIDATE_ERROR, function (event) {
|
|
957
|
+
var errorCode = event.error.errorCode;
|
|
958
|
+
var errorText = event.error.errorText;
|
|
959
|
+
if (errorCode === 600 && errorText === 'Address not associated with the desired network interface.') {
|
|
960
|
+
return;
|
|
961
|
+
}
|
|
962
|
+
if (errorText.endsWith('.')) {
|
|
963
|
+
errorText = errorText.slice(0, -1);
|
|
964
|
+
}
|
|
965
|
+
errorText = errorText.toLowerCase();
|
|
966
|
+
errorText = errorText.replace(/ /g, '_');
|
|
967
|
+
var error = "".concat(errorCode, "_").concat(errorText);
|
|
968
|
+
var count = _this.iceCandidateErrors.get(error) || 0;
|
|
969
|
+
_this.iceCandidateErrors.set(error, count + 1);
|
|
970
|
+
});
|
|
950
971
|
});
|
|
951
972
|
/**
|
|
952
973
|
* Registers for all required StatsAnalyzer events
|
|
@@ -1192,10 +1213,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1192
1213
|
* @returns {undefined}
|
|
1193
1214
|
*/
|
|
1194
1215
|
(0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "handleShareVideoStreamMuteStateChange", function (muted) {
|
|
1216
|
+
var _this$statsAnalyzer;
|
|
1195
1217
|
_loggerProxy.default.logger.log("Meeting:index#handleShareVideoStreamMuteStateChange --> Share video stream mute state changed to muted ".concat(muted));
|
|
1196
1218
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_VIDEO_MUTE_STATE_CHANGE, {
|
|
1197
1219
|
correlationId: _this.correlationId,
|
|
1198
|
-
muted: muted
|
|
1220
|
+
muted: muted,
|
|
1221
|
+
encoderImplementation: (_this$statsAnalyzer = _this.statsAnalyzer) === null || _this$statsAnalyzer === void 0 ? void 0 : _this$statsAnalyzer.shareVideoEncoderImplementation
|
|
1199
1222
|
});
|
|
1200
1223
|
});
|
|
1201
1224
|
/**
|
|
@@ -2071,6 +2094,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2071
2094
|
isRetry: false,
|
|
2072
2095
|
prevJoinResponse: undefined
|
|
2073
2096
|
};
|
|
2097
|
+
|
|
2098
|
+
/**
|
|
2099
|
+
* Connection state handler
|
|
2100
|
+
* @instance
|
|
2101
|
+
* @type {ConnectionStateHandler}
|
|
2102
|
+
* @private
|
|
2103
|
+
* @memberof Meeting
|
|
2104
|
+
*/
|
|
2105
|
+
_this.connectionStateHandler = undefined;
|
|
2106
|
+
|
|
2107
|
+
/**
|
|
2108
|
+
* ICE Candidates errors map
|
|
2109
|
+
* @instance
|
|
2110
|
+
* @type {Map<[number, string], number>}
|
|
2111
|
+
* @private
|
|
2112
|
+
* @memberof Meeting
|
|
2113
|
+
*/
|
|
2114
|
+
_this.iceCandidateErrors = new _map.default();
|
|
2074
2115
|
return _this;
|
|
2075
2116
|
}
|
|
2076
2117
|
|
|
@@ -2342,13 +2383,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2342
2383
|
_loggerProxy.default.logger.info("Meeting:index#refreshPermissionToken --> cannot refresh the permission token, because we don't have it (reason=".concat(reason, ")"));
|
|
2343
2384
|
return _context6.abrupt("return");
|
|
2344
2385
|
case 3:
|
|
2345
|
-
isStartingSpaceInstantV2Meeting = this.destinationType === _constants.
|
|
2386
|
+
isStartingSpaceInstantV2Meeting = this.destinationType === _constants.DESTINATION_TYPE.CONVERSATION_URL &&
|
|
2346
2387
|
// @ts-ignore - config coming from registerPlugin
|
|
2347
2388
|
this.config.experimental.enableAdhocMeetings &&
|
|
2348
2389
|
// @ts-ignore
|
|
2349
2390
|
this.webex.meetings.preferredWebexSite;
|
|
2350
2391
|
destination = isStartingSpaceInstantV2Meeting ? this.meetingInfo.meetingJoinUrl : this.destination;
|
|
2351
|
-
destinationType = isStartingSpaceInstantV2Meeting ? _constants.
|
|
2392
|
+
destinationType = isStartingSpaceInstantV2Meeting ? _constants.DESTINATION_TYPE.MEETING_LINK : this.destinationType;
|
|
2352
2393
|
permissionTokenExpiryInfo = this.getPermissionTokenExpiryInfo();
|
|
2353
2394
|
timeLeft = permissionTokenExpiryInfo === null || permissionTokenExpiryInfo === void 0 ? void 0 : permissionTokenExpiryInfo.timeLeft;
|
|
2354
2395
|
expiryTime = permissionTokenExpiryInfo === null || permissionTokenExpiryInfo === void 0 ? void 0 : permissionTokenExpiryInfo.expiryTime;
|
|
@@ -3564,6 +3605,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3564
3605
|
correlation_id: _this19.correlationId,
|
|
3565
3606
|
locus_id: _this19.locusId
|
|
3566
3607
|
});
|
|
3608
|
+
_loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoSelfListener --> MEDIA_INACTIVITY received, reconnecting...');
|
|
3567
3609
|
_this19.reconnect();
|
|
3568
3610
|
});
|
|
3569
3611
|
|
|
@@ -4633,7 +4675,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4633
4675
|
}, {
|
|
4634
4676
|
key: "closePeerConnections",
|
|
4635
4677
|
value: function closePeerConnections() {
|
|
4636
|
-
this.locusMediaRequest = undefined;
|
|
4637
4678
|
if (this.mediaProperties.webrtcMediaConnection) {
|
|
4638
4679
|
if (this.remoteMediaManager) {
|
|
4639
4680
|
this.remoteMediaManager.stop();
|
|
@@ -4938,12 +4979,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4938
4979
|
joinResponse,
|
|
4939
4980
|
turnServerInfo,
|
|
4940
4981
|
turnDiscoverySkippedReason,
|
|
4982
|
+
forceTurnDiscovery,
|
|
4941
4983
|
turnDiscoveryRequest,
|
|
4942
4984
|
_yield$this$roap$hand,
|
|
4943
4985
|
mediaResponse,
|
|
4944
4986
|
_this$locusUrl,
|
|
4945
4987
|
_leaveError,
|
|
4946
4988
|
leaveError,
|
|
4989
|
+
shouldRetry,
|
|
4947
4990
|
_args15 = arguments;
|
|
4948
4991
|
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
4949
4992
|
while (1) switch (_context15.prev = _context15.next) {
|
|
@@ -4962,34 +5005,36 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4962
5005
|
joined = false;
|
|
4963
5006
|
joinResponse = prevJoinResponse;
|
|
4964
5007
|
_context15.prev = 9;
|
|
4965
|
-
|
|
5008
|
+
forceTurnDiscovery = false;
|
|
5009
|
+
if (joinResponse) {
|
|
5010
|
+
_context15.next = 36;
|
|
5011
|
+
break;
|
|
5012
|
+
}
|
|
5013
|
+
_context15.next = 14;
|
|
4966
5014
|
return this.webex.meetings.reachability.getReachabilityResults();
|
|
4967
|
-
case
|
|
5015
|
+
case 14:
|
|
4968
5016
|
joinOptions.reachability = _context15.sent;
|
|
4969
|
-
_context15.next =
|
|
5017
|
+
_context15.next = 17;
|
|
4970
5018
|
return this.roap.generateTurnDiscoveryRequestMessage(this, true);
|
|
4971
|
-
case
|
|
5019
|
+
case 17:
|
|
4972
5020
|
turnDiscoveryRequest = _context15.sent;
|
|
4973
5021
|
turnDiscoverySkippedReason = turnDiscoveryRequest.turnDiscoverySkippedReason;
|
|
4974
5022
|
joinOptions.roapMessage = turnDiscoveryRequest.roapMessage;
|
|
4975
|
-
if (joinResponse) {
|
|
4976
|
-
_context15.next = 23;
|
|
4977
|
-
break;
|
|
4978
|
-
}
|
|
4979
5023
|
_loggerProxy.default.logger.info('Meeting:index#joinWithMedia ---> calling join with joinOptions, ', joinOptions);
|
|
4980
|
-
_context15.next =
|
|
5024
|
+
_context15.next = 23;
|
|
4981
5025
|
return this.join(joinOptions);
|
|
4982
|
-
case 22:
|
|
4983
|
-
joinResponse = _context15.sent;
|
|
4984
5026
|
case 23:
|
|
5027
|
+
joinResponse = _context15.sent;
|
|
4985
5028
|
joined = true;
|
|
5029
|
+
|
|
5030
|
+
// if we sent out TURN discovery Roap message with join, process the TURN discovery response
|
|
4986
5031
|
if (!joinOptions.roapMessage) {
|
|
4987
|
-
_context15.next =
|
|
5032
|
+
_context15.next = 34;
|
|
4988
5033
|
break;
|
|
4989
5034
|
}
|
|
4990
|
-
_context15.next =
|
|
5035
|
+
_context15.next = 28;
|
|
4991
5036
|
return this.roap.handleTurnDiscoveryHttpResponse(this, joinResponse);
|
|
4992
|
-
case
|
|
5037
|
+
case 28:
|
|
4993
5038
|
_yield$this$roap$hand = _context15.sent;
|
|
4994
5039
|
turnServerInfo = _yield$this$roap$hand.turnServerInfo;
|
|
4995
5040
|
turnDiscoverySkippedReason = _yield$this$roap$hand.turnDiscoverySkippedReason;
|
|
@@ -4998,10 +5043,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4998
5043
|
if (turnServerInfo === undefined) {
|
|
4999
5044
|
this.roap.abortTurnDiscovery();
|
|
5000
5045
|
}
|
|
5001
|
-
case
|
|
5002
|
-
_context15.next =
|
|
5003
|
-
|
|
5004
|
-
case
|
|
5046
|
+
case 34:
|
|
5047
|
+
_context15.next = 38;
|
|
5048
|
+
break;
|
|
5049
|
+
case 36:
|
|
5050
|
+
// This is a retry, when join succeeded but addMedia failed, so we'll just call addMedia() again,
|
|
5051
|
+
// but we need to ensure that it also does a new TURN discovery
|
|
5052
|
+
forceTurnDiscovery = true;
|
|
5053
|
+
joined = true;
|
|
5054
|
+
case 38:
|
|
5055
|
+
_context15.next = 40;
|
|
5056
|
+
return this.addMedia(mediaOptions, turnServerInfo, forceTurnDiscovery);
|
|
5057
|
+
case 40:
|
|
5005
5058
|
mediaResponse = _context15.sent;
|
|
5006
5059
|
this.joinWithMediaRetryInfo = {
|
|
5007
5060
|
isRetry: false,
|
|
@@ -5011,30 +5064,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5011
5064
|
join: joinResponse,
|
|
5012
5065
|
media: mediaResponse
|
|
5013
5066
|
});
|
|
5014
|
-
case
|
|
5015
|
-
_context15.prev =
|
|
5067
|
+
case 45:
|
|
5068
|
+
_context15.prev = 45;
|
|
5016
5069
|
_context15.t0 = _context15["catch"](9);
|
|
5017
5070
|
_loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _context15.t0);
|
|
5018
5071
|
this.roap.abortTurnDiscovery();
|
|
5019
5072
|
if (!(joined && isRetry)) {
|
|
5020
|
-
_context15.next =
|
|
5073
|
+
_context15.next = 59;
|
|
5021
5074
|
break;
|
|
5022
5075
|
}
|
|
5023
|
-
_context15.prev =
|
|
5024
|
-
_context15.next =
|
|
5076
|
+
_context15.prev = 50;
|
|
5077
|
+
_context15.next = 53;
|
|
5025
5078
|
return this.leave({
|
|
5026
5079
|
resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
|
|
5027
5080
|
reason: 'joinWithMedia failure'
|
|
5028
5081
|
});
|
|
5029
|
-
case
|
|
5030
|
-
_context15.next =
|
|
5082
|
+
case 53:
|
|
5083
|
+
_context15.next = 59;
|
|
5031
5084
|
break;
|
|
5032
|
-
case
|
|
5033
|
-
_context15.prev =
|
|
5034
|
-
_context15.t1 = _context15["catch"](
|
|
5085
|
+
case 55:
|
|
5086
|
+
_context15.prev = 55;
|
|
5087
|
+
_context15.t1 = _context15["catch"](50);
|
|
5035
5088
|
_loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _context15.t1);
|
|
5036
5089
|
leaveError = _context15.t1;
|
|
5037
|
-
case
|
|
5090
|
+
case 59:
|
|
5038
5091
|
_metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
|
|
5039
5092
|
correlation_id: this.correlationId,
|
|
5040
5093
|
locus_id: (_this$locusUrl = this.locusUrl) === null || _this$locusUrl === void 0 ? void 0 : _this$locusUrl.split('/').pop(),
|
|
@@ -5046,25 +5099,33 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5046
5099
|
}, {
|
|
5047
5100
|
type: _context15.t0.name
|
|
5048
5101
|
});
|
|
5049
|
-
|
|
5050
|
-
|
|
5102
|
+
|
|
5103
|
+
// if this was the first attempt, let's do a retry
|
|
5104
|
+
shouldRetry = !isRetry;
|
|
5105
|
+
if (_internalPluginMetrics.CallDiagnosticUtils.isSdpOfferCreationError(_context15.t0)) {
|
|
5106
|
+
// errors related to offer creation (for example missing H264 codec) will happen again no matter how many times we try,
|
|
5107
|
+
// so there is no point doing a retry
|
|
5108
|
+
shouldRetry = false;
|
|
5109
|
+
}
|
|
5110
|
+
if (!shouldRetry) {
|
|
5111
|
+
_context15.next = 67;
|
|
5051
5112
|
break;
|
|
5052
5113
|
}
|
|
5053
5114
|
_loggerProxy.default.logger.warn('Meeting:index#joinWithMedia --> retrying call to joinWithMedia');
|
|
5054
5115
|
this.joinWithMediaRetryInfo.isRetry = true;
|
|
5055
5116
|
this.joinWithMediaRetryInfo.prevJoinResponse = joinResponse;
|
|
5056
5117
|
return _context15.abrupt("return", this.joinWithMedia(options));
|
|
5057
|
-
case
|
|
5118
|
+
case 67:
|
|
5058
5119
|
this.joinWithMediaRetryInfo = {
|
|
5059
5120
|
isRetry: false,
|
|
5060
5121
|
prevJoinResponse: undefined
|
|
5061
5122
|
};
|
|
5062
5123
|
throw _context15.t0;
|
|
5063
|
-
case
|
|
5124
|
+
case 69:
|
|
5064
5125
|
case "end":
|
|
5065
5126
|
return _context15.stop();
|
|
5066
5127
|
}
|
|
5067
|
-
}, _callee15, this, [[9,
|
|
5128
|
+
}, _callee15, this, [[9, 45], [50, 55]]);
|
|
5068
5129
|
}));
|
|
5069
5130
|
function joinWithMedia() {
|
|
5070
5131
|
return _joinWithMedia.apply(this, arguments);
|
|
@@ -5495,6 +5556,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5495
5556
|
case 51:
|
|
5496
5557
|
return _context18.abrupt("return", _util2.default.joinMeetingOptions(this, options).then(function (join) {
|
|
5497
5558
|
_this31.meetingFiniteStateMachine.join();
|
|
5559
|
+
_this31.setupLocusMediaRequest();
|
|
5498
5560
|
_loggerProxy.default.logger.log('Meeting:index#join --> Success');
|
|
5499
5561
|
_metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
|
|
5500
5562
|
correlation_id: _this31.correlationId
|
|
@@ -5588,7 +5650,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5588
5650
|
_context19.next = 8;
|
|
5589
5651
|
break;
|
|
5590
5652
|
}
|
|
5591
|
-
if (!(
|
|
5653
|
+
if (!(
|
|
5654
|
+
// @ts-ignore - Fix type
|
|
5655
|
+
url === this.webex.internal.llm.getLocusUrl() &&
|
|
5656
|
+
// @ts-ignore - Fix type
|
|
5657
|
+
datachannelUrl === this.webex.internal.llm.getDatachannelUrl() && isJoined)) {
|
|
5592
5658
|
_context19.next = 5;
|
|
5593
5659
|
break;
|
|
5594
5660
|
}
|
|
@@ -6103,7 +6169,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6103
6169
|
key: "waitForMediaConnectionConnected",
|
|
6104
6170
|
value: (function () {
|
|
6105
6171
|
var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
|
|
6106
|
-
var _this$mediaProperties6, _this$mediaProperties7, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12
|
|
6172
|
+
var iceConnected, _this$mediaProperties6, _this$mediaProperties7, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12;
|
|
6107
6173
|
return _regenerator.default.wrap(function _callee23$(_context23) {
|
|
6108
6174
|
while (1) switch (_context23.prev = _context23.next) {
|
|
6109
6175
|
case 0:
|
|
@@ -6111,37 +6177,59 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6111
6177
|
_context23.next = 3;
|
|
6112
6178
|
return this.mediaProperties.waitForMediaConnectionConnected();
|
|
6113
6179
|
case 3:
|
|
6114
|
-
_context23.next =
|
|
6180
|
+
_context23.next = 30;
|
|
6115
6181
|
break;
|
|
6116
6182
|
case 5:
|
|
6117
6183
|
_context23.prev = 5;
|
|
6118
6184
|
_context23.t0 = _context23["catch"](0);
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
name: 'client.ice.end',
|
|
6124
|
-
payload: {
|
|
6125
|
-
canProceed: !this.turnServerUsed,
|
|
6126
|
-
// If we haven't done turn tls retry yet we will proceed with join attempt
|
|
6127
|
-
icePhase: this.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY',
|
|
6128
|
-
errors: [
|
|
6129
|
-
// @ts-ignore
|
|
6130
|
-
this.webex.internal.newMetrics.callDiagnosticMetrics.getErrorPayloadForClientErrorCode({
|
|
6131
|
-
clientErrorCode: _internalPluginMetrics.CallDiagnosticUtils.generateClientErrorCodeForIceFailure({
|
|
6132
|
-
signalingState: ((_this$mediaProperties6 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties6 === void 0 ? void 0 : (_this$mediaProperties7 = _this$mediaProperties6.multistreamConnection) === null || _this$mediaProperties7 === void 0 ? void 0 : (_this$mediaProperties8 = _this$mediaProperties7.pc) === null || _this$mediaProperties8 === void 0 ? void 0 : (_this$mediaProperties9 = _this$mediaProperties8.pc) === null || _this$mediaProperties9 === void 0 ? void 0 : _this$mediaProperties9.signalingState) || ((_this$mediaProperties10 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties10 === void 0 ? void 0 : (_this$mediaProperties11 = _this$mediaProperties10.mediaConnection) === null || _this$mediaProperties11 === void 0 ? void 0 : (_this$mediaProperties12 = _this$mediaProperties11.pc) === null || _this$mediaProperties12 === void 0 ? void 0 : _this$mediaProperties12.signalingState) || 'unknown',
|
|
6133
|
-
iceConnectionState: ((_this$mediaProperties13 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties13 === void 0 ? void 0 : (_this$mediaProperties14 = _this$mediaProperties13.multistreamConnection) === null || _this$mediaProperties14 === void 0 ? void 0 : (_this$mediaProperties15 = _this$mediaProperties14.pc) === null || _this$mediaProperties15 === void 0 ? void 0 : (_this$mediaProperties16 = _this$mediaProperties15.pc) === null || _this$mediaProperties16 === void 0 ? void 0 : _this$mediaProperties16.iceConnectionState) || ((_this$mediaProperties17 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties17 === void 0 ? void 0 : (_this$mediaProperties18 = _this$mediaProperties17.mediaConnection) === null || _this$mediaProperties18 === void 0 ? void 0 : (_this$mediaProperties19 = _this$mediaProperties18.pc) === null || _this$mediaProperties19 === void 0 ? void 0 : _this$mediaProperties19.iceConnectionState) || 'unknown',
|
|
6134
|
-
turnServerUsed: this.turnServerUsed
|
|
6135
|
-
})
|
|
6136
|
-
})]
|
|
6137
|
-
},
|
|
6138
|
-
options: {
|
|
6139
|
-
meetingId: this.id
|
|
6140
|
-
}
|
|
6141
|
-
});
|
|
6185
|
+
iceConnected = _context23.t0.iceConnected;
|
|
6186
|
+
if (this.hasMediaConnectionConnectedAtLeastOnce) {
|
|
6187
|
+
_context23.next = 29;
|
|
6188
|
+
break;
|
|
6142
6189
|
}
|
|
6190
|
+
_context23.t1 = this.webex.internal.newMetrics;
|
|
6191
|
+
_context23.t2 = !this.turnServerUsed;
|
|
6192
|
+
_context23.t3 = this.turnServerUsed ? 'JOIN_MEETING_FINAL' : 'JOIN_MEETING_RETRY';
|
|
6193
|
+
_context23.t4 = this.webex.internal.newMetrics.callDiagnosticMetrics;
|
|
6194
|
+
_context23.t5 = _internalPluginMetrics.CallDiagnosticUtils;
|
|
6195
|
+
_context23.t6 = ((_this$mediaProperties6 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties6 === void 0 ? void 0 : (_this$mediaProperties7 = _this$mediaProperties6.multistreamConnection) === null || _this$mediaProperties7 === void 0 ? void 0 : (_this$mediaProperties8 = _this$mediaProperties7.pc) === null || _this$mediaProperties8 === void 0 ? void 0 : (_this$mediaProperties9 = _this$mediaProperties8.pc) === null || _this$mediaProperties9 === void 0 ? void 0 : _this$mediaProperties9.signalingState) || ((_this$mediaProperties10 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties10 === void 0 ? void 0 : (_this$mediaProperties11 = _this$mediaProperties10.mediaConnection) === null || _this$mediaProperties11 === void 0 ? void 0 : (_this$mediaProperties12 = _this$mediaProperties11.pc) === null || _this$mediaProperties12 === void 0 ? void 0 : _this$mediaProperties12.signalingState) || 'unknown';
|
|
6196
|
+
_context23.t7 = iceConnected;
|
|
6197
|
+
_context23.t8 = this.turnServerUsed;
|
|
6198
|
+
_context23.next = 19;
|
|
6199
|
+
return this.webex.meetings.reachability.isWebexMediaBackendUnreachable().catch(function () {
|
|
6200
|
+
return false;
|
|
6201
|
+
});
|
|
6202
|
+
case 19:
|
|
6203
|
+
_context23.t9 = _context23.sent;
|
|
6204
|
+
_context23.t10 = {
|
|
6205
|
+
signalingState: _context23.t6,
|
|
6206
|
+
iceConnected: _context23.t7,
|
|
6207
|
+
turnServerUsed: _context23.t8,
|
|
6208
|
+
unreachable: _context23.t9
|
|
6209
|
+
};
|
|
6210
|
+
_context23.t11 = _context23.t5.generateClientErrorCodeForIceFailure.call(_context23.t5, _context23.t10);
|
|
6211
|
+
_context23.t12 = {
|
|
6212
|
+
clientErrorCode: _context23.t11
|
|
6213
|
+
};
|
|
6214
|
+
_context23.t13 = _context23.t4.getErrorPayloadForClientErrorCode.call(_context23.t4, _context23.t12);
|
|
6215
|
+
_context23.t14 = [_context23.t13];
|
|
6216
|
+
_context23.t15 = {
|
|
6217
|
+
canProceed: _context23.t2,
|
|
6218
|
+
icePhase: _context23.t3,
|
|
6219
|
+
errors: _context23.t14
|
|
6220
|
+
};
|
|
6221
|
+
_context23.t16 = {
|
|
6222
|
+
meetingId: this.id
|
|
6223
|
+
};
|
|
6224
|
+
_context23.t17 = {
|
|
6225
|
+
name: 'client.ice.end',
|
|
6226
|
+
payload: _context23.t15,
|
|
6227
|
+
options: _context23.t16
|
|
6228
|
+
};
|
|
6229
|
+
_context23.t1.submitClientEvent.call(_context23.t1, _context23.t17);
|
|
6230
|
+
case 29:
|
|
6143
6231
|
throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
|
|
6144
|
-
case
|
|
6232
|
+
case 30:
|
|
6145
6233
|
case "end":
|
|
6146
6234
|
return _context23.stop();
|
|
6147
6235
|
}
|
|
@@ -6167,11 +6255,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6167
6255
|
if (this.config.stats.enableStatsAnalyzer) {
|
|
6168
6256
|
// @ts-ignore - config coming from registerPlugin
|
|
6169
6257
|
this.networkQualityMonitor = new _networkQualityMonitor.default(this.config.stats);
|
|
6170
|
-
this.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6258
|
+
this.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer({
|
|
6259
|
+
// @ts-ignore - config coming from registerPlugin
|
|
6260
|
+
config: this.config.stats,
|
|
6261
|
+
receiveSlotCallback: function receiveSlotCallback(ssrc) {
|
|
6262
|
+
return _this38.receiveSlotManager.findReceiveSlotBySsrc(ssrc);
|
|
6263
|
+
},
|
|
6264
|
+
networkQualityMonitor: this.networkQualityMonitor,
|
|
6265
|
+
isMultistream: this.isMultistream
|
|
6266
|
+
});
|
|
6175
6267
|
this.setupStatsAnalyzerEventHandlers();
|
|
6176
6268
|
this.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, this.sendNetworkQualityEvent.bind(this));
|
|
6177
6269
|
}
|
|
@@ -6430,12 +6522,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6430
6522
|
key: "establishMediaConnection",
|
|
6431
6523
|
value: (function () {
|
|
6432
6524
|
var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
|
|
6525
|
+
var _this$locusMediaReque;
|
|
6433
6526
|
var LOG_HEADER, isReconnecting, _yield$this$doTurnDis, mc;
|
|
6434
6527
|
return _regenerator.default.wrap(function _callee29$(_context29) {
|
|
6435
6528
|
while (1) switch (_context29.prev = _context29.next) {
|
|
6436
6529
|
case 0:
|
|
6437
6530
|
LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->';
|
|
6438
|
-
isReconnecting = this.isMoveToInProgress || this.
|
|
6531
|
+
isReconnecting = this.isMoveToInProgress || !!((_this$locusMediaReque = this.locusMediaRequest) !== null && _this$locusMediaReque !== void 0 && _this$locusMediaReque.isConfluenceCreated()); // We are forcing turn discovery if the case is moveTo and a turn server was used already
|
|
6439
6532
|
if (this.isMoveToInProgress && this.turnServerUsed) {
|
|
6440
6533
|
isForced = true;
|
|
6441
6534
|
}
|
|
@@ -6593,23 +6686,53 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6593
6686
|
}
|
|
6594
6687
|
return cleanUpBeforeRetryWithTurnServer;
|
|
6595
6688
|
}()
|
|
6689
|
+
/**
|
|
6690
|
+
* Creates an instance of LocusMediaRequest for this meeting - it is needed for doing any calls
|
|
6691
|
+
* to Locus /media API (these are used for sending Roap messages and updating audio/video mute status).
|
|
6692
|
+
*
|
|
6693
|
+
* @returns {void}
|
|
6694
|
+
*/
|
|
6695
|
+
)
|
|
6696
|
+
}, {
|
|
6697
|
+
key: "setupLocusMediaRequest",
|
|
6698
|
+
value: function setupLocusMediaRequest() {
|
|
6699
|
+
var _this$webex$meetings$2, _this$webex$meetings$3;
|
|
6700
|
+
this.locusMediaRequest = new _locusMediaRequest.LocusMediaRequest({
|
|
6701
|
+
correlationId: this.correlationId,
|
|
6702
|
+
meetingId: this.id,
|
|
6703
|
+
device: {
|
|
6704
|
+
url: this.deviceUrl,
|
|
6705
|
+
// @ts-ignore
|
|
6706
|
+
deviceType: this.config.deviceType,
|
|
6707
|
+
// @ts-ignore
|
|
6708
|
+
countryCode: (_this$webex$meetings$2 = this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$2 === void 0 ? void 0 : _this$webex$meetings$2.countryCode,
|
|
6709
|
+
// @ts-ignore
|
|
6710
|
+
regionCode: (_this$webex$meetings$3 = this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$3 === void 0 ? void 0 : _this$webex$meetings$3.regionCode
|
|
6711
|
+
},
|
|
6712
|
+
preferTranscoding: !this.isMultistream
|
|
6713
|
+
}, {
|
|
6714
|
+
// @ts-ignore
|
|
6715
|
+
parent: this.webex
|
|
6716
|
+
});
|
|
6717
|
+
}
|
|
6718
|
+
|
|
6596
6719
|
/**
|
|
6597
6720
|
* Creates a media connection to the server. Media connection is required for sending or receiving any audio/video.
|
|
6598
6721
|
*
|
|
6599
6722
|
* @param {AddMediaOptions} options
|
|
6600
6723
|
* @param {TurnServerInfo} turnServerInfo - TURN server information (used only internally by the SDK)
|
|
6724
|
+
* @param {boolean} forceTurnDiscovery - if true, TURN discovery will be done (used only internally by the SDK)
|
|
6601
6725
|
* @returns {Promise<void>}
|
|
6602
6726
|
* @public
|
|
6603
6727
|
* @memberof Meeting
|
|
6604
6728
|
*/
|
|
6605
|
-
)
|
|
6606
6729
|
}, {
|
|
6607
6730
|
key: "addMedia",
|
|
6608
6731
|
value: (function () {
|
|
6609
6732
|
var _addMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
|
|
6610
|
-
var _this$webex$meetings$2, _this$webex$meetings$3;
|
|
6611
6733
|
var options,
|
|
6612
6734
|
turnServerInfo,
|
|
6735
|
+
forceTurnDiscovery,
|
|
6613
6736
|
LOG_HEADER,
|
|
6614
6737
|
localStreams,
|
|
6615
6738
|
_options$audioEnabled,
|
|
@@ -6628,6 +6751,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6628
6751
|
selectedCandidatePairChanges,
|
|
6629
6752
|
numTransports,
|
|
6630
6753
|
reachabilityStats,
|
|
6754
|
+
_this$mediaProperties13,
|
|
6755
|
+
_this$mediaProperties14,
|
|
6756
|
+
_this$mediaProperties15,
|
|
6757
|
+
_this$mediaProperties16,
|
|
6758
|
+
_this$mediaProperties17,
|
|
6759
|
+
_this$mediaProperties18,
|
|
6760
|
+
_this$mediaProperties19,
|
|
6631
6761
|
_this$mediaProperties20,
|
|
6632
6762
|
_this$mediaProperties21,
|
|
6633
6763
|
_this$mediaProperties22,
|
|
@@ -6642,50 +6772,45 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6642
6772
|
_this$mediaProperties31,
|
|
6643
6773
|
_this$mediaProperties32,
|
|
6644
6774
|
_this$mediaProperties33,
|
|
6645
|
-
_this$mediaProperties34,
|
|
6646
|
-
_this$mediaProperties35,
|
|
6647
|
-
_this$mediaProperties36,
|
|
6648
|
-
_this$mediaProperties37,
|
|
6649
|
-
_this$mediaProperties38,
|
|
6650
|
-
_this$mediaProperties39,
|
|
6651
|
-
_this$mediaProperties40,
|
|
6652
6775
|
reachabilityMetrics,
|
|
6653
6776
|
_yield$this$mediaProp2,
|
|
6654
6777
|
_selectedCandidatePairChanges,
|
|
6655
6778
|
_numTransports,
|
|
6779
|
+
iceCandidateErrors,
|
|
6656
6780
|
_args32 = arguments;
|
|
6657
6781
|
return _regenerator.default.wrap(function _callee32$(_context32) {
|
|
6658
6782
|
while (1) switch (_context32.prev = _context32.next) {
|
|
6659
6783
|
case 0:
|
|
6660
6784
|
options = _args32.length > 0 && _args32[0] !== undefined ? _args32[0] : {};
|
|
6661
6785
|
turnServerInfo = _args32.length > 1 && _args32[1] !== undefined ? _args32[1] : undefined;
|
|
6786
|
+
forceTurnDiscovery = _args32.length > 2 && _args32[2] !== undefined ? _args32[2] : false;
|
|
6662
6787
|
this.retriedWithTurnServer = false;
|
|
6663
6788
|
this.hasMediaConnectionConnectedAtLeastOnce = false;
|
|
6664
6789
|
LOG_HEADER = 'Meeting:index#addMedia -->';
|
|
6665
|
-
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: ").concat((0, _stringify.default)(options), ", ").concat((0, _stringify.default)(turnServerInfo)));
|
|
6790
|
+
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: options=").concat((0, _stringify.default)(options), ", turnServerInfo=").concat((0, _stringify.default)(turnServerInfo), ", forceTurnDiscovery=").concat(forceTurnDiscovery));
|
|
6666
6791
|
if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
|
|
6667
|
-
_context32.next =
|
|
6792
|
+
_context32.next = 9;
|
|
6668
6793
|
break;
|
|
6669
6794
|
}
|
|
6670
6795
|
throw new _webexErrors.MeetingNotActiveError();
|
|
6671
|
-
case
|
|
6796
|
+
case 9:
|
|
6672
6797
|
if (!_util2.default.isUserInLeftState(this.locusInfo)) {
|
|
6673
|
-
_context32.next =
|
|
6798
|
+
_context32.next = 11;
|
|
6674
6799
|
break;
|
|
6675
6800
|
}
|
|
6676
6801
|
throw new _webexErrors.UserNotJoinedError();
|
|
6677
|
-
case
|
|
6802
|
+
case 11:
|
|
6678
6803
|
localStreams = options.localStreams, _options$audioEnabled = options.audioEnabled, audioEnabled = _options$audioEnabled === void 0 ? true : _options$audioEnabled, _options$videoEnabled = options.videoEnabled, videoEnabled = _options$videoEnabled === void 0 ? true : _options$videoEnabled, _options$shareAudioEn = options.shareAudioEnabled, shareAudioEnabled = _options$shareAudioEn === void 0 ? true : _options$shareAudioEn, _options$shareVideoEn = options.shareVideoEnabled, shareVideoEnabled = _options$shareVideoEn === void 0 ? true : _options$shareVideoEn, remoteMediaManagerConfig = options.remoteMediaManagerConfig, bundlePolicy = options.bundlePolicy;
|
|
6679
6804
|
this.allowMediaInLobby = options === null || options === void 0 ? void 0 : options.allowMediaInLobby;
|
|
6680
6805
|
|
|
6681
6806
|
// If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
|
|
6682
6807
|
// @ts-ignore - isUserUnadmitted coming from SelfUtil
|
|
6683
6808
|
if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
|
|
6684
|
-
_context32.next =
|
|
6809
|
+
_context32.next = 15;
|
|
6685
6810
|
break;
|
|
6686
6811
|
}
|
|
6687
6812
|
throw new _webexErrors.UserInLobbyError();
|
|
6688
|
-
case
|
|
6813
|
+
case 15:
|
|
6689
6814
|
// @ts-ignore
|
|
6690
6815
|
this.webex.internal.newMetrics.submitClientEvent({
|
|
6691
6816
|
name: 'client.media.capabilities',
|
|
@@ -6722,23 +6847,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6722
6847
|
receiveVideo: videoEnabled,
|
|
6723
6848
|
receiveShare: shareAudioEnabled || shareVideoEnabled
|
|
6724
6849
|
});
|
|
6725
|
-
this.locusMediaRequest = new _locusMediaRequest.LocusMediaRequest({
|
|
6726
|
-
correlationId: this.correlationId,
|
|
6727
|
-
meetingId: this.id,
|
|
6728
|
-
device: {
|
|
6729
|
-
url: this.deviceUrl,
|
|
6730
|
-
// @ts-ignore
|
|
6731
|
-
deviceType: this.config.deviceType,
|
|
6732
|
-
// @ts-ignore
|
|
6733
|
-
countryCode: (_this$webex$meetings$2 = this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$2 === void 0 ? void 0 : _this$webex$meetings$2.countryCode,
|
|
6734
|
-
// @ts-ignore
|
|
6735
|
-
regionCode: (_this$webex$meetings$3 = this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$3 === void 0 ? void 0 : _this$webex$meetings$3.regionCode
|
|
6736
|
-
},
|
|
6737
|
-
preferTranscoding: !this.isMultistream
|
|
6738
|
-
}, {
|
|
6739
|
-
// @ts-ignore
|
|
6740
|
-
parent: this.webex
|
|
6741
|
-
});
|
|
6742
6850
|
this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
|
|
6743
6851
|
this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
|
|
6744
6852
|
_context32.prev = 19;
|
|
@@ -6748,7 +6856,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6748
6856
|
this.setMercuryListener();
|
|
6749
6857
|
this.createStatsAnalyzer();
|
|
6750
6858
|
_context32.next = 26;
|
|
6751
|
-
return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy,
|
|
6859
|
+
return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, forceTurnDiscovery, turnServerInfo);
|
|
6752
6860
|
case 26:
|
|
6753
6861
|
if (!(audioEnabled || videoEnabled)) {
|
|
6754
6862
|
_context32.next = 31;
|
|
@@ -6801,7 +6909,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6801
6909
|
|
|
6802
6910
|
// We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
|
|
6803
6911
|
(_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
|
|
6804
|
-
_context32.next =
|
|
6912
|
+
_context32.next = 68;
|
|
6805
6913
|
break;
|
|
6806
6914
|
case 50:
|
|
6807
6915
|
_context32.prev = 50;
|
|
@@ -6819,7 +6927,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6819
6927
|
_yield$this$mediaProp2 = _context32.sent;
|
|
6820
6928
|
_selectedCandidatePairChanges = _yield$this$mediaProp2.selectedCandidatePairChanges;
|
|
6821
6929
|
_numTransports = _yield$this$mediaProp2.numTransports;
|
|
6822
|
-
|
|
6930
|
+
iceCandidateErrors = Object.fromEntries(this.iceCandidateErrors);
|
|
6931
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread(_objectSpread({
|
|
6823
6932
|
correlation_id: this.correlationId,
|
|
6824
6933
|
locus_id: this.locusUrl.split('/').pop(),
|
|
6825
6934
|
reason: _context32.t0.message,
|
|
@@ -6832,13 +6941,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6832
6941
|
retriedWithTurnServer: this.retriedWithTurnServer,
|
|
6833
6942
|
isMultistream: this.isMultistream,
|
|
6834
6943
|
isJoinWithMediaRetry: this.joinWithMediaRetryInfo.isRetry,
|
|
6835
|
-
signalingState: ((_this$
|
|
6836
|
-
connectionState: ((_this$
|
|
6837
|
-
iceConnectionState: ((_this$
|
|
6838
|
-
}, reachabilityMetrics));
|
|
6839
|
-
_context32.next =
|
|
6944
|
+
signalingState: ((_this$mediaProperties13 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties13 === void 0 ? void 0 : (_this$mediaProperties14 = _this$mediaProperties13.multistreamConnection) === null || _this$mediaProperties14 === void 0 ? void 0 : (_this$mediaProperties15 = _this$mediaProperties14.pc) === null || _this$mediaProperties15 === void 0 ? void 0 : (_this$mediaProperties16 = _this$mediaProperties15.pc) === null || _this$mediaProperties16 === void 0 ? void 0 : _this$mediaProperties16.signalingState) || ((_this$mediaProperties17 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties17 === void 0 ? void 0 : (_this$mediaProperties18 = _this$mediaProperties17.mediaConnection) === null || _this$mediaProperties18 === void 0 ? void 0 : (_this$mediaProperties19 = _this$mediaProperties18.pc) === null || _this$mediaProperties19 === void 0 ? void 0 : _this$mediaProperties19.signalingState) || 'unknown',
|
|
6945
|
+
connectionState: ((_this$mediaProperties20 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties20 === void 0 ? void 0 : (_this$mediaProperties21 = _this$mediaProperties20.multistreamConnection) === null || _this$mediaProperties21 === void 0 ? void 0 : (_this$mediaProperties22 = _this$mediaProperties21.pc) === null || _this$mediaProperties22 === void 0 ? void 0 : (_this$mediaProperties23 = _this$mediaProperties22.pc) === null || _this$mediaProperties23 === void 0 ? void 0 : _this$mediaProperties23.connectionState) || ((_this$mediaProperties24 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties24 === void 0 ? void 0 : (_this$mediaProperties25 = _this$mediaProperties24.mediaConnection) === null || _this$mediaProperties25 === void 0 ? void 0 : (_this$mediaProperties26 = _this$mediaProperties25.pc) === null || _this$mediaProperties26 === void 0 ? void 0 : _this$mediaProperties26.connectionState) || 'unknown',
|
|
6946
|
+
iceConnectionState: ((_this$mediaProperties27 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties27 === void 0 ? void 0 : (_this$mediaProperties28 = _this$mediaProperties27.multistreamConnection) === null || _this$mediaProperties28 === void 0 ? void 0 : (_this$mediaProperties29 = _this$mediaProperties28.pc) === null || _this$mediaProperties29 === void 0 ? void 0 : (_this$mediaProperties30 = _this$mediaProperties29.pc) === null || _this$mediaProperties30 === void 0 ? void 0 : _this$mediaProperties30.iceConnectionState) || ((_this$mediaProperties31 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties31 === void 0 ? void 0 : (_this$mediaProperties32 = _this$mediaProperties31.mediaConnection) === null || _this$mediaProperties32 === void 0 ? void 0 : (_this$mediaProperties33 = _this$mediaProperties32.pc) === null || _this$mediaProperties33 === void 0 ? void 0 : _this$mediaProperties33.iceConnectionState) || 'unknown'
|
|
6947
|
+
}, reachabilityMetrics), iceCandidateErrors));
|
|
6948
|
+
_context32.next = 65;
|
|
6840
6949
|
return this.cleanUpOnAddMediaFailure();
|
|
6841
|
-
case
|
|
6950
|
+
case 65:
|
|
6842
6951
|
// Upload logs on error while adding media
|
|
6843
6952
|
_triggerProxy.default.trigger(this, {
|
|
6844
6953
|
file: 'meeting/index',
|
|
@@ -6850,7 +6959,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6850
6959
|
});
|
|
6851
6960
|
}
|
|
6852
6961
|
throw _context32.t0;
|
|
6853
|
-
case
|
|
6962
|
+
case 68:
|
|
6854
6963
|
case "end":
|
|
6855
6964
|
return _context32.stop();
|
|
6856
6965
|
}
|
|
@@ -7615,10 +7724,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7615
7724
|
var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
7616
7725
|
var main = renderInfo.main,
|
|
7617
7726
|
content = renderInfo.content;
|
|
7618
|
-
var _this$
|
|
7619
|
-
mediaDirection = _this$
|
|
7620
|
-
remoteShareStream = _this$
|
|
7621
|
-
remoteVideoStream = _this$
|
|
7727
|
+
var _this$mediaProperties34 = this.mediaProperties,
|
|
7728
|
+
mediaDirection = _this$mediaProperties34.mediaDirection,
|
|
7729
|
+
remoteShareStream = _this$mediaProperties34.remoteShareStream,
|
|
7730
|
+
remoteVideoStream = _this$mediaProperties34.remoteVideoStream;
|
|
7622
7731
|
var layoutInfo = (0, _lodash.cloneDeep)(this.lastVideoLayoutInfo);
|
|
7623
7732
|
|
|
7624
7733
|
// TODO: We need a real time value for Audio, Video and Share send indicator
|
|
@@ -7890,8 +7999,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7890
7999
|
}, {
|
|
7891
8000
|
key: "checkMediaConnection",
|
|
7892
8001
|
value: function checkMediaConnection() {
|
|
7893
|
-
var _this$
|
|
7894
|
-
if ((_this$
|
|
8002
|
+
var _this$mediaProperties35;
|
|
8003
|
+
if ((_this$mediaProperties35 = this.mediaProperties) !== null && _this$mediaProperties35 !== void 0 && _this$mediaProperties35.webrtcMediaConnection) {
|
|
7895
8004
|
return;
|
|
7896
8005
|
}
|
|
7897
8006
|
throw new _webexErrors.NoMediaEstablishedYetError();
|
|
@@ -7951,14 +8060,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7951
8060
|
}, {
|
|
7952
8061
|
key: "updateTranscodedMediaConnection",
|
|
7953
8062
|
value: function updateTranscodedMediaConnection() {
|
|
7954
|
-
var _this$
|
|
7955
|
-
_this$
|
|
7956
|
-
_this$
|
|
7957
|
-
_this$
|
|
7958
|
-
_this$
|
|
7959
|
-
_this$
|
|
7960
|
-
_this$
|
|
7961
|
-
_this$
|
|
8063
|
+
var _this$mediaProperties36,
|
|
8064
|
+
_this$mediaProperties37,
|
|
8065
|
+
_this$mediaProperties38,
|
|
8066
|
+
_this$mediaProperties39,
|
|
8067
|
+
_this$mediaProperties40,
|
|
8068
|
+
_this$mediaProperties41,
|
|
8069
|
+
_this$mediaProperties42,
|
|
8070
|
+
_this$mediaProperties43,
|
|
7962
8071
|
_this50 = this;
|
|
7963
8072
|
var LOG_HEADER = 'Meeting:index#updateTranscodedMediaConnection -->';
|
|
7964
8073
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " starting"));
|
|
@@ -7968,10 +8077,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7968
8077
|
return this.mediaProperties.webrtcMediaConnection.update({
|
|
7969
8078
|
// TODO: RoapMediaConnection is not ready to use stream classes yet, so we pass the raw MediaStreamTrack for now
|
|
7970
8079
|
localTracks: {
|
|
7971
|
-
audio: ((_this$
|
|
7972
|
-
video: ((_this$
|
|
7973
|
-
screenShareVideo: ((_this$
|
|
7974
|
-
screenShareAudio: ((_this$
|
|
8080
|
+
audio: ((_this$mediaProperties36 = this.mediaProperties.audioStream) === null || _this$mediaProperties36 === void 0 ? void 0 : (_this$mediaProperties37 = _this$mediaProperties36.outputStream) === null || _this$mediaProperties37 === void 0 ? void 0 : _this$mediaProperties37.getTracks()[0]) || null,
|
|
8081
|
+
video: ((_this$mediaProperties38 = this.mediaProperties.videoStream) === null || _this$mediaProperties38 === void 0 ? void 0 : (_this$mediaProperties39 = _this$mediaProperties38.outputStream) === null || _this$mediaProperties39 === void 0 ? void 0 : _this$mediaProperties39.getTracks()[0]) || null,
|
|
8082
|
+
screenShareVideo: ((_this$mediaProperties40 = this.mediaProperties.shareVideoStream) === null || _this$mediaProperties40 === void 0 ? void 0 : (_this$mediaProperties41 = _this$mediaProperties40.outputStream) === null || _this$mediaProperties41 === void 0 ? void 0 : _this$mediaProperties41.getTracks()[0]) || null,
|
|
8083
|
+
screenShareAudio: ((_this$mediaProperties42 = this.mediaProperties.shareAudioStream) === null || _this$mediaProperties42 === void 0 ? void 0 : (_this$mediaProperties43 = _this$mediaProperties42.outputStream) === null || _this$mediaProperties43 === void 0 ? void 0 : _this$mediaProperties43.getTracks()[0]) || null
|
|
7975
8084
|
},
|
|
7976
8085
|
direction: {
|
|
7977
8086
|
audio: _media.default.getDirection(true, this.mediaProperties.mediaDirection.receiveAudio, this.mediaProperties.mediaDirection.sendAudio),
|