@webex/plugin-meetings 3.0.0-next.2 → 3.0.0-next.21
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 +1 -1
- package/dist/constants.d.ts +3 -9
- package/dist/constants.js +4 -9
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +3 -3
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/mediaSharesUtils.js +15 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/media/index.js +4 -1
- package/dist/media/index.js.map +1 -1
- package/dist/mediaQualityMetrics/config.d.ts +9 -1
- package/dist/mediaQualityMetrics/config.js +10 -1
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/index.d.ts +18 -7
- package/dist/meeting/index.js +745 -567
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.d.ts +2 -8
- package/dist/meeting/muteState.js +37 -25
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.d.ts +3 -0
- package/dist/meeting/request.js +32 -23
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +1 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/multistream/mediaRequestManager.d.ts +1 -2
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.d.ts +1 -1
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.d.ts +1 -2
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.d.ts +1 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/request.js +12 -10
- package/dist/reachability/request.js.map +1 -1
- package/dist/reconnection-manager/index.js +2 -1
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/index.d.ts +10 -2
- package/dist/roap/index.js +15 -0
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +3 -3
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.d.ts +64 -17
- package/dist/roap/turnDiscovery.js +307 -126
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/index.js +61 -41
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/constants.ts +3 -9
- package/src/index.ts +1 -0
- package/src/interpretation/index.ts +2 -2
- package/src/locus-info/mediaSharesUtils.ts +16 -0
- package/src/media/index.ts +3 -1
- package/src/mediaQualityMetrics/config.ts +11 -1
- package/src/meeting/index.ts +264 -90
- package/src/meeting/muteState.ts +34 -20
- package/src/meeting/request.ts +18 -2
- package/src/meeting/util.ts +1 -0
- package/src/multistream/mediaRequestManager.ts +1 -1
- package/src/multistream/remoteMediaGroup.ts +1 -1
- package/src/multistream/remoteMediaManager.ts +1 -2
- package/src/multistream/sendSlotManager.ts +1 -2
- package/src/reachability/request.ts +15 -11
- package/src/reconnection-manager/index.ts +1 -1
- package/src/roap/index.ts +25 -3
- package/src/roap/request.ts +3 -3
- package/src/roap/turnDiscovery.ts +244 -78
- package/src/statsAnalyzer/index.ts +72 -43
- package/test/integration/spec/journey.js +14 -14
- package/test/integration/spec/space-meeting.js +1 -1
- package/test/unit/spec/interpretation/index.ts +4 -1
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +9 -0
- package/test/unit/spec/media/index.ts +89 -78
- package/test/unit/spec/meeting/index.js +611 -125
- package/test/unit/spec/meeting/muteState.js +219 -67
- package/test/unit/spec/meeting/request.js +21 -0
- package/test/unit/spec/meeting/utils.js +6 -1
- package/test/unit/spec/meetings/index.js +27 -20
- package/test/unit/spec/multistream/remoteMediaGroup.ts +0 -1
- package/test/unit/spec/multistream/remoteMediaManager.ts +0 -1
- package/test/unit/spec/reachability/request.js +15 -7
- package/test/unit/spec/reconnection-manager/index.js +28 -0
- package/test/unit/spec/roap/index.ts +61 -6
- package/test/unit/spec/roap/turnDiscovery.ts +298 -16
- package/test/unit/spec/stats-analyzer/index.js +183 -8
- package/dist/member/member.types.d.ts +0 -11
- package/dist/member/member.types.js +0 -17
- package/dist/member/member.types.js.map +0 -1
- package/src/member/member.types.ts +0 -13
package/dist/meeting/index.js
CHANGED
|
@@ -69,7 +69,6 @@ var _constants = require("../constants");
|
|
|
69
69
|
var _constants2 = _interopRequireDefault(require("../metrics/constants"));
|
|
70
70
|
var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
|
71
71
|
var _meetingInfoV = require("../meeting-info/meeting-info-v2");
|
|
72
|
-
var _browserDetection = _interopRequireDefault(require("../common/browser-detection"));
|
|
73
72
|
var _receiveSlotManager = require("../multistream/receiveSlotManager");
|
|
74
73
|
var _sendSlotManager = _interopRequireDefault(require("../multistream/sendSlotManager"));
|
|
75
74
|
var _mediaRequestManager = require("../multistream/mediaRequestManager");
|
|
@@ -92,8 +91,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
92
91
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
93
92
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } // @ts-ignore - Fix this
|
|
94
93
|
// @ts-ignore - Types not available for @webex/common
|
|
95
|
-
var _BrowserDetection = (0, _browserDetection.default)(),
|
|
96
|
-
isBrowser = _BrowserDetection.isBrowser;
|
|
97
94
|
var logRequest = function logRequest(request, _ref) {
|
|
98
95
|
var _ref$logText = _ref.logText,
|
|
99
96
|
logText = _ref$logText === void 0 ? '' : _ref$logText;
|
|
@@ -724,7 +721,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
724
721
|
}), {
|
|
725
722
|
logText: "".concat(LOG_HEADER, " Roap Offer")
|
|
726
723
|
}).catch(function () {
|
|
727
|
-
_this.deferSDPAnswer.reject();
|
|
724
|
+
_this.deferSDPAnswer.reject(new Error('failed to send ROAP SDP offer'));
|
|
728
725
|
clearTimeout(_this.sdpResponseTimer);
|
|
729
726
|
_this.sdpResponseTimer = undefined;
|
|
730
727
|
});
|
|
@@ -1001,6 +998,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1001
998
|
meetingId: _this.id
|
|
1002
999
|
}
|
|
1003
1000
|
});
|
|
1001
|
+
if (data.type === 'share') {
|
|
1002
|
+
// @ts-ignore
|
|
1003
|
+
_this.webex.internal.newMetrics.submitClientEvent({
|
|
1004
|
+
name: 'client.media.render.start',
|
|
1005
|
+
payload: {
|
|
1006
|
+
mediaType: 'share',
|
|
1007
|
+
shareInstanceId: _this.remoteShareInstanceId
|
|
1008
|
+
},
|
|
1009
|
+
options: {
|
|
1010
|
+
meetingId: _this.id
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1004
1014
|
});
|
|
1005
1015
|
_this.statsAnalyzer.on(_statsAnalyzer.EVENTS.REMOTE_MEDIA_STOPPED, function (data) {
|
|
1006
1016
|
// @ts-ignore
|
|
@@ -1014,6 +1024,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1014
1024
|
meetingId: _this.id
|
|
1015
1025
|
}
|
|
1016
1026
|
});
|
|
1027
|
+
if (data.type === 'share') {
|
|
1028
|
+
// @ts-ignore
|
|
1029
|
+
_this.webex.internal.newMetrics.submitClientEvent({
|
|
1030
|
+
name: 'client.media.render.stop',
|
|
1031
|
+
payload: {
|
|
1032
|
+
mediaType: 'share',
|
|
1033
|
+
shareInstanceId: _this.remoteShareInstanceId
|
|
1034
|
+
},
|
|
1035
|
+
options: {
|
|
1036
|
+
meetingId: _this.id
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1017
1040
|
});
|
|
1018
1041
|
});
|
|
1019
1042
|
/**
|
|
@@ -1941,11 +1964,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1941
1964
|
* helper class for managing remote streams
|
|
1942
1965
|
*/
|
|
1943
1966
|
_this.remoteMediaManager = null;
|
|
1944
|
-
_this.localAudioStreamMuteStateHandler = function (
|
|
1945
|
-
_this.audio.handleLocalStreamMuteStateChange((0, _assertThisInitialized2.default)(_this)
|
|
1967
|
+
_this.localAudioStreamMuteStateHandler = function () {
|
|
1968
|
+
_this.audio.handleLocalStreamMuteStateChange((0, _assertThisInitialized2.default)(_this));
|
|
1946
1969
|
};
|
|
1947
|
-
_this.localVideoStreamMuteStateHandler = function (
|
|
1948
|
-
_this.video.handleLocalStreamMuteStateChange((0, _assertThisInitialized2.default)(_this)
|
|
1970
|
+
_this.localVideoStreamMuteStateHandler = function () {
|
|
1971
|
+
_this.video.handleLocalStreamMuteStateChange((0, _assertThisInitialized2.default)(_this));
|
|
1949
1972
|
};
|
|
1950
1973
|
|
|
1951
1974
|
// The handling of output track changes should be done inside
|
|
@@ -3012,7 +3035,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3012
3035
|
function: 'triggerAnnotationInfoEvent'
|
|
3013
3036
|
}, _constants.EVENT_TRIGGERS.MEETING_UPDATE_ANNOTATION_INFO, {
|
|
3014
3037
|
annotationInfo: contentShare === null || contentShare === void 0 ? void 0 : contentShare.annotation,
|
|
3015
|
-
meetingId: this.id
|
|
3038
|
+
meetingId: this.id,
|
|
3039
|
+
resourceType: contentShare === null || contentShare === void 0 ? void 0 : contentShare.resourceType
|
|
3016
3040
|
});
|
|
3017
3041
|
}
|
|
3018
3042
|
}
|
|
@@ -3041,7 +3065,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3041
3065
|
previousContentShare = (_payload$previous = payload.previous) === null || _payload$previous === void 0 ? void 0 : _payload$previous.content;
|
|
3042
3066
|
previousWhiteboardShare = (_payload$previous2 = payload.previous) === null || _payload$previous2 === void 0 ? void 0 : _payload$previous2.whiteboard;
|
|
3043
3067
|
_this14.triggerAnnotationInfoEvent(contentShare, previousContentShare);
|
|
3044
|
-
if (!(contentShare.beneficiaryId === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.beneficiaryId) && contentShare.disposition === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.disposition) && contentShare.deviceUrlSharing === previousContentShare.deviceUrlSharing && whiteboardShare.beneficiaryId === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.beneficiaryId) && whiteboardShare.disposition === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.disposition) && whiteboardShare.resourceUrl === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.resourceUrl))) {
|
|
3068
|
+
if (!(contentShare.beneficiaryId === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.beneficiaryId) && contentShare.disposition === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.disposition) && contentShare.deviceUrlSharing === previousContentShare.deviceUrlSharing && whiteboardShare.beneficiaryId === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.beneficiaryId) && whiteboardShare.disposition === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.disposition) && whiteboardShare.resourceUrl === (previousWhiteboardShare === null || previousWhiteboardShare === void 0 ? void 0 : previousWhiteboardShare.resourceUrl) && contentShare.resourceType === (previousContentShare === null || previousContentShare === void 0 ? void 0 : previousContentShare.resourceType))) {
|
|
3045
3069
|
_context8.next = 6;
|
|
3046
3070
|
break;
|
|
3047
3071
|
}
|
|
@@ -3122,7 +3146,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3122
3146
|
memberId: contentShare.beneficiaryId,
|
|
3123
3147
|
url: contentShare.url,
|
|
3124
3148
|
shareInstanceId: _this14.remoteShareInstanceId,
|
|
3125
|
-
annotationInfo: contentShare.annotation
|
|
3149
|
+
annotationInfo: contentShare.annotation,
|
|
3150
|
+
resourceType: contentShare.resourceType
|
|
3126
3151
|
});
|
|
3127
3152
|
};
|
|
3128
3153
|
_context8.prev = 26;
|
|
@@ -3194,7 +3219,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3194
3219
|
memberId: contentShare.beneficiaryId,
|
|
3195
3220
|
url: contentShare.url,
|
|
3196
3221
|
shareInstanceId: _this14.remoteShareInstanceId,
|
|
3197
|
-
annotationInfo: contentShare.annotation
|
|
3222
|
+
annotationInfo: contentShare.annotation,
|
|
3223
|
+
resourceType: contentShare.resourceType
|
|
3198
3224
|
});
|
|
3199
3225
|
_this14.members.locusMediaSharesUpdate(payload);
|
|
3200
3226
|
} else if (newShareStatus === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE) {
|
|
@@ -3473,7 +3499,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3473
3499
|
}
|
|
3474
3500
|
});
|
|
3475
3501
|
}
|
|
3476
|
-
|
|
3502
|
+
_this19.updateLLMConnection();
|
|
3503
|
+
case 3:
|
|
3477
3504
|
case "end":
|
|
3478
3505
|
return _context9.stop();
|
|
3479
3506
|
}
|
|
@@ -3840,8 +3867,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3840
3867
|
}
|
|
3841
3868
|
this.owner = ((_locusMeetingObject6 = locusMeetingObject) === null || _locusMeetingObject6 === void 0 ? void 0 : _locusMeetingObject6.info.owner) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.owner) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.hostId) || this.owner;
|
|
3842
3869
|
this.permissionToken = meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.permissionToken;
|
|
3843
|
-
this.
|
|
3844
|
-
|
|
3870
|
+
if (this.permissionToken) {
|
|
3871
|
+
this.setPermissionTokenPayload(meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.permissionToken);
|
|
3872
|
+
this.setSelfUserPolicies();
|
|
3873
|
+
}
|
|
3845
3874
|
// Need to populate environment when sending CA event
|
|
3846
3875
|
this.environment = ((_locusMeetingObject7 = locusMeetingObject) === null || _locusMeetingObject7 === void 0 ? void 0 : _locusMeetingObject7.info.channel) || (meetingInfo === null || meetingInfo === void 0 ? void 0 : meetingInfo.channel);
|
|
3847
3876
|
}
|
|
@@ -4236,24 +4265,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4236
4265
|
while (1) switch (_context11.prev = _context11.next) {
|
|
4237
4266
|
case 0:
|
|
4238
4267
|
oldStream = this.mediaProperties.audioStream;
|
|
4239
|
-
oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.
|
|
4268
|
+
oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localAudioStreamMuteStateHandler);
|
|
4269
|
+
oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localAudioStreamMuteStateHandler);
|
|
4240
4270
|
oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
|
|
4241
4271
|
|
|
4242
4272
|
// we don't update this.mediaProperties.mediaDirection.sendAudio, because we always keep it as true to avoid extra SDP exchanges
|
|
4243
4273
|
this.mediaProperties.setLocalAudioStream(localStream);
|
|
4244
4274
|
this.audio.handleLocalStreamChange(this);
|
|
4245
|
-
localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.
|
|
4275
|
+
localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localAudioStreamMuteStateHandler);
|
|
4276
|
+
localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localAudioStreamMuteStateHandler);
|
|
4246
4277
|
localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
|
|
4247
4278
|
if (!(!this.isMultistream || !localStream)) {
|
|
4248
|
-
_context11.next =
|
|
4279
|
+
_context11.next = 12;
|
|
4249
4280
|
break;
|
|
4250
4281
|
}
|
|
4251
|
-
_context11.next = 10;
|
|
4252
|
-
return this.unpublishStream(_internalMediaCore.MediaType.AudioMain, oldStream);
|
|
4253
|
-
case 10:
|
|
4254
4282
|
_context11.next = 12;
|
|
4255
|
-
return this.
|
|
4283
|
+
return this.unpublishStream(_internalMediaCore.MediaType.AudioMain, oldStream);
|
|
4256
4284
|
case 12:
|
|
4285
|
+
_context11.next = 14;
|
|
4286
|
+
return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
|
|
4287
|
+
case 14:
|
|
4257
4288
|
case "end":
|
|
4258
4289
|
return _context11.stop();
|
|
4259
4290
|
}
|
|
@@ -4281,24 +4312,26 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4281
4312
|
while (1) switch (_context12.prev = _context12.next) {
|
|
4282
4313
|
case 0:
|
|
4283
4314
|
oldStream = this.mediaProperties.videoStream;
|
|
4284
|
-
oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.
|
|
4315
|
+
oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localVideoStreamMuteStateHandler);
|
|
4316
|
+
oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localVideoStreamMuteStateHandler);
|
|
4285
4317
|
oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
|
|
4286
4318
|
|
|
4287
4319
|
// we don't update this.mediaProperties.mediaDirection.sendVideo, because we always keep it as true to avoid extra SDP exchanges
|
|
4288
4320
|
this.mediaProperties.setLocalVideoStream(localStream);
|
|
4289
4321
|
this.video.handleLocalStreamChange(this);
|
|
4290
|
-
localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.
|
|
4322
|
+
localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localVideoStreamMuteStateHandler);
|
|
4323
|
+
localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localVideoStreamMuteStateHandler);
|
|
4291
4324
|
localStream === null || localStream === void 0 ? void 0 : localStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
|
|
4292
4325
|
if (!(!this.isMultistream || !localStream)) {
|
|
4293
|
-
_context12.next =
|
|
4326
|
+
_context12.next = 12;
|
|
4294
4327
|
break;
|
|
4295
4328
|
}
|
|
4296
|
-
_context12.next = 10;
|
|
4297
|
-
return this.unpublishStream(_internalMediaCore.MediaType.VideoMain, oldStream);
|
|
4298
|
-
case 10:
|
|
4299
4329
|
_context12.next = 12;
|
|
4300
|
-
return this.
|
|
4330
|
+
return this.unpublishStream(_internalMediaCore.MediaType.VideoMain, oldStream);
|
|
4301
4331
|
case 12:
|
|
4332
|
+
_context12.next = 14;
|
|
4333
|
+
return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
|
|
4334
|
+
case 14:
|
|
4302
4335
|
case "end":
|
|
4303
4336
|
return _context12.stop();
|
|
4304
4337
|
}
|
|
@@ -4327,11 +4360,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4327
4360
|
while (1) switch (_context13.prev = _context13.next) {
|
|
4328
4361
|
case 0:
|
|
4329
4362
|
oldStream = this.mediaProperties.shareVideoStream;
|
|
4330
|
-
oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.
|
|
4363
|
+
oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.handleShareVideoStreamMuteStateChange);
|
|
4331
4364
|
oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareVideoStreamEnded);
|
|
4332
4365
|
oldStream === null || oldStream === void 0 ? void 0 : oldStream.off(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
|
|
4333
4366
|
this.mediaProperties.setLocalShareVideoStream(localDisplayStream);
|
|
4334
|
-
localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.
|
|
4367
|
+
localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.handleShareVideoStreamMuteStateChange);
|
|
4335
4368
|
localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.StreamEventNames.Ended, this.handleShareVideoStreamEnded);
|
|
4336
4369
|
localDisplayStream === null || localDisplayStream === void 0 ? void 0 : localDisplayStream.on(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
|
|
4337
4370
|
this.mediaProperties.mediaDirection.sendShare = this.mediaProperties.hasLocalShareStream();
|
|
@@ -4437,13 +4470,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4437
4470
|
videoStream = _this$mediaProperties5.videoStream,
|
|
4438
4471
|
shareAudioStream = _this$mediaProperties5.shareAudioStream,
|
|
4439
4472
|
shareVideoStream = _this$mediaProperties5.shareVideoStream;
|
|
4440
|
-
audioStream === null || audioStream === void 0 ? void 0 : audioStream.off(_mediaHelpers.
|
|
4473
|
+
audioStream === null || audioStream === void 0 ? void 0 : audioStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localAudioStreamMuteStateHandler);
|
|
4474
|
+
audioStream === null || audioStream === void 0 ? void 0 : audioStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localAudioStreamMuteStateHandler);
|
|
4441
4475
|
audioStream === null || audioStream === void 0 ? void 0 : audioStream.off(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
|
|
4442
|
-
videoStream === null || videoStream === void 0 ? void 0 : videoStream.off(_mediaHelpers.
|
|
4476
|
+
videoStream === null || videoStream === void 0 ? void 0 : videoStream.off(_mediaHelpers.LocalStreamEventNames.UserMuteStateChange, this.localVideoStreamMuteStateHandler);
|
|
4477
|
+
videoStream === null || videoStream === void 0 ? void 0 : videoStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.localVideoStreamMuteStateHandler);
|
|
4443
4478
|
videoStream === null || videoStream === void 0 ? void 0 : videoStream.off(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
|
|
4444
4479
|
shareAudioStream === null || shareAudioStream === void 0 ? void 0 : shareAudioStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareAudioStreamEnded);
|
|
4445
4480
|
shareAudioStream === null || shareAudioStream === void 0 ? void 0 : shareAudioStream.off(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
|
|
4446
|
-
shareVideoStream === null || shareVideoStream === void 0 ? void 0 : shareVideoStream.off(_mediaHelpers.
|
|
4481
|
+
shareVideoStream === null || shareVideoStream === void 0 ? void 0 : shareVideoStream.off(_mediaHelpers.LocalStreamEventNames.SystemMuteStateChange, this.handleShareVideoStreamMuteStateChange);
|
|
4447
4482
|
shareVideoStream === null || shareVideoStream === void 0 ? void 0 : shareVideoStream.off(_mediaHelpers.StreamEventNames.Ended, this.handleShareVideoStreamEnded);
|
|
4448
4483
|
shareVideoStream === null || shareVideoStream === void 0 ? void 0 : shareVideoStream.off(_mediaHelpers.LocalStreamEventNames.OutputTrackChange, this.localOutputTrackChangeHandler);
|
|
4449
4484
|
this.mediaProperties.setLocalAudioStream(undefined);
|
|
@@ -4838,36 +4873,123 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4838
4873
|
*/
|
|
4839
4874
|
}, {
|
|
4840
4875
|
key: "joinWithMedia",
|
|
4841
|
-
value: function
|
|
4842
|
-
var
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4876
|
+
value: (function () {
|
|
4877
|
+
var _joinWithMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
|
|
4878
|
+
var options,
|
|
4879
|
+
mediaOptions,
|
|
4880
|
+
_options$joinOptions,
|
|
4881
|
+
joinOptions,
|
|
4882
|
+
joined,
|
|
4883
|
+
turnServerInfo,
|
|
4884
|
+
turnDiscoverySkippedReason,
|
|
4885
|
+
turnDiscoveryRequest,
|
|
4886
|
+
joinResponse,
|
|
4887
|
+
_yield$this$roap$hand,
|
|
4888
|
+
mediaResponse,
|
|
4889
|
+
_this$locusUrl,
|
|
4890
|
+
_leaveError,
|
|
4891
|
+
leaveError,
|
|
4892
|
+
_args15 = arguments;
|
|
4893
|
+
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
4894
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
4895
|
+
case 0:
|
|
4896
|
+
options = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
|
|
4897
|
+
mediaOptions = options.mediaOptions, _options$joinOptions = options.joinOptions, joinOptions = _options$joinOptions === void 0 ? {} : _options$joinOptions;
|
|
4898
|
+
if (mediaOptions !== null && mediaOptions !== void 0 && mediaOptions.allowMediaInLobby) {
|
|
4899
|
+
_context15.next = 4;
|
|
4900
|
+
break;
|
|
4901
|
+
}
|
|
4902
|
+
return _context15.abrupt("return", _promise.default.reject(new _parameter.default('joinWithMedia() can only be used with allowMediaInLobby set to true')));
|
|
4903
|
+
case 4:
|
|
4904
|
+
this.allowMediaInLobby = true;
|
|
4905
|
+
_loggerProxy.default.logger.info('Meeting:index#joinWithMedia called');
|
|
4906
|
+
joined = false;
|
|
4907
|
+
_context15.prev = 7;
|
|
4908
|
+
_context15.next = 10;
|
|
4909
|
+
return this.webex.meetings.reachability.getReachabilityResults();
|
|
4910
|
+
case 10:
|
|
4911
|
+
joinOptions.reachability = _context15.sent;
|
|
4912
|
+
_context15.next = 13;
|
|
4913
|
+
return this.roap.generateTurnDiscoveryRequestMessage(this, true);
|
|
4914
|
+
case 13:
|
|
4915
|
+
turnDiscoveryRequest = _context15.sent;
|
|
4916
|
+
turnDiscoverySkippedReason = turnDiscoveryRequest.turnDiscoverySkippedReason;
|
|
4917
|
+
joinOptions.roapMessage = turnDiscoveryRequest.roapMessage;
|
|
4918
|
+
_context15.next = 18;
|
|
4919
|
+
return this.join(joinOptions);
|
|
4920
|
+
case 18:
|
|
4921
|
+
joinResponse = _context15.sent;
|
|
4922
|
+
joined = true;
|
|
4923
|
+
if (!joinOptions.roapMessage) {
|
|
4924
|
+
_context15.next = 29;
|
|
4925
|
+
break;
|
|
4926
|
+
}
|
|
4927
|
+
_context15.next = 23;
|
|
4928
|
+
return this.roap.handleTurnDiscoveryHttpResponse(this, joinResponse);
|
|
4929
|
+
case 23:
|
|
4930
|
+
_yield$this$roap$hand = _context15.sent;
|
|
4931
|
+
turnServerInfo = _yield$this$roap$hand.turnServerInfo;
|
|
4932
|
+
turnDiscoverySkippedReason = _yield$this$roap$hand.turnDiscoverySkippedReason;
|
|
4933
|
+
this.turnDiscoverySkippedReason = turnDiscoverySkippedReason;
|
|
4934
|
+
this.turnServerUsed = !!turnServerInfo;
|
|
4935
|
+
if (turnServerInfo === undefined) {
|
|
4936
|
+
this.roap.abortTurnDiscovery();
|
|
4937
|
+
}
|
|
4938
|
+
case 29:
|
|
4939
|
+
_context15.next = 31;
|
|
4940
|
+
return this.addMedia(mediaOptions, turnServerInfo);
|
|
4941
|
+
case 31:
|
|
4942
|
+
mediaResponse = _context15.sent;
|
|
4943
|
+
return _context15.abrupt("return", {
|
|
4944
|
+
join: joinResponse,
|
|
4945
|
+
media: mediaResponse
|
|
4946
|
+
});
|
|
4947
|
+
case 35:
|
|
4948
|
+
_context15.prev = 35;
|
|
4949
|
+
_context15.t0 = _context15["catch"](7);
|
|
4950
|
+
_loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', _context15.t0);
|
|
4951
|
+
this.roap.abortTurnDiscovery();
|
|
4952
|
+
if (!joined) {
|
|
4953
|
+
_context15.next = 49;
|
|
4954
|
+
break;
|
|
4955
|
+
}
|
|
4956
|
+
_context15.prev = 40;
|
|
4957
|
+
_context15.next = 43;
|
|
4958
|
+
return this.leave({
|
|
4959
|
+
resourceId: joinOptions === null || joinOptions === void 0 ? void 0 : joinOptions.resourceId,
|
|
4960
|
+
reason: 'joinWithMedia failure'
|
|
4961
|
+
});
|
|
4962
|
+
case 43:
|
|
4963
|
+
_context15.next = 49;
|
|
4964
|
+
break;
|
|
4965
|
+
case 45:
|
|
4966
|
+
_context15.prev = 45;
|
|
4967
|
+
_context15.t1 = _context15["catch"](40);
|
|
4968
|
+
_loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> leave error', _context15.t1);
|
|
4969
|
+
leaveError = _context15.t1;
|
|
4970
|
+
case 49:
|
|
4971
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
|
|
4972
|
+
correlation_id: this.correlationId,
|
|
4973
|
+
locus_id: (_this$locusUrl = this.locusUrl) === null || _this$locusUrl === void 0 ? void 0 : _this$locusUrl.split('/').pop(),
|
|
4974
|
+
// if join fails, we may end up with no locusUrl
|
|
4975
|
+
reason: _context15.t0.message,
|
|
4976
|
+
stack: _context15.t0.stack,
|
|
4977
|
+
leaveErrorReason: (_leaveError = leaveError) === null || _leaveError === void 0 ? void 0 : _leaveError.message
|
|
4978
|
+
}, {
|
|
4979
|
+
type: _context15.t0.name
|
|
4980
|
+
});
|
|
4981
|
+
throw _context15.t0;
|
|
4982
|
+
case 51:
|
|
4983
|
+
case "end":
|
|
4984
|
+
return _context15.stop();
|
|
4985
|
+
}
|
|
4986
|
+
}, _callee15, this, [[7, 35], [40, 45]]);
|
|
4987
|
+
}));
|
|
4988
|
+
function joinWithMedia() {
|
|
4989
|
+
return _joinWithMedia.apply(this, arguments);
|
|
4848
4990
|
}
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
return _this28.addMedia(mediaOptions).then(function (mediaResponse) {
|
|
4852
|
-
return {
|
|
4853
|
-
join: joinResponse,
|
|
4854
|
-
media: mediaResponse
|
|
4855
|
-
};
|
|
4856
|
-
});
|
|
4857
|
-
}).catch(function (error) {
|
|
4858
|
-
_loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', error);
|
|
4859
|
-
_metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
|
|
4860
|
-
correlation_id: _this28.correlationId,
|
|
4861
|
-
locus_id: _this28.locusUrl.split('/').pop(),
|
|
4862
|
-
reason: error.message,
|
|
4863
|
-
stack: error.stack
|
|
4864
|
-
}, {
|
|
4865
|
-
type: error.name
|
|
4866
|
-
});
|
|
4867
|
-
return _promise.default.reject(error);
|
|
4868
|
-
});
|
|
4869
|
-
}
|
|
4870
|
-
|
|
4991
|
+
return joinWithMedia;
|
|
4992
|
+
}()
|
|
4871
4993
|
/**
|
|
4872
4994
|
* Initiates the reconnection of the media in the meeting
|
|
4873
4995
|
*
|
|
@@ -4876,10 +4998,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4876
4998
|
* @public
|
|
4877
4999
|
* @memberof Meeting
|
|
4878
5000
|
*/
|
|
5001
|
+
)
|
|
4879
5002
|
}, {
|
|
4880
5003
|
key: "reconnect",
|
|
4881
5004
|
value: function reconnect(options) {
|
|
4882
|
-
var
|
|
5005
|
+
var _this28 = this;
|
|
4883
5006
|
_loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
|
|
4884
5007
|
if (!this.reconnectionManager || !this.reconnectionManager.reconnect) {
|
|
4885
5008
|
return _promise.default.reject(new _parameter.default('Cannot reconnect, ReconnectionManager must first be defined.'));
|
|
@@ -4907,29 +5030,29 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4907
5030
|
function: 'reconnect'
|
|
4908
5031
|
}, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING);
|
|
4909
5032
|
return this.reconnectionManager.reconnect(options).then(function () {
|
|
4910
|
-
return
|
|
5033
|
+
return _this28.waitForRemoteSDPAnswer();
|
|
4911
5034
|
}).then(function () {
|
|
4912
|
-
return
|
|
5035
|
+
return _this28.waitForMediaConnectionConnected();
|
|
4913
5036
|
}).then(function () {
|
|
4914
|
-
_triggerProxy.default.trigger(
|
|
5037
|
+
_triggerProxy.default.trigger(_this28, {
|
|
4915
5038
|
file: 'meeting/index',
|
|
4916
5039
|
function: 'reconnect'
|
|
4917
5040
|
}, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_SUCCESS);
|
|
4918
5041
|
_loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
|
|
4919
5042
|
|
|
4920
5043
|
// @ts-ignore
|
|
4921
|
-
|
|
5044
|
+
_this28.webex.internal.newMetrics.submitClientEvent({
|
|
4922
5045
|
name: 'client.media.recovered',
|
|
4923
5046
|
payload: {
|
|
4924
5047
|
recoveredBy: 'new'
|
|
4925
5048
|
},
|
|
4926
5049
|
options: {
|
|
4927
|
-
meetingId:
|
|
5050
|
+
meetingId: _this28.id
|
|
4928
5051
|
}
|
|
4929
5052
|
});
|
|
4930
|
-
|
|
5053
|
+
_this28.reconnectionManager.setStatus(_constants.RECONNECTION.STATE.COMPLETE);
|
|
4931
5054
|
}).catch(function (error) {
|
|
4932
|
-
_triggerProxy.default.trigger(
|
|
5055
|
+
_triggerProxy.default.trigger(_this28, {
|
|
4933
5056
|
file: 'meeting/index',
|
|
4934
5057
|
function: 'reconnect'
|
|
4935
5058
|
}, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_FAILURE, {
|
|
@@ -4937,18 +5060,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4937
5060
|
});
|
|
4938
5061
|
_loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
|
|
4939
5062
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_RECONNECT_FAILURE, {
|
|
4940
|
-
correlation_id:
|
|
4941
|
-
locus_id:
|
|
5063
|
+
correlation_id: _this28.correlationId,
|
|
5064
|
+
locus_id: _this28.locusUrl.split('/').pop(),
|
|
4942
5065
|
reason: error.message,
|
|
4943
5066
|
stack: error.stack
|
|
4944
5067
|
});
|
|
4945
|
-
|
|
5068
|
+
_this28.uploadLogs({
|
|
4946
5069
|
file: 'meeting/index',
|
|
4947
5070
|
function: 'reconnect'
|
|
4948
5071
|
});
|
|
4949
5072
|
return _promise.default.reject(new _reconnection.default('Reconnection failure event', error));
|
|
4950
5073
|
}).finally(function () {
|
|
4951
|
-
|
|
5074
|
+
_this28.reconnectionManager.reset();
|
|
4952
5075
|
});
|
|
4953
5076
|
}
|
|
4954
5077
|
|
|
@@ -4991,19 +5114,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4991
5114
|
}, {
|
|
4992
5115
|
key: "setCaptionLanguage",
|
|
4993
5116
|
value: function setCaptionLanguage(language) {
|
|
4994
|
-
var
|
|
5117
|
+
var _this29 = this;
|
|
4995
5118
|
return new _promise.default(function (resolve, reject) {
|
|
4996
|
-
if (!
|
|
5119
|
+
if (!_this29.isTranscriptionSupported()) {
|
|
4997
5120
|
_loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
|
|
4998
5121
|
reject(new Error('Webex Assistant is not enabled/supported'));
|
|
4999
5122
|
}
|
|
5000
5123
|
try {
|
|
5001
5124
|
var voiceaListenerCaptionUpdate = function voiceaListenerCaptionUpdate(payload) {
|
|
5002
5125
|
// @ts-ignore
|
|
5003
|
-
|
|
5126
|
+
_this29.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
|
|
5004
5127
|
var statusCode = payload.statusCode;
|
|
5005
5128
|
if (statusCode === 200) {
|
|
5006
|
-
|
|
5129
|
+
_this29.transcription.languageOptions = _objectSpread(_objectSpread({}, _this29.transcription.languageOptions), {}, {
|
|
5007
5130
|
currentCaptionLanguage: language
|
|
5008
5131
|
});
|
|
5009
5132
|
resolve(language);
|
|
@@ -5012,9 +5135,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5012
5135
|
}
|
|
5013
5136
|
};
|
|
5014
5137
|
// @ts-ignore
|
|
5015
|
-
|
|
5138
|
+
_this29.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.CAPTION_LANGUAGE_UPDATE, voiceaListenerCaptionUpdate);
|
|
5016
5139
|
// @ts-ignore
|
|
5017
|
-
|
|
5140
|
+
_this29.webex.internal.voicea.requestLanguage(language);
|
|
5018
5141
|
} catch (error) {
|
|
5019
5142
|
_loggerProxy.default.logger.error("Meeting:index#setCaptionLanguage --> ".concat(error));
|
|
5020
5143
|
reject(error);
|
|
@@ -5030,19 +5153,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5030
5153
|
}, {
|
|
5031
5154
|
key: "setSpokenLanguage",
|
|
5032
5155
|
value: function setSpokenLanguage(language) {
|
|
5033
|
-
var
|
|
5156
|
+
var _this30 = this;
|
|
5034
5157
|
return new _promise.default(function (resolve, reject) {
|
|
5035
|
-
if (!
|
|
5158
|
+
if (!_this30.isTranscriptionSupported()) {
|
|
5036
5159
|
_loggerProxy.default.logger.error('Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported');
|
|
5037
5160
|
reject(new Error('Webex Assistant is not enabled/supported'));
|
|
5038
5161
|
}
|
|
5039
5162
|
try {
|
|
5040
5163
|
var voiceaListenerLanguageUpdate = function voiceaListenerLanguageUpdate(payload) {
|
|
5041
5164
|
// @ts-ignore
|
|
5042
|
-
|
|
5165
|
+
_this30.webex.internal.voicea.off(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
|
|
5043
5166
|
var languageCode = payload.languageCode;
|
|
5044
5167
|
if (languageCode) {
|
|
5045
|
-
|
|
5168
|
+
_this30.transcription.languageOptions = _objectSpread(_objectSpread({}, _this30.transcription.languageOptions), {}, {
|
|
5046
5169
|
currentSpokenLanguage: languageCode
|
|
5047
5170
|
});
|
|
5048
5171
|
resolve(languageCode);
|
|
@@ -5052,10 +5175,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5052
5175
|
};
|
|
5053
5176
|
|
|
5054
5177
|
// @ts-ignore
|
|
5055
|
-
|
|
5178
|
+
_this30.webex.internal.voicea.on(_internalPluginVoicea.EVENT_TRIGGERS.SPOKEN_LANGUAGE_UPDATE, voiceaListenerLanguageUpdate);
|
|
5056
5179
|
|
|
5057
5180
|
// @ts-ignore
|
|
5058
|
-
|
|
5181
|
+
_this30.webex.internal.voicea.setSpokenLanguage(language);
|
|
5059
5182
|
} catch (error) {
|
|
5060
5183
|
_loggerProxy.default.logger.error("Meeting:index#setSpokenLanguage --> ".concat(error));
|
|
5061
5184
|
reject(error);
|
|
@@ -5072,48 +5195,48 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5072
5195
|
}, {
|
|
5073
5196
|
key: "startTranscription",
|
|
5074
5197
|
value: (function () {
|
|
5075
|
-
var _startTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
5076
|
-
return _regenerator.default.wrap(function
|
|
5077
|
-
while (1) switch (
|
|
5198
|
+
var _startTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(options) {
|
|
5199
|
+
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
5200
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
5078
5201
|
case 0:
|
|
5079
5202
|
if (!this.isJoined()) {
|
|
5080
|
-
|
|
5203
|
+
_context16.next = 15;
|
|
5081
5204
|
break;
|
|
5082
5205
|
}
|
|
5083
5206
|
_loggerProxy.default.logger.info('Meeting:index#startTranscription --> Attempting to enable transcription!');
|
|
5084
|
-
|
|
5207
|
+
_context16.prev = 2;
|
|
5085
5208
|
if (!this.areVoiceaEventsSetup) {
|
|
5086
5209
|
this.setUpVoiceaListeners();
|
|
5087
5210
|
}
|
|
5088
5211
|
if (!(this.getCurUserType() === 'host')) {
|
|
5089
|
-
|
|
5212
|
+
_context16.next = 7;
|
|
5090
5213
|
break;
|
|
5091
5214
|
}
|
|
5092
|
-
|
|
5215
|
+
_context16.next = 7;
|
|
5093
5216
|
return this.webex.internal.voicea.toggleTranscribing(true, options === null || options === void 0 ? void 0 : options.spokenLanguage);
|
|
5094
5217
|
case 7:
|
|
5095
|
-
|
|
5218
|
+
_context16.next = 13;
|
|
5096
5219
|
break;
|
|
5097
5220
|
case 9:
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
_loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(
|
|
5221
|
+
_context16.prev = 9;
|
|
5222
|
+
_context16.t0 = _context16["catch"](2);
|
|
5223
|
+
_loggerProxy.default.logger.error("Meeting:index#startTranscription --> ".concat(_context16.t0));
|
|
5101
5224
|
_metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
|
|
5102
5225
|
correlation_id: this.correlationId,
|
|
5103
|
-
reason:
|
|
5104
|
-
stack:
|
|
5226
|
+
reason: _context16.t0.message,
|
|
5227
|
+
stack: _context16.t0.stack
|
|
5105
5228
|
});
|
|
5106
5229
|
case 13:
|
|
5107
|
-
|
|
5230
|
+
_context16.next = 17;
|
|
5108
5231
|
break;
|
|
5109
5232
|
case 15:
|
|
5110
5233
|
_loggerProxy.default.logger.error("Meeting:index#startTranscription --> meeting joined : ".concat(this.isJoined()));
|
|
5111
5234
|
throw new Error('Meeting is not joined');
|
|
5112
5235
|
case 17:
|
|
5113
5236
|
case "end":
|
|
5114
|
-
return
|
|
5237
|
+
return _context16.stop();
|
|
5115
5238
|
}
|
|
5116
|
-
},
|
|
5239
|
+
}, _callee16, this, [[2, 9]]);
|
|
5117
5240
|
}));
|
|
5118
5241
|
function startTranscription(_x15) {
|
|
5119
5242
|
return _startTranscription.apply(this, arguments);
|
|
@@ -5176,8 +5299,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5176
5299
|
}, {
|
|
5177
5300
|
key: "join",
|
|
5178
5301
|
value: (function () {
|
|
5179
|
-
var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
5180
|
-
var
|
|
5302
|
+
var _join = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
|
|
5303
|
+
var _this31 = this;
|
|
5181
5304
|
var options,
|
|
5182
5305
|
errorMessage,
|
|
5183
5306
|
error,
|
|
@@ -5187,25 +5310,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5187
5310
|
_error,
|
|
5188
5311
|
_errorMessage2,
|
|
5189
5312
|
_error2,
|
|
5190
|
-
|
|
5191
|
-
return _regenerator.default.wrap(function
|
|
5192
|
-
while (1) switch (
|
|
5313
|
+
_args17 = arguments;
|
|
5314
|
+
return _regenerator.default.wrap(function _callee17$(_context17) {
|
|
5315
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
5193
5316
|
case 0:
|
|
5194
|
-
options =
|
|
5317
|
+
options = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
|
|
5195
5318
|
if (this.webex.meetings.registered) {
|
|
5196
|
-
|
|
5319
|
+
_context17.next = 6;
|
|
5197
5320
|
break;
|
|
5198
5321
|
}
|
|
5199
5322
|
errorMessage = 'Meeting:index#join --> Device not registered';
|
|
5200
5323
|
error = new Error(errorMessage);
|
|
5201
5324
|
_loggerProxy.default.logger.error(errorMessage);
|
|
5202
|
-
return
|
|
5325
|
+
return _context17.abrupt("return", _promise.default.reject(error));
|
|
5203
5326
|
case 6:
|
|
5204
5327
|
if (!this.deferJoin) {
|
|
5205
|
-
|
|
5328
|
+
_context17.next = 8;
|
|
5206
5329
|
break;
|
|
5207
5330
|
}
|
|
5208
|
-
return
|
|
5331
|
+
return _context17.abrupt("return", this.deferJoin);
|
|
5209
5332
|
case 8:
|
|
5210
5333
|
// Create a deferred promise for a consistent resolve value from utils.
|
|
5211
5334
|
// This also prevents redundant API calls.
|
|
@@ -5254,15 +5377,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5254
5377
|
this.wirelessShare = true;
|
|
5255
5378
|
}
|
|
5256
5379
|
if (!options.meetingQuality) {
|
|
5257
|
-
|
|
5380
|
+
_context17.next = 36;
|
|
5258
5381
|
break;
|
|
5259
5382
|
}
|
|
5260
5383
|
if (!(typeof options.meetingQuality === 'string')) {
|
|
5261
|
-
|
|
5384
|
+
_context17.next = 27;
|
|
5262
5385
|
break;
|
|
5263
5386
|
}
|
|
5264
5387
|
if (_constants.QUALITY_LEVELS[options.meetingQuality]) {
|
|
5265
|
-
|
|
5388
|
+
_context17.next = 26;
|
|
5266
5389
|
break;
|
|
5267
5390
|
}
|
|
5268
5391
|
_errorMessage = "Meeting:index#join --> ".concat(options.meetingQuality, " not defined");
|
|
@@ -5270,16 +5393,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5270
5393
|
_loggerProxy.default.logger.error(_errorMessage);
|
|
5271
5394
|
joinFailed(_error);
|
|
5272
5395
|
this.deferJoin = undefined;
|
|
5273
|
-
return
|
|
5396
|
+
return _context17.abrupt("return", _promise.default.reject(_error));
|
|
5274
5397
|
case 26:
|
|
5275
5398
|
this.mediaProperties.setRemoteQualityLevel(options.meetingQuality);
|
|
5276
5399
|
case 27:
|
|
5277
5400
|
if (!((0, _typeof2.default)(options.meetingQuality) === 'object')) {
|
|
5278
|
-
|
|
5401
|
+
_context17.next = 36;
|
|
5279
5402
|
break;
|
|
5280
5403
|
}
|
|
5281
5404
|
if (_constants.QUALITY_LEVELS[options.meetingQuality.remote]) {
|
|
5282
|
-
|
|
5405
|
+
_context17.next = 35;
|
|
5283
5406
|
break;
|
|
5284
5407
|
}
|
|
5285
5408
|
_errorMessage2 = "Meeting:index#join --> ".concat(options.meetingQuality.remote, " not defined");
|
|
@@ -5287,97 +5410,97 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5287
5410
|
_error2 = new Error(_errorMessage2);
|
|
5288
5411
|
joinFailed(_error2);
|
|
5289
5412
|
this.deferJoin = undefined;
|
|
5290
|
-
return
|
|
5413
|
+
return _context17.abrupt("return", _promise.default.reject(new Error(_errorMessage2)));
|
|
5291
5414
|
case 35:
|
|
5292
5415
|
if (options.meetingQuality.remote) {
|
|
5293
5416
|
this.mediaProperties.setRemoteQualityLevel(options.meetingQuality.remote);
|
|
5294
5417
|
}
|
|
5295
5418
|
case 36:
|
|
5296
5419
|
this.isMultistream = !!options.enableMultistream;
|
|
5297
|
-
|
|
5298
|
-
|
|
5420
|
+
_context17.prev = 37;
|
|
5421
|
+
_context17.next = 40;
|
|
5299
5422
|
return this.checkAndRefreshPermissionToken(_constants.MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC, _constants.MEETING_PERMISSION_TOKEN_REFRESH_REASON);
|
|
5300
5423
|
case 40:
|
|
5301
|
-
|
|
5424
|
+
_context17.next = 51;
|
|
5302
5425
|
break;
|
|
5303
5426
|
case 42:
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
_loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:',
|
|
5307
|
-
if (!(
|
|
5308
|
-
|
|
5427
|
+
_context17.prev = 42;
|
|
5428
|
+
_context17.t0 = _context17["catch"](37);
|
|
5429
|
+
_loggerProxy.default.logger.error('Meeting:index#join --> Failed to refresh permission token:', _context17.t0);
|
|
5430
|
+
if (!(_context17.t0 instanceof _captchaError.default || _context17.t0 instanceof _passwordError.default || _context17.t0 instanceof _permission.default)) {
|
|
5431
|
+
_context17.next = 51;
|
|
5309
5432
|
break;
|
|
5310
5433
|
}
|
|
5311
|
-
this.meetingFiniteStateMachine.fail(
|
|
5434
|
+
this.meetingFiniteStateMachine.fail(_context17.t0);
|
|
5312
5435
|
|
|
5313
5436
|
// Upload logs on refreshpermissionToken refresh Failure
|
|
5314
5437
|
_triggerProxy.default.trigger(this, {
|
|
5315
5438
|
file: 'meeting/index',
|
|
5316
5439
|
function: 'join'
|
|
5317
5440
|
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
|
|
5318
|
-
joinFailed(
|
|
5441
|
+
joinFailed(_context17.t0);
|
|
5319
5442
|
this.deferJoin = undefined;
|
|
5320
5443
|
|
|
5321
5444
|
// if refresh permission token requires captcha, password or permission, we are throwing the errors
|
|
5322
5445
|
// and bubble it up to client
|
|
5323
|
-
return
|
|
5446
|
+
return _context17.abrupt("return", _promise.default.reject(_context17.t0));
|
|
5324
5447
|
case 51:
|
|
5325
|
-
return
|
|
5326
|
-
|
|
5448
|
+
return _context17.abrupt("return", _util.default.joinMeetingOptions(this, options).then(function (join) {
|
|
5449
|
+
_this31.meetingFiniteStateMachine.join();
|
|
5327
5450
|
_loggerProxy.default.logger.log('Meeting:index#join --> Success');
|
|
5328
5451
|
_metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
|
|
5329
|
-
correlation_id:
|
|
5452
|
+
correlation_id: _this31.correlationId
|
|
5330
5453
|
});
|
|
5331
5454
|
joinSuccess(join);
|
|
5332
|
-
|
|
5455
|
+
_this31.deferJoin = undefined;
|
|
5333
5456
|
return join;
|
|
5334
5457
|
}).catch(function (error) {
|
|
5335
|
-
var
|
|
5336
|
-
|
|
5458
|
+
var _this31$meetingInfo, _error$error;
|
|
5459
|
+
_this31.meetingFiniteStateMachine.fail(error);
|
|
5337
5460
|
_loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
|
|
5338
5461
|
|
|
5339
5462
|
// @ts-ignore
|
|
5340
|
-
|
|
5463
|
+
_this31.webex.internal.newMetrics.submitClientEvent({
|
|
5341
5464
|
name: 'client.locus.join.response',
|
|
5342
5465
|
payload: {
|
|
5343
5466
|
identifiers: {
|
|
5344
|
-
meetingLookupUrl: (
|
|
5467
|
+
meetingLookupUrl: (_this31$meetingInfo = _this31.meetingInfo) === null || _this31$meetingInfo === void 0 ? void 0 : _this31$meetingInfo.meetingLookupUrl
|
|
5345
5468
|
}
|
|
5346
5469
|
},
|
|
5347
5470
|
options: {
|
|
5348
|
-
meetingId:
|
|
5471
|
+
meetingId: _this31.id,
|
|
5349
5472
|
rawError: error
|
|
5350
5473
|
}
|
|
5351
5474
|
});
|
|
5352
5475
|
|
|
5353
5476
|
// TODO: change this to error codes and pre defined dictionary
|
|
5354
5477
|
_metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
|
|
5355
|
-
correlation_id:
|
|
5478
|
+
correlation_id: _this31.correlationId,
|
|
5356
5479
|
reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
|
|
5357
5480
|
stack: error.stack
|
|
5358
5481
|
});
|
|
5359
5482
|
|
|
5360
5483
|
// Upload logs on join Failure
|
|
5361
|
-
_triggerProxy.default.trigger(
|
|
5484
|
+
_triggerProxy.default.trigger(_this31, {
|
|
5362
5485
|
file: 'meeting/index',
|
|
5363
5486
|
function: 'join'
|
|
5364
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
5487
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this31);
|
|
5365
5488
|
joinFailed(error);
|
|
5366
|
-
|
|
5489
|
+
_this31.deferJoin = undefined;
|
|
5367
5490
|
return _promise.default.reject(error);
|
|
5368
5491
|
}).then(function (join) {
|
|
5369
5492
|
// @ts-ignore - config coming from registerPlugin
|
|
5370
|
-
if (
|
|
5371
|
-
|
|
5493
|
+
if (_this31.config.enableAutomaticLLM) {
|
|
5494
|
+
_this31.updateLLMConnection().catch(function (error) {
|
|
5372
5495
|
_loggerProxy.default.logger.error('Meeting:index#join --> Transcription Socket Connection Failed', error);
|
|
5373
5496
|
_metrics.default.sendBehavioralMetric(_constants2.default.LLM_CONNECTION_AFTER_JOIN_FAILURE, {
|
|
5374
|
-
correlation_id:
|
|
5497
|
+
correlation_id: _this31.correlationId,
|
|
5375
5498
|
reason: error === null || error === void 0 ? void 0 : error.message,
|
|
5376
5499
|
stack: error.stack
|
|
5377
5500
|
});
|
|
5378
5501
|
}).then(function () {
|
|
5379
5502
|
_loggerProxy.default.logger.info('Meeting:index#join --> Transcription Socket Connection Success');
|
|
5380
|
-
_triggerProxy.default.trigger(
|
|
5503
|
+
_triggerProxy.default.trigger(_this31, {
|
|
5381
5504
|
file: 'meeting/index',
|
|
5382
5505
|
function: 'join'
|
|
5383
5506
|
}, _constants.EVENT_TRIGGERS.MEETING_TRANSCRIPTION_CONNECTED, undefined);
|
|
@@ -5387,9 +5510,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5387
5510
|
}));
|
|
5388
5511
|
case 52:
|
|
5389
5512
|
case "end":
|
|
5390
|
-
return
|
|
5513
|
+
return _context17.stop();
|
|
5391
5514
|
}
|
|
5392
|
-
},
|
|
5515
|
+
}, _callee17, this, [[37, 42]]);
|
|
5393
5516
|
}));
|
|
5394
5517
|
function join() {
|
|
5395
5518
|
return _join.apply(this, arguments);
|
|
@@ -5406,50 +5529,50 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5406
5529
|
}, {
|
|
5407
5530
|
key: "updateLLMConnection",
|
|
5408
5531
|
value: (function () {
|
|
5409
|
-
var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
5410
|
-
var
|
|
5532
|
+
var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18() {
|
|
5533
|
+
var _this32 = this;
|
|
5411
5534
|
var _this$locusInfo6, url, _this$locusInfo6$info, _this$locusInfo6$info2, datachannelUrl, isJoined;
|
|
5412
|
-
return _regenerator.default.wrap(function
|
|
5413
|
-
while (1) switch (
|
|
5535
|
+
return _regenerator.default.wrap(function _callee18$(_context18) {
|
|
5536
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
5414
5537
|
case 0:
|
|
5415
5538
|
// @ts-ignore - Fix type
|
|
5416
5539
|
_this$locusInfo6 = this.locusInfo, url = _this$locusInfo6.url, _this$locusInfo6$info = _this$locusInfo6.info, _this$locusInfo6$info2 = _this$locusInfo6$info === void 0 ? {} : _this$locusInfo6$info, datachannelUrl = _this$locusInfo6$info2.datachannelUrl;
|
|
5417
5540
|
isJoined = this.isJoined(); // @ts-ignore - Fix type
|
|
5418
5541
|
if (!this.webex.internal.llm.isConnected()) {
|
|
5419
|
-
|
|
5542
|
+
_context18.next = 8;
|
|
5420
5543
|
break;
|
|
5421
5544
|
}
|
|
5422
5545
|
if (!(url === this.webex.internal.llm.getLocusUrl() && isJoined)) {
|
|
5423
|
-
|
|
5546
|
+
_context18.next = 5;
|
|
5424
5547
|
break;
|
|
5425
5548
|
}
|
|
5426
|
-
return
|
|
5549
|
+
return _context18.abrupt("return", undefined);
|
|
5427
5550
|
case 5:
|
|
5428
|
-
|
|
5551
|
+
_context18.next = 7;
|
|
5429
5552
|
return this.webex.internal.llm.disconnectLLM();
|
|
5430
5553
|
case 7:
|
|
5431
5554
|
// @ts-ignore - Fix type
|
|
5432
5555
|
this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
|
|
5433
5556
|
case 8:
|
|
5434
5557
|
if (isJoined) {
|
|
5435
|
-
|
|
5558
|
+
_context18.next = 10;
|
|
5436
5559
|
break;
|
|
5437
5560
|
}
|
|
5438
|
-
return
|
|
5561
|
+
return _context18.abrupt("return", undefined);
|
|
5439
5562
|
case 10:
|
|
5440
|
-
return
|
|
5563
|
+
return _context18.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl).then(function (registerAndConnectResult) {
|
|
5441
5564
|
// @ts-ignore - Fix type
|
|
5442
|
-
|
|
5565
|
+
_this32.webex.internal.llm.off('event:relay.event', _this32.processRelayEvent);
|
|
5443
5566
|
// @ts-ignore - Fix type
|
|
5444
|
-
|
|
5567
|
+
_this32.webex.internal.llm.on('event:relay.event', _this32.processRelayEvent);
|
|
5445
5568
|
_loggerProxy.default.logger.info('Meeting:index#updateLLMConnection --> enabled to receive relay events!');
|
|
5446
5569
|
return _promise.default.resolve(registerAndConnectResult);
|
|
5447
5570
|
}));
|
|
5448
5571
|
case 11:
|
|
5449
5572
|
case "end":
|
|
5450
|
-
return
|
|
5573
|
+
return _context18.stop();
|
|
5451
5574
|
}
|
|
5452
|
-
},
|
|
5575
|
+
}, _callee18, this);
|
|
5453
5576
|
}));
|
|
5454
5577
|
function updateLLMConnection() {
|
|
5455
5578
|
return _updateLLMConnection.apply(this, arguments);
|
|
@@ -5495,7 +5618,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5495
5618
|
}, {
|
|
5496
5619
|
key: "dialInPstn",
|
|
5497
5620
|
value: function dialInPstn() {
|
|
5498
|
-
var
|
|
5621
|
+
var _this33 = this;
|
|
5499
5622
|
if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
|
|
5500
5623
|
|
|
5501
5624
|
var correlationId = this.correlationId,
|
|
@@ -5511,10 +5634,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5511
5634
|
}).catch(function (error) {
|
|
5512
5635
|
var _error$error2;
|
|
5513
5636
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
|
|
5514
|
-
correlation_id:
|
|
5515
|
-
dial_in_url:
|
|
5637
|
+
correlation_id: _this33.correlationId,
|
|
5638
|
+
dial_in_url: _this33.dialInUrl,
|
|
5516
5639
|
locus_id: locusUrl.split('/').pop(),
|
|
5517
|
-
client_url:
|
|
5640
|
+
client_url: _this33.deviceUrl,
|
|
5518
5641
|
reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
|
|
5519
5642
|
stack: error.stack
|
|
5520
5643
|
});
|
|
@@ -5532,7 +5655,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5532
5655
|
}, {
|
|
5533
5656
|
key: "dialOutPstn",
|
|
5534
5657
|
value: function dialOutPstn(phoneNumber) {
|
|
5535
|
-
var
|
|
5658
|
+
var _this34 = this;
|
|
5536
5659
|
if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
|
|
5537
5660
|
|
|
5538
5661
|
var correlationId = this.correlationId,
|
|
@@ -5549,10 +5672,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5549
5672
|
}).catch(function (error) {
|
|
5550
5673
|
var _error$error3;
|
|
5551
5674
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
|
|
5552
|
-
correlation_id:
|
|
5553
|
-
dial_out_url:
|
|
5675
|
+
correlation_id: _this34.correlationId,
|
|
5676
|
+
dial_out_url: _this34.dialOutUrl,
|
|
5554
5677
|
locus_id: locusUrl.split('/').pop(),
|
|
5555
|
-
client_url:
|
|
5678
|
+
client_url: _this34.deviceUrl,
|
|
5556
5679
|
reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
|
|
5557
5680
|
stack: error.stack
|
|
5558
5681
|
});
|
|
@@ -5583,7 +5706,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5583
5706
|
}, {
|
|
5584
5707
|
key: "moveTo",
|
|
5585
5708
|
value: function moveTo(resourceId) {
|
|
5586
|
-
var
|
|
5709
|
+
var _this35 = this;
|
|
5587
5710
|
if (!resourceId) {
|
|
5588
5711
|
throw new _parameter.default('Cannot move call without a resourceId.');
|
|
5589
5712
|
}
|
|
@@ -5621,18 +5744,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5621
5744
|
meetingId: this.id
|
|
5622
5745
|
}
|
|
5623
5746
|
});
|
|
5624
|
-
this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
5747
|
+
this.locusInfo.once(_constants.LOCUSINFO.EVENTS.SELF_OBSERVING, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
|
|
5625
5748
|
var mediaSettings;
|
|
5626
|
-
return _regenerator.default.wrap(function
|
|
5627
|
-
while (1) switch (
|
|
5749
|
+
return _regenerator.default.wrap(function _callee19$(_context19) {
|
|
5750
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
5628
5751
|
case 0:
|
|
5629
|
-
|
|
5630
|
-
if (!(
|
|
5631
|
-
|
|
5752
|
+
_context19.prev = 0;
|
|
5753
|
+
if (!(_this35.screenShareFloorState === ScreenShareFloorStatus.GRANTED)) {
|
|
5754
|
+
_context19.next = 4;
|
|
5632
5755
|
break;
|
|
5633
5756
|
}
|
|
5634
|
-
|
|
5635
|
-
return
|
|
5757
|
+
_context19.next = 4;
|
|
5758
|
+
return _this35.releaseScreenShareFloor();
|
|
5636
5759
|
case 4:
|
|
5637
5760
|
mediaSettings = {
|
|
5638
5761
|
mediaDirection: {
|
|
@@ -5644,47 +5767,47 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5644
5767
|
receiveShare: true
|
|
5645
5768
|
}
|
|
5646
5769
|
};
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5770
|
+
_this35.cleanupLocalStreams();
|
|
5771
|
+
_this35.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
|
|
5772
|
+
_this35.mediaProperties.unsetRemoteMedia();
|
|
5650
5773
|
|
|
5651
5774
|
// when a move to is intiated by the client , Locus delets the existing media node from the server as soon the DX answers the meeting
|
|
5652
5775
|
// once the DX answers we establish connection back the media server with only receiveShare enabled
|
|
5653
5776
|
// @ts-ignore - reconnectMedia does not accept any argument
|
|
5654
|
-
|
|
5655
|
-
return
|
|
5777
|
+
_context19.next = 10;
|
|
5778
|
+
return _this35.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
|
|
5656
5779
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
|
|
5657
5780
|
});
|
|
5658
5781
|
case 10:
|
|
5659
|
-
|
|
5782
|
+
_context19.next = 16;
|
|
5660
5783
|
break;
|
|
5661
5784
|
case 12:
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
_loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId',
|
|
5785
|
+
_context19.prev = 12;
|
|
5786
|
+
_context19.t0 = _context19["catch"](0);
|
|
5787
|
+
_loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context19.t0);
|
|
5665
5788
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
|
|
5666
|
-
correlation_id:
|
|
5667
|
-
locus_id:
|
|
5668
|
-
reason:
|
|
5669
|
-
stack:
|
|
5789
|
+
correlation_id: _this35.correlationId,
|
|
5790
|
+
locus_id: _this35.locusUrl.split('/').pop(),
|
|
5791
|
+
reason: _context19.t0.message,
|
|
5792
|
+
stack: _context19.t0.stack
|
|
5670
5793
|
});
|
|
5671
5794
|
case 16:
|
|
5672
5795
|
case "end":
|
|
5673
|
-
return
|
|
5796
|
+
return _context19.stop();
|
|
5674
5797
|
}
|
|
5675
|
-
},
|
|
5798
|
+
}, _callee19, null, [[0, 12]]);
|
|
5676
5799
|
})));
|
|
5677
5800
|
_loggerProxy.default.logger.info('Meeting:index#moveTo --> Initated moved to using resourceId', resourceId);
|
|
5678
5801
|
return _util.default.joinMeetingOptions(this, {
|
|
5679
5802
|
resourceId: resourceId,
|
|
5680
5803
|
moveToResource: true
|
|
5681
5804
|
}).then(function () {
|
|
5682
|
-
|
|
5805
|
+
_this35.meetingFiniteStateMachine.join();
|
|
5683
5806
|
}).catch(function (error) {
|
|
5684
|
-
|
|
5807
|
+
_this35.meetingFiniteStateMachine.fail(error);
|
|
5685
5808
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
|
|
5686
|
-
correlation_id:
|
|
5687
|
-
locus_id:
|
|
5809
|
+
correlation_id: _this35.correlationId,
|
|
5810
|
+
locus_id: _this35.locusUrl.split('/').pop(),
|
|
5688
5811
|
reason: error.message,
|
|
5689
5812
|
stack: error.stack
|
|
5690
5813
|
});
|
|
@@ -5703,7 +5826,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5703
5826
|
}, {
|
|
5704
5827
|
key: "moveFrom",
|
|
5705
5828
|
value: function moveFrom(resourceId) {
|
|
5706
|
-
var
|
|
5829
|
+
var _this36 = this;
|
|
5707
5830
|
// On moveFrom ask the developer to re capture it moveFrom then updateMedia
|
|
5708
5831
|
if (!resourceId) {
|
|
5709
5832
|
throw new _parameter.default('Cannot move call without a resourceId.');
|
|
@@ -5718,19 +5841,19 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5718
5841
|
}
|
|
5719
5842
|
});
|
|
5720
5843
|
return _util.default.joinMeetingOptions(this).then(function () {
|
|
5721
|
-
return _util.default.leaveMeeting(
|
|
5844
|
+
return _util.default.leaveMeeting(_this36, {
|
|
5722
5845
|
resourceId: resourceId,
|
|
5723
5846
|
correlationId: oldCorrelationId,
|
|
5724
5847
|
moveMeeting: true
|
|
5725
5848
|
}).then(function () {
|
|
5726
|
-
|
|
5849
|
+
_this36.resourceId = '';
|
|
5727
5850
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
|
|
5728
5851
|
});
|
|
5729
5852
|
}).catch(function (error) {
|
|
5730
|
-
|
|
5853
|
+
_this36.meetingFiniteStateMachine.fail(error);
|
|
5731
5854
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
|
|
5732
|
-
correlation_id:
|
|
5733
|
-
locus_id:
|
|
5855
|
+
correlation_id: _this36.correlationId,
|
|
5856
|
+
locus_id: _this36.locusUrl.split('/').pop(),
|
|
5734
5857
|
reason: error.message,
|
|
5735
5858
|
stack: error.stack
|
|
5736
5859
|
});
|
|
@@ -5755,10 +5878,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5755
5878
|
}, {
|
|
5756
5879
|
key: "createMediaConnection",
|
|
5757
5880
|
value: (function () {
|
|
5758
|
-
var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
5881
|
+
var _createMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(turnServerInfo, bundlePolicy) {
|
|
5759
5882
|
var mc, audioEnabled, videoEnabled, shareEnabled;
|
|
5760
|
-
return _regenerator.default.wrap(function
|
|
5761
|
-
while (1) switch (
|
|
5883
|
+
return _regenerator.default.wrap(function _callee20$(_context20) {
|
|
5884
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
5762
5885
|
case 0:
|
|
5763
5886
|
mc = _media.default.createMediaConnection(this.isMultistream, this.getMediaConnectionDebugId(),
|
|
5764
5887
|
// @ts-ignore
|
|
@@ -5784,40 +5907,40 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5784
5907
|
|
|
5785
5908
|
// publish the streams
|
|
5786
5909
|
if (!this.mediaProperties.audioStream) {
|
|
5787
|
-
|
|
5910
|
+
_context20.next = 8;
|
|
5788
5911
|
break;
|
|
5789
5912
|
}
|
|
5790
5913
|
this.setSendNamedMediaGroup(_internalMediaCore.MediaType.AudioMain);
|
|
5791
|
-
|
|
5914
|
+
_context20.next = 8;
|
|
5792
5915
|
return this.publishStream(_internalMediaCore.MediaType.AudioMain, this.mediaProperties.audioStream);
|
|
5793
5916
|
case 8:
|
|
5794
5917
|
if (!this.mediaProperties.videoStream) {
|
|
5795
|
-
|
|
5918
|
+
_context20.next = 11;
|
|
5796
5919
|
break;
|
|
5797
5920
|
}
|
|
5798
|
-
|
|
5921
|
+
_context20.next = 11;
|
|
5799
5922
|
return this.publishStream(_internalMediaCore.MediaType.VideoMain, this.mediaProperties.videoStream);
|
|
5800
5923
|
case 11:
|
|
5801
5924
|
if (!this.mediaProperties.shareVideoStream) {
|
|
5802
|
-
|
|
5925
|
+
_context20.next = 14;
|
|
5803
5926
|
break;
|
|
5804
5927
|
}
|
|
5805
|
-
|
|
5928
|
+
_context20.next = 14;
|
|
5806
5929
|
return this.publishStream(_internalMediaCore.MediaType.VideoSlides, this.mediaProperties.shareVideoStream);
|
|
5807
5930
|
case 14:
|
|
5808
5931
|
if (!(this.isMultistream && this.mediaProperties.shareAudioStream)) {
|
|
5809
|
-
|
|
5932
|
+
_context20.next = 17;
|
|
5810
5933
|
break;
|
|
5811
5934
|
}
|
|
5812
|
-
|
|
5935
|
+
_context20.next = 17;
|
|
5813
5936
|
return this.publishStream(_internalMediaCore.MediaType.AudioSlides, this.mediaProperties.shareAudioStream);
|
|
5814
5937
|
case 17:
|
|
5815
|
-
return
|
|
5938
|
+
return _context20.abrupt("return", mc);
|
|
5816
5939
|
case 18:
|
|
5817
5940
|
case "end":
|
|
5818
|
-
return
|
|
5941
|
+
return _context20.stop();
|
|
5819
5942
|
}
|
|
5820
|
-
},
|
|
5943
|
+
}, _callee20, this);
|
|
5821
5944
|
}));
|
|
5822
5945
|
function createMediaConnection(_x16, _x17) {
|
|
5823
5946
|
return _createMediaConnection.apply(this, arguments);
|
|
@@ -5837,9 +5960,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5837
5960
|
}, {
|
|
5838
5961
|
key: "forwardEvent",
|
|
5839
5962
|
value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
|
|
5840
|
-
var
|
|
5963
|
+
var _this37 = this;
|
|
5841
5964
|
eventEmitter.on(eventTypeToForward, function (data) {
|
|
5842
|
-
return _triggerProxy.default.trigger(
|
|
5965
|
+
return _triggerProxy.default.trigger(_this37, {
|
|
5843
5966
|
file: 'meetings',
|
|
5844
5967
|
function: 'addMedia'
|
|
5845
5968
|
}, meetingEventType, data);
|
|
@@ -5857,41 +5980,41 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5857
5980
|
}, {
|
|
5858
5981
|
key: "setUpLocalStreamReferences",
|
|
5859
5982
|
value: (function () {
|
|
5860
|
-
var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
5861
|
-
var _localStreams$screenS, _localStreams$screenS2;
|
|
5983
|
+
var _setUpLocalStreamReferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(localStreams) {
|
|
5984
|
+
var _localStreams$microph, _localStreams$camera, _localStreams$screenS, _localStreams$screenS2, _localStreams$screenS3, _localStreams$screenS4, _localStreams$screenS5, _localStreams$screenS6;
|
|
5862
5985
|
var setUpStreamPromises;
|
|
5863
|
-
return _regenerator.default.wrap(function
|
|
5864
|
-
while (1) switch (
|
|
5986
|
+
return _regenerator.default.wrap(function _callee21$(_context21) {
|
|
5987
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
5865
5988
|
case 0:
|
|
5866
5989
|
setUpStreamPromises = [];
|
|
5867
|
-
if (localStreams !== null && localStreams !== void 0 && localStreams.microphone) {
|
|
5990
|
+
if (localStreams !== null && localStreams !== void 0 && localStreams.microphone && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$microph = localStreams.microphone) === null || _localStreams$microph === void 0 ? void 0 : _localStreams$microph.readyState) !== 'ended') {
|
|
5868
5991
|
setUpStreamPromises.push(this.setLocalAudioStream(localStreams.microphone));
|
|
5869
5992
|
}
|
|
5870
|
-
if (localStreams !== null && localStreams !== void 0 && localStreams.camera) {
|
|
5993
|
+
if (localStreams !== null && localStreams !== void 0 && localStreams.camera && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$camera = localStreams.camera) === null || _localStreams$camera === void 0 ? void 0 : _localStreams$camera.readyState) !== 'ended') {
|
|
5871
5994
|
setUpStreamPromises.push(this.setLocalVideoStream(localStreams.camera));
|
|
5872
5995
|
}
|
|
5873
|
-
if (localStreams !== null && localStreams !== void 0 && (_localStreams$screenS = localStreams.screenShare) !== null && _localStreams$screenS !== void 0 && _localStreams$screenS.video) {
|
|
5996
|
+
if (localStreams !== null && localStreams !== void 0 && (_localStreams$screenS = localStreams.screenShare) !== null && _localStreams$screenS !== void 0 && _localStreams$screenS.video && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$screenS2 = localStreams.screenShare) === null || _localStreams$screenS2 === void 0 ? void 0 : (_localStreams$screenS3 = _localStreams$screenS2.video) === null || _localStreams$screenS3 === void 0 ? void 0 : _localStreams$screenS3.readyState) !== 'ended') {
|
|
5874
5997
|
setUpStreamPromises.push(this.setLocalShareVideoStream(localStreams.screenShare.video));
|
|
5875
5998
|
}
|
|
5876
|
-
if (localStreams !== null && localStreams !== void 0 && (_localStreams$
|
|
5999
|
+
if (localStreams !== null && localStreams !== void 0 && (_localStreams$screenS4 = localStreams.screenShare) !== null && _localStreams$screenS4 !== void 0 && _localStreams$screenS4.audio && (localStreams === null || localStreams === void 0 ? void 0 : (_localStreams$screenS5 = localStreams.screenShare) === null || _localStreams$screenS5 === void 0 ? void 0 : (_localStreams$screenS6 = _localStreams$screenS5.audio) === null || _localStreams$screenS6 === void 0 ? void 0 : _localStreams$screenS6.readyState) !== 'ended') {
|
|
5877
6000
|
setUpStreamPromises.push(this.setLocalShareAudioStream(localStreams.screenShare.audio));
|
|
5878
6001
|
}
|
|
5879
|
-
|
|
5880
|
-
|
|
6002
|
+
_context21.prev = 5;
|
|
6003
|
+
_context21.next = 8;
|
|
5881
6004
|
return _promise.default.all(setUpStreamPromises);
|
|
5882
6005
|
case 8:
|
|
5883
|
-
|
|
6006
|
+
_context21.next = 14;
|
|
5884
6007
|
break;
|
|
5885
6008
|
case 10:
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
_loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ",
|
|
5889
|
-
throw
|
|
6009
|
+
_context21.prev = 10;
|
|
6010
|
+
_context21.t0 = _context21["catch"](5);
|
|
6011
|
+
_loggerProxy.default.logger.error("Meeting:index#addMedia():setUpLocalStreamReferences --> Error , ", _context21.t0);
|
|
6012
|
+
throw _context21.t0;
|
|
5890
6013
|
case 14:
|
|
5891
6014
|
case "end":
|
|
5892
|
-
return
|
|
6015
|
+
return _context21.stop();
|
|
5893
6016
|
}
|
|
5894
|
-
},
|
|
6017
|
+
}, _callee21, this, [[5, 10]]);
|
|
5895
6018
|
}));
|
|
5896
6019
|
function setUpLocalStreamReferences(_x18) {
|
|
5897
6020
|
return _setUpLocalStreamReferences.apply(this, arguments);
|
|
@@ -5908,20 +6031,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5908
6031
|
}, {
|
|
5909
6032
|
key: "waitForMediaConnectionConnected",
|
|
5910
6033
|
value: (function () {
|
|
5911
|
-
var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
6034
|
+
var _waitForMediaConnectionConnected = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22() {
|
|
5912
6035
|
var _this$mediaProperties6, _this$mediaProperties7, _this$mediaProperties8, _this$mediaProperties9, _this$mediaProperties10, _this$mediaProperties11, _this$mediaProperties12, _this$mediaProperties13, _this$mediaProperties14, _this$mediaProperties15, _this$mediaProperties16, _this$mediaProperties17, _this$mediaProperties18, _this$mediaProperties19;
|
|
5913
|
-
return _regenerator.default.wrap(function
|
|
5914
|
-
while (1) switch (
|
|
6036
|
+
return _regenerator.default.wrap(function _callee22$(_context22) {
|
|
6037
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
5915
6038
|
case 0:
|
|
5916
|
-
|
|
5917
|
-
|
|
6039
|
+
_context22.prev = 0;
|
|
6040
|
+
_context22.next = 3;
|
|
5918
6041
|
return this.mediaProperties.waitForMediaConnectionConnected();
|
|
5919
6042
|
case 3:
|
|
5920
|
-
|
|
6043
|
+
_context22.next = 9;
|
|
5921
6044
|
break;
|
|
5922
6045
|
case 5:
|
|
5923
|
-
|
|
5924
|
-
|
|
6046
|
+
_context22.prev = 5;
|
|
6047
|
+
_context22.t0 = _context22["catch"](0);
|
|
5925
6048
|
if (!this.hasMediaConnectionConnectedAtLeastOnce) {
|
|
5926
6049
|
// Only send CA event for join flow if we haven't successfully connected media yet
|
|
5927
6050
|
// @ts-ignore
|
|
@@ -5949,9 +6072,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5949
6072
|
throw new Error("Timed out waiting for media connection to be connected, correlationId=".concat(this.correlationId));
|
|
5950
6073
|
case 9:
|
|
5951
6074
|
case "end":
|
|
5952
|
-
return
|
|
6075
|
+
return _context22.stop();
|
|
5953
6076
|
}
|
|
5954
|
-
},
|
|
6077
|
+
}, _callee22, this, [[0, 5]]);
|
|
5955
6078
|
}));
|
|
5956
6079
|
function waitForMediaConnectionConnected() {
|
|
5957
6080
|
return _waitForMediaConnectionConnected.apply(this, arguments);
|
|
@@ -5968,7 +6091,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5968
6091
|
}, {
|
|
5969
6092
|
key: "createStatsAnalyzer",
|
|
5970
6093
|
value: function createStatsAnalyzer() {
|
|
5971
|
-
var
|
|
6094
|
+
var _this38 = this;
|
|
5972
6095
|
// @ts-ignore - config coming from registerPlugin
|
|
5973
6096
|
if (this.config.stats.enableStatsAnalyzer) {
|
|
5974
6097
|
// @ts-ignore - config coming from registerPlugin
|
|
@@ -5976,7 +6099,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5976
6099
|
this.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(
|
|
5977
6100
|
// @ts-ignore - config coming from registerPlugin
|
|
5978
6101
|
this.config.stats, function (ssrc) {
|
|
5979
|
-
return
|
|
6102
|
+
return _this38.receiveSlotManager.findReceiveSlotBySsrc(ssrc);
|
|
5980
6103
|
}, this.networkQualityMonitor);
|
|
5981
6104
|
this.setupStatsAnalyzerEventHandlers();
|
|
5982
6105
|
this.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, this.sendNetworkQualityEvent.bind(this));
|
|
@@ -6001,18 +6124,18 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6001
6124
|
* @returns {Promise<void>}
|
|
6002
6125
|
*/
|
|
6003
6126
|
function () {
|
|
6004
|
-
var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
6127
|
+
var _waitForRemoteSDPAnswer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
|
|
6005
6128
|
var LOG_HEADER, deferSDPAnswer;
|
|
6006
|
-
return _regenerator.default.wrap(function
|
|
6007
|
-
while (1) switch (
|
|
6129
|
+
return _regenerator.default.wrap(function _callee23$(_context23) {
|
|
6130
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
6008
6131
|
case 0:
|
|
6009
6132
|
LOG_HEADER = 'Meeting:index#addMedia():waitForRemoteSDPAnswer -->';
|
|
6010
6133
|
if (this.deferSDPAnswer) {
|
|
6011
|
-
|
|
6134
|
+
_context23.next = 4;
|
|
6012
6135
|
break;
|
|
6013
6136
|
}
|
|
6014
6137
|
_loggerProxy.default.logger.warn("".concat(LOG_HEADER, " offer not created yet"));
|
|
6015
|
-
return
|
|
6138
|
+
return _context23.abrupt("return", _promise.default.reject(new Error('waitForRemoteSDPAnswer() called before local sdp offer created')));
|
|
6016
6139
|
case 4:
|
|
6017
6140
|
deferSDPAnswer = this.deferSDPAnswer;
|
|
6018
6141
|
this.sdpResponseTimer = setTimeout(function () {
|
|
@@ -6020,12 +6143,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6020
6143
|
deferSDPAnswer.reject(new Error('Timed out waiting for REMOTE SDP ANSWER'));
|
|
6021
6144
|
}, _constants.ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT);
|
|
6022
6145
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " waiting for REMOTE SDP ANSWER..."));
|
|
6023
|
-
return
|
|
6146
|
+
return _context23.abrupt("return", deferSDPAnswer.promise);
|
|
6024
6147
|
case 8:
|
|
6025
6148
|
case "end":
|
|
6026
|
-
return
|
|
6149
|
+
return _context23.stop();
|
|
6027
6150
|
}
|
|
6028
|
-
},
|
|
6151
|
+
}, _callee23, this);
|
|
6029
6152
|
}));
|
|
6030
6153
|
function waitForRemoteSDPAnswer() {
|
|
6031
6154
|
return _waitForRemoteSDPAnswer.apply(this, arguments);
|
|
@@ -6044,28 +6167,28 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6044
6167
|
}, {
|
|
6045
6168
|
key: "retryEstablishMediaConnectionWithForcedTurnDiscovery",
|
|
6046
6169
|
value: (function () {
|
|
6047
|
-
var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
6170
|
+
var _retryEstablishMediaConnectionWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(remoteMediaManagerConfig, bundlePolicy) {
|
|
6048
6171
|
var LOG_HEADER;
|
|
6049
|
-
return _regenerator.default.wrap(function
|
|
6050
|
-
while (1) switch (
|
|
6172
|
+
return _regenerator.default.wrap(function _callee24$(_context24) {
|
|
6173
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
6051
6174
|
case 0:
|
|
6052
6175
|
LOG_HEADER = 'Meeting:index#addMedia():retryEstablishMediaConnectionWithForcedTurnDiscovery -->';
|
|
6053
|
-
|
|
6054
|
-
|
|
6176
|
+
_context24.prev = 1;
|
|
6177
|
+
_context24.next = 4;
|
|
6055
6178
|
return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, true);
|
|
6056
6179
|
case 4:
|
|
6057
|
-
|
|
6180
|
+
_context24.next = 10;
|
|
6058
6181
|
break;
|
|
6059
6182
|
case 6:
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "),
|
|
6063
|
-
throw
|
|
6183
|
+
_context24.prev = 6;
|
|
6184
|
+
_context24.t0 = _context24["catch"](1);
|
|
6185
|
+
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " retry with TURN-TLS failed, media connection unable to connect, "), _context24.t0);
|
|
6186
|
+
throw _context24.t0;
|
|
6064
6187
|
case 10:
|
|
6065
6188
|
case "end":
|
|
6066
|
-
return
|
|
6189
|
+
return _context24.stop();
|
|
6067
6190
|
}
|
|
6068
|
-
},
|
|
6191
|
+
}, _callee24, this, [[1, 6]]);
|
|
6069
6192
|
}));
|
|
6070
6193
|
function retryEstablishMediaConnectionWithForcedTurnDiscovery(_x19, _x20) {
|
|
6071
6194
|
return _retryEstablishMediaConnectionWithForcedTurnDiscovery.apply(this, arguments);
|
|
@@ -6085,14 +6208,14 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6085
6208
|
}, {
|
|
6086
6209
|
key: "retryWithForcedTurnDiscovery",
|
|
6087
6210
|
value: (function () {
|
|
6088
|
-
var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
6211
|
+
var _retryWithForcedTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(remoteMediaManagerConfig, bundlePolicy) {
|
|
6089
6212
|
var LOG_HEADER;
|
|
6090
|
-
return _regenerator.default.wrap(function
|
|
6091
|
-
while (1) switch (
|
|
6213
|
+
return _regenerator.default.wrap(function _callee25$(_context25) {
|
|
6214
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
6092
6215
|
case 0:
|
|
6093
6216
|
this.retriedWithTurnServer = true;
|
|
6094
6217
|
LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
|
|
6095
|
-
|
|
6218
|
+
_context25.next = 4;
|
|
6096
6219
|
return this.cleanUpBeforeRetryWithTurnServer();
|
|
6097
6220
|
case 4:
|
|
6098
6221
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_RETRY, {
|
|
@@ -6102,22 +6225,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6102
6225
|
reason: 'forcingTurnTls'
|
|
6103
6226
|
});
|
|
6104
6227
|
if (!(this.state === _constants.MEETING_STATE.STATES.LEFT)) {
|
|
6105
|
-
|
|
6228
|
+
_context25.next = 9;
|
|
6106
6229
|
break;
|
|
6107
6230
|
}
|
|
6108
6231
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. "));
|
|
6109
|
-
|
|
6232
|
+
_context25.next = 9;
|
|
6110
6233
|
return this.join({
|
|
6111
6234
|
rejoin: true
|
|
6112
6235
|
});
|
|
6113
6236
|
case 9:
|
|
6114
|
-
|
|
6237
|
+
_context25.next = 11;
|
|
6115
6238
|
return this.retryEstablishMediaConnectionWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
|
|
6116
6239
|
case 11:
|
|
6117
6240
|
case "end":
|
|
6118
|
-
return
|
|
6241
|
+
return _context25.stop();
|
|
6119
6242
|
}
|
|
6120
|
-
},
|
|
6243
|
+
}, _callee25, this);
|
|
6121
6244
|
}));
|
|
6122
6245
|
function retryWithForcedTurnDiscovery(_x21, _x22) {
|
|
6123
6246
|
return _retryWithForcedTurnDiscovery.apply(this, arguments);
|
|
@@ -6139,30 +6262,30 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6139
6262
|
}, {
|
|
6140
6263
|
key: "handleWaitForMediaConnectionConnectedError",
|
|
6141
6264
|
value: (function () {
|
|
6142
|
-
var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
6265
|
+
var _handleWaitForMediaConnectionConnectedError = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(error, remoteMediaManagerConfig, bundlePolicy) {
|
|
6143
6266
|
var LOG_HEADER;
|
|
6144
|
-
return _regenerator.default.wrap(function
|
|
6145
|
-
while (1) switch (
|
|
6267
|
+
return _regenerator.default.wrap(function _callee26$(_context26) {
|
|
6268
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
6146
6269
|
case 0:
|
|
6147
6270
|
LOG_HEADER = 'Meeting:index#addMedia():handleWaitForMediaConnectionConnectedError -->'; // @ts-ignore - config coming from registerPlugin
|
|
6148
6271
|
if (this.turnServerUsed) {
|
|
6149
|
-
|
|
6272
|
+
_context26.next = 7;
|
|
6150
6273
|
break;
|
|
6151
6274
|
}
|
|
6152
6275
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " error waiting for media to connect on UDP, TCP, retrying using TURN-TLS, "), error);
|
|
6153
|
-
|
|
6276
|
+
_context26.next = 5;
|
|
6154
6277
|
return this.retryWithForcedTurnDiscovery(remoteMediaManagerConfig, bundlePolicy);
|
|
6155
6278
|
case 5:
|
|
6156
|
-
|
|
6279
|
+
_context26.next = 9;
|
|
6157
6280
|
break;
|
|
6158
6281
|
case 7:
|
|
6159
6282
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " error waiting for media to connect using UDP, TCP and TURN-TLS"), error);
|
|
6160
6283
|
throw new _webexErrors.AddMediaFailed();
|
|
6161
6284
|
case 9:
|
|
6162
6285
|
case "end":
|
|
6163
|
-
return
|
|
6286
|
+
return _context26.stop();
|
|
6164
6287
|
}
|
|
6165
|
-
},
|
|
6288
|
+
}, _callee26, this);
|
|
6166
6289
|
}));
|
|
6167
6290
|
function handleWaitForMediaConnectionConnectedError(_x23, _x24, _x25) {
|
|
6168
6291
|
return _handleWaitForMediaConnectionConnectedError.apply(this, arguments);
|
|
@@ -6170,44 +6293,38 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6170
6293
|
return handleWaitForMediaConnectionConnectedError;
|
|
6171
6294
|
}()
|
|
6172
6295
|
/**
|
|
6173
|
-
*
|
|
6296
|
+
* Performs TURN discovery as a separate call to the Locus /media API
|
|
6174
6297
|
*
|
|
6175
|
-
* @
|
|
6176
|
-
* @param {
|
|
6177
|
-
* @
|
|
6178
|
-
* @param {boolean} [isForced] - let isForced be true to do turn discovery regardless of reachability results
|
|
6179
|
-
* @returns {Promise<void>}
|
|
6298
|
+
* @param {boolean} isRetry
|
|
6299
|
+
* @param {boolean} isForced
|
|
6300
|
+
* @returns {Promise}
|
|
6180
6301
|
*/
|
|
6181
6302
|
)
|
|
6182
6303
|
}, {
|
|
6183
|
-
key: "
|
|
6304
|
+
key: "doTurnDiscovery",
|
|
6184
6305
|
value: (function () {
|
|
6185
|
-
var
|
|
6186
|
-
var
|
|
6187
|
-
return _regenerator.default.wrap(function
|
|
6188
|
-
while (1) switch (
|
|
6306
|
+
var _doTurnDiscovery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(isRetry, isForced) {
|
|
6307
|
+
var cdl, turnDiscoveryResult;
|
|
6308
|
+
return _regenerator.default.wrap(function _callee27$(_context27) {
|
|
6309
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
6189
6310
|
case 0:
|
|
6190
|
-
LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->'; // @ts-ignore
|
|
6191
|
-
cdl = this.webex.internal.newMetrics.callDiagnosticLatencies;
|
|
6192
|
-
isRetry = this.retriedWithTurnServer;
|
|
6193
|
-
_context26.prev = 3;
|
|
6194
6311
|
// @ts-ignore
|
|
6312
|
+
cdl = this.webex.internal.newMetrics.callDiagnosticLatencies; // @ts-ignore
|
|
6195
6313
|
this.webex.internal.newMetrics.submitInternalEvent({
|
|
6196
6314
|
name: 'internal.client.add-media.turn-discovery.start'
|
|
6197
6315
|
});
|
|
6198
|
-
|
|
6316
|
+
_context27.next = 4;
|
|
6199
6317
|
return this.roap.doTurnDiscovery(this, isRetry, isForced);
|
|
6200
|
-
case
|
|
6201
|
-
|
|
6202
|
-
this.turnDiscoverySkippedReason =
|
|
6318
|
+
case 4:
|
|
6319
|
+
turnDiscoveryResult = _context27.sent;
|
|
6320
|
+
this.turnDiscoverySkippedReason = turnDiscoveryResult === null || turnDiscoveryResult === void 0 ? void 0 : turnDiscoveryResult.turnDiscoverySkippedReason;
|
|
6203
6321
|
this.turnServerUsed = !this.turnDiscoverySkippedReason;
|
|
6204
6322
|
|
|
6205
6323
|
// @ts-ignore
|
|
6206
6324
|
this.webex.internal.newMetrics.submitInternalEvent({
|
|
6207
6325
|
name: 'internal.client.add-media.turn-discovery.end'
|
|
6208
6326
|
});
|
|
6209
|
-
|
|
6210
|
-
if (this.turnServerUsed && turnServerInfo) {
|
|
6327
|
+
if (this.turnServerUsed && turnDiscoveryResult.turnServerInfo) {
|
|
6211
6328
|
_metrics.default.sendBehavioralMetric(_constants2.default.TURN_DISCOVERY_LATENCY, {
|
|
6212
6329
|
correlation_id: this.correlationId,
|
|
6213
6330
|
latency: cdl.getTurnDiscoveryTime(),
|
|
@@ -6215,13 +6332,57 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6215
6332
|
retriedWithTurnServer: this.retriedWithTurnServer
|
|
6216
6333
|
});
|
|
6217
6334
|
}
|
|
6218
|
-
|
|
6335
|
+
return _context27.abrupt("return", turnDiscoveryResult);
|
|
6336
|
+
case 10:
|
|
6337
|
+
case "end":
|
|
6338
|
+
return _context27.stop();
|
|
6339
|
+
}
|
|
6340
|
+
}, _callee27, this);
|
|
6341
|
+
}));
|
|
6342
|
+
function doTurnDiscovery(_x26, _x27) {
|
|
6343
|
+
return _doTurnDiscovery.apply(this, arguments);
|
|
6344
|
+
}
|
|
6345
|
+
return doTurnDiscovery;
|
|
6346
|
+
}()
|
|
6347
|
+
/**
|
|
6348
|
+
* Does TURN discovery, SDP offer/answer exhange, establishes ICE connection and DTLS handshake.
|
|
6349
|
+
*
|
|
6350
|
+
* @private
|
|
6351
|
+
* @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig]
|
|
6352
|
+
* @param {BundlePolicy} [bundlePolicy]
|
|
6353
|
+
* @param {boolean} [isForced] - let isForced be true to do turn discovery regardless of reachability results
|
|
6354
|
+
* @param {TurnServerInfo} [turnServerInfo]
|
|
6355
|
+
* @returns {Promise<void>}
|
|
6356
|
+
*/
|
|
6357
|
+
)
|
|
6358
|
+
}, {
|
|
6359
|
+
key: "establishMediaConnection",
|
|
6360
|
+
value: (function () {
|
|
6361
|
+
var _establishMediaConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(remoteMediaManagerConfig, bundlePolicy, isForced, turnServerInfo) {
|
|
6362
|
+
var LOG_HEADER, isRetry, _yield$this$doTurnDis, mc;
|
|
6363
|
+
return _regenerator.default.wrap(function _callee28$(_context28) {
|
|
6364
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
6365
|
+
case 0:
|
|
6366
|
+
LOG_HEADER = 'Meeting:index#addMedia():establishMediaConnection -->';
|
|
6367
|
+
isRetry = this.retriedWithTurnServer;
|
|
6368
|
+
_context28.prev = 2;
|
|
6369
|
+
if (turnServerInfo) {
|
|
6370
|
+
_context28.next = 8;
|
|
6371
|
+
break;
|
|
6372
|
+
}
|
|
6373
|
+
_context28.next = 6;
|
|
6374
|
+
return this.doTurnDiscovery(isRetry, isForced);
|
|
6375
|
+
case 6:
|
|
6376
|
+
_yield$this$doTurnDis = _context28.sent;
|
|
6377
|
+
turnServerInfo = _yield$this$doTurnDis.turnServerInfo;
|
|
6378
|
+
case 8:
|
|
6379
|
+
_context28.next = 10;
|
|
6219
6380
|
return this.createMediaConnection(turnServerInfo, bundlePolicy);
|
|
6220
|
-
case
|
|
6221
|
-
mc =
|
|
6381
|
+
case 10:
|
|
6382
|
+
mc = _context28.sent;
|
|
6222
6383
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created"));
|
|
6223
6384
|
if (!this.isMultistream) {
|
|
6224
|
-
|
|
6385
|
+
_context28.next = 20;
|
|
6225
6386
|
break;
|
|
6226
6387
|
}
|
|
6227
6388
|
this.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(this.receiveSlotManager, this.mediaRequestManagers, remoteMediaManagerConfig);
|
|
@@ -6229,42 +6390,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6229
6390
|
this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.InterpretationAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_INTERPRETATION_AUDIO_CREATED);
|
|
6230
6391
|
this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
|
|
6231
6392
|
this.forwardEvent(this.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
|
|
6232
|
-
|
|
6393
|
+
_context28.next = 20;
|
|
6233
6394
|
return this.remoteMediaManager.start();
|
|
6234
|
-
case
|
|
6235
|
-
|
|
6395
|
+
case 20:
|
|
6396
|
+
_context28.next = 22;
|
|
6236
6397
|
return mc.initiateOffer();
|
|
6237
|
-
case
|
|
6238
|
-
|
|
6398
|
+
case 22:
|
|
6399
|
+
_context28.next = 24;
|
|
6239
6400
|
return this.waitForRemoteSDPAnswer();
|
|
6240
|
-
case
|
|
6401
|
+
case 24:
|
|
6241
6402
|
this.handleMediaLogging(this.mediaProperties);
|
|
6242
|
-
|
|
6403
|
+
_context28.next = 31;
|
|
6243
6404
|
break;
|
|
6244
|
-
case
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "),
|
|
6248
|
-
throw
|
|
6249
|
-
case
|
|
6250
|
-
|
|
6251
|
-
|
|
6405
|
+
case 27:
|
|
6406
|
+
_context28.prev = 27;
|
|
6407
|
+
_context28.t0 = _context28["catch"](2);
|
|
6408
|
+
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " error establishing media connection, "), _context28.t0);
|
|
6409
|
+
throw _context28.t0;
|
|
6410
|
+
case 31:
|
|
6411
|
+
_context28.prev = 31;
|
|
6412
|
+
_context28.next = 34;
|
|
6252
6413
|
return this.waitForMediaConnectionConnected();
|
|
6253
|
-
case
|
|
6254
|
-
|
|
6414
|
+
case 34:
|
|
6415
|
+
_context28.next = 40;
|
|
6255
6416
|
break;
|
|
6256
|
-
case
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
return this.handleWaitForMediaConnectionConnectedError(
|
|
6261
|
-
case
|
|
6417
|
+
case 36:
|
|
6418
|
+
_context28.prev = 36;
|
|
6419
|
+
_context28.t1 = _context28["catch"](31);
|
|
6420
|
+
_context28.next = 40;
|
|
6421
|
+
return this.handleWaitForMediaConnectionConnectedError(_context28.t1, remoteMediaManagerConfig, bundlePolicy);
|
|
6422
|
+
case 40:
|
|
6262
6423
|
case "end":
|
|
6263
|
-
return
|
|
6424
|
+
return _context28.stop();
|
|
6264
6425
|
}
|
|
6265
|
-
},
|
|
6426
|
+
}, _callee28, this, [[2, 27], [31, 36]]);
|
|
6266
6427
|
}));
|
|
6267
|
-
function establishMediaConnection(
|
|
6428
|
+
function establishMediaConnection(_x28, _x29, _x30, _x31) {
|
|
6268
6429
|
return _establishMediaConnection.apply(this, arguments);
|
|
6269
6430
|
}
|
|
6270
6431
|
return establishMediaConnection;
|
|
@@ -6279,22 +6440,22 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6279
6440
|
}, {
|
|
6280
6441
|
key: "cleanUpOnAddMediaFailure",
|
|
6281
6442
|
value: (function () {
|
|
6282
|
-
var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
6283
|
-
return _regenerator.default.wrap(function
|
|
6284
|
-
while (1) switch (
|
|
6443
|
+
var _cleanUpOnAddMediaFailure = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
|
|
6444
|
+
return _regenerator.default.wrap(function _callee29$(_context29) {
|
|
6445
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
6285
6446
|
case 0:
|
|
6286
6447
|
if (!this.statsAnalyzer) {
|
|
6287
|
-
|
|
6448
|
+
_context29.next = 3;
|
|
6288
6449
|
break;
|
|
6289
6450
|
}
|
|
6290
|
-
|
|
6451
|
+
_context29.next = 3;
|
|
6291
6452
|
return this.statsAnalyzer.stopAnalyzer();
|
|
6292
6453
|
case 3:
|
|
6293
6454
|
this.statsAnalyzer = null;
|
|
6294
6455
|
|
|
6295
6456
|
// when media fails, we want to upload a webrtc dump to see whats going on
|
|
6296
6457
|
// this function is async, but returns once the stats have been gathered
|
|
6297
|
-
|
|
6458
|
+
_context29.next = 6;
|
|
6298
6459
|
return this.forceSendStatsReport({
|
|
6299
6460
|
callFrom: 'addMedia'
|
|
6300
6461
|
});
|
|
@@ -6305,9 +6466,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6305
6466
|
}
|
|
6306
6467
|
case 7:
|
|
6307
6468
|
case "end":
|
|
6308
|
-
return
|
|
6469
|
+
return _context29.stop();
|
|
6309
6470
|
}
|
|
6310
|
-
},
|
|
6471
|
+
}, _callee29, this);
|
|
6311
6472
|
}));
|
|
6312
6473
|
function cleanUpOnAddMediaFailure() {
|
|
6313
6474
|
return _cleanUpOnAddMediaFailure.apply(this, arguments);
|
|
@@ -6325,11 +6486,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6325
6486
|
}, {
|
|
6326
6487
|
key: "cleanUpBeforeRetryWithTurnServer",
|
|
6327
6488
|
value: (function () {
|
|
6328
|
-
var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
6329
|
-
return _regenerator.default.wrap(function
|
|
6330
|
-
while (1) switch (
|
|
6489
|
+
var _cleanUpBeforeRetryWithTurnServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30() {
|
|
6490
|
+
return _regenerator.default.wrap(function _callee30$(_context30) {
|
|
6491
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
6331
6492
|
case 0:
|
|
6332
|
-
|
|
6493
|
+
_context30.next = 2;
|
|
6333
6494
|
return this.forceSendStatsReport({
|
|
6334
6495
|
callFrom: 'cleanUpBeforeRetryWithTurnServer'
|
|
6335
6496
|
});
|
|
@@ -6349,9 +6510,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6349
6510
|
}
|
|
6350
6511
|
case 3:
|
|
6351
6512
|
case "end":
|
|
6352
|
-
return
|
|
6513
|
+
return _context30.stop();
|
|
6353
6514
|
}
|
|
6354
|
-
},
|
|
6515
|
+
}, _callee30, this);
|
|
6355
6516
|
}));
|
|
6356
6517
|
function cleanUpBeforeRetryWithTurnServer() {
|
|
6357
6518
|
return _cleanUpBeforeRetryWithTurnServer.apply(this, arguments);
|
|
@@ -6362,6 +6523,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6362
6523
|
* Creates a media connection to the server. Media connection is required for sending or receiving any audio/video.
|
|
6363
6524
|
*
|
|
6364
6525
|
* @param {AddMediaOptions} options
|
|
6526
|
+
* @param {TurnServerInfo} turnServerInfo - TURN server information (used only internally by the SDK)
|
|
6365
6527
|
* @returns {Promise<void>}
|
|
6366
6528
|
* @public
|
|
6367
6529
|
* @memberof Meeting
|
|
@@ -6370,9 +6532,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6370
6532
|
}, {
|
|
6371
6533
|
key: "addMedia",
|
|
6372
6534
|
value: (function () {
|
|
6373
|
-
var _addMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
6535
|
+
var _addMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31() {
|
|
6374
6536
|
var _this$webex$meetings$2, _this$webex$meetings$3;
|
|
6375
6537
|
var options,
|
|
6538
|
+
turnServerInfo,
|
|
6376
6539
|
LOG_HEADER,
|
|
6377
6540
|
localStreams,
|
|
6378
6541
|
_options$audioEnabled,
|
|
@@ -6385,7 +6548,6 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6385
6548
|
shareVideoEnabled,
|
|
6386
6549
|
remoteMediaManagerConfig,
|
|
6387
6550
|
bundlePolicy,
|
|
6388
|
-
allowMediaInLobby,
|
|
6389
6551
|
_this$remoteMediaMana,
|
|
6390
6552
|
connectionType,
|
|
6391
6553
|
reachabilityStats,
|
|
@@ -6411,38 +6573,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6411
6573
|
_this$mediaProperties39,
|
|
6412
6574
|
_this$mediaProperties40,
|
|
6413
6575
|
reachabilityMetrics,
|
|
6414
|
-
|
|
6415
|
-
return _regenerator.default.wrap(function
|
|
6416
|
-
while (1) switch (
|
|
6576
|
+
_args31 = arguments;
|
|
6577
|
+
return _regenerator.default.wrap(function _callee31$(_context31) {
|
|
6578
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
6417
6579
|
case 0:
|
|
6418
|
-
options =
|
|
6580
|
+
options = _args31.length > 0 && _args31[0] !== undefined ? _args31[0] : {};
|
|
6581
|
+
turnServerInfo = _args31.length > 1 && _args31[1] !== undefined ? _args31[1] : undefined;
|
|
6419
6582
|
this.retriedWithTurnServer = false;
|
|
6420
6583
|
this.hasMediaConnectionConnectedAtLeastOnce = false;
|
|
6421
6584
|
LOG_HEADER = 'Meeting:index#addMedia -->';
|
|
6422
|
-
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: ").concat((0, _stringify.default)(options)));
|
|
6585
|
+
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " called with: ").concat((0, _stringify.default)(options), ", ").concat((0, _stringify.default)(turnServerInfo)));
|
|
6423
6586
|
if (!(options.allowMediaInLobby !== true && this.meetingState !== _constants.FULL_STATE.ACTIVE)) {
|
|
6424
|
-
|
|
6587
|
+
_context31.next = 8;
|
|
6425
6588
|
break;
|
|
6426
6589
|
}
|
|
6427
6590
|
throw new _webexErrors.MeetingNotActiveError();
|
|
6428
|
-
case
|
|
6591
|
+
case 8:
|
|
6429
6592
|
if (!_util.default.isUserInLeftState(this.locusInfo)) {
|
|
6430
|
-
|
|
6593
|
+
_context31.next = 10;
|
|
6431
6594
|
break;
|
|
6432
6595
|
}
|
|
6433
6596
|
throw new _webexErrors.UserNotJoinedError();
|
|
6434
|
-
case
|
|
6435
|
-
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
|
|
6597
|
+
case 10:
|
|
6598
|
+
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;
|
|
6436
6599
|
this.allowMediaInLobby = options === null || options === void 0 ? void 0 : options.allowMediaInLobby;
|
|
6437
6600
|
|
|
6438
6601
|
// If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
|
|
6439
6602
|
// @ts-ignore - isUserUnadmitted coming from SelfUtil
|
|
6440
|
-
if (!(this.isUserUnadmitted && !this.wirelessShare && !allowMediaInLobby)) {
|
|
6441
|
-
|
|
6603
|
+
if (!(this.isUserUnadmitted && !this.wirelessShare && !this.allowMediaInLobby)) {
|
|
6604
|
+
_context31.next = 14;
|
|
6442
6605
|
break;
|
|
6443
6606
|
}
|
|
6444
6607
|
throw new _webexErrors.UserInLobbyError();
|
|
6445
|
-
case
|
|
6608
|
+
case 14:
|
|
6446
6609
|
// @ts-ignore
|
|
6447
6610
|
this.webex.internal.newMetrics.submitClientEvent({
|
|
6448
6611
|
name: 'client.media.capabilities',
|
|
@@ -6497,33 +6660,42 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6497
6660
|
});
|
|
6498
6661
|
this.audio = (0, _muteState.createMuteState)(_constants.AUDIO, this, audioEnabled);
|
|
6499
6662
|
this.video = (0, _muteState.createMuteState)(_constants.VIDEO, this, videoEnabled);
|
|
6500
|
-
|
|
6501
|
-
|
|
6663
|
+
_context31.prev = 19;
|
|
6664
|
+
_context31.next = 22;
|
|
6502
6665
|
return this.setUpLocalStreamReferences(localStreams);
|
|
6503
|
-
case
|
|
6666
|
+
case 22:
|
|
6504
6667
|
this.setMercuryListener();
|
|
6505
6668
|
this.createStatsAnalyzer();
|
|
6506
|
-
|
|
6507
|
-
return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, false);
|
|
6508
|
-
case
|
|
6509
|
-
|
|
6669
|
+
_context31.next = 26;
|
|
6670
|
+
return this.establishMediaConnection(remoteMediaManagerConfig, bundlePolicy, false, turnServerInfo);
|
|
6671
|
+
case 26:
|
|
6672
|
+
if (!(audioEnabled || videoEnabled)) {
|
|
6673
|
+
_context31.next = 31;
|
|
6674
|
+
break;
|
|
6675
|
+
}
|
|
6676
|
+
_context31.next = 29;
|
|
6510
6677
|
return Meeting.handleDeviceLogging();
|
|
6511
|
-
case
|
|
6678
|
+
case 29:
|
|
6679
|
+
_context31.next = 32;
|
|
6680
|
+
break;
|
|
6681
|
+
case 31:
|
|
6682
|
+
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " device logging not required"));
|
|
6683
|
+
case 32:
|
|
6512
6684
|
if (!this.mediaProperties.hasLocalShareStream()) {
|
|
6513
|
-
|
|
6685
|
+
_context31.next = 35;
|
|
6514
6686
|
break;
|
|
6515
6687
|
}
|
|
6516
|
-
|
|
6688
|
+
_context31.next = 35;
|
|
6517
6689
|
return this.enqueueScreenShareFloorRequest();
|
|
6518
|
-
case
|
|
6519
|
-
|
|
6690
|
+
case 35:
|
|
6691
|
+
_context31.next = 37;
|
|
6520
6692
|
return this.mediaProperties.getCurrentConnectionType();
|
|
6521
|
-
case
|
|
6522
|
-
connectionType =
|
|
6523
|
-
|
|
6693
|
+
case 37:
|
|
6694
|
+
connectionType = _context31.sent;
|
|
6695
|
+
_context31.next = 40;
|
|
6524
6696
|
return this.webex.meetings.reachability.getReachabilityMetrics();
|
|
6525
|
-
case
|
|
6526
|
-
reachabilityStats =
|
|
6697
|
+
case 40:
|
|
6698
|
+
reachabilityStats = _context31.sent;
|
|
6527
6699
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, _objectSpread({
|
|
6528
6700
|
correlation_id: this.correlationId,
|
|
6529
6701
|
locus_id: this.locusUrl.split('/').pop(),
|
|
@@ -6542,24 +6714,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6542
6714
|
|
|
6543
6715
|
// We can log ReceiveSlot SSRCs only after the SDP exchange, so doing it here:
|
|
6544
6716
|
(_this$remoteMediaMana = this.remoteMediaManager) === null || _this$remoteMediaMana === void 0 ? void 0 : _this$remoteMediaMana.logAllReceiveSlots();
|
|
6545
|
-
|
|
6717
|
+
_context31.next = 59;
|
|
6546
6718
|
break;
|
|
6547
|
-
case
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "),
|
|
6719
|
+
case 47:
|
|
6720
|
+
_context31.prev = 47;
|
|
6721
|
+
_context31.t0 = _context31["catch"](19);
|
|
6722
|
+
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " failed to establish media connection: "), _context31.t0);
|
|
6551
6723
|
|
|
6552
6724
|
// @ts-ignore
|
|
6553
|
-
|
|
6725
|
+
_context31.next = 52;
|
|
6554
6726
|
return this.webex.meetings.reachability.getReachabilityMetrics();
|
|
6555
|
-
case
|
|
6556
|
-
reachabilityMetrics =
|
|
6727
|
+
case 52:
|
|
6728
|
+
reachabilityMetrics = _context31.sent;
|
|
6557
6729
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, _objectSpread({
|
|
6558
6730
|
correlation_id: this.correlationId,
|
|
6559
6731
|
locus_id: this.locusUrl.split('/').pop(),
|
|
6560
|
-
reason:
|
|
6561
|
-
stack:
|
|
6562
|
-
code:
|
|
6732
|
+
reason: _context31.t0.message,
|
|
6733
|
+
stack: _context31.t0.stack,
|
|
6734
|
+
code: _context31.t0.code,
|
|
6563
6735
|
turnDiscoverySkippedReason: this.turnDiscoverySkippedReason,
|
|
6564
6736
|
turnServerUsed: this.turnServerUsed,
|
|
6565
6737
|
retriedWithTurnServer: this.retriedWithTurnServer,
|
|
@@ -6568,25 +6740,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6568
6740
|
connectionState: ((_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.connectionState) || ((_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.connectionState) || 'unknown',
|
|
6569
6741
|
iceConnectionState: ((_this$mediaProperties34 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties34 === void 0 ? void 0 : (_this$mediaProperties35 = _this$mediaProperties34.multistreamConnection) === null || _this$mediaProperties35 === void 0 ? void 0 : (_this$mediaProperties36 = _this$mediaProperties35.pc) === null || _this$mediaProperties36 === void 0 ? void 0 : (_this$mediaProperties37 = _this$mediaProperties36.pc) === null || _this$mediaProperties37 === void 0 ? void 0 : _this$mediaProperties37.iceConnectionState) || ((_this$mediaProperties38 = this.mediaProperties.webrtcMediaConnection) === null || _this$mediaProperties38 === void 0 ? void 0 : (_this$mediaProperties39 = _this$mediaProperties38.mediaConnection) === null || _this$mediaProperties39 === void 0 ? void 0 : (_this$mediaProperties40 = _this$mediaProperties39.pc) === null || _this$mediaProperties40 === void 0 ? void 0 : _this$mediaProperties40.iceConnectionState) || 'unknown'
|
|
6570
6742
|
}, reachabilityMetrics));
|
|
6571
|
-
|
|
6743
|
+
_context31.next = 56;
|
|
6572
6744
|
return this.cleanUpOnAddMediaFailure();
|
|
6573
|
-
case
|
|
6745
|
+
case 56:
|
|
6574
6746
|
// Upload logs on error while adding media
|
|
6575
6747
|
_triggerProxy.default.trigger(this, {
|
|
6576
6748
|
file: 'meeting/index',
|
|
6577
6749
|
function: 'addMedia'
|
|
6578
6750
|
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, this);
|
|
6579
|
-
if (
|
|
6751
|
+
if (_context31.t0 instanceof _internalMediaCore.Errors.SdpError) {
|
|
6580
6752
|
this.leave({
|
|
6581
6753
|
reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
|
|
6582
6754
|
});
|
|
6583
6755
|
}
|
|
6584
|
-
throw
|
|
6585
|
-
case
|
|
6756
|
+
throw _context31.t0;
|
|
6757
|
+
case 59:
|
|
6586
6758
|
case "end":
|
|
6587
|
-
return
|
|
6759
|
+
return _context31.stop();
|
|
6588
6760
|
}
|
|
6589
|
-
},
|
|
6761
|
+
}, _callee31, this, [[19, 47]]);
|
|
6590
6762
|
}));
|
|
6591
6763
|
function addMedia() {
|
|
6592
6764
|
return _addMedia.apply(this, arguments);
|
|
@@ -6618,7 +6790,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6618
6790
|
* @memberof Meeting
|
|
6619
6791
|
*/
|
|
6620
6792
|
function enqueueMediaUpdate(mediaUpdateType) {
|
|
6621
|
-
var
|
|
6793
|
+
var _this39 = this;
|
|
6622
6794
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
6623
6795
|
var canUpdateMediaNow = this.canUpdateMedia();
|
|
6624
6796
|
return new _promise.default(function (resolve, reject) {
|
|
@@ -6629,9 +6801,9 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6629
6801
|
options: options
|
|
6630
6802
|
};
|
|
6631
6803
|
_loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
|
|
6632
|
-
|
|
6804
|
+
_this39.queuedMediaUpdates.push(queueItem);
|
|
6633
6805
|
if (canUpdateMediaNow) {
|
|
6634
|
-
|
|
6806
|
+
_this39.processNextQueuedMediaUpdate();
|
|
6635
6807
|
}
|
|
6636
6808
|
});
|
|
6637
6809
|
}
|
|
@@ -6654,35 +6826,35 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6654
6826
|
* @memberof Meeting
|
|
6655
6827
|
*/
|
|
6656
6828
|
function () {
|
|
6657
|
-
var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
6829
|
+
var _updateMedia = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(options) {
|
|
6658
6830
|
var audioEnabled, videoEnabled, shareAudioEnabled, shareVideoEnabled;
|
|
6659
|
-
return _regenerator.default.wrap(function
|
|
6660
|
-
while (1) switch (
|
|
6831
|
+
return _regenerator.default.wrap(function _callee32$(_context32) {
|
|
6832
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
6661
6833
|
case 0:
|
|
6662
6834
|
this.checkMediaConnection();
|
|
6663
6835
|
audioEnabled = options.audioEnabled, videoEnabled = options.videoEnabled, shareAudioEnabled = options.shareAudioEnabled, shareVideoEnabled = options.shareVideoEnabled;
|
|
6664
6836
|
_loggerProxy.default.logger.log("Meeting:index#updateMedia --> called with options=".concat((0, _stringify.default)(options)));
|
|
6665
6837
|
if (this.canUpdateMedia()) {
|
|
6666
|
-
|
|
6838
|
+
_context32.next = 5;
|
|
6667
6839
|
break;
|
|
6668
6840
|
}
|
|
6669
|
-
return
|
|
6841
|
+
return _context32.abrupt("return", this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.UPDATE_MEDIA, options));
|
|
6670
6842
|
case 5:
|
|
6671
6843
|
if (!this.isMultistream) {
|
|
6672
|
-
|
|
6844
|
+
_context32.next = 10;
|
|
6673
6845
|
break;
|
|
6674
6846
|
}
|
|
6675
6847
|
if (!(shareAudioEnabled !== undefined || shareVideoEnabled !== undefined)) {
|
|
6676
|
-
|
|
6848
|
+
_context32.next = 8;
|
|
6677
6849
|
break;
|
|
6678
6850
|
}
|
|
6679
6851
|
throw new Error('toggling shareAudioEnabled or shareVideoEnabled in a multistream meeting is not supported, to control receiving screen share call meeting.remoteMediaManager.setLayout() with appropriate layout');
|
|
6680
6852
|
case 8:
|
|
6681
|
-
|
|
6853
|
+
_context32.next = 12;
|
|
6682
6854
|
break;
|
|
6683
6855
|
case 10:
|
|
6684
6856
|
if (!(shareAudioEnabled !== undefined)) {
|
|
6685
|
-
|
|
6857
|
+
_context32.next = 12;
|
|
6686
6858
|
break;
|
|
6687
6859
|
}
|
|
6688
6860
|
throw new Error('toggling shareAudioEnabled in a transcoded meeting is not supported as of now');
|
|
@@ -6707,20 +6879,20 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6707
6879
|
this.mediaProperties.mediaDirection.receiveShare = !!(shareAudioEnabled || shareVideoEnabled);
|
|
6708
6880
|
}
|
|
6709
6881
|
if (this.isMultistream) {
|
|
6710
|
-
|
|
6882
|
+
_context32.next = 18;
|
|
6711
6883
|
break;
|
|
6712
6884
|
}
|
|
6713
|
-
|
|
6885
|
+
_context32.next = 18;
|
|
6714
6886
|
return this.updateTranscodedMediaConnection();
|
|
6715
6887
|
case 18:
|
|
6716
|
-
return
|
|
6888
|
+
return _context32.abrupt("return", undefined);
|
|
6717
6889
|
case 19:
|
|
6718
6890
|
case "end":
|
|
6719
|
-
return
|
|
6891
|
+
return _context32.stop();
|
|
6720
6892
|
}
|
|
6721
|
-
},
|
|
6893
|
+
}, _callee32, this);
|
|
6722
6894
|
}));
|
|
6723
|
-
function updateMedia(
|
|
6895
|
+
function updateMedia(_x32) {
|
|
6724
6896
|
return _updateMedia.apply(this, arguments);
|
|
6725
6897
|
}
|
|
6726
6898
|
return updateMedia;
|
|
@@ -6736,7 +6908,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6736
6908
|
}, {
|
|
6737
6909
|
key: "acknowledge",
|
|
6738
6910
|
value: function acknowledge(type) {
|
|
6739
|
-
var
|
|
6911
|
+
var _this40 = this;
|
|
6740
6912
|
if (!type) {
|
|
6741
6913
|
return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
|
|
6742
6914
|
}
|
|
@@ -6748,12 +6920,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6748
6920
|
}).then(function (response) {
|
|
6749
6921
|
return _promise.default.resolve(response);
|
|
6750
6922
|
}).then(function (response) {
|
|
6751
|
-
|
|
6923
|
+
_this40.meetingFiniteStateMachine.ring(type);
|
|
6752
6924
|
// @ts-ignore
|
|
6753
|
-
|
|
6925
|
+
_this40.webex.internal.newMetrics.submitClientEvent({
|
|
6754
6926
|
name: 'client.alert.displayed',
|
|
6755
6927
|
options: {
|
|
6756
|
-
meetingId:
|
|
6928
|
+
meetingId: _this40.id
|
|
6757
6929
|
}
|
|
6758
6930
|
});
|
|
6759
6931
|
return _promise.default.resolve({
|
|
@@ -6778,12 +6950,12 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6778
6950
|
}, {
|
|
6779
6951
|
key: "decline",
|
|
6780
6952
|
value: function decline(reason) {
|
|
6781
|
-
var
|
|
6953
|
+
var _this41 = this;
|
|
6782
6954
|
return _util.default.declineMeeting(this, reason).then(function (decline) {
|
|
6783
|
-
|
|
6955
|
+
_this41.meetingFiniteStateMachine.decline();
|
|
6784
6956
|
return _promise.default.resolve(decline);
|
|
6785
6957
|
}).catch(function (error) {
|
|
6786
|
-
|
|
6958
|
+
_this41.meetingFiniteStateMachine.fail(error);
|
|
6787
6959
|
return _promise.default.reject(error);
|
|
6788
6960
|
});
|
|
6789
6961
|
}
|
|
@@ -6834,7 +7006,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6834
7006
|
}, {
|
|
6835
7007
|
key: "leave",
|
|
6836
7008
|
value: function leave() {
|
|
6837
|
-
var
|
|
7009
|
+
var _this42 = this;
|
|
6838
7010
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
6839
7011
|
var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
|
|
6840
7012
|
|
|
@@ -6846,7 +7018,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6846
7018
|
var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
6847
7019
|
return (
|
|
6848
7020
|
// @ts-ignore
|
|
6849
|
-
|
|
7021
|
+
_this42.webex.internal.newMetrics.submitClientEvent({
|
|
6850
7022
|
name: 'client.call.leave',
|
|
6851
7023
|
payload: _objectSpread({
|
|
6852
7024
|
trigger: 'user-interaction',
|
|
@@ -6854,7 +7026,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6854
7026
|
leaveReason: options.clientEventLeaveReason
|
|
6855
7027
|
}, payload),
|
|
6856
7028
|
options: {
|
|
6857
|
-
meetingId:
|
|
7029
|
+
meetingId: _this42.id
|
|
6858
7030
|
}
|
|
6859
7031
|
})
|
|
6860
7032
|
);
|
|
@@ -6863,24 +7035,24 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6863
7035
|
return _util.default.leaveMeeting(this, options).then(function (leave) {
|
|
6864
7036
|
// CA team recommends submitting this *after* locus /leave
|
|
6865
7037
|
submitLeaveMetric();
|
|
6866
|
-
|
|
6867
|
-
|
|
7038
|
+
_this42.meetingFiniteStateMachine.leave();
|
|
7039
|
+
_this42.clearMeetingData();
|
|
6868
7040
|
|
|
6869
7041
|
// upload logs on leave irrespective of meeting delete
|
|
6870
|
-
_triggerProxy.default.trigger(
|
|
7042
|
+
_triggerProxy.default.trigger(_this42, {
|
|
6871
7043
|
file: 'meeting/index',
|
|
6872
7044
|
function: 'leave'
|
|
6873
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
7045
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this42);
|
|
6874
7046
|
|
|
6875
7047
|
// TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
|
|
6876
|
-
if (
|
|
7048
|
+
if (_this42.wirelessShare || _this42.guest) {
|
|
6877
7049
|
// If screen sharing clean the meeting object
|
|
6878
|
-
_triggerProxy.default.trigger(
|
|
7050
|
+
_triggerProxy.default.trigger(_this42, {
|
|
6879
7051
|
file: 'meeting/index',
|
|
6880
7052
|
function: 'leave'
|
|
6881
7053
|
}, _constants.EVENTS.DESTROY_MEETING, {
|
|
6882
7054
|
reason: options.reason,
|
|
6883
|
-
meetingId:
|
|
7055
|
+
meetingId: _this42.id
|
|
6884
7056
|
});
|
|
6885
7057
|
}
|
|
6886
7058
|
_loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
|
|
@@ -6897,16 +7069,16 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6897
7069
|
shownToUser: false
|
|
6898
7070
|
}]
|
|
6899
7071
|
});
|
|
6900
|
-
|
|
7072
|
+
_this42.meetingFiniteStateMachine.fail(error);
|
|
6901
7073
|
_loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
|
|
6902
7074
|
// upload logs on leave irrespective of meeting delete
|
|
6903
|
-
_triggerProxy.default.trigger(
|
|
7075
|
+
_triggerProxy.default.trigger(_this42, {
|
|
6904
7076
|
file: 'meeting/index',
|
|
6905
7077
|
function: 'leave'
|
|
6906
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
7078
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this42);
|
|
6907
7079
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
|
|
6908
|
-
correlation_id:
|
|
6909
|
-
locus_id:
|
|
7080
|
+
correlation_id: _this42.correlationId,
|
|
7081
|
+
locus_id: _this42.locusUrl.split('/').pop(),
|
|
6910
7082
|
reason: error.message,
|
|
6911
7083
|
stack: error.stack,
|
|
6912
7084
|
code: error.code
|
|
@@ -6926,7 +7098,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6926
7098
|
}, {
|
|
6927
7099
|
key: "startWhiteboardShare",
|
|
6928
7100
|
value: function startWhiteboardShare(channelUrl, resourceToken) {
|
|
6929
|
-
var
|
|
7101
|
+
var _this43 = this;
|
|
6930
7102
|
var whiteboard = this.locusInfo.mediaShares.find(function (element) {
|
|
6931
7103
|
return element.name === 'whiteboard';
|
|
6932
7104
|
});
|
|
@@ -6955,13 +7127,13 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6955
7127
|
body.resourceToken = resourceToken;
|
|
6956
7128
|
}
|
|
6957
7129
|
return this.meetingRequest.changeMeetingFloor(body).then(function () {
|
|
6958
|
-
|
|
7130
|
+
_this43.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
|
|
6959
7131
|
return _promise.default.resolve();
|
|
6960
7132
|
}).catch(function (error) {
|
|
6961
7133
|
_loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
|
|
6962
7134
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
|
|
6963
|
-
correlation_id:
|
|
6964
|
-
locus_id:
|
|
7135
|
+
correlation_id: _this43.correlationId,
|
|
7136
|
+
locus_id: _this43.locusUrl.split('/').pop(),
|
|
6965
7137
|
reason: error.message,
|
|
6966
7138
|
stack: error.stack,
|
|
6967
7139
|
board: {
|
|
@@ -6984,7 +7156,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6984
7156
|
}, {
|
|
6985
7157
|
key: "stopWhiteboardShare",
|
|
6986
7158
|
value: function stopWhiteboardShare(channelUrl) {
|
|
6987
|
-
var
|
|
7159
|
+
var _this44 = this;
|
|
6988
7160
|
var whiteboard = this.locusInfo.mediaShares.find(function (element) {
|
|
6989
7161
|
return element.name === 'whiteboard';
|
|
6990
7162
|
});
|
|
@@ -7007,8 +7179,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7007
7179
|
}).catch(function (error) {
|
|
7008
7180
|
_loggerProxy.default.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
|
|
7009
7181
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_STOP_WHITEBOARD_SHARE_FAILURE, {
|
|
7010
|
-
correlation_id:
|
|
7011
|
-
locus_id:
|
|
7182
|
+
correlation_id: _this44.correlationId,
|
|
7183
|
+
locus_id: _this44.locusUrl.split('/').pop(),
|
|
7012
7184
|
reason: error.message,
|
|
7013
7185
|
stack: error.stack,
|
|
7014
7186
|
board: {
|
|
@@ -7030,7 +7202,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7030
7202
|
}, {
|
|
7031
7203
|
key: "requestScreenShareFloor",
|
|
7032
7204
|
value: function requestScreenShareFloor() {
|
|
7033
|
-
var
|
|
7205
|
+
var _this45 = this;
|
|
7034
7206
|
if (!this.mediaProperties.hasLocalShareStream() || !this.mediaProperties.mediaDirection.sendShare) {
|
|
7035
7207
|
_loggerProxy.default.logger.log("Meeting:index#requestScreenShareFloor --> NOT requesting floor, because we don't have the share stream anymore (shareStream=".concat(this.mediaProperties.shareVideoStream ? 'yes' : 'no', ", sendShare=").concat(this.mediaProperties.mediaDirection.sendShare, ")"));
|
|
7036
7208
|
this.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
|
|
@@ -7061,34 +7233,34 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7061
7233
|
resourceUrl: this.resourceUrl,
|
|
7062
7234
|
shareInstanceId: this.localShareInstanceId
|
|
7063
7235
|
}).then(function () {
|
|
7064
|
-
|
|
7236
|
+
_this45.screenShareFloorState = ScreenShareFloorStatus.GRANTED;
|
|
7065
7237
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_SUCCESS, {
|
|
7066
|
-
correlation_id:
|
|
7067
|
-
locus_id:
|
|
7238
|
+
correlation_id: _this45.correlationId,
|
|
7239
|
+
locus_id: _this45.locusUrl.split('/').pop()
|
|
7068
7240
|
});
|
|
7069
7241
|
return _promise.default.resolve();
|
|
7070
7242
|
}).catch(function (error) {
|
|
7071
7243
|
_loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
|
|
7072
7244
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
|
|
7073
|
-
correlation_id:
|
|
7074
|
-
locus_id:
|
|
7245
|
+
correlation_id: _this45.correlationId,
|
|
7246
|
+
locus_id: _this45.locusUrl.split('/').pop(),
|
|
7075
7247
|
reason: error.message,
|
|
7076
7248
|
stack: error.stack
|
|
7077
7249
|
});
|
|
7078
7250
|
|
|
7079
7251
|
// @ts-ignore
|
|
7080
|
-
|
|
7252
|
+
_this45.webex.internal.newMetrics.submitClientEvent({
|
|
7081
7253
|
name: 'client.share.floor-granted.local',
|
|
7082
7254
|
payload: {
|
|
7083
7255
|
mediaType: 'share',
|
|
7084
7256
|
errors: _util.default.getChangeMeetingFloorErrorPayload(error.message),
|
|
7085
|
-
shareInstanceId:
|
|
7257
|
+
shareInstanceId: _this45.localShareInstanceId
|
|
7086
7258
|
},
|
|
7087
7259
|
options: {
|
|
7088
|
-
meetingId:
|
|
7260
|
+
meetingId: _this45.id
|
|
7089
7261
|
}
|
|
7090
7262
|
});
|
|
7091
|
-
|
|
7263
|
+
_this45.screenShareFloorState = ScreenShareFloorStatus.RELEASED;
|
|
7092
7264
|
return _promise.default.reject(error);
|
|
7093
7265
|
});
|
|
7094
7266
|
}
|
|
@@ -7111,10 +7283,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7111
7283
|
}, {
|
|
7112
7284
|
key: "requestScreenShareFloorIfPending",
|
|
7113
7285
|
value: function requestScreenShareFloorIfPending() {
|
|
7114
|
-
var
|
|
7286
|
+
var _this46 = this;
|
|
7115
7287
|
if (this.floorGrantPending && this.state === _constants.MEETING_STATE.STATES.JOINED) {
|
|
7116
7288
|
this.requestScreenShareFloor().then(function () {
|
|
7117
|
-
|
|
7289
|
+
_this46.floorGrantPending = false;
|
|
7118
7290
|
});
|
|
7119
7291
|
}
|
|
7120
7292
|
}
|
|
@@ -7128,7 +7300,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7128
7300
|
}, {
|
|
7129
7301
|
key: "releaseScreenShareFloor",
|
|
7130
7302
|
value: function releaseScreenShareFloor() {
|
|
7131
|
-
var
|
|
7303
|
+
var _this47 = this;
|
|
7132
7304
|
var content = this.locusInfo.mediaShares.find(function (element) {
|
|
7133
7305
|
return element.name === _constants.CONTENT;
|
|
7134
7306
|
});
|
|
@@ -7163,8 +7335,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7163
7335
|
}).catch(function (error) {
|
|
7164
7336
|
_loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
|
|
7165
7337
|
_metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
|
|
7166
|
-
correlation_id:
|
|
7167
|
-
locus_id:
|
|
7338
|
+
correlation_id: _this47.correlationId,
|
|
7339
|
+
locus_id: _this47.locusUrl.split('/').pop(),
|
|
7168
7340
|
reason: error.message,
|
|
7169
7341
|
stack: error.stack
|
|
7170
7342
|
});
|
|
@@ -7343,7 +7515,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7343
7515
|
}, {
|
|
7344
7516
|
key: "changeVideoLayout",
|
|
7345
7517
|
value: function changeVideoLayout(layoutType) {
|
|
7346
|
-
var
|
|
7518
|
+
var _this48 = this;
|
|
7347
7519
|
var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
7348
7520
|
var main = renderInfo.main,
|
|
7349
7521
|
content = renderInfo.content;
|
|
@@ -7397,7 +7569,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7397
7569
|
}
|
|
7398
7570
|
this.lastVideoLayoutInfo = (0, _lodash.cloneDeep)(layoutInfo);
|
|
7399
7571
|
this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
|
|
7400
|
-
_triggerProxy.default.trigger(
|
|
7572
|
+
_triggerProxy.default.trigger(_this48, {
|
|
7401
7573
|
file: 'meeting/index',
|
|
7402
7574
|
function: 'changeVideoLayout'
|
|
7403
7575
|
}, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
|
|
@@ -7481,7 +7653,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7481
7653
|
|
|
7482
7654
|
/**
|
|
7483
7655
|
*
|
|
7484
|
-
* @returns {string} one of 'attendee','host','cohost', returns the user type of the current user
|
|
7656
|
+
* @returns {string} one of 'panelist', 'attendee', 'host', 'cohost', returns the user type of the current user
|
|
7485
7657
|
*/
|
|
7486
7658
|
}, {
|
|
7487
7659
|
key: "getCurUserType",
|
|
@@ -7494,8 +7666,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7494
7666
|
if (roles.includes(_constants.SELF_ROLES.COHOST)) {
|
|
7495
7667
|
return 'cohost';
|
|
7496
7668
|
}
|
|
7497
|
-
if (roles.includes(_constants.SELF_ROLES.
|
|
7498
|
-
return '
|
|
7669
|
+
if (roles.includes(_constants.SELF_ROLES.PANELIST)) {
|
|
7670
|
+
return 'panelist';
|
|
7499
7671
|
}
|
|
7500
7672
|
if (roles.includes(_constants.SELF_ROLES.ATTENDEE)) {
|
|
7501
7673
|
return 'attendee';
|
|
@@ -7513,7 +7685,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7513
7685
|
}, {
|
|
7514
7686
|
key: "endMeetingForAll",
|
|
7515
7687
|
value: function endMeetingForAll() {
|
|
7516
|
-
var
|
|
7688
|
+
var _this49 = this;
|
|
7517
7689
|
// @ts-ignore
|
|
7518
7690
|
this.webex.internal.newMetrics.submitClientEvent({
|
|
7519
7691
|
name: 'client.call.leave',
|
|
@@ -7531,25 +7703,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7531
7703
|
locus_id: this.locusId
|
|
7532
7704
|
});
|
|
7533
7705
|
return _util.default.endMeetingForAll(this).then(function (end) {
|
|
7534
|
-
|
|
7535
|
-
|
|
7706
|
+
_this49.meetingFiniteStateMachine.end();
|
|
7707
|
+
_this49.clearMeetingData();
|
|
7536
7708
|
// upload logs on leave irrespective of meeting delete
|
|
7537
|
-
_triggerProxy.default.trigger(
|
|
7709
|
+
_triggerProxy.default.trigger(_this49, {
|
|
7538
7710
|
file: 'meeting/index',
|
|
7539
7711
|
function: 'endMeetingForAll'
|
|
7540
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
7712
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this49);
|
|
7541
7713
|
return end;
|
|
7542
7714
|
}).catch(function (error) {
|
|
7543
|
-
|
|
7715
|
+
_this49.meetingFiniteStateMachine.fail(error);
|
|
7544
7716
|
_loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
|
|
7545
7717
|
// upload logs on leave irrespective of meeting delete
|
|
7546
|
-
_triggerProxy.default.trigger(
|
|
7718
|
+
_triggerProxy.default.trigger(_this49, {
|
|
7547
7719
|
file: 'meeting/index',
|
|
7548
7720
|
function: 'endMeetingForAll'
|
|
7549
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
7721
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this49);
|
|
7550
7722
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
|
|
7551
|
-
correlation_id:
|
|
7552
|
-
locus_id:
|
|
7723
|
+
correlation_id: _this49.correlationId,
|
|
7724
|
+
locus_id: _this49.locusUrl.split('/').pop(),
|
|
7553
7725
|
reason: error.message,
|
|
7554
7726
|
stack: error.stack,
|
|
7555
7727
|
code: error.code
|
|
@@ -7638,39 +7810,39 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7638
7810
|
}, {
|
|
7639
7811
|
key: "enableMusicMode",
|
|
7640
7812
|
value: (function () {
|
|
7641
|
-
var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
7642
|
-
return _regenerator.default.wrap(function
|
|
7643
|
-
while (1) switch (
|
|
7813
|
+
var _enableMusicMode = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(shouldEnableMusicMode) {
|
|
7814
|
+
return _regenerator.default.wrap(function _callee33$(_context33) {
|
|
7815
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
7644
7816
|
case 0:
|
|
7645
7817
|
this.checkMediaConnection();
|
|
7646
7818
|
if (this.isMultistream) {
|
|
7647
|
-
|
|
7819
|
+
_context33.next = 3;
|
|
7648
7820
|
break;
|
|
7649
7821
|
}
|
|
7650
7822
|
throw new Error('enableMusicMode() only supported with multistream');
|
|
7651
7823
|
case 3:
|
|
7652
7824
|
if (!shouldEnableMusicMode) {
|
|
7653
|
-
|
|
7825
|
+
_context33.next = 8;
|
|
7654
7826
|
break;
|
|
7655
7827
|
}
|
|
7656
|
-
|
|
7828
|
+
_context33.next = 6;
|
|
7657
7829
|
return this.sendSlotManager.setCodecParameters(_internalMediaCore.MediaType.AudioMain, {
|
|
7658
7830
|
maxaveragebitrate: '64000',
|
|
7659
7831
|
maxplaybackrate: '48000'
|
|
7660
7832
|
});
|
|
7661
7833
|
case 6:
|
|
7662
|
-
|
|
7834
|
+
_context33.next = 10;
|
|
7663
7835
|
break;
|
|
7664
7836
|
case 8:
|
|
7665
|
-
|
|
7837
|
+
_context33.next = 10;
|
|
7666
7838
|
return this.sendSlotManager.deleteCodecParameters(_internalMediaCore.MediaType.AudioMain, ['maxaveragebitrate', 'maxplaybackrate']);
|
|
7667
7839
|
case 10:
|
|
7668
7840
|
case "end":
|
|
7669
|
-
return
|
|
7841
|
+
return _context33.stop();
|
|
7670
7842
|
}
|
|
7671
|
-
},
|
|
7843
|
+
}, _callee33, this);
|
|
7672
7844
|
}));
|
|
7673
|
-
function enableMusicMode(
|
|
7845
|
+
function enableMusicMode(_x33) {
|
|
7674
7846
|
return _enableMusicMode.apply(this, arguments);
|
|
7675
7847
|
}
|
|
7676
7848
|
return enableMusicMode;
|
|
@@ -7691,7 +7863,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7691
7863
|
_this$mediaProperties48,
|
|
7692
7864
|
_this$mediaProperties49,
|
|
7693
7865
|
_this$mediaProperties50,
|
|
7694
|
-
|
|
7866
|
+
_this50 = this;
|
|
7695
7867
|
var LOG_HEADER = 'Meeting:index#updateTranscodedMediaConnection -->';
|
|
7696
7868
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " starting"));
|
|
7697
7869
|
if (!this.canUpdateMedia()) {
|
|
@@ -7716,8 +7888,8 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7716
7888
|
}).catch(function (error) {
|
|
7717
7889
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error: "), error);
|
|
7718
7890
|
_metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
|
|
7719
|
-
correlation_id:
|
|
7720
|
-
locus_id:
|
|
7891
|
+
correlation_id: _this50.correlationId,
|
|
7892
|
+
locus_id: _this50.locusUrl.split('/').pop(),
|
|
7721
7893
|
reason: error.message,
|
|
7722
7894
|
stack: error.stack
|
|
7723
7895
|
});
|
|
@@ -7761,25 +7933,25 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7761
7933
|
}, {
|
|
7762
7934
|
key: "publishStream",
|
|
7763
7935
|
value: (function () {
|
|
7764
|
-
var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
7765
|
-
return _regenerator.default.wrap(function
|
|
7766
|
-
while (1) switch (
|
|
7936
|
+
var _publishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(mediaType, stream) {
|
|
7937
|
+
return _regenerator.default.wrap(function _callee34$(_context34) {
|
|
7938
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
7767
7939
|
case 0:
|
|
7768
7940
|
if (stream) {
|
|
7769
|
-
|
|
7941
|
+
_context34.next = 2;
|
|
7770
7942
|
break;
|
|
7771
7943
|
}
|
|
7772
|
-
return
|
|
7944
|
+
return _context34.abrupt("return");
|
|
7773
7945
|
case 2:
|
|
7774
7946
|
if (!this.mediaProperties.webrtcMediaConnection) {
|
|
7775
|
-
|
|
7947
|
+
_context34.next = 7;
|
|
7776
7948
|
break;
|
|
7777
7949
|
}
|
|
7778
7950
|
if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
|
|
7779
|
-
|
|
7951
|
+
_context34.next = 6;
|
|
7780
7952
|
break;
|
|
7781
7953
|
}
|
|
7782
|
-
|
|
7954
|
+
_context34.next = 6;
|
|
7783
7955
|
return this.sendSlotManager.publishStream(mediaType, stream);
|
|
7784
7956
|
case 6:
|
|
7785
7957
|
this.emitPublishStateChangeEvent({
|
|
@@ -7790,11 +7962,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7790
7962
|
});
|
|
7791
7963
|
case 7:
|
|
7792
7964
|
case "end":
|
|
7793
|
-
return
|
|
7965
|
+
return _context34.stop();
|
|
7794
7966
|
}
|
|
7795
|
-
},
|
|
7967
|
+
}, _callee34, this);
|
|
7796
7968
|
}));
|
|
7797
|
-
function publishStream(
|
|
7969
|
+
function publishStream(_x34, _x35) {
|
|
7798
7970
|
return _publishStream.apply(this, arguments);
|
|
7799
7971
|
}
|
|
7800
7972
|
return publishStream;
|
|
@@ -7810,21 +7982,21 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7810
7982
|
}, {
|
|
7811
7983
|
key: "unpublishStream",
|
|
7812
7984
|
value: (function () {
|
|
7813
|
-
var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
7814
|
-
return _regenerator.default.wrap(function
|
|
7815
|
-
while (1) switch (
|
|
7985
|
+
var _unpublishStream = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(mediaType, stream) {
|
|
7986
|
+
return _regenerator.default.wrap(function _callee35$(_context35) {
|
|
7987
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
7816
7988
|
case 0:
|
|
7817
7989
|
if (stream) {
|
|
7818
|
-
|
|
7990
|
+
_context35.next = 2;
|
|
7819
7991
|
break;
|
|
7820
7992
|
}
|
|
7821
|
-
return
|
|
7993
|
+
return _context35.abrupt("return");
|
|
7822
7994
|
case 2:
|
|
7823
7995
|
if (!(this.isMultistream && this.mediaProperties.webrtcMediaConnection)) {
|
|
7824
|
-
|
|
7996
|
+
_context35.next = 5;
|
|
7825
7997
|
break;
|
|
7826
7998
|
}
|
|
7827
|
-
|
|
7999
|
+
_context35.next = 5;
|
|
7828
8000
|
return this.sendSlotManager.unpublishStream(mediaType);
|
|
7829
8001
|
case 5:
|
|
7830
8002
|
this.emitPublishStateChangeEvent({
|
|
@@ -7835,11 +8007,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7835
8007
|
});
|
|
7836
8008
|
case 6:
|
|
7837
8009
|
case "end":
|
|
7838
|
-
return
|
|
8010
|
+
return _context35.stop();
|
|
7839
8011
|
}
|
|
7840
|
-
},
|
|
8012
|
+
}, _callee35, this);
|
|
7841
8013
|
}));
|
|
7842
|
-
function unpublishStream(
|
|
8014
|
+
function unpublishStream(_x36, _x37) {
|
|
7843
8015
|
return _unpublishStream.apply(this, arguments);
|
|
7844
8016
|
}
|
|
7845
8017
|
return unpublishStream;
|
|
@@ -7854,61 +8026,67 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7854
8026
|
}, {
|
|
7855
8027
|
key: "publishStreams",
|
|
7856
8028
|
value: (function () {
|
|
7857
|
-
var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
7858
|
-
var _streams$screenShare, _streams$screenShare2, _streams$screenShare3, _streams$screenShare4;
|
|
7859
|
-
var floorRequestNeeded, _streams$
|
|
7860
|
-
return _regenerator.default.wrap(function
|
|
7861
|
-
while (1) switch (
|
|
8029
|
+
var _publishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(streams) {
|
|
8030
|
+
var _streams$screenShare, _streams$screenShare2, _streams$microphone, _streams$camera, _streams$screenShare3, _streams$screenShare4, _streams$screenShare5, _streams$screenShare6, _streams$screenShare7, _streams$screenShare8;
|
|
8031
|
+
var floorRequestNeeded, _streams$screenShare9;
|
|
8032
|
+
return _regenerator.default.wrap(function _callee36$(_context36) {
|
|
8033
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
7862
8034
|
case 0:
|
|
7863
8035
|
this.checkMediaConnection();
|
|
7864
8036
|
if (!(!streams.microphone && !streams.camera && !((_streams$screenShare = streams.screenShare) !== null && _streams$screenShare !== void 0 && _streams$screenShare.audio) && !((_streams$screenShare2 = streams.screenShare) !== null && _streams$screenShare2 !== void 0 && _streams$screenShare2.video))) {
|
|
7865
|
-
|
|
8037
|
+
_context36.next = 3;
|
|
7866
8038
|
break;
|
|
7867
8039
|
}
|
|
7868
|
-
return
|
|
8040
|
+
return _context36.abrupt("return");
|
|
7869
8041
|
case 3:
|
|
8042
|
+
if (!((streams === null || streams === void 0 ? void 0 : (_streams$microphone = streams.microphone) === null || _streams$microphone === void 0 ? void 0 : _streams$microphone.readyState) === 'ended' || (streams === null || streams === void 0 ? void 0 : (_streams$camera = streams.camera) === null || _streams$camera === void 0 ? void 0 : _streams$camera.readyState) === 'ended' || (streams === null || streams === void 0 ? void 0 : (_streams$screenShare3 = streams.screenShare) === null || _streams$screenShare3 === void 0 ? void 0 : (_streams$screenShare4 = _streams$screenShare3.audio) === null || _streams$screenShare4 === void 0 ? void 0 : _streams$screenShare4.readyState) === 'ended' || (streams === null || streams === void 0 ? void 0 : (_streams$screenShare5 = streams.screenShare) === null || _streams$screenShare5 === void 0 ? void 0 : (_streams$screenShare6 = _streams$screenShare5.video) === null || _streams$screenShare6 === void 0 ? void 0 : _streams$screenShare6.readyState) === 'ended')) {
|
|
8043
|
+
_context36.next = 5;
|
|
8044
|
+
break;
|
|
8045
|
+
}
|
|
8046
|
+
throw new Error("Attempted to publish stream with ended readyState, correlationId=".concat(this.correlationId));
|
|
8047
|
+
case 5:
|
|
7870
8048
|
floorRequestNeeded = false; // Screenshare Audio is supported only in multi stream. So we check for screenshare audio presence only if it's a multi stream meeting
|
|
7871
|
-
if (!(this.isMultistream && (_streams$
|
|
7872
|
-
|
|
8049
|
+
if (!(this.isMultistream && (_streams$screenShare7 = streams.screenShare) !== null && _streams$screenShare7 !== void 0 && _streams$screenShare7.audio)) {
|
|
8050
|
+
_context36.next = 10;
|
|
7873
8051
|
break;
|
|
7874
8052
|
}
|
|
7875
|
-
|
|
8053
|
+
_context36.next = 9;
|
|
7876
8054
|
return this.setLocalShareAudioStream(streams.screenShare.audio);
|
|
7877
|
-
case
|
|
8055
|
+
case 9:
|
|
7878
8056
|
floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
|
|
7879
|
-
case
|
|
7880
|
-
if (!((_streams$
|
|
7881
|
-
|
|
8057
|
+
case 10:
|
|
8058
|
+
if (!((_streams$screenShare8 = streams.screenShare) !== null && _streams$screenShare8 !== void 0 && _streams$screenShare8.video)) {
|
|
8059
|
+
_context36.next = 14;
|
|
7882
8060
|
break;
|
|
7883
8061
|
}
|
|
7884
|
-
|
|
7885
|
-
return this.setLocalShareVideoStream((_streams$
|
|
7886
|
-
case
|
|
8062
|
+
_context36.next = 13;
|
|
8063
|
+
return this.setLocalShareVideoStream((_streams$screenShare9 = streams.screenShare) === null || _streams$screenShare9 === void 0 ? void 0 : _streams$screenShare9.video);
|
|
8064
|
+
case 13:
|
|
7887
8065
|
floorRequestNeeded = this.screenShareFloorState === ScreenShareFloorStatus.RELEASED;
|
|
7888
|
-
case
|
|
8066
|
+
case 14:
|
|
7889
8067
|
if (!streams.microphone) {
|
|
7890
|
-
|
|
8068
|
+
_context36.next = 17;
|
|
7891
8069
|
break;
|
|
7892
8070
|
}
|
|
7893
|
-
|
|
8071
|
+
_context36.next = 17;
|
|
7894
8072
|
return this.setLocalAudioStream(streams.microphone);
|
|
7895
|
-
case
|
|
8073
|
+
case 17:
|
|
7896
8074
|
if (!streams.camera) {
|
|
7897
|
-
|
|
8075
|
+
_context36.next = 20;
|
|
7898
8076
|
break;
|
|
7899
8077
|
}
|
|
7900
|
-
|
|
8078
|
+
_context36.next = 20;
|
|
7901
8079
|
return this.setLocalVideoStream(streams.camera);
|
|
7902
|
-
case
|
|
8080
|
+
case 20:
|
|
7903
8081
|
if (this.isMultistream) {
|
|
7904
|
-
|
|
8082
|
+
_context36.next = 23;
|
|
7905
8083
|
break;
|
|
7906
8084
|
}
|
|
7907
|
-
|
|
8085
|
+
_context36.next = 23;
|
|
7908
8086
|
return this.updateTranscodedMediaConnection();
|
|
7909
|
-
case
|
|
8087
|
+
case 23:
|
|
7910
8088
|
if (!floorRequestNeeded) {
|
|
7911
|
-
|
|
8089
|
+
_context36.next = 29;
|
|
7912
8090
|
break;
|
|
7913
8091
|
}
|
|
7914
8092
|
this.localShareInstanceId = _uuid.default.v4();
|
|
@@ -7932,15 +8110,15 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7932
8110
|
// we're sending the http request to Locus to request the screen share floor
|
|
7933
8111
|
// only after the SDP update, because that's how it's always been done for transcoded meetings
|
|
7934
8112
|
// and also if sharing from the start, we need confluence to have been created
|
|
7935
|
-
|
|
8113
|
+
_context36.next = 29;
|
|
7936
8114
|
return this.enqueueScreenShareFloorRequest();
|
|
7937
|
-
case
|
|
8115
|
+
case 29:
|
|
7938
8116
|
case "end":
|
|
7939
|
-
return
|
|
8117
|
+
return _context36.stop();
|
|
7940
8118
|
}
|
|
7941
|
-
},
|
|
8119
|
+
}, _callee36, this);
|
|
7942
8120
|
}));
|
|
7943
|
-
function publishStreams(
|
|
8121
|
+
function publishStreams(_x38) {
|
|
7944
8122
|
return _publishStreams.apply(this, arguments);
|
|
7945
8123
|
}
|
|
7946
8124
|
return publishStreams;
|
|
@@ -7955,10 +8133,10 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7955
8133
|
}, {
|
|
7956
8134
|
key: "unpublishStreams",
|
|
7957
8135
|
value: (function () {
|
|
7958
|
-
var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
8136
|
+
var _unpublishStreams = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(streams) {
|
|
7959
8137
|
var promises, _iterator, _step, stream;
|
|
7960
|
-
return _regenerator.default.wrap(function
|
|
7961
|
-
while (1) switch (
|
|
8138
|
+
return _regenerator.default.wrap(function _callee37$(_context37) {
|
|
8139
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
7962
8140
|
case 0:
|
|
7963
8141
|
this.checkMediaConnection();
|
|
7964
8142
|
promises = [];
|
|
@@ -7989,7 +8167,7 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
7989
8167
|
if (!this.isMultistream) {
|
|
7990
8168
|
promises.push(this.updateTranscodedMediaConnection());
|
|
7991
8169
|
}
|
|
7992
|
-
|
|
8170
|
+
_context37.next = 7;
|
|
7993
8171
|
return _promise.default.all(promises);
|
|
7994
8172
|
case 7:
|
|
7995
8173
|
// we're allowing for the SDK to support just audio share as well
|
|
@@ -8010,11 +8188,11 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
8010
8188
|
}
|
|
8011
8189
|
case 8:
|
|
8012
8190
|
case "end":
|
|
8013
|
-
return
|
|
8191
|
+
return _context37.stop();
|
|
8014
8192
|
}
|
|
8015
|
-
},
|
|
8193
|
+
}, _callee37, this);
|
|
8016
8194
|
}));
|
|
8017
|
-
function unpublishStreams(
|
|
8195
|
+
function unpublishStreams(_x39) {
|
|
8018
8196
|
return _unpublishStreams.apply(this, arguments);
|
|
8019
8197
|
}
|
|
8020
8198
|
return unpublishStreams;
|
|
@@ -8074,27 +8252,27 @@ var Meeting = exports.default = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
8074
8252
|
}], [{
|
|
8075
8253
|
key: "handleDeviceLogging",
|
|
8076
8254
|
value: (function () {
|
|
8077
|
-
var _handleDeviceLogging = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
8255
|
+
var _handleDeviceLogging = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
|
|
8078
8256
|
var devices;
|
|
8079
|
-
return _regenerator.default.wrap(function
|
|
8080
|
-
while (1) switch (
|
|
8257
|
+
return _regenerator.default.wrap(function _callee38$(_context38) {
|
|
8258
|
+
while (1) switch (_context38.prev = _context38.next) {
|
|
8081
8259
|
case 0:
|
|
8082
|
-
|
|
8083
|
-
|
|
8260
|
+
_context38.prev = 0;
|
|
8261
|
+
_context38.next = 3;
|
|
8084
8262
|
return (0, _mediaHelpers.getDevices)();
|
|
8085
8263
|
case 3:
|
|
8086
|
-
devices =
|
|
8264
|
+
devices = _context38.sent;
|
|
8087
8265
|
_util.default.handleDeviceLogging(devices);
|
|
8088
|
-
|
|
8266
|
+
_context38.next = 9;
|
|
8089
8267
|
break;
|
|
8090
8268
|
case 7:
|
|
8091
|
-
|
|
8092
|
-
|
|
8269
|
+
_context38.prev = 7;
|
|
8270
|
+
_context38.t0 = _context38["catch"](0);
|
|
8093
8271
|
case 9:
|
|
8094
8272
|
case "end":
|
|
8095
|
-
return
|
|
8273
|
+
return _context38.stop();
|
|
8096
8274
|
}
|
|
8097
|
-
},
|
|
8275
|
+
}, _callee38, null, [[0, 7]]);
|
|
8098
8276
|
}));
|
|
8099
8277
|
function handleDeviceLogging() {
|
|
8100
8278
|
return _handleDeviceLogging.apply(this, arguments);
|