@webex/plugin-meetings 3.0.0-beta.17 → 3.0.0-beta.19
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 +116 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/index.js +226 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/config.js +4 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +38 -5
- package/dist/constants.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +2 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +48 -0
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/parser.js +1 -0
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +19 -11
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +3 -3
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +4 -4
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/index.js +719 -490
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +25 -44
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +4 -57
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +2 -0
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +28 -18
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +14 -12
- package/dist/meetings/request.js.map +1 -1
- package/dist/member/index.js +9 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +14 -1
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +8 -6
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +3 -1
- package/dist/members/request.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +46 -6
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/multistreamMedia.js +4 -0
- package/dist/multistream/multistreamMedia.js.map +1 -1
- package/dist/multistream/receiveSlot.js +3 -3
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +8 -6
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +168 -63
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/reachability/index.js +63 -51
- package/dist/reachability/index.js.map +1 -1
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +25 -12
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +343 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +63 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/request.js +88 -68
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +72 -47
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/index.js +3 -3
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +18 -6
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/package.json +24 -19
- package/src/breakouts/README.md +190 -0
- package/src/breakouts/breakout.ts +110 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/index.ts +225 -0
- package/src/config.ts +4 -1
- package/src/constants.ts +35 -1
- package/src/locus-info/controlsUtils.ts +2 -0
- package/src/locus-info/index.ts +59 -1
- package/src/locus-info/parser.ts +1 -0
- package/src/locus-info/selfUtils.ts +8 -0
- package/src/media/index.ts +1 -2
- package/src/media/properties.ts +6 -9
- package/src/meeting/index.ts +398 -129
- package/src/meeting/request.ts +9 -31
- package/src/meeting/request.type.ts +2 -0
- package/src/meeting/util.ts +3 -60
- package/src/meeting-info/meeting-info-v2.ts +2 -0
- package/src/meetings/index.ts +10 -5
- package/src/meetings/request.ts +1 -1
- package/src/member/index.ts +9 -0
- package/src/member/util.ts +14 -1
- package/src/members/index.ts +1 -0
- package/src/members/request.ts +1 -0
- package/src/multistream/mediaRequestManager.ts +79 -15
- package/src/multistream/multistreamMedia.ts +4 -0
- package/src/multistream/receiveSlot.ts +17 -12
- package/src/multistream/receiveSlotManager.ts +22 -21
- package/src/multistream/remoteMedia.ts +1 -1
- package/src/multistream/remoteMediaGroup.ts +2 -2
- package/src/multistream/remoteMediaManager.ts +150 -37
- package/src/reachability/index.ts +16 -13
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.type.ts +25 -0
- package/src/reconnection-manager/index.ts +18 -9
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +315 -0
- package/src/recording-controller/util.ts +58 -0
- package/src/roap/request.ts +78 -73
- package/src/roap/turnDiscovery.ts +8 -6
- package/src/statsAnalyzer/index.ts +4 -4
- package/src/statsAnalyzer/mqaUtil.ts +6 -0
- package/test/unit/spec/breakouts/breakout.ts +119 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/index.ts +293 -0
- package/test/unit/spec/locus-info/controlsUtils.js +20 -0
- package/test/unit/spec/locus-info/index.js +103 -0
- package/test/unit/spec/locus-info/selfConstant.js +25 -0
- package/test/unit/spec/locus-info/selfUtils.js +84 -0
- package/test/unit/spec/media/index.ts +1 -1
- package/test/unit/spec/media/properties.ts +9 -9
- package/test/unit/spec/meeting/effectsState.js +5 -1
- package/test/unit/spec/meeting/index.js +419 -50
- package/test/unit/spec/meeting/request.js +17 -0
- package/test/unit/spec/meeting/utils.js +20 -129
- package/test/unit/spec/meetings/index.js +1 -0
- package/test/unit/spec/member/util.js +26 -1
- package/test/unit/spec/multistream/mediaRequestManager.ts +312 -50
- package/test/unit/spec/multistream/receiveSlot.ts +6 -6
- package/test/unit/spec/multistream/receiveSlotManager.ts +13 -13
- package/test/unit/spec/multistream/remoteMedia.ts +2 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +5 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +354 -65
- package/test/unit/spec/reachability/index.ts +58 -24
- package/test/unit/spec/reconnection-manager/index.js +42 -13
- package/test/unit/spec/recording-controller/index.js +231 -0
- package/test/unit/spec/recording-controller/util.js +102 -0
- package/test/unit/spec/roap/index.ts +2 -1
- package/test/unit/spec/roap/request.ts +114 -0
- package/test/unit/spec/roap/turnDiscovery.ts +45 -29
- package/test/unit/spec/stats-analyzer/index.js +2 -2
- package/test/utils/webex-test-users.js +1 -0
- package/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -18
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/src/media/internal-media-core-wrapper.ts +0 -9
package/dist/meeting/index.js
CHANGED
|
@@ -54,8 +54,10 @@ var _reconnectionManager = _interopRequireDefault(require("../reconnection-manag
|
|
|
54
54
|
var _request = _interopRequireDefault(require("./request"));
|
|
55
55
|
var _index2 = _interopRequireDefault(require("../members/index"));
|
|
56
56
|
var _util = _interopRequireDefault(require("./util"));
|
|
57
|
-
var _util2 = _interopRequireDefault(require("../
|
|
57
|
+
var _util2 = _interopRequireDefault(require("../recording-controller/util"));
|
|
58
|
+
var _util3 = _interopRequireDefault(require("../media/util"));
|
|
58
59
|
var _transcription = _interopRequireDefault(require("../transcription"));
|
|
60
|
+
var _reactions = require("../reactions/reactions");
|
|
59
61
|
var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
|
|
60
62
|
var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
|
|
61
63
|
var _reconnection = _interopRequireDefault(require("../common/errors/reconnection"));
|
|
@@ -70,8 +72,10 @@ var _receiveSlotManager = require("../multistream/receiveSlotManager");
|
|
|
70
72
|
var _mediaRequestManager = require("../multistream/mediaRequestManager");
|
|
71
73
|
var _remoteMediaManager = require("../multistream/remoteMediaManager");
|
|
72
74
|
var _multistreamMedia = require("../multistream/multistreamMedia");
|
|
73
|
-
var
|
|
75
|
+
var _breakouts = _interopRequireDefault(require("../breakouts"));
|
|
74
76
|
var _inMeetingActions = _interopRequireDefault(require("./in-meeting-actions"));
|
|
77
|
+
var _constants3 = require("../reactions/constants");
|
|
78
|
+
var _recordingController = _interopRequireDefault(require("../recording-controller"));
|
|
75
79
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
76
80
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
77
81
|
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); }; }
|
|
@@ -98,7 +102,8 @@ var MEDIA_UPDATE_TYPE = {
|
|
|
98
102
|
ALL: 'ALL',
|
|
99
103
|
AUDIO: 'AUDIO',
|
|
100
104
|
VIDEO: 'VIDEO',
|
|
101
|
-
SHARE: 'SHARE'
|
|
105
|
+
SHARE: 'SHARE',
|
|
106
|
+
LAMBDA: 'LAMBDA'
|
|
102
107
|
};
|
|
103
108
|
|
|
104
109
|
/**
|
|
@@ -399,6 +404,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
399
404
|
* @memberof Meeting
|
|
400
405
|
*/
|
|
401
406
|
function Meeting(attrs, _options) {
|
|
407
|
+
var _this$locusInfo, _this$locusInfo$links, _this$locusInfo$links2, _this$locusInfo$links3, _this$locusInfo2, _this$locusInfo2$full, _this$locusInfo3;
|
|
402
408
|
var _this;
|
|
403
409
|
(0, _classCallCheck2.default)(this, Meeting);
|
|
404
410
|
_this = _super.call(this, {}, _options);
|
|
@@ -411,6 +417,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
411
417
|
*/
|
|
412
418
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "attrs", void 0);
|
|
413
419
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "audio", void 0);
|
|
420
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "breakouts", void 0);
|
|
414
421
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "conversationUrl", void 0);
|
|
415
422
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "correlationId", void 0);
|
|
416
423
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "destination", void 0);
|
|
@@ -467,6 +474,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
467
474
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "queuedMediaUpdates", void 0);
|
|
468
475
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "recording", void 0);
|
|
469
476
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "remoteMediaManager", void 0);
|
|
477
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "recordingController", void 0);
|
|
470
478
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "requiredCaptcha", void 0);
|
|
471
479
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "receiveSlotManager", void 0);
|
|
472
480
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "shareStatus", void 0);
|
|
@@ -492,6 +500,31 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
492
500
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "selfId", void 0);
|
|
493
501
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", void 0);
|
|
494
502
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "namespace", _constants.MEETINGS);
|
|
503
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "processRelayEvent", function (e) {
|
|
504
|
+
switch (e.data.relayType) {
|
|
505
|
+
case _constants3.REACTION_RELAY_TYPES.REACTION:
|
|
506
|
+
if (
|
|
507
|
+
// @ts-ignore - config coming from registerPlugin
|
|
508
|
+
(_this.config.receiveReactions || options.receiveReactions) && _this.isReactionsSupported()) {
|
|
509
|
+
var _this$members$members = _this.members.membersCollection.get(e.data.sender.participantId),
|
|
510
|
+
name = _this$members$members.name;
|
|
511
|
+
var processedReaction = {
|
|
512
|
+
reaction: e.data.reaction,
|
|
513
|
+
sender: {
|
|
514
|
+
id: e.data.sender.participantId,
|
|
515
|
+
name: name
|
|
516
|
+
}
|
|
517
|
+
};
|
|
518
|
+
_triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
|
|
519
|
+
file: 'meeting/index',
|
|
520
|
+
function: 'join'
|
|
521
|
+
}, _constants.EVENT_TRIGGERS.MEETING_RECEIVE_REACTIONS, processedReaction);
|
|
522
|
+
}
|
|
523
|
+
break;
|
|
524
|
+
default:
|
|
525
|
+
break;
|
|
526
|
+
}
|
|
527
|
+
});
|
|
495
528
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getMediaStreams", function (mediaDirection) {
|
|
496
529
|
var audioVideo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.VIDEO_RESOLUTIONS[_this.mediaProperties.localQualityLevel];
|
|
497
530
|
var sharePreferences = arguments.length > 2 ? arguments[2] : undefined;
|
|
@@ -599,7 +632,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
599
632
|
};
|
|
600
633
|
_metrics.default.sendBehavioralMetric(metricName, data, metadata);
|
|
601
634
|
};
|
|
602
|
-
if (error instanceof _internalMediaCore.
|
|
635
|
+
if (error instanceof _internalMediaCore.Errors.SdpOfferCreationError) {
|
|
603
636
|
sendBehavioralMetric(_constants2.default.PEERCONNECTION_FAILURE, error, _this.id);
|
|
604
637
|
_metrics.default.postEvent({
|
|
605
638
|
event: _config.eventType.LOCAL_SDP_GENERATED,
|
|
@@ -609,7 +642,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
609
642
|
errors: [_metrics.default.generateErrorPayload(2001, true, _config.error.name.MEDIA_ENGINE, undefined)]
|
|
610
643
|
}
|
|
611
644
|
});
|
|
612
|
-
} else if (error instanceof _internalMediaCore.
|
|
645
|
+
} else if (error instanceof _internalMediaCore.Errors.SdpOfferHandlingError || error instanceof _internalMediaCore.Errors.SdpAnswerHandlingError) {
|
|
613
646
|
sendBehavioralMetric(_constants2.default.PEERCONNECTION_FAILURE, error, _this.id);
|
|
614
647
|
_metrics.default.postEvent({
|
|
615
648
|
event: _config.eventType.REMOTE_SDP_RECEIVED,
|
|
@@ -619,8 +652,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
619
652
|
errors: [_metrics.default.generateErrorPayload(2001, true, _config.error.name.MEDIA_ENGINE, undefined)]
|
|
620
653
|
}
|
|
621
654
|
});
|
|
622
|
-
} else if (error instanceof _internalMediaCore.
|
|
623
|
-
// this covers also the case of
|
|
655
|
+
} else if (error instanceof _internalMediaCore.Errors.SdpError) {
|
|
656
|
+
// this covers also the case of Errors.IceGatheringError which extends Errors.SdpError
|
|
624
657
|
sendBehavioralMetric(_constants2.default.INVALID_ICE_CANDIDATE, error, _this.id);
|
|
625
658
|
_metrics.default.postEvent({
|
|
626
659
|
event: _config.eventType.LOCAL_SDP_GENERATED,
|
|
@@ -633,16 +666,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
633
666
|
}
|
|
634
667
|
});
|
|
635
668
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setupMediaConnectionListeners", function () {
|
|
636
|
-
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.
|
|
669
|
+
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.ROAP_STARTED, function () {
|
|
637
670
|
_this.isRoapInProgress = true;
|
|
638
671
|
});
|
|
639
|
-
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.
|
|
672
|
+
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.ROAP_DONE, function () {
|
|
640
673
|
_this.mediaNegotiatedEvent();
|
|
641
674
|
_this.isRoapInProgress = false;
|
|
642
675
|
_this.processNextQueuedMediaUpdate();
|
|
643
676
|
});
|
|
644
|
-
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.
|
|
645
|
-
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.
|
|
677
|
+
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.ROAP_FAILURE, _this.handleRoapFailure);
|
|
678
|
+
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.ROAP_MESSAGE_TO_SEND, function (event) {
|
|
646
679
|
var LOG_HEADER = 'Meeting:index#setupMediaConnectionListeners.ROAP_MESSAGE_TO_SEND -->';
|
|
647
680
|
switch (event.roapMessage.messageType) {
|
|
648
681
|
case 'OK':
|
|
@@ -707,7 +740,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
707
740
|
});
|
|
708
741
|
break;
|
|
709
742
|
case 'ERROR':
|
|
710
|
-
if (event.roapMessage.errorType === _internalMediaCore.
|
|
743
|
+
if (event.roapMessage.errorType === _internalMediaCore.ErrorType.CONFLICT || event.roapMessage.errorType === _internalMediaCore.ErrorType.DOUBLECONFLICT) {
|
|
711
744
|
_metrics.default.sendBehavioralMetric(_constants2.default.ROAP_GLARE_CONDITION, {
|
|
712
745
|
correlation_id: _this.correlationId,
|
|
713
746
|
locus_id: _this.locusUrl.split('/').pop(),
|
|
@@ -732,22 +765,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
732
765
|
});
|
|
733
766
|
|
|
734
767
|
// eslint-disable-next-line no-param-reassign
|
|
735
|
-
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.
|
|
768
|
+
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.REMOTE_TRACK_ADDED, function (event) {
|
|
736
769
|
_loggerProxy.default.logger.log("Meeting:index#setupMediaConnectionListeners --> REMOTE_TRACK_ADDED event received for webrtcMediaConnection: ".concat((0, _stringify.default)(event)));
|
|
737
770
|
var mediaTrack = event.track;
|
|
738
771
|
|
|
739
772
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
740
773
|
var eventType;
|
|
741
774
|
switch (event.type) {
|
|
742
|
-
case _internalMediaCore.
|
|
775
|
+
case _internalMediaCore.RemoteTrackType.AUDIO:
|
|
743
776
|
eventType = _constants.EVENT_TYPES.REMOTE_AUDIO;
|
|
744
777
|
_this.mediaProperties.setRemoteAudioTrack(event.track);
|
|
745
778
|
break;
|
|
746
|
-
case _internalMediaCore.
|
|
779
|
+
case _internalMediaCore.RemoteTrackType.VIDEO:
|
|
747
780
|
eventType = _constants.EVENT_TYPES.REMOTE_VIDEO;
|
|
748
781
|
_this.mediaProperties.setRemoteVideoTrack(event.track);
|
|
749
782
|
break;
|
|
750
|
-
case _internalMediaCore.
|
|
783
|
+
case _internalMediaCore.RemoteTrackType.SCREENSHARE_VIDEO:
|
|
751
784
|
if (event.track) {
|
|
752
785
|
eventType = _constants.EVENT_TYPES.REMOTE_SHARE;
|
|
753
786
|
_this.mediaProperties.setRemoteShare(event.track);
|
|
@@ -768,11 +801,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
768
801
|
function: 'setupRemoteTrackListener:Event.REMOTE_TRACK_ADDED'
|
|
769
802
|
}, _constants.EVENT_TRIGGERS.MEDIA_READY, {
|
|
770
803
|
type: eventType,
|
|
771
|
-
stream:
|
|
804
|
+
stream: _util3.default.createMediaStream([mediaTrack])
|
|
772
805
|
});
|
|
773
806
|
}
|
|
774
807
|
});
|
|
775
|
-
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.
|
|
808
|
+
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.CONNECTION_STATE_CHANGED, function (event) {
|
|
776
809
|
var connectionFailed = function connectionFailed() {
|
|
777
810
|
// we know the media connection failed and browser will not attempt to recover it any more
|
|
778
811
|
// so reset the timer as it's not needed anymore, we want to reconnect immediately
|
|
@@ -799,13 +832,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
799
832
|
};
|
|
800
833
|
_loggerProxy.default.logger.info("Meeting:index#setupMediaConnectionListeners --> connection state changed to ".concat(event.state));
|
|
801
834
|
switch (event.state) {
|
|
802
|
-
case _internalMediaCore.
|
|
835
|
+
case _internalMediaCore.ConnectionState.Connecting:
|
|
803
836
|
_metrics.default.postEvent({
|
|
804
837
|
event: _config.eventType.ICE_START,
|
|
805
838
|
meeting: (0, _assertThisInitialized2.default)(_this)
|
|
806
839
|
});
|
|
807
840
|
break;
|
|
808
|
-
case _internalMediaCore.
|
|
841
|
+
case _internalMediaCore.ConnectionState.Connected:
|
|
809
842
|
_metrics.default.postEvent({
|
|
810
843
|
event: _config.eventType.ICE_END,
|
|
811
844
|
meeting: (0, _assertThisInitialized2.default)(_this)
|
|
@@ -817,27 +850,29 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
817
850
|
_this.setNetworkStatus(_constants.NETWORK_STATUS.CONNECTED);
|
|
818
851
|
_this.reconnectionManager.iceReconnected();
|
|
819
852
|
break;
|
|
820
|
-
case _internalMediaCore.
|
|
853
|
+
case _internalMediaCore.ConnectionState.Disconnected:
|
|
821
854
|
_this.setNetworkStatus(_constants.NETWORK_STATUS.DISCONNECTED);
|
|
822
855
|
_this.reconnectionManager.waitForIceReconnect().catch(function () {
|
|
823
856
|
_loggerProxy.default.logger.info('Meeting:index#setupMediaConnectionListeners --> state DISCONNECTED, automatic reconnection timed out.');
|
|
824
857
|
connectionFailed();
|
|
825
858
|
});
|
|
826
859
|
break;
|
|
827
|
-
case _internalMediaCore.
|
|
860
|
+
case _internalMediaCore.ConnectionState.Failed:
|
|
828
861
|
connectionFailed();
|
|
829
862
|
break;
|
|
830
863
|
default:
|
|
831
864
|
break;
|
|
832
865
|
}
|
|
833
866
|
});
|
|
834
|
-
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.
|
|
867
|
+
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.ACTIVE_SPEAKERS_CHANGED, function (msg) {
|
|
835
868
|
_triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
|
|
836
869
|
file: 'meeting/index',
|
|
837
870
|
function: 'setupMediaConnectionListeners'
|
|
838
871
|
}, _constants.EVENT_TRIGGERS.ACTIVE_SPEAKER_CHANGED, {
|
|
839
872
|
seqNum: msg.seqNum,
|
|
840
|
-
memberIds: msg.csis
|
|
873
|
+
memberIds: msg.csis
|
|
874
|
+
// @ts-ignore
|
|
875
|
+
.map(function (csi) {
|
|
841
876
|
var _this$members$findMem;
|
|
842
877
|
return (_this$members$findMem = _this.members.findMemberByCsi(csi)) === null || _this$members$findMem === void 0 ? void 0 : _this$members$findMem.id;
|
|
843
878
|
}).filter(function (item) {
|
|
@@ -845,7 +880,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
845
880
|
})
|
|
846
881
|
});
|
|
847
882
|
});
|
|
848
|
-
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.
|
|
883
|
+
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.VIDEO_SOURCES_COUNT_CHANGED, function (numTotalSources, numLiveSources) {
|
|
849
884
|
_triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
|
|
850
885
|
file: 'meeting/index',
|
|
851
886
|
function: 'setupMediaConnectionListeners'
|
|
@@ -854,7 +889,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
854
889
|
numLiveSources: numLiveSources
|
|
855
890
|
});
|
|
856
891
|
});
|
|
857
|
-
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.
|
|
892
|
+
_this.mediaProperties.webrtcMediaConnection.on(_internalMediaCore.Event.AUDIO_SOURCES_COUNT_CHANGED, function (numTotalSources, numLiveSources) {
|
|
858
893
|
_triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
|
|
859
894
|
file: 'meeting/index',
|
|
860
895
|
function: 'setupMediaConnectionListeners'
|
|
@@ -870,7 +905,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
870
905
|
// TODO: might have to send the same event to the developer
|
|
871
906
|
// Add ip address info if geo hint is present
|
|
872
907
|
// @ts-ignore fix type
|
|
873
|
-
options.data.intervalMetadata.peerReflexiveIP =
|
|
908
|
+
options.data.intervalMetadata.peerReflexiveIP =
|
|
909
|
+
// @ts-ignore
|
|
910
|
+
((_this$webex$meetings$ = _this.webex.meetings.geoHintInfo) === null || _this$webex$meetings$ === void 0 ? void 0 : _this$webex$meetings$.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
|
|
874
911
|
_metrics.default.postEvent({
|
|
875
912
|
event: _config.eventType.MEDIA_QUALITY,
|
|
876
913
|
meeting: (0, _assertThisInitialized2.default)(_this),
|
|
@@ -941,20 +978,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
941
978
|
pendingPromiseResolve = _this$queuedMediaUpda.pendingPromiseResolve,
|
|
942
979
|
pendingPromiseReject = _this$queuedMediaUpda.pendingPromiseReject,
|
|
943
980
|
mediaUpdateType = _this$queuedMediaUpda.mediaUpdateType,
|
|
944
|
-
|
|
981
|
+
_options2 = _this$queuedMediaUpda.options;
|
|
945
982
|
_loggerProxy.default.logger.log("Meeting:index#processNextQueuedMediaUpdate --> performing delayed media update type=".concat(mediaUpdateType));
|
|
946
983
|
switch (mediaUpdateType) {
|
|
947
984
|
case MEDIA_UPDATE_TYPE.ALL:
|
|
948
|
-
_this.updateMedia(
|
|
985
|
+
_this.updateMedia(_options2).then(pendingPromiseResolve, pendingPromiseReject);
|
|
949
986
|
break;
|
|
950
987
|
case MEDIA_UPDATE_TYPE.AUDIO:
|
|
951
|
-
_this.updateAudio(
|
|
988
|
+
_this.updateAudio(_options2).then(pendingPromiseResolve, pendingPromiseReject);
|
|
952
989
|
break;
|
|
953
990
|
case MEDIA_UPDATE_TYPE.VIDEO:
|
|
954
|
-
_this.updateVideo(
|
|
991
|
+
_this.updateVideo(_options2).then(pendingPromiseResolve, pendingPromiseReject);
|
|
955
992
|
break;
|
|
956
993
|
case MEDIA_UPDATE_TYPE.SHARE:
|
|
957
|
-
_this.updateShare(
|
|
994
|
+
_this.updateShare(_options2).then(pendingPromiseResolve, pendingPromiseReject);
|
|
995
|
+
break;
|
|
996
|
+
case MEDIA_UPDATE_TYPE.LAMBDA:
|
|
997
|
+
_options2.lambda().then(pendingPromiseResolve, pendingPromiseReject);
|
|
958
998
|
break;
|
|
959
999
|
default:
|
|
960
1000
|
_loggerProxy.default.logger.error("Peer-connection-manager:index#processNextQueuedMediaUpdate --> unsupported media update type ".concat(mediaUpdateType, " found in the queue"));
|
|
@@ -1081,28 +1121,58 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1081
1121
|
*/
|
|
1082
1122
|
// TODO: needs to be defined as a class
|
|
1083
1123
|
_this.meetingInfo = {};
|
|
1124
|
+
/**
|
|
1125
|
+
* @instance
|
|
1126
|
+
* @type {Breakouts}
|
|
1127
|
+
* @public
|
|
1128
|
+
* @memberof Meeting
|
|
1129
|
+
*/
|
|
1130
|
+
// @ts-ignore
|
|
1131
|
+
_this.breakouts = new _breakouts.default({}, {
|
|
1132
|
+
parent: _this.webex
|
|
1133
|
+
});
|
|
1084
1134
|
/**
|
|
1085
1135
|
* helper class for managing receive slots (for multistream media connections)
|
|
1086
1136
|
*/
|
|
1087
1137
|
_this.receiveSlotManager = new _receiveSlotManager.ReceiveSlotManager((0, _assertThisInitialized2.default)(_this));
|
|
1088
1138
|
/**
|
|
1089
|
-
*
|
|
1090
|
-
* All media requests sent out for
|
|
1139
|
+
* Object containing helper classes for managing media requests for audio/video/screenshare (for multistream media connections)
|
|
1140
|
+
* All multistream media requests sent out for this meeting have to go through them.
|
|
1091
1141
|
*/
|
|
1092
1142
|
_this.mediaRequestManagers = {
|
|
1093
|
-
|
|
1143
|
+
// @ts-ignore - config coming from registerPlugin
|
|
1144
|
+
audio: new _mediaRequestManager.MediaRequestManager(_this.config.degradationPreferences, function (mediaRequests) {
|
|
1094
1145
|
if (!_this.mediaProperties.webrtcMediaConnection) {
|
|
1095
1146
|
_loggerProxy.default.logger.warn('Meeting:index#mediaRequestManager --> trying to send audio media request before media connection was created');
|
|
1096
1147
|
return;
|
|
1097
1148
|
}
|
|
1098
|
-
_this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.
|
|
1149
|
+
_this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaType.AudioMain, mediaRequests);
|
|
1099
1150
|
}),
|
|
1100
|
-
|
|
1151
|
+
// @ts-ignore - config coming from registerPlugin
|
|
1152
|
+
video: new _mediaRequestManager.MediaRequestManager(_this.config.degradationPreferences, function (mediaRequests) {
|
|
1101
1153
|
if (!_this.mediaProperties.webrtcMediaConnection) {
|
|
1102
1154
|
_loggerProxy.default.logger.warn('Meeting:index#mediaRequestManager --> trying to send video media request before media connection was created');
|
|
1103
1155
|
return;
|
|
1104
1156
|
}
|
|
1105
|
-
_this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.
|
|
1157
|
+
_this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaType.VideoMain, mediaRequests);
|
|
1158
|
+
}),
|
|
1159
|
+
screenShareAudio: new _mediaRequestManager.MediaRequestManager(
|
|
1160
|
+
// @ts-ignore - config coming from registerPlugin
|
|
1161
|
+
_this.config.degradationPreferences, function (mediaRequests) {
|
|
1162
|
+
if (!_this.mediaProperties.webrtcMediaConnection) {
|
|
1163
|
+
_loggerProxy.default.logger.warn('Meeting:index#mediaRequestManager --> trying to send screenshare audio media request before media connection was created');
|
|
1164
|
+
return;
|
|
1165
|
+
}
|
|
1166
|
+
_this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaType.AudioSlides, mediaRequests);
|
|
1167
|
+
}),
|
|
1168
|
+
screenShareVideo: new _mediaRequestManager.MediaRequestManager(
|
|
1169
|
+
// @ts-ignore - config coming from registerPlugin
|
|
1170
|
+
_this.config.degradationPreferences, function (mediaRequests) {
|
|
1171
|
+
if (!_this.mediaProperties.webrtcMediaConnection) {
|
|
1172
|
+
_loggerProxy.default.logger.warn('Meeting:index#mediaRequestManager --> trying to send screenshare video media request before media connection was created');
|
|
1173
|
+
return;
|
|
1174
|
+
}
|
|
1175
|
+
_this.mediaProperties.webrtcMediaConnection.requestMedia(_internalMediaCore.MediaType.VideoSlides, mediaRequests);
|
|
1106
1176
|
})
|
|
1107
1177
|
};
|
|
1108
1178
|
/**
|
|
@@ -1115,8 +1185,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1115
1185
|
locusUrl: attrs.locus && attrs.locus.url,
|
|
1116
1186
|
receiveSlotManager: _this.receiveSlotManager,
|
|
1117
1187
|
mediaRequestManagers: _this.mediaRequestManagers
|
|
1118
|
-
|
|
1119
|
-
|
|
1188
|
+
},
|
|
1189
|
+
// @ts-ignore - Fix type
|
|
1190
|
+
{
|
|
1120
1191
|
parent: _this.webex
|
|
1121
1192
|
});
|
|
1122
1193
|
/**
|
|
@@ -1421,6 +1492,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1421
1492
|
*/
|
|
1422
1493
|
// @ts-ignore - Fix type
|
|
1423
1494
|
_this.locusInfo = new _locusInfo.default(_this.updateMeetingObject.bind((0, _assertThisInitialized2.default)(_this)), _this.webex, _this.id);
|
|
1495
|
+
|
|
1424
1496
|
// We had to add listeners first before setting up the locus instance
|
|
1425
1497
|
/**
|
|
1426
1498
|
* @instance
|
|
@@ -1523,6 +1595,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1523
1595
|
* @memberof Meeting
|
|
1524
1596
|
*/
|
|
1525
1597
|
_this.keepAliveTimerId = null;
|
|
1598
|
+
|
|
1599
|
+
/**
|
|
1600
|
+
* The class that helps to control recording functions: start, stop, pause, resume, etc
|
|
1601
|
+
* @instance
|
|
1602
|
+
* @type {RecordingController}
|
|
1603
|
+
* @public
|
|
1604
|
+
* @memberof Meeting
|
|
1605
|
+
*/
|
|
1606
|
+
_this.recordingController = new _recordingController.default(_this.meetingRequest, {
|
|
1607
|
+
serviceUrl: (_this$locusInfo = _this.locusInfo) === null || _this$locusInfo === void 0 ? void 0 : (_this$locusInfo$links = _this$locusInfo.links) === null || _this$locusInfo$links === void 0 ? void 0 : (_this$locusInfo$links2 = _this$locusInfo$links.services) === null || _this$locusInfo$links2 === void 0 ? void 0 : (_this$locusInfo$links3 = _this$locusInfo$links2.record) === null || _this$locusInfo$links3 === void 0 ? void 0 : _this$locusInfo$links3.url,
|
|
1608
|
+
sessionId: (_this$locusInfo2 = _this.locusInfo) === null || _this$locusInfo2 === void 0 ? void 0 : (_this$locusInfo2$full = _this$locusInfo2.fullState) === null || _this$locusInfo2$full === void 0 ? void 0 : _this$locusInfo2$full.sessionId,
|
|
1609
|
+
locusUrl: (_this$locusInfo3 = _this.locusInfo) === null || _this$locusInfo3 === void 0 ? void 0 : _this$locusInfo3.url,
|
|
1610
|
+
displayHints: []
|
|
1611
|
+
});
|
|
1526
1612
|
_this.setUpLocusInfoListeners();
|
|
1527
1613
|
_this.locusInfo.init(attrs.locus ? attrs.locus : {});
|
|
1528
1614
|
_this.hasJoinedOnce = false;
|
|
@@ -1600,8 +1686,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1600
1686
|
_context.next = 33;
|
|
1601
1687
|
break;
|
|
1602
1688
|
}
|
|
1603
|
-
// @ts-ignore
|
|
1604
|
-
|
|
1689
|
+
_loggerProxy.default.logger.info( // @ts-ignore
|
|
1690
|
+
"Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - password required (code=").concat(_context.t0 === null || _context.t0 === void 0 ? void 0 : (_err$body = _context.t0.body) === null || _err$body === void 0 ? void 0 : _err$body.code, ")."));
|
|
1605
1691
|
|
|
1606
1692
|
// when wbxappapi requires password it still populates partial meeting info in the response
|
|
1607
1693
|
if (_context.t0.meetingInfo) {
|
|
@@ -1623,8 +1709,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1623
1709
|
_context.next = 41;
|
|
1624
1710
|
break;
|
|
1625
1711
|
}
|
|
1626
|
-
// @ts-ignore
|
|
1627
|
-
|
|
1712
|
+
_loggerProxy.default.logger.info( // @ts-ignore
|
|
1713
|
+
"Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ".concat(this.destination, " - captcha required (code=").concat(_context.t0 === null || _context.t0 === void 0 ? void 0 : (_err$body2 = _context.t0.body) === null || _err$body2 === void 0 ? void 0 : _err$body2.code, ")."));
|
|
1628
1714
|
this.meetingInfoFailureReason = this.requiredCaptcha ? _constants.MEETING_INFO_FAILURE_REASON.WRONG_CAPTCHA : _constants.MEETING_INFO_FAILURE_REASON.WRONG_PASSWORD;
|
|
1629
1715
|
if (_context.t0.isPasswordRequired) {
|
|
1630
1716
|
this.passwordStatus = _constants.PASSWORD_STATUS.REQUIRED;
|
|
@@ -1699,7 +1785,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1699
1785
|
// we have to pass the wbxappapi hostname as the siteFullName parameter
|
|
1700
1786
|
var _URL = new URL(this.requiredCaptcha.refreshURL),
|
|
1701
1787
|
hostname = _URL.hostname;
|
|
1702
|
-
return this.meetingRequest
|
|
1788
|
+
return this.meetingRequest
|
|
1789
|
+
// @ts-ignore
|
|
1790
|
+
.refreshCaptcha({
|
|
1703
1791
|
captchaRefreshUrl: "".concat(this.requiredCaptcha.refreshURL, "&siteFullName=").concat(hostname),
|
|
1704
1792
|
captchaId: this.requiredCaptcha.captchaId
|
|
1705
1793
|
}).then(function (response) {
|
|
@@ -1724,6 +1812,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1724
1812
|
// meeting update listeners
|
|
1725
1813
|
this.setUpLocusInfoSelfListener();
|
|
1726
1814
|
this.setUpLocusInfoMeetingListener();
|
|
1815
|
+
this.setUpLocusServicesListener();
|
|
1727
1816
|
// members update listeners
|
|
1728
1817
|
this.setUpLocusFullStateListener();
|
|
1729
1818
|
this.setUpLocusUrlListener();
|
|
@@ -1736,6 +1825,37 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1736
1825
|
this.setUpLocusInfoMeetingInfoListener();
|
|
1737
1826
|
this.setUpLocusInfoAssignHostListener();
|
|
1738
1827
|
this.setUpLocusInfoMediaInactiveListener();
|
|
1828
|
+
this.setUpBreakoutsListener();
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* Set up the listeners for breakouts
|
|
1833
|
+
* @returns {undefined}
|
|
1834
|
+
* @private
|
|
1835
|
+
* @memberof Meeting
|
|
1836
|
+
*/
|
|
1837
|
+
}, {
|
|
1838
|
+
key: "setUpBreakoutsListener",
|
|
1839
|
+
value: function setUpBreakoutsListener() {
|
|
1840
|
+
var _this4 = this;
|
|
1841
|
+
this.breakouts.on(_constants.BREAKOUTS.EVENTS.BREAKOUTS_CLOSING, function () {
|
|
1842
|
+
_triggerProxy.default.trigger(_this4, {
|
|
1843
|
+
file: 'meeting/index',
|
|
1844
|
+
function: 'setUpBreakoutsListener'
|
|
1845
|
+
}, _constants.EVENT_TRIGGERS.MEETING_BREAKOUTS_CLOSING);
|
|
1846
|
+
});
|
|
1847
|
+
this.breakouts.on(_constants.BREAKOUTS.EVENTS.MESSAGE, function (messageEvent) {
|
|
1848
|
+
_triggerProxy.default.trigger(_this4, {
|
|
1849
|
+
file: 'meeting/index',
|
|
1850
|
+
function: 'setUpBreakoutsListener'
|
|
1851
|
+
}, _constants.EVENT_TRIGGERS.MEETING_BREAKOUTS_MESSAGE, messageEvent);
|
|
1852
|
+
});
|
|
1853
|
+
this.breakouts.on(_constants.BREAKOUTS.EVENTS.MEMBERS_UPDATE, function () {
|
|
1854
|
+
_triggerProxy.default.trigger(_this4, {
|
|
1855
|
+
file: 'meeting/index',
|
|
1856
|
+
function: 'setUpBreakoutsListener'
|
|
1857
|
+
}, _constants.EVENT_TRIGGERS.MEETING_BREAKOUTS_UPDATE);
|
|
1858
|
+
});
|
|
1739
1859
|
}
|
|
1740
1860
|
|
|
1741
1861
|
/**
|
|
@@ -1747,30 +1867,30 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1747
1867
|
}, {
|
|
1748
1868
|
key: "setUpLocusInfoMediaInactiveListener",
|
|
1749
1869
|
value: function setUpLocusInfoMediaInactiveListener() {
|
|
1750
|
-
var
|
|
1870
|
+
var _this5 = this;
|
|
1751
1871
|
// User gets kicked off the meeting due to inactivity or user did a refresh
|
|
1752
1872
|
this.locusInfo.on(_constants.EVENTS.DISCONNECT_DUE_TO_INACTIVITY, function (res) {
|
|
1753
1873
|
// https:// jira-eng-gpk2.cisco.com/jira/browse/SPARK-240520
|
|
1754
1874
|
// TODO: send custom parameter explaining why the inactivity happened
|
|
1755
1875
|
// refresh , no media or network got dsconnected or something else
|
|
1756
1876
|
_metrics.default.sendBehavioralMetric(_constants2.default.DISCONNECT_DUE_TO_INACTIVITY, {
|
|
1757
|
-
correlation_id:
|
|
1758
|
-
locus_id:
|
|
1877
|
+
correlation_id: _this5.correlationId,
|
|
1878
|
+
locus_id: _this5.locusId
|
|
1759
1879
|
});
|
|
1760
1880
|
|
|
1761
1881
|
// Upload logs on media inactivity
|
|
1762
1882
|
// Normally media should not be inactive
|
|
1763
|
-
_triggerProxy.default.trigger(
|
|
1883
|
+
_triggerProxy.default.trigger(_this5, {
|
|
1764
1884
|
file: 'meeting/index',
|
|
1765
1885
|
function: 'setUpLocusInfoMediaInactiveListener'
|
|
1766
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
1886
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this5);
|
|
1767
1887
|
_loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMediaInactiveListener --> Meeting disconnected due to inactivity: ".concat(res.reason));
|
|
1768
1888
|
|
|
1769
1889
|
// @ts-ignore - config coming from registerPlugin
|
|
1770
|
-
if (
|
|
1771
|
-
|
|
1890
|
+
if (_this5.config.reconnection.autoRejoin) {
|
|
1891
|
+
_this5.reconnect();
|
|
1772
1892
|
} else {
|
|
1773
|
-
_triggerProxy.default.trigger(
|
|
1893
|
+
_triggerProxy.default.trigger(_this5, {
|
|
1774
1894
|
file: 'meeting/index',
|
|
1775
1895
|
function: 'setUpLocusInfoMediaInactiveListener'
|
|
1776
1896
|
}, _constants.EVENT_TRIGGERS.MEETING_SELF_LEFT, res.reason);
|
|
@@ -1787,16 +1907,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1787
1907
|
}, {
|
|
1788
1908
|
key: "setUpLocusInfoAssignHostListener",
|
|
1789
1909
|
value: function setUpLocusInfoAssignHostListener() {
|
|
1790
|
-
var
|
|
1910
|
+
var _this6 = this;
|
|
1791
1911
|
this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_CAN_ASSIGN_HOST, function (payload) {
|
|
1792
|
-
var changed =
|
|
1912
|
+
var changed = _this6.inMeetingActions.set({
|
|
1793
1913
|
canAssignHost: payload.canAssignHost
|
|
1794
1914
|
});
|
|
1795
1915
|
if (changed) {
|
|
1796
|
-
_triggerProxy.default.trigger(
|
|
1916
|
+
_triggerProxy.default.trigger(_this6, {
|
|
1797
1917
|
file: 'meeting/index',
|
|
1798
1918
|
function: 'setUpLocusInfoAssignHostListener'
|
|
1799
|
-
}, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE,
|
|
1919
|
+
}, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, _this6.inMeetingActions.get());
|
|
1800
1920
|
}
|
|
1801
1921
|
});
|
|
1802
1922
|
}
|
|
@@ -1810,9 +1930,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1810
1930
|
}, {
|
|
1811
1931
|
key: "setUpLocusFullStateListener",
|
|
1812
1932
|
value: function setUpLocusFullStateListener() {
|
|
1813
|
-
var
|
|
1933
|
+
var _this7 = this;
|
|
1814
1934
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.FULL_STATE_MEETING_STATE_CHANGE, function (payload) {
|
|
1815
|
-
_triggerProxy.default.trigger(
|
|
1935
|
+
_triggerProxy.default.trigger(_this7, {
|
|
1816
1936
|
file: 'meeting/index',
|
|
1817
1937
|
function: 'setUpLocusFullStateListener'
|
|
1818
1938
|
}, _constants.EVENT_TRIGGERS.MEETING_STATE_CHANGE, {
|
|
@@ -1820,7 +1940,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1820
1940
|
});
|
|
1821
1941
|
});
|
|
1822
1942
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.FULL_STATE_TYPE_UPDATE, function (payload) {
|
|
1823
|
-
|
|
1943
|
+
_this7.members.locusFullStateTypeUpdate(payload);
|
|
1824
1944
|
});
|
|
1825
1945
|
}
|
|
1826
1946
|
|
|
@@ -2009,15 +2129,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2009
2129
|
}, {
|
|
2010
2130
|
key: "setUpLocusSelfListener",
|
|
2011
2131
|
value: function setUpLocusSelfListener() {
|
|
2012
|
-
var
|
|
2132
|
+
var _this8 = this;
|
|
2013
2133
|
this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_SELF, function (payload) {
|
|
2014
|
-
|
|
2015
|
-
|
|
2134
|
+
_this8.members.locusSelfUpdate(payload);
|
|
2135
|
+
_this8.pstnUpdate(payload);
|
|
2016
2136
|
|
|
2017
2137
|
// If user moved to a JOINED state and there is a pending floor grant trigger it
|
|
2018
|
-
if (
|
|
2019
|
-
|
|
2020
|
-
|
|
2138
|
+
if (_this8.floorGrantPending && payload.newSelf.state === _constants.MEETING_STATE.STATES.JOINED) {
|
|
2139
|
+
_this8.requestScreenShareFloor().then(function () {
|
|
2140
|
+
_this8.floorGrantPending = false;
|
|
2021
2141
|
});
|
|
2022
2142
|
}
|
|
2023
2143
|
});
|
|
@@ -2033,14 +2153,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2033
2153
|
}, {
|
|
2034
2154
|
key: "pstnUpdate",
|
|
2035
2155
|
value: function pstnUpdate(payload) {
|
|
2036
|
-
var
|
|
2156
|
+
var _this9 = this;
|
|
2037
2157
|
if (this.locusInfo.self) {
|
|
2038
2158
|
var _payload$newSelf, _payload$newSelf2;
|
|
2039
2159
|
var dialInPstnDevice = (_payload$newSelf = payload.newSelf) === null || _payload$newSelf === void 0 ? void 0 : _payload$newSelf.pstnDevices.find(function (device) {
|
|
2040
|
-
return device.url ===
|
|
2160
|
+
return device.url === _this9.dialInUrl;
|
|
2041
2161
|
});
|
|
2042
2162
|
var dialOutPstnDevice = (_payload$newSelf2 = payload.newSelf) === null || _payload$newSelf2 === void 0 ? void 0 : _payload$newSelf2.pstnDevices.find(function (device) {
|
|
2043
|
-
return device.url ===
|
|
2163
|
+
return device.url === _this9.dialOutUrl;
|
|
2044
2164
|
});
|
|
2045
2165
|
var changed = false;
|
|
2046
2166
|
if (dialInPstnDevice) {
|
|
@@ -2088,9 +2208,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2088
2208
|
}, {
|
|
2089
2209
|
key: "setUpLocusHostListener",
|
|
2090
2210
|
value: function setUpLocusHostListener() {
|
|
2091
|
-
var
|
|
2211
|
+
var _this10 = this;
|
|
2092
2212
|
this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_HOST, function (payload) {
|
|
2093
|
-
|
|
2213
|
+
_this10.members.locusHostUpdate(payload);
|
|
2094
2214
|
});
|
|
2095
2215
|
}
|
|
2096
2216
|
|
|
@@ -2105,9 +2225,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2105
2225
|
}, {
|
|
2106
2226
|
key: "setUpLocusParticipantsListener",
|
|
2107
2227
|
value: function setUpLocusParticipantsListener() {
|
|
2108
|
-
var
|
|
2228
|
+
var _this11 = this;
|
|
2109
2229
|
this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_PARTICIPANTS, function (payload) {
|
|
2110
|
-
|
|
2230
|
+
_this11.members.locusParticipantsUpdate(payload);
|
|
2111
2231
|
});
|
|
2112
2232
|
}
|
|
2113
2233
|
|
|
@@ -2132,7 +2252,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2132
2252
|
}, {
|
|
2133
2253
|
key: "setupLocusControlsListener",
|
|
2134
2254
|
value: function setupLocusControlsListener() {
|
|
2135
|
-
var
|
|
2255
|
+
var _this12 = this;
|
|
2136
2256
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED, function (_ref5) {
|
|
2137
2257
|
var state = _ref5.state,
|
|
2138
2258
|
modifiedBy = _ref5.modifiedBy,
|
|
@@ -2157,19 +2277,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2157
2277
|
}
|
|
2158
2278
|
|
|
2159
2279
|
// `RESUMED` state should be converted to `RECORDING` after triggering the event
|
|
2160
|
-
|
|
2280
|
+
_this12.recording = {
|
|
2161
2281
|
state: state === _constants.RECORDING_STATE.RESUMED ? _constants.RECORDING_STATE.RECORDING : state,
|
|
2162
2282
|
modifiedBy: modifiedBy,
|
|
2163
2283
|
lastModified: lastModified
|
|
2164
2284
|
};
|
|
2165
|
-
_triggerProxy.default.trigger(
|
|
2285
|
+
_triggerProxy.default.trigger(_this12, {
|
|
2166
2286
|
file: 'meeting/index',
|
|
2167
2287
|
function: 'setupLocusControlsListener'
|
|
2168
|
-
}, event,
|
|
2288
|
+
}, event, _this12.recording);
|
|
2169
2289
|
});
|
|
2170
2290
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_CONTAINER_UPDATED, function (_ref6) {
|
|
2171
2291
|
var meetingContainerUrl = _ref6.meetingContainerUrl;
|
|
2172
|
-
_triggerProxy.default.trigger(
|
|
2292
|
+
_triggerProxy.default.trigger(_this12, {
|
|
2173
2293
|
file: 'meeting/index',
|
|
2174
2294
|
function: 'setupLocusControlsListener'
|
|
2175
2295
|
}, _constants.EVENT_TRIGGERS.MEETING_MEETING_CONTAINER_UPDATE, {
|
|
@@ -2180,10 +2300,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2180
2300
|
var caption = _ref7.caption,
|
|
2181
2301
|
transcribing = _ref7.transcribing;
|
|
2182
2302
|
// @ts-ignore - config coming from registerPlugin
|
|
2183
|
-
if (transcribing &&
|
|
2184
|
-
|
|
2185
|
-
} else if (!transcribing &&
|
|
2186
|
-
_triggerProxy.default.trigger(
|
|
2303
|
+
if (transcribing && _this12.transcription && _this12.config.receiveTranscription) {
|
|
2304
|
+
_this12.receiveTranscription();
|
|
2305
|
+
} else if (!transcribing && _this12.transcription) {
|
|
2306
|
+
_triggerProxy.default.trigger(_this12, {
|
|
2187
2307
|
file: 'meeting/index',
|
|
2188
2308
|
function: 'setupLocusControlsListener'
|
|
2189
2309
|
}, _constants.EVENT_TRIGGERS.MEETING_STOPPED_RECEIVING_TRANSCRIPTION, {
|
|
@@ -2192,9 +2312,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2192
2312
|
});
|
|
2193
2313
|
}
|
|
2194
2314
|
});
|
|
2195
|
-
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.
|
|
2196
|
-
var
|
|
2197
|
-
|
|
2315
|
+
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED, function (_ref8) {
|
|
2316
|
+
var breakout = _ref8.breakout;
|
|
2317
|
+
_this12.breakouts.updateBreakout(breakout);
|
|
2318
|
+
_triggerProxy.default.trigger(_this12, {
|
|
2319
|
+
file: 'meeting/index',
|
|
2320
|
+
function: 'setupLocusControlsListener'
|
|
2321
|
+
}, _constants.EVENT_TRIGGERS.MEETING_BREAKOUTS_UPDATE);
|
|
2322
|
+
});
|
|
2323
|
+
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED, function (_ref9) {
|
|
2324
|
+
var entryExitTone = _ref9.entryExitTone;
|
|
2325
|
+
_triggerProxy.default.trigger(_this12, {
|
|
2198
2326
|
file: 'meeting/index',
|
|
2199
2327
|
function: 'setupLocusControlsListener'
|
|
2200
2328
|
}, _constants.EVENT_TRIGGERS.MEETING_ENTRY_EXIT_TONE_UPDATE, {
|
|
@@ -2214,7 +2342,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2214
2342
|
}, {
|
|
2215
2343
|
key: "setUpLocusMediaSharesListener",
|
|
2216
2344
|
value: function setUpLocusMediaSharesListener() {
|
|
2217
|
-
var
|
|
2345
|
+
var _this13 = this;
|
|
2218
2346
|
// Will get triggered on local and remote share
|
|
2219
2347
|
this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, function (payload) {
|
|
2220
2348
|
var _payload$previous, _payload$previous2;
|
|
@@ -2228,18 +2356,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2228
2356
|
// (this happens when we steal presentation from remote)
|
|
2229
2357
|
return;
|
|
2230
2358
|
}
|
|
2231
|
-
var newShareStatus =
|
|
2359
|
+
var newShareStatus = _this13.shareStatus;
|
|
2232
2360
|
|
|
2233
2361
|
// REMOTE - check if remote started sharing
|
|
2234
|
-
if (
|
|
2362
|
+
if (_this13.selfId !== contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
|
|
2235
2363
|
// CONTENT - sharing content remote
|
|
2236
2364
|
newShareStatus = _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE;
|
|
2237
2365
|
}
|
|
2238
2366
|
// LOCAL - check if we started sharing content
|
|
2239
|
-
else if (
|
|
2240
|
-
var
|
|
2241
|
-
if (((
|
|
2242
|
-
|
|
2367
|
+
else if (_this13.selfId === contentShare.beneficiaryId && contentShare.disposition === _constants.FLOOR_ACTION.GRANTED) {
|
|
2368
|
+
var _this13$mediaProperti;
|
|
2369
|
+
if (((_this13$mediaProperti = _this13.mediaProperties.shareTrack) === null || _this13$mediaProperti === void 0 ? void 0 : _this13$mediaProperti.readyState) === 'ended') {
|
|
2370
|
+
_this13.stopShare({
|
|
2243
2371
|
skipSignalingCheck: true
|
|
2244
2372
|
}).catch(function (error) {
|
|
2245
2373
|
_loggerProxy.default.logger.log('Meeting:index#setUpLocusMediaSharesListener --> Error stopping share: ', error);
|
|
@@ -2260,22 +2388,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2260
2388
|
else if ((previousContentShare && contentShare.disposition === _constants.FLOOR_ACTION.RELEASED || contentShare.disposition === null) && (previousWhiteboardShare && whiteboardShare.disposition === _constants.FLOOR_ACTION.RELEASED || whiteboardShare.disposition === null)) {
|
|
2261
2389
|
newShareStatus = _constants.SHARE_STATUS.NO_SHARE;
|
|
2262
2390
|
}
|
|
2263
|
-
if (newShareStatus !==
|
|
2264
|
-
var oldShareStatus =
|
|
2391
|
+
if (newShareStatus !== _this13.shareStatus) {
|
|
2392
|
+
var oldShareStatus = _this13.shareStatus;
|
|
2265
2393
|
|
|
2266
2394
|
// update our state before we send out any notifications
|
|
2267
|
-
|
|
2395
|
+
_this13.shareStatus = newShareStatus;
|
|
2268
2396
|
|
|
2269
2397
|
// send out "stop" notifications for the old state
|
|
2270
2398
|
switch (oldShareStatus) {
|
|
2271
2399
|
case _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE:
|
|
2272
|
-
_triggerProxy.default.trigger(
|
|
2400
|
+
_triggerProxy.default.trigger(_this13, {
|
|
2273
2401
|
file: 'meetings/index',
|
|
2274
2402
|
function: 'remoteShare'
|
|
2275
2403
|
}, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_REMOTE);
|
|
2276
2404
|
break;
|
|
2277
2405
|
case _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE:
|
|
2278
|
-
_triggerProxy.default.trigger(
|
|
2406
|
+
_triggerProxy.default.trigger(_this13, {
|
|
2279
2407
|
file: 'meeting/index',
|
|
2280
2408
|
function: 'localShare'
|
|
2281
2409
|
}, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL, {
|
|
@@ -2283,7 +2411,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2283
2411
|
});
|
|
2284
2412
|
break;
|
|
2285
2413
|
case _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE:
|
|
2286
|
-
_triggerProxy.default.trigger(
|
|
2414
|
+
_triggerProxy.default.trigger(_this13, {
|
|
2287
2415
|
file: 'meeting/index',
|
|
2288
2416
|
function: 'stopWhiteboardShare'
|
|
2289
2417
|
}, _constants.EVENT_TRIGGERS.MEETING_STOPPED_SHARING_WHITEBOARD);
|
|
@@ -2299,9 +2427,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2299
2427
|
switch (newShareStatus) {
|
|
2300
2428
|
case _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE:
|
|
2301
2429
|
{
|
|
2302
|
-
var
|
|
2430
|
+
var _this13$mediaProperti2;
|
|
2303
2431
|
var sendStartedSharingRemote = function sendStartedSharingRemote() {
|
|
2304
|
-
_triggerProxy.default.trigger(
|
|
2432
|
+
_triggerProxy.default.trigger(_this13, {
|
|
2305
2433
|
file: 'meetings/index',
|
|
2306
2434
|
function: 'remoteShare'
|
|
2307
2435
|
}, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE, {
|
|
@@ -2310,12 +2438,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2310
2438
|
};
|
|
2311
2439
|
|
|
2312
2440
|
// if a remote participant is stealing the presentation from us
|
|
2313
|
-
if (!((
|
|
2441
|
+
if (!((_this13$mediaProperti2 = _this13.mediaProperties.mediaDirection) !== null && _this13$mediaProperti2 !== void 0 && _this13$mediaProperti2.sendShare) || oldShareStatus === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE) {
|
|
2314
2442
|
sendStartedSharingRemote();
|
|
2315
2443
|
} else {
|
|
2316
|
-
|
|
2444
|
+
_this13.updateShare({
|
|
2317
2445
|
sendShare: false,
|
|
2318
|
-
receiveShare:
|
|
2446
|
+
receiveShare: _this13.mediaProperties.mediaDirection.receiveShare
|
|
2319
2447
|
}).finally(function () {
|
|
2320
2448
|
sendStartedSharingRemote();
|
|
2321
2449
|
});
|
|
@@ -2323,17 +2451,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2323
2451
|
break;
|
|
2324
2452
|
}
|
|
2325
2453
|
case _constants.SHARE_STATUS.LOCAL_SHARE_ACTIVE:
|
|
2326
|
-
_triggerProxy.default.trigger(
|
|
2454
|
+
_triggerProxy.default.trigger(_this13, {
|
|
2327
2455
|
file: 'meeting/index',
|
|
2328
2456
|
function: 'share'
|
|
2329
2457
|
}, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_LOCAL);
|
|
2330
2458
|
_metrics.default.postEvent({
|
|
2331
2459
|
event: _config.eventType.LOCAL_SHARE_FLOOR_GRANTED,
|
|
2332
|
-
meeting:
|
|
2460
|
+
meeting: _this13
|
|
2333
2461
|
});
|
|
2334
2462
|
break;
|
|
2335
2463
|
case _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE:
|
|
2336
|
-
_triggerProxy.default.trigger(
|
|
2464
|
+
_triggerProxy.default.trigger(_this13, {
|
|
2337
2465
|
file: 'meeting/index',
|
|
2338
2466
|
function: 'startWhiteboardShare'
|
|
2339
2467
|
}, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_WHITEBOARD, {
|
|
@@ -2342,7 +2470,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2342
2470
|
});
|
|
2343
2471
|
_metrics.default.postEvent({
|
|
2344
2472
|
event: _config.eventType.WHITEBOARD_SHARE_FLOOR_GRANTED,
|
|
2345
|
-
meeting:
|
|
2473
|
+
meeting: _this13
|
|
2346
2474
|
});
|
|
2347
2475
|
break;
|
|
2348
2476
|
case _constants.SHARE_STATUS.NO_SHARE:
|
|
@@ -2351,21 +2479,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2351
2479
|
default:
|
|
2352
2480
|
break;
|
|
2353
2481
|
}
|
|
2354
|
-
|
|
2482
|
+
_this13.members.locusMediaSharesUpdate(payload);
|
|
2355
2483
|
} else if (newShareStatus === _constants.SHARE_STATUS.REMOTE_SHARE_ACTIVE) {
|
|
2356
2484
|
// if we got here, then some remote participant has stolen
|
|
2357
2485
|
// the presentation from another remote participant
|
|
2358
|
-
_triggerProxy.default.trigger(
|
|
2486
|
+
_triggerProxy.default.trigger(_this13, {
|
|
2359
2487
|
file: 'meetings/index',
|
|
2360
2488
|
function: 'remoteShare'
|
|
2361
2489
|
}, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_REMOTE, {
|
|
2362
2490
|
memberId: contentShare.beneficiaryId
|
|
2363
2491
|
});
|
|
2364
|
-
|
|
2492
|
+
_this13.members.locusMediaSharesUpdate(payload);
|
|
2365
2493
|
} else if (newShareStatus === _constants.SHARE_STATUS.WHITEBOARD_SHARE_ACTIVE) {
|
|
2366
2494
|
// if we got here, then some remote participant has stolen
|
|
2367
2495
|
// the presentation from another remote participant
|
|
2368
|
-
_triggerProxy.default.trigger(
|
|
2496
|
+
_triggerProxy.default.trigger(_this13, {
|
|
2369
2497
|
file: 'meeting/index',
|
|
2370
2498
|
function: 'startWhiteboardShare'
|
|
2371
2499
|
}, _constants.EVENT_TRIGGERS.MEETING_STARTED_SHARING_WHITEBOARD, {
|
|
@@ -2374,9 +2502,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2374
2502
|
});
|
|
2375
2503
|
_metrics.default.postEvent({
|
|
2376
2504
|
event: _config.eventType.WHITEBOARD_SHARE_FLOOR_GRANTED,
|
|
2377
|
-
meeting:
|
|
2505
|
+
meeting: _this13
|
|
2378
2506
|
});
|
|
2379
|
-
|
|
2507
|
+
_this13.members.locusMediaSharesUpdate(payload);
|
|
2380
2508
|
}
|
|
2381
2509
|
});
|
|
2382
2510
|
}
|
|
@@ -2391,12 +2519,34 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2391
2519
|
}, {
|
|
2392
2520
|
key: "setUpLocusUrlListener",
|
|
2393
2521
|
value: function setUpLocusUrlListener() {
|
|
2394
|
-
var
|
|
2522
|
+
var _this14 = this;
|
|
2395
2523
|
this.locusInfo.on(_constants.EVENTS.LOCUS_INFO_UPDATE_URL, function (payload) {
|
|
2396
|
-
var
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2524
|
+
var _this14$locusUrl;
|
|
2525
|
+
_this14.members.locusUrlUpdate(payload);
|
|
2526
|
+
_this14.breakouts.locusUrlUpdate(payload);
|
|
2527
|
+
_this14.locusUrl = payload;
|
|
2528
|
+
_this14.locusId = (_this14$locusUrl = _this14.locusUrl) === null || _this14$locusUrl === void 0 ? void 0 : _this14$locusUrl.split('/').pop();
|
|
2529
|
+
_this14.recordingController.setLocusUrl(_this14.locusUrl);
|
|
2530
|
+
});
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2533
|
+
/**
|
|
2534
|
+
* Set up the locus info service link listener
|
|
2535
|
+
* update the locusInfo for recording controller
|
|
2536
|
+
* does not currently re-emit the event as it's internal only
|
|
2537
|
+
* payload is unused
|
|
2538
|
+
* @returns {undefined}
|
|
2539
|
+
* @private
|
|
2540
|
+
* @memberof Meeting
|
|
2541
|
+
*/
|
|
2542
|
+
}, {
|
|
2543
|
+
key: "setUpLocusServicesListener",
|
|
2544
|
+
value: function setUpLocusServicesListener() {
|
|
2545
|
+
var _this15 = this;
|
|
2546
|
+
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LINKS_SERVICES, function (payload) {
|
|
2547
|
+
var _payload$services, _payload$services$rec, _this15$locusInfo, _this15$locusInfo$ful;
|
|
2548
|
+
_this15.recordingController.setServiceUrl(payload === null || payload === void 0 ? void 0 : (_payload$services = payload.services) === null || _payload$services === void 0 ? void 0 : (_payload$services$rec = _payload$services.record) === null || _payload$services$rec === void 0 ? void 0 : _payload$services$rec.url);
|
|
2549
|
+
_this15.recordingController.setSessionId((_this15$locusInfo = _this15.locusInfo) === null || _this15$locusInfo === void 0 ? void 0 : (_this15$locusInfo$ful = _this15$locusInfo.fullState) === null || _this15$locusInfo$ful === void 0 ? void 0 : _this15$locusInfo$ful.sessionId);
|
|
2400
2550
|
});
|
|
2401
2551
|
}
|
|
2402
2552
|
|
|
@@ -2409,10 +2559,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2409
2559
|
}, {
|
|
2410
2560
|
key: "setUpLocusInfoMeetingInfoListener",
|
|
2411
2561
|
value: function setUpLocusInfoMeetingInfoListener() {
|
|
2412
|
-
var
|
|
2562
|
+
var _this16 = this;
|
|
2413
2563
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_LOCKED, function (payload) {
|
|
2414
2564
|
if (payload) {
|
|
2415
|
-
_triggerProxy.default.trigger(
|
|
2565
|
+
_triggerProxy.default.trigger(_this16, {
|
|
2416
2566
|
file: 'meeting/index',
|
|
2417
2567
|
function: 'setUpLocusInfoMeetingInfoListener'
|
|
2418
2568
|
}, _constants.EVENT_TRIGGERS.MEETING_LOCKED, {
|
|
@@ -2422,7 +2572,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2422
2572
|
});
|
|
2423
2573
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_UNLOCKED, function (payload) {
|
|
2424
2574
|
if (payload) {
|
|
2425
|
-
_triggerProxy.default.trigger(
|
|
2575
|
+
_triggerProxy.default.trigger(_this16, {
|
|
2426
2576
|
file: 'meeting/index',
|
|
2427
2577
|
function: 'setUpLocusInfoMeetingInfoListener'
|
|
2428
2578
|
}, _constants.EVENT_TRIGGERS.MEETING_UNLOCKED, {
|
|
@@ -2432,15 +2582,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2432
2582
|
});
|
|
2433
2583
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, function (payload) {
|
|
2434
2584
|
if (payload && payload.info) {
|
|
2435
|
-
var changed =
|
|
2585
|
+
var changed = _this16.inMeetingActions.set({
|
|
2436
2586
|
canInviteNewParticipants: _util.default.canInviteNewParticipants(payload.info.userDisplayHints),
|
|
2437
2587
|
canAdmitParticipant: _util.default.canAdmitParticipant(payload.info.userDisplayHints),
|
|
2438
2588
|
canLock: _util.default.canUserLock(payload.info.userDisplayHints),
|
|
2439
2589
|
canUnlock: _util.default.canUserUnlock(payload.info.userDisplayHints),
|
|
2440
|
-
canStartRecording:
|
|
2441
|
-
canStopRecording:
|
|
2442
|
-
canPauseRecording:
|
|
2443
|
-
canResumeRecording:
|
|
2590
|
+
canStartRecording: _util2.default.canUserStart(payload.info.userDisplayHints),
|
|
2591
|
+
canStopRecording: _util2.default.canUserStop(payload.info.userDisplayHints),
|
|
2592
|
+
canPauseRecording: _util2.default.canUserPause(payload.info.userDisplayHints),
|
|
2593
|
+
canResumeRecording: _util2.default.canUserResume(payload.info.userDisplayHints),
|
|
2444
2594
|
canRaiseHand: _util.default.canUserRaiseHand(payload.info.userDisplayHints),
|
|
2445
2595
|
canLowerAllHands: _util.default.canUserLowerAllHands(payload.info.userDisplayHints),
|
|
2446
2596
|
canLowerSomeoneElsesHand: _util.default.canUserLowerSomeoneElsesHand(payload.info.userDisplayHints),
|
|
@@ -2454,16 +2604,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2454
2604
|
isRealTimeTranslationEnabled: _util.default.isRealTimeTranslationEnabled(payload.info.userDisplayHints),
|
|
2455
2605
|
canSelectSpokenLanguages: _util.default.canSelectSpokenLanguages(payload.info.userDisplayHints),
|
|
2456
2606
|
waitingForOthersToJoin: _util.default.waitingForOthersToJoin(payload.info.userDisplayHints),
|
|
2457
|
-
canEnableReactions: _util.default.canEnableReactions(
|
|
2458
|
-
canSendReactions: _util.default.canSendReactions(
|
|
2607
|
+
canEnableReactions: _util.default.canEnableReactions(_this16.inMeetingActions.canEnableReactions, payload.info.userDisplayHints),
|
|
2608
|
+
canSendReactions: _util.default.canSendReactions(_this16.inMeetingActions.canSendReactions, payload.info.userDisplayHints)
|
|
2459
2609
|
});
|
|
2610
|
+
_this16.recordingController.setDisplayHints(payload.info.userDisplayHints);
|
|
2460
2611
|
if (changed) {
|
|
2461
|
-
_triggerProxy.default.trigger(
|
|
2612
|
+
_triggerProxy.default.trigger(_this16, {
|
|
2462
2613
|
file: 'meeting/index',
|
|
2463
2614
|
function: 'setUpLocusInfoMeetingInfoListener'
|
|
2464
|
-
}, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE,
|
|
2615
|
+
}, _constants.EVENT_TRIGGERS.MEETING_ACTIONS_UPDATE, _this16.inMeetingActions.get());
|
|
2465
2616
|
}
|
|
2466
|
-
|
|
2617
|
+
_this16.handleDataChannelUrlChange(payload.info.datachannelUrl);
|
|
2467
2618
|
}
|
|
2468
2619
|
});
|
|
2469
2620
|
}
|
|
@@ -2476,12 +2627,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2476
2627
|
}, {
|
|
2477
2628
|
key: "handleDataChannelUrlChange",
|
|
2478
2629
|
value: function handleDataChannelUrlChange(datachannelUrl) {
|
|
2479
|
-
var
|
|
2630
|
+
var _this17 = this;
|
|
2631
|
+
// @ts-ignore - config coming from registerPlugin
|
|
2480
2632
|
if (datachannelUrl && this.config.enableAutomaticLLM) {
|
|
2481
2633
|
// Defer this as updateLLMConnection relies upon this.locusInfo.url which is only set
|
|
2482
2634
|
// after the MEETING_INFO_UPDATED callback finishes
|
|
2483
2635
|
(0, _defer2.default)(function () {
|
|
2484
|
-
|
|
2636
|
+
_this17.updateLLMConnection();
|
|
2485
2637
|
});
|
|
2486
2638
|
}
|
|
2487
2639
|
}
|
|
@@ -2495,10 +2647,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2495
2647
|
}, {
|
|
2496
2648
|
key: "setUpLocusEmbeddedAppsListener",
|
|
2497
2649
|
value: function setUpLocusEmbeddedAppsListener() {
|
|
2498
|
-
var
|
|
2650
|
+
var _this18 = this;
|
|
2499
2651
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.EMBEDDED_APPS_UPDATED, function (embeddedApps) {
|
|
2500
2652
|
if (embeddedApps) {
|
|
2501
|
-
_triggerProxy.default.trigger(
|
|
2653
|
+
_triggerProxy.default.trigger(_this18, {
|
|
2502
2654
|
file: 'meeting/index',
|
|
2503
2655
|
function: 'setUpLocusEmbeddedAppsListener'
|
|
2504
2656
|
}, _constants.EVENT_TRIGGERS.MEETING_EMBEDDED_APPS_UPDATE, embeddedApps);
|
|
@@ -2515,11 +2667,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2515
2667
|
}, {
|
|
2516
2668
|
key: "setUpLocusInfoSelfListener",
|
|
2517
2669
|
value: function setUpLocusInfoSelfListener() {
|
|
2518
|
-
var
|
|
2670
|
+
var _this19 = this;
|
|
2519
2671
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED, function (payload) {
|
|
2520
|
-
if (
|
|
2521
|
-
|
|
2522
|
-
_triggerProxy.default.trigger(
|
|
2672
|
+
if (_this19.audio) {
|
|
2673
|
+
_this19.audio.handleServerLocalUnmuteRequired(_this19);
|
|
2674
|
+
_triggerProxy.default.trigger(_this19, {
|
|
2523
2675
|
file: 'meeting/index',
|
|
2524
2676
|
function: 'setUpLocusInfoSelfListener'
|
|
2525
2677
|
}, _constants.EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS, {
|
|
@@ -2529,15 +2681,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2529
2681
|
});
|
|
2530
2682
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED, function (payload) {
|
|
2531
2683
|
if (payload) {
|
|
2532
|
-
var
|
|
2533
|
-
if (
|
|
2534
|
-
|
|
2684
|
+
var _this19$audio;
|
|
2685
|
+
if (_this19.audio) {
|
|
2686
|
+
_this19.audio.handleServerRemoteMuteUpdate(payload.muted, payload.unmuteAllowed);
|
|
2535
2687
|
}
|
|
2536
2688
|
// with "mute on entry" server will send us remote mute even if we don't have media configured,
|
|
2537
2689
|
// so if being muted by others, always send the notification,
|
|
2538
2690
|
// but if being unmuted, only send it if we are also locally unmuted
|
|
2539
|
-
if (payload.muted || !((
|
|
2540
|
-
_triggerProxy.default.trigger(
|
|
2691
|
+
if (payload.muted || !((_this19$audio = _this19.audio) !== null && _this19$audio !== void 0 && _this19$audio.isMuted())) {
|
|
2692
|
+
_triggerProxy.default.trigger(_this19, {
|
|
2541
2693
|
file: 'meeting/index',
|
|
2542
2694
|
function: 'setUpLocusInfoSelfListener'
|
|
2543
2695
|
}, payload.muted ? _constants.EVENT_TRIGGERS.MEETING_SELF_MUTED_BY_OTHERS : _constants.EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS, {
|
|
@@ -2547,7 +2699,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2547
2699
|
}
|
|
2548
2700
|
});
|
|
2549
2701
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED, function (payload) {
|
|
2550
|
-
_triggerProxy.default.trigger(
|
|
2702
|
+
_triggerProxy.default.trigger(_this19, {
|
|
2551
2703
|
file: 'meeting/index',
|
|
2552
2704
|
function: 'setUpLocusInfoSelfListener'
|
|
2553
2705
|
}, _constants.EVENT_TRIGGERS.MEETING_SELF_REQUESTED_TO_UNMUTE, {
|
|
@@ -2556,8 +2708,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2556
2708
|
});
|
|
2557
2709
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_UNADMITTED_GUEST, function (payload) {
|
|
2558
2710
|
if (payload) {
|
|
2559
|
-
|
|
2560
|
-
_triggerProxy.default.trigger(
|
|
2711
|
+
_this19.startKeepAlive();
|
|
2712
|
+
_triggerProxy.default.trigger(_this19, {
|
|
2561
2713
|
file: 'meeting/index',
|
|
2562
2714
|
function: 'setUpLocusInfoSelfListener'
|
|
2563
2715
|
}, _constants.EVENT_TRIGGERS.MEETING_SELF_LOBBY_WAITING, {
|
|
@@ -2565,14 +2717,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2565
2717
|
});
|
|
2566
2718
|
_metrics.default.postEvent({
|
|
2567
2719
|
event: _config.eventType.LOBBY_ENTERED,
|
|
2568
|
-
meeting:
|
|
2720
|
+
meeting: _this19
|
|
2569
2721
|
});
|
|
2570
2722
|
}
|
|
2571
2723
|
});
|
|
2572
2724
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, function (payload) {
|
|
2573
|
-
|
|
2725
|
+
_this19.stopKeepAlive();
|
|
2574
2726
|
if (payload) {
|
|
2575
|
-
_triggerProxy.default.trigger(
|
|
2727
|
+
_triggerProxy.default.trigger(_this19, {
|
|
2576
2728
|
file: 'meeting/index',
|
|
2577
2729
|
function: 'setUpLocusInfoSelfListener'
|
|
2578
2730
|
}, _constants.EVENT_TRIGGERS.MEETING_SELF_GUEST_ADMITTED, {
|
|
@@ -2580,7 +2732,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2580
2732
|
});
|
|
2581
2733
|
_metrics.default.postEvent({
|
|
2582
2734
|
event: _config.eventType.LOBBY_EXITED,
|
|
2583
|
-
meeting:
|
|
2735
|
+
meeting: _this19
|
|
2584
2736
|
});
|
|
2585
2737
|
}
|
|
2586
2738
|
});
|
|
@@ -2588,42 +2740,49 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2588
2740
|
// @ts-ignore - check if MEDIA_INACTIVITY exists
|
|
2589
2741
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, function () {
|
|
2590
2742
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_MEDIA_INACTIVE, {
|
|
2591
|
-
correlation_id:
|
|
2592
|
-
locus_id:
|
|
2743
|
+
correlation_id: _this19.correlationId,
|
|
2744
|
+
locus_id: _this19.locusId
|
|
2593
2745
|
});
|
|
2594
|
-
|
|
2746
|
+
_this19.reconnect();
|
|
2595
2747
|
});
|
|
2596
2748
|
|
|
2597
2749
|
// There is two stats for mute one is the actual media being sent or received
|
|
2598
2750
|
// The second on is if the audio is muted, we need to tell the statsAnalyzer when
|
|
2599
2751
|
// the audio is muted or the user is not willing to send media
|
|
2600
2752
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.MEDIA_STATUS_CHANGE, function (status) {
|
|
2601
|
-
if (
|
|
2602
|
-
var
|
|
2603
|
-
|
|
2753
|
+
if (_this19.statsAnalyzer) {
|
|
2754
|
+
var _this19$mediaProperti, _this19$audio2, _this19$mediaProperti2, _this19$video, _this19$mediaProperti3, _this19$mediaProperti4, _this19$mediaProperti5, _this19$mediaProperti6;
|
|
2755
|
+
_this19.statsAnalyzer.updateMediaStatus({
|
|
2604
2756
|
actual: status,
|
|
2605
2757
|
expected: {
|
|
2606
2758
|
// We need to check what should be the actual direction of media
|
|
2607
|
-
sendAudio: ((
|
|
2608
|
-
sendVideo: ((
|
|
2609
|
-
sendShare: (
|
|
2610
|
-
receiveAudio: (
|
|
2611
|
-
receiveVideo: (
|
|
2612
|
-
receiveShare: (
|
|
2759
|
+
sendAudio: ((_this19$mediaProperti = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti === void 0 ? void 0 : _this19$mediaProperti.sendAudio) && !((_this19$audio2 = _this19.audio) !== null && _this19$audio2 !== void 0 && _this19$audio2.isMuted()),
|
|
2760
|
+
sendVideo: ((_this19$mediaProperti2 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti2 === void 0 ? void 0 : _this19$mediaProperti2.sendVideo) && !((_this19$video = _this19.video) !== null && _this19$video !== void 0 && _this19$video.isMuted()),
|
|
2761
|
+
sendShare: (_this19$mediaProperti3 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti3 === void 0 ? void 0 : _this19$mediaProperti3.sendShare,
|
|
2762
|
+
receiveAudio: (_this19$mediaProperti4 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti4 === void 0 ? void 0 : _this19$mediaProperti4.receiveAudio,
|
|
2763
|
+
receiveVideo: (_this19$mediaProperti5 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti5 === void 0 ? void 0 : _this19$mediaProperti5.receiveVideo,
|
|
2764
|
+
receiveShare: (_this19$mediaProperti6 = _this19.mediaProperties.mediaDirection) === null || _this19$mediaProperti6 === void 0 ? void 0 : _this19$mediaProperti6.receiveShare
|
|
2613
2765
|
}
|
|
2614
2766
|
});
|
|
2615
2767
|
}
|
|
2616
2768
|
});
|
|
2617
2769
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_CANNOT_VIEW_PARTICIPANT_LIST_CHANGE, function (payload) {
|
|
2618
|
-
_triggerProxy.default.trigger(
|
|
2770
|
+
_triggerProxy.default.trigger(_this19, {
|
|
2619
2771
|
file: 'meeting/index',
|
|
2620
2772
|
function: 'setUpLocusInfoSelfListener'
|
|
2621
2773
|
}, _constants.EVENT_TRIGGERS.MEETING_SELF_CANNOT_VIEW_PARTICIPANT_LIST, {
|
|
2622
2774
|
payload: payload
|
|
2623
2775
|
});
|
|
2624
2776
|
});
|
|
2777
|
+
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_MEETING_BREAKOUTS_CHANGED, function (payload) {
|
|
2778
|
+
_this19.breakouts.updateBreakoutSessions(payload);
|
|
2779
|
+
_triggerProxy.default.trigger(_this19, {
|
|
2780
|
+
file: 'meeting/index',
|
|
2781
|
+
function: 'setUpLocusInfoSelfListener'
|
|
2782
|
+
}, _constants.EVENT_TRIGGERS.MEETING_BREAKOUTS_UPDATE);
|
|
2783
|
+
});
|
|
2625
2784
|
this.locusInfo.on(_constants.LOCUSINFO.EVENTS.SELF_IS_SHARING_BLOCKED_CHANGE, function (payload) {
|
|
2626
|
-
_triggerProxy.default.trigger(
|
|
2785
|
+
_triggerProxy.default.trigger(_this19, {
|
|
2627
2786
|
file: 'meeting/index',
|
|
2628
2787
|
function: 'setUpLocusInfoSelfListener'
|
|
2629
2788
|
}, _constants.EVENT_TRIGGERS.MEETING_SELF_IS_SHARING_BLOCKED, {
|
|
@@ -2641,17 +2800,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2641
2800
|
}, {
|
|
2642
2801
|
key: "setUpLocusInfoMeetingListener",
|
|
2643
2802
|
value: function setUpLocusInfoMeetingListener() {
|
|
2644
|
-
var
|
|
2803
|
+
var _this20 = this;
|
|
2645
2804
|
this.locusInfo.on(_constants.EVENTS.REMOTE_RESPONSE, function (payload) {
|
|
2646
|
-
|
|
2805
|
+
_this20.meetingFiniteStateMachine.remote(payload);
|
|
2647
2806
|
if (payload.remoteDeclined) {
|
|
2648
|
-
|
|
2807
|
+
_this20.leave({
|
|
2649
2808
|
reason: payload.reason
|
|
2650
2809
|
}).then(function () {
|
|
2651
2810
|
_loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Attempting to leave meeting.');
|
|
2652
2811
|
}).catch(function (error) {
|
|
2653
2812
|
// @ts-ignore
|
|
2654
|
-
_loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Issue with leave for meeting, meeting still in collection: ".concat(
|
|
2813
|
+
_loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(error));
|
|
2655
2814
|
});
|
|
2656
2815
|
}
|
|
2657
2816
|
});
|
|
@@ -2659,10 +2818,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2659
2818
|
// if self state is NOT left
|
|
2660
2819
|
|
|
2661
2820
|
// TODO: Handle sharing and wireless sharing when meeting end
|
|
2662
|
-
if (
|
|
2663
|
-
if (
|
|
2664
|
-
|
|
2665
|
-
|
|
2821
|
+
if (_this20.wirelessShare) {
|
|
2822
|
+
if (_this20.mediaProperties.shareTrack) {
|
|
2823
|
+
_this20.mediaProperties.shareTrack.onended = null;
|
|
2824
|
+
_this20.mediaProperties.shareTrack.stop();
|
|
2666
2825
|
}
|
|
2667
2826
|
}
|
|
2668
2827
|
// when multiple WEB deviceType join with same user
|
|
@@ -2676,23 +2835,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2676
2835
|
if (payload.shouldLeave) {
|
|
2677
2836
|
// TODO: We should do cleaning of meeting object if the shouldLeave: false because there might be meeting object which we are not cleaning
|
|
2678
2837
|
|
|
2679
|
-
|
|
2838
|
+
_this20.leave({
|
|
2680
2839
|
reason: payload.reason
|
|
2681
2840
|
}).then(function () {
|
|
2682
2841
|
_loggerProxy.default.logger.warn('Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. The meeting has been left, but has not been destroyed, you should see a later event for leave.');
|
|
2683
2842
|
}).catch(function (error) {
|
|
2684
2843
|
// @ts-ignore
|
|
2685
|
-
_loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(
|
|
2844
|
+
_loggerProxy.default.logger.error("Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ".concat(_this20, ", error: ").concat(error));
|
|
2686
2845
|
});
|
|
2687
2846
|
} else {
|
|
2688
2847
|
_loggerProxy.default.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> MEETING_REMOVED_REASON', payload.reason);
|
|
2689
|
-
_util.default.cleanUp(
|
|
2690
|
-
_triggerProxy.default.trigger(
|
|
2848
|
+
_util.default.cleanUp(_this20);
|
|
2849
|
+
_triggerProxy.default.trigger(_this20, {
|
|
2691
2850
|
file: 'meeting/index',
|
|
2692
2851
|
function: 'setUpLocusInfoMeetingListener'
|
|
2693
2852
|
}, _constants.EVENTS.DESTROY_MEETING, {
|
|
2694
2853
|
reason: payload.reason,
|
|
2695
|
-
meetingId:
|
|
2854
|
+
meetingId: _this20.id
|
|
2696
2855
|
});
|
|
2697
2856
|
}
|
|
2698
2857
|
});
|
|
@@ -2709,13 +2868,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2709
2868
|
}, {
|
|
2710
2869
|
key: "updateMeetingObject",
|
|
2711
2870
|
value: function updateMeetingObject(object) {
|
|
2712
|
-
var
|
|
2871
|
+
var _this21 = this;
|
|
2713
2872
|
// Validate if these are valid meeting object property
|
|
2714
2873
|
// TODO: add a check to make sure the value passed in the constructor
|
|
2715
2874
|
// is not changed by any delta event
|
|
2716
2875
|
if (object && (0, _keys.default)(object).length) {
|
|
2717
2876
|
(0, _keys.default)(object).forEach(function (key) {
|
|
2718
|
-
|
|
2877
|
+
_this21[key] = object[key];
|
|
2719
2878
|
});
|
|
2720
2879
|
}
|
|
2721
2880
|
}
|
|
@@ -2923,7 +3082,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2923
3082
|
this.conversationUrl = ((_locusMeetingObject = locusMeetingObject) === null || _locusMeetingObject === void 0 ? void 0 : _locusMeetingObject.conversationUrl) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.conversationUrl) || this.conversationUrl;
|
|
2924
3083
|
this.locusUrl = ((_locusMeetingObject2 = locusMeetingObject) === null || _locusMeetingObject2 === void 0 ? void 0 : _locusMeetingObject2.url) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.locusUrl) || this.locusUrl;
|
|
2925
3084
|
// @ts-ignore - config coming from registerPlugin
|
|
2926
|
-
this.setSipUri(
|
|
3085
|
+
this.setSipUri(
|
|
3086
|
+
// @ts-ignore
|
|
3087
|
+
this.config.experimental.enableUnifiedMeetings ? ((_locusMeetingObject3 = locusMeetingObject) === null || _locusMeetingObject3 === void 0 ? void 0 : _locusMeetingObject3.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipUrl) : ((_locusMeetingObject4 = locusMeetingObject) === null || _locusMeetingObject4 === void 0 ? void 0 : _locusMeetingObject4.info.sipUri) || (webexMeetingInfo === null || webexMeetingInfo === void 0 ? void 0 : webexMeetingInfo.sipMeetingUri) || this.sipUri);
|
|
2927
3088
|
// @ts-ignore - config coming from registerPlugin
|
|
2928
3089
|
if (this.config.experimental.enableUnifiedMeetings) {
|
|
2929
3090
|
var _locusMeetingObject5;
|
|
@@ -3076,7 +3237,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3076
3237
|
}, {
|
|
3077
3238
|
key: "closeRemoteTracks",
|
|
3078
3239
|
value: function closeRemoteTracks() {
|
|
3079
|
-
var
|
|
3240
|
+
var _this22 = this;
|
|
3080
3241
|
var _this$mediaProperties = this.mediaProperties,
|
|
3081
3242
|
remoteAudioTrack = _this$mediaProperties.remoteAudioTrack,
|
|
3082
3243
|
remoteVideoTrack = _this$mediaProperties.remoteVideoTrack,
|
|
@@ -3090,7 +3251,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3090
3251
|
*/
|
|
3091
3252
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
3092
3253
|
var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
|
|
3093
|
-
_triggerProxy.default.trigger(
|
|
3254
|
+
_triggerProxy.default.trigger(_this22, {
|
|
3094
3255
|
file: 'meeting/index',
|
|
3095
3256
|
function: 'closeRemoteTracks'
|
|
3096
3257
|
}, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
|
|
@@ -3134,7 +3295,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3134
3295
|
function: 'setLocalTracks'
|
|
3135
3296
|
}, _constants.EVENT_TRIGGERS.MEDIA_READY, {
|
|
3136
3297
|
type: _constants.EVENT_TYPES.LOCAL,
|
|
3137
|
-
stream:
|
|
3298
|
+
stream: _util3.default.createMediaStream([this.mediaProperties.audioTrack, this.mediaProperties.videoTrack])
|
|
3138
3299
|
});
|
|
3139
3300
|
}
|
|
3140
3301
|
|
|
@@ -3238,7 +3399,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3238
3399
|
}, {
|
|
3239
3400
|
key: "setLocalShareTrack",
|
|
3240
3401
|
value: function setLocalShareTrack(localShare) {
|
|
3241
|
-
var
|
|
3402
|
+
var _this23 = this;
|
|
3242
3403
|
var settings = null;
|
|
3243
3404
|
if (localShare) {
|
|
3244
3405
|
this.mediaProperties.setLocalShareTrack(_util.default.getTrack(localShare).videoTrack);
|
|
@@ -3256,7 +3417,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3256
3417
|
_loggerProxy.default.logger.log('Meeting:index#setLocalShareTrack --> Screen settings.', (0, _stringify.default)(this.mediaProperties.mediaSettings.screen));
|
|
3257
3418
|
}
|
|
3258
3419
|
contentTracks.onended = function () {
|
|
3259
|
-
return
|
|
3420
|
+
return _this23.handleShareTrackEnded(localShare);
|
|
3260
3421
|
};
|
|
3261
3422
|
_triggerProxy.default.trigger(this, {
|
|
3262
3423
|
file: 'meeting/index',
|
|
@@ -3278,7 +3439,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3278
3439
|
}, {
|
|
3279
3440
|
key: "closeLocalStream",
|
|
3280
3441
|
value: function closeLocalStream() {
|
|
3281
|
-
var
|
|
3442
|
+
var _this24 = this;
|
|
3282
3443
|
var _this$mediaProperties2 = this.mediaProperties,
|
|
3283
3444
|
audioTrack = _this$mediaProperties2.audioTrack,
|
|
3284
3445
|
videoTrack = _this$mediaProperties2.videoTrack;
|
|
@@ -3290,7 +3451,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3290
3451
|
|
|
3291
3452
|
// triggers event for audio and video stop , sometime either audio or video one of them exists
|
|
3292
3453
|
if (audioStopped || videoStopped) {
|
|
3293
|
-
_triggerProxy.default.trigger(
|
|
3454
|
+
_triggerProxy.default.trigger(_this24, {
|
|
3294
3455
|
file: 'meeting/index',
|
|
3295
3456
|
function: 'closeLocalStream'
|
|
3296
3457
|
}, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
|
|
@@ -3312,11 +3473,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3312
3473
|
}, {
|
|
3313
3474
|
key: "closeLocalShare",
|
|
3314
3475
|
value: function closeLocalShare() {
|
|
3315
|
-
var
|
|
3476
|
+
var _this25 = this;
|
|
3316
3477
|
var track = this.mediaProperties.shareTrack;
|
|
3317
3478
|
return _media.default.stopTracks(track).then(function () {
|
|
3318
3479
|
if (track && track.readyState === _constants.ENDED) {
|
|
3319
|
-
_triggerProxy.default.trigger(
|
|
3480
|
+
_triggerProxy.default.trigger(_this25, {
|
|
3320
3481
|
file: 'meeting/index',
|
|
3321
3482
|
function: 'closeLocalShare'
|
|
3322
3483
|
}, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
|
|
@@ -3362,7 +3523,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3362
3523
|
}, {
|
|
3363
3524
|
key: "setMercuryListener",
|
|
3364
3525
|
value: function setMercuryListener() {
|
|
3365
|
-
var
|
|
3526
|
+
var _this26 = this;
|
|
3366
3527
|
// Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
|
|
3367
3528
|
// if the meeting has active peer connections, it should try to reconnect.
|
|
3368
3529
|
// @ts-ignore
|
|
@@ -3370,16 +3531,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3370
3531
|
_loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online');
|
|
3371
3532
|
|
|
3372
3533
|
// Only send restore event when it was disconnected before and for connected later
|
|
3373
|
-
if (!
|
|
3534
|
+
if (!_this26.hasWebsocketConnected) {
|
|
3374
3535
|
_metrics.default.postEvent({
|
|
3375
3536
|
event: _config.eventType.MERCURY_CONNECTION_RESTORED,
|
|
3376
|
-
meeting:
|
|
3537
|
+
meeting: _this26
|
|
3377
3538
|
});
|
|
3378
3539
|
_metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
|
|
3379
|
-
correlation_id:
|
|
3540
|
+
correlation_id: _this26.correlationId
|
|
3380
3541
|
});
|
|
3381
3542
|
}
|
|
3382
|
-
|
|
3543
|
+
_this26.hasWebsocketConnected = true;
|
|
3383
3544
|
});
|
|
3384
3545
|
|
|
3385
3546
|
// @ts-ignore
|
|
@@ -3387,10 +3548,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3387
3548
|
_loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
|
|
3388
3549
|
_metrics.default.postEvent({
|
|
3389
3550
|
event: _config.eventType.MERCURY_CONNECTION_LOST,
|
|
3390
|
-
meeting:
|
|
3551
|
+
meeting: _this26
|
|
3391
3552
|
});
|
|
3392
3553
|
_metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
|
|
3393
|
-
correlation_id:
|
|
3554
|
+
correlation_id: _this26.correlationId
|
|
3394
3555
|
});
|
|
3395
3556
|
});
|
|
3396
3557
|
}
|
|
@@ -3460,7 +3621,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3460
3621
|
}, {
|
|
3461
3622
|
key: "muteAudio",
|
|
3462
3623
|
value: function muteAudio() {
|
|
3463
|
-
var
|
|
3624
|
+
var _this27 = this;
|
|
3464
3625
|
if (!_util.default.isUserInJoinedState(this.locusInfo)) {
|
|
3465
3626
|
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
3466
3627
|
}
|
|
@@ -3477,10 +3638,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3477
3638
|
|
|
3478
3639
|
// First, stop sending the local audio media
|
|
3479
3640
|
return logRequest(this.audio.handleClientRequest(this, true).then(function () {
|
|
3480
|
-
_util.default.handleAudioLogging(
|
|
3641
|
+
_util.default.handleAudioLogging(_this27.mediaProperties.audioTrack);
|
|
3481
3642
|
_metrics.default.postEvent({
|
|
3482
3643
|
event: _config.eventType.MUTED,
|
|
3483
|
-
meeting:
|
|
3644
|
+
meeting: _this27,
|
|
3484
3645
|
data: {
|
|
3485
3646
|
trigger: _config.trigger.USER_INTERACTION,
|
|
3486
3647
|
mediaType: _config.mediaType.AUDIO
|
|
@@ -3488,8 +3649,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3488
3649
|
});
|
|
3489
3650
|
}).catch(function (error) {
|
|
3490
3651
|
_metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
|
|
3491
|
-
correlation_id:
|
|
3492
|
-
locus_id:
|
|
3652
|
+
correlation_id: _this27.correlationId,
|
|
3653
|
+
locus_id: _this27.locusUrl.split('/').pop(),
|
|
3493
3654
|
reason: error.message,
|
|
3494
3655
|
stack: error.stack
|
|
3495
3656
|
});
|
|
@@ -3510,7 +3671,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3510
3671
|
}, {
|
|
3511
3672
|
key: "unmuteAudio",
|
|
3512
3673
|
value: function unmuteAudio() {
|
|
3513
|
-
var
|
|
3674
|
+
var _this28 = this;
|
|
3514
3675
|
if (!_util.default.isUserInJoinedState(this.locusInfo)) {
|
|
3515
3676
|
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
3516
3677
|
}
|
|
@@ -3527,10 +3688,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3527
3688
|
|
|
3528
3689
|
// First, send the control to unmute the participant on the server
|
|
3529
3690
|
return logRequest(this.audio.handleClientRequest(this, false).then(function () {
|
|
3530
|
-
_util.default.handleAudioLogging(
|
|
3691
|
+
_util.default.handleAudioLogging(_this28.mediaProperties.audioTrack);
|
|
3531
3692
|
_metrics.default.postEvent({
|
|
3532
3693
|
event: _config.eventType.UNMUTED,
|
|
3533
|
-
meeting:
|
|
3694
|
+
meeting: _this28,
|
|
3534
3695
|
data: {
|
|
3535
3696
|
trigger: _config.trigger.USER_INTERACTION,
|
|
3536
3697
|
mediaType: _config.mediaType.AUDIO
|
|
@@ -3538,8 +3699,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3538
3699
|
});
|
|
3539
3700
|
}).catch(function (error) {
|
|
3540
3701
|
_metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_AUDIO_FAILURE, {
|
|
3541
|
-
correlation_id:
|
|
3542
|
-
locus_id:
|
|
3702
|
+
correlation_id: _this28.correlationId,
|
|
3703
|
+
locus_id: _this28.locusUrl.split('/').pop(),
|
|
3543
3704
|
reason: error.message,
|
|
3544
3705
|
stack: error.stack
|
|
3545
3706
|
});
|
|
@@ -3560,7 +3721,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3560
3721
|
}, {
|
|
3561
3722
|
key: "muteVideo",
|
|
3562
3723
|
value: function muteVideo() {
|
|
3563
|
-
var
|
|
3724
|
+
var _this29 = this;
|
|
3564
3725
|
if (!_util.default.isUserInJoinedState(this.locusInfo)) {
|
|
3565
3726
|
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
3566
3727
|
}
|
|
@@ -3575,10 +3736,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3575
3736
|
}
|
|
3576
3737
|
var LOG_HEADER = 'Meeting:index#muteVideo -->';
|
|
3577
3738
|
return logRequest(this.video.handleClientRequest(this, true).then(function () {
|
|
3578
|
-
_util.default.handleVideoLogging(
|
|
3739
|
+
_util.default.handleVideoLogging(_this29.mediaProperties.videoTrack);
|
|
3579
3740
|
_metrics.default.postEvent({
|
|
3580
3741
|
event: _config.eventType.MUTED,
|
|
3581
|
-
meeting:
|
|
3742
|
+
meeting: _this29,
|
|
3582
3743
|
data: {
|
|
3583
3744
|
trigger: _config.trigger.USER_INTERACTION,
|
|
3584
3745
|
mediaType: _config.mediaType.VIDEO
|
|
@@ -3586,8 +3747,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3586
3747
|
});
|
|
3587
3748
|
}).catch(function (error) {
|
|
3588
3749
|
_metrics.default.sendBehavioralMetric(_constants2.default.MUTE_VIDEO_FAILURE, {
|
|
3589
|
-
correlation_id:
|
|
3590
|
-
locus_id:
|
|
3750
|
+
correlation_id: _this29.correlationId,
|
|
3751
|
+
locus_id: _this29.locusUrl.split('/').pop(),
|
|
3591
3752
|
reason: error.message,
|
|
3592
3753
|
stack: error.stack
|
|
3593
3754
|
});
|
|
@@ -3608,7 +3769,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3608
3769
|
}, {
|
|
3609
3770
|
key: "unmuteVideo",
|
|
3610
3771
|
value: function unmuteVideo() {
|
|
3611
|
-
var
|
|
3772
|
+
var _this30 = this;
|
|
3612
3773
|
if (!_util.default.isUserInJoinedState(this.locusInfo)) {
|
|
3613
3774
|
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
3614
3775
|
}
|
|
@@ -3623,10 +3784,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3623
3784
|
}
|
|
3624
3785
|
var LOG_HEADER = 'Meeting:index#unmuteVideo -->';
|
|
3625
3786
|
return logRequest(this.video.handleClientRequest(this, false).then(function () {
|
|
3626
|
-
_util.default.handleVideoLogging(
|
|
3787
|
+
_util.default.handleVideoLogging(_this30.mediaProperties.videoTrack);
|
|
3627
3788
|
_metrics.default.postEvent({
|
|
3628
3789
|
event: _config.eventType.UNMUTED,
|
|
3629
|
-
meeting:
|
|
3790
|
+
meeting: _this30,
|
|
3630
3791
|
data: {
|
|
3631
3792
|
trigger: _config.trigger.USER_INTERACTION,
|
|
3632
3793
|
mediaType: _config.mediaType.VIDEO
|
|
@@ -3634,8 +3795,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3634
3795
|
});
|
|
3635
3796
|
}).catch(function (error) {
|
|
3636
3797
|
_metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_VIDEO_FAILURE, {
|
|
3637
|
-
correlation_id:
|
|
3638
|
-
locus_id:
|
|
3798
|
+
correlation_id: _this30.correlationId,
|
|
3799
|
+
locus_id: _this30.locusUrl.split('/').pop(),
|
|
3639
3800
|
reason: error.message,
|
|
3640
3801
|
stack: error.stack
|
|
3641
3802
|
});
|
|
@@ -3675,18 +3836,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3675
3836
|
}, {
|
|
3676
3837
|
key: "joinWithMedia",
|
|
3677
3838
|
value: function joinWithMedia() {
|
|
3678
|
-
var
|
|
3839
|
+
var _this31 = this;
|
|
3679
3840
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3680
3841
|
// TODO: add validations for parameters
|
|
3681
3842
|
var mediaSettings = options.mediaSettings,
|
|
3682
3843
|
joinOptions = options.joinOptions,
|
|
3683
3844
|
audioVideoOptions = options.audioVideoOptions;
|
|
3684
3845
|
return this.join(joinOptions).then(function (joinResponse) {
|
|
3685
|
-
return
|
|
3686
|
-
var
|
|
3687
|
-
localStream =
|
|
3688
|
-
localShare =
|
|
3689
|
-
return
|
|
3846
|
+
return _this31.getMediaStreams(mediaSettings, audioVideoOptions).then(function (_ref10) {
|
|
3847
|
+
var _ref11 = (0, _slicedToArray2.default)(_ref10, 2),
|
|
3848
|
+
localStream = _ref11[0],
|
|
3849
|
+
localShare = _ref11[1];
|
|
3850
|
+
return _this31.addMedia({
|
|
3690
3851
|
mediaSettings: mediaSettings,
|
|
3691
3852
|
localShare: localShare,
|
|
3692
3853
|
localStream: localStream
|
|
@@ -3701,8 +3862,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3701
3862
|
}).catch(function (error) {
|
|
3702
3863
|
_loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', error);
|
|
3703
3864
|
_metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
|
|
3704
|
-
correlation_id:
|
|
3705
|
-
locus_id:
|
|
3865
|
+
correlation_id: _this31.correlationId,
|
|
3866
|
+
locus_id: _this31.locusUrl.split('/').pop(),
|
|
3706
3867
|
reason: error.message,
|
|
3707
3868
|
stack: error.stack
|
|
3708
3869
|
}, {
|
|
@@ -3723,7 +3884,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3723
3884
|
}, {
|
|
3724
3885
|
key: "reconnect",
|
|
3725
3886
|
value: function reconnect(options) {
|
|
3726
|
-
var
|
|
3887
|
+
var _this32 = this;
|
|
3727
3888
|
_loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
|
|
3728
3889
|
if (!this.reconnectionManager || !this.reconnectionManager.reconnect) {
|
|
3729
3890
|
return _promise.default.reject(new _parameter.default('Cannot reconnect, ReconnectionManager must first be defined.'));
|
|
@@ -3751,13 +3912,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3751
3912
|
function: 'reconnect'
|
|
3752
3913
|
}, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING);
|
|
3753
3914
|
return this.reconnectionManager.reconnect(options).then(function () {
|
|
3754
|
-
_triggerProxy.default.trigger(
|
|
3915
|
+
_triggerProxy.default.trigger(_this32, {
|
|
3755
3916
|
file: 'meeting/index',
|
|
3756
3917
|
function: 'reconnect'
|
|
3757
3918
|
}, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_SUCCESS);
|
|
3758
3919
|
_loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
|
|
3759
3920
|
}).catch(function (error) {
|
|
3760
|
-
_triggerProxy.default.trigger(
|
|
3921
|
+
_triggerProxy.default.trigger(_this32, {
|
|
3761
3922
|
file: 'meeting/index',
|
|
3762
3923
|
function: 'reconnect'
|
|
3763
3924
|
}, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_FAILURE, {
|
|
@@ -3765,18 +3926,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3765
3926
|
});
|
|
3766
3927
|
_loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
|
|
3767
3928
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_RECONNECT_FAILURE, {
|
|
3768
|
-
correlation_id:
|
|
3769
|
-
locus_id:
|
|
3929
|
+
correlation_id: _this32.correlationId,
|
|
3930
|
+
locus_id: _this32.locusUrl.split('/').pop(),
|
|
3770
3931
|
reason: error.message,
|
|
3771
3932
|
stack: error.stack
|
|
3772
3933
|
});
|
|
3773
|
-
|
|
3934
|
+
_this32.uploadLogs({
|
|
3774
3935
|
file: 'meeting/index',
|
|
3775
3936
|
function: 'reconnect'
|
|
3776
3937
|
});
|
|
3777
3938
|
return _promise.default.reject(new _reconnection.default('Reconnection failure event', error));
|
|
3778
3939
|
}).finally(function () {
|
|
3779
|
-
|
|
3940
|
+
_this32.reconnectionManager.reset();
|
|
3780
3941
|
});
|
|
3781
3942
|
}
|
|
3782
3943
|
|
|
@@ -3796,6 +3957,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3796
3957
|
return false;
|
|
3797
3958
|
}
|
|
3798
3959
|
|
|
3960
|
+
/**
|
|
3961
|
+
* Check if the meeting supports the Reactions
|
|
3962
|
+
* @returns {boolean}
|
|
3963
|
+
*/
|
|
3964
|
+
}, {
|
|
3965
|
+
key: "isReactionsSupported",
|
|
3966
|
+
value: function isReactionsSupported() {
|
|
3967
|
+
var _this$locusInfo4, _this$locusInfo4$cont;
|
|
3968
|
+
if ((_this$locusInfo4 = this.locusInfo) !== null && _this$locusInfo4 !== void 0 && (_this$locusInfo4$cont = _this$locusInfo4.controls) !== null && _this$locusInfo4$cont !== void 0 && _this$locusInfo4$cont.reactions.enabled) {
|
|
3969
|
+
return true;
|
|
3970
|
+
}
|
|
3971
|
+
_loggerProxy.default.logger.error('Meeting:index#isReactionsSupported --> Reactions is not supported');
|
|
3972
|
+
return false;
|
|
3973
|
+
}
|
|
3974
|
+
|
|
3799
3975
|
/**
|
|
3800
3976
|
* Monitor the Low-Latency Mercury (LLM) web socket connection on `onError` and `onClose` states
|
|
3801
3977
|
* @private
|
|
@@ -3804,16 +3980,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3804
3980
|
}, {
|
|
3805
3981
|
key: "monitorTranscriptionSocketConnection",
|
|
3806
3982
|
value: function monitorTranscriptionSocketConnection() {
|
|
3807
|
-
var
|
|
3983
|
+
var _this33 = this;
|
|
3808
3984
|
this.transcription.onCloseSocket(function (event) {
|
|
3809
3985
|
_loggerProxy.default.logger.info("Meeting:index#onCloseSocket -->\n unable to continue receiving transcription;\n low-latency mercury web socket connection is closed now.\n ".concat(event));
|
|
3810
|
-
|
|
3986
|
+
_this33.triggerStopReceivingTranscriptionEvent();
|
|
3811
3987
|
});
|
|
3812
3988
|
this.transcription.onErrorSocket(function (event) {
|
|
3813
3989
|
_loggerProxy.default.logger.error("Meeting:index#onErrorSocket -->\n unable to continue receiving transcription;\n low-latency mercury web socket connection error had occured.\n ".concat(event));
|
|
3814
|
-
|
|
3990
|
+
_this33.triggerStopReceivingTranscriptionEvent();
|
|
3815
3991
|
_metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
|
|
3816
|
-
correlation_id:
|
|
3992
|
+
correlation_id: _this33.correlationId,
|
|
3817
3993
|
reason: 'unexpected error: transcription LLM web socket connection error had occured.',
|
|
3818
3994
|
event: event
|
|
3819
3995
|
});
|
|
@@ -3829,7 +4005,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3829
4005
|
key: "receiveTranscription",
|
|
3830
4006
|
value: function () {
|
|
3831
4007
|
var _receiveTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
3832
|
-
var
|
|
4008
|
+
var _this34 = this;
|
|
3833
4009
|
var datachannelUrl, _yield$this$request, webSocketUrl;
|
|
3834
4010
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
3835
4011
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -3856,7 +4032,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3856
4032
|
|
|
3857
4033
|
// retrieve and pass the payload
|
|
3858
4034
|
this.transcription.subscribe(function (payload) {
|
|
3859
|
-
_triggerProxy.default.trigger(
|
|
4035
|
+
_triggerProxy.default.trigger(_this34, {
|
|
3860
4036
|
file: 'meeting/index',
|
|
3861
4037
|
function: 'join'
|
|
3862
4038
|
}, _constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION, payload);
|
|
@@ -3887,13 +4063,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3887
4063
|
return receiveTranscription;
|
|
3888
4064
|
}()
|
|
3889
4065
|
/**
|
|
3890
|
-
*
|
|
3891
|
-
*
|
|
4066
|
+
* Callback called when a relay event is received from meeting LLM Connection
|
|
4067
|
+
* @param {RelayEvent} e Event object coming from LLM Connection
|
|
4068
|
+
* @private
|
|
3892
4069
|
* @returns {void}
|
|
3893
4070
|
*/
|
|
3894
4071
|
}, {
|
|
3895
4072
|
key: "stopReceivingTranscription",
|
|
3896
|
-
value:
|
|
4073
|
+
value:
|
|
4074
|
+
/**
|
|
4075
|
+
* stop recieving Transcription by closing
|
|
4076
|
+
* the web socket connection properly
|
|
4077
|
+
* @returns {void}
|
|
4078
|
+
*/
|
|
4079
|
+
function stopReceivingTranscription() {
|
|
3897
4080
|
if (this.transcription) {
|
|
3898
4081
|
this.transcription.closeSocket();
|
|
3899
4082
|
}
|
|
@@ -3930,7 +4113,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3930
4113
|
}, {
|
|
3931
4114
|
key: "join",
|
|
3932
4115
|
value: function join() {
|
|
3933
|
-
var
|
|
4116
|
+
var _this35 = this;
|
|
3934
4117
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3935
4118
|
// @ts-ignore - fix type
|
|
3936
4119
|
if (!this.webex.meetings.registered) {
|
|
@@ -4018,40 +4201,44 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4018
4201
|
}
|
|
4019
4202
|
this.isMultistream = !!options.enableMultistream;
|
|
4020
4203
|
return _util.default.joinMeetingOptions(this, options).then(function (join) {
|
|
4021
|
-
|
|
4204
|
+
_this35.meetingFiniteStateMachine.join();
|
|
4022
4205
|
_loggerProxy.default.logger.log('Meeting:index#join --> Success');
|
|
4023
4206
|
return join;
|
|
4024
4207
|
}).then(function (join) {
|
|
4025
4208
|
joinSuccess(join);
|
|
4026
|
-
|
|
4209
|
+
_this35.deferJoin = undefined;
|
|
4027
4210
|
_metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
|
|
4028
|
-
correlation_id:
|
|
4211
|
+
correlation_id: _this35.correlationId
|
|
4029
4212
|
});
|
|
4030
4213
|
return join;
|
|
4031
4214
|
}).then( /*#__PURE__*/function () {
|
|
4032
|
-
var
|
|
4215
|
+
var _ref12 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(join) {
|
|
4033
4216
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
4034
4217
|
while (1) switch (_context3.prev = _context3.next) {
|
|
4035
4218
|
case 0:
|
|
4036
|
-
if (!
|
|
4037
|
-
_context3.next =
|
|
4219
|
+
if (!_this35.config.enableAutomaticLLM) {
|
|
4220
|
+
_context3.next = 5;
|
|
4038
4221
|
break;
|
|
4039
4222
|
}
|
|
4040
4223
|
_context3.next = 3;
|
|
4041
|
-
return
|
|
4224
|
+
return _this35.updateLLMConnection();
|
|
4042
4225
|
case 3:
|
|
4226
|
+
// @ts-ignore - Fix type
|
|
4227
|
+
_this35.webex.internal.llm.on('event:relay.event', _this35.processRelayEvent);
|
|
4228
|
+
_loggerProxy.default.logger.info('Meeting:index#join --> enabled to receive relay events!');
|
|
4229
|
+
case 5:
|
|
4043
4230
|
return _context3.abrupt("return", join);
|
|
4044
|
-
case
|
|
4231
|
+
case 6:
|
|
4045
4232
|
case "end":
|
|
4046
4233
|
return _context3.stop();
|
|
4047
4234
|
}
|
|
4048
4235
|
}, _callee3);
|
|
4049
4236
|
}));
|
|
4050
4237
|
return function (_x2) {
|
|
4051
|
-
return
|
|
4238
|
+
return _ref12.apply(this, arguments);
|
|
4052
4239
|
};
|
|
4053
4240
|
}()).then( /*#__PURE__*/function () {
|
|
4054
|
-
var
|
|
4241
|
+
var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(join) {
|
|
4055
4242
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
4056
4243
|
while (1) switch (_context4.prev = _context4.next) {
|
|
4057
4244
|
case 0:
|
|
@@ -4059,16 +4246,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4059
4246
|
_context4.next = 8;
|
|
4060
4247
|
break;
|
|
4061
4248
|
}
|
|
4062
|
-
if (!(
|
|
4249
|
+
if (!(_this35.config.receiveTranscription || options.receiveTranscription)) {
|
|
4063
4250
|
_context4.next = 6;
|
|
4064
4251
|
break;
|
|
4065
4252
|
}
|
|
4066
|
-
if (!
|
|
4253
|
+
if (!_this35.isTranscriptionSupported()) {
|
|
4067
4254
|
_context4.next = 6;
|
|
4068
4255
|
break;
|
|
4069
4256
|
}
|
|
4070
4257
|
_context4.next = 5;
|
|
4071
|
-
return
|
|
4258
|
+
return _this35.receiveTranscription();
|
|
4072
4259
|
case 5:
|
|
4073
4260
|
_loggerProxy.default.logger.info('Meeting:index#join --> enabled to recieve transcription!');
|
|
4074
4261
|
case 6:
|
|
@@ -4085,16 +4272,16 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4085
4272
|
}, _callee4);
|
|
4086
4273
|
}));
|
|
4087
4274
|
return function (_x3) {
|
|
4088
|
-
return
|
|
4275
|
+
return _ref13.apply(this, arguments);
|
|
4089
4276
|
};
|
|
4090
4277
|
}()).catch(function (error) {
|
|
4091
4278
|
var _error$error;
|
|
4092
|
-
|
|
4279
|
+
_this35.meetingFiniteStateMachine.fail(error);
|
|
4093
4280
|
_loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
|
|
4094
4281
|
_metrics.default.postEvent({
|
|
4095
4282
|
event: _config.eventType.LOCUS_JOIN_RESPONSE,
|
|
4096
|
-
meeting:
|
|
4097
|
-
meetingId:
|
|
4283
|
+
meeting: _this35,
|
|
4284
|
+
meetingId: _this35.id,
|
|
4098
4285
|
data: {
|
|
4099
4286
|
errors: [_metrics.default.parseLocusError(error.error, true)]
|
|
4100
4287
|
}
|
|
@@ -4102,18 +4289,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4102
4289
|
|
|
4103
4290
|
// TODO: change this to error codes and pre defined dictionary
|
|
4104
4291
|
_metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
|
|
4105
|
-
correlation_id:
|
|
4292
|
+
correlation_id: _this35.correlationId,
|
|
4106
4293
|
reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
|
|
4107
4294
|
stack: error.stack
|
|
4108
4295
|
});
|
|
4109
4296
|
|
|
4110
4297
|
// Upload logs on join Failure
|
|
4111
|
-
_triggerProxy.default.trigger(
|
|
4298
|
+
_triggerProxy.default.trigger(_this35, {
|
|
4112
4299
|
file: 'meeting/index',
|
|
4113
4300
|
function: 'join'
|
|
4114
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
4301
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this35);
|
|
4115
4302
|
joinFailed(error);
|
|
4116
|
-
|
|
4303
|
+
_this35.deferJoin = undefined;
|
|
4117
4304
|
return _promise.default.reject(error);
|
|
4118
4305
|
});
|
|
4119
4306
|
}
|
|
@@ -4128,14 +4315,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4128
4315
|
key: "updateLLMConnection",
|
|
4129
4316
|
value: function () {
|
|
4130
4317
|
var _updateLLMConnection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
4131
|
-
var _this$
|
|
4318
|
+
var _this$locusInfo5, url, _this$locusInfo5$info, _this$locusInfo5$info2, datachannelUrl, isJoined;
|
|
4132
4319
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
4133
4320
|
while (1) switch (_context5.prev = _context5.next) {
|
|
4134
4321
|
case 0:
|
|
4135
|
-
|
|
4136
|
-
|
|
4322
|
+
// @ts-ignore - Fix type
|
|
4323
|
+
_this$locusInfo5 = this.locusInfo, url = _this$locusInfo5.url, _this$locusInfo5$info = _this$locusInfo5.info, _this$locusInfo5$info2 = _this$locusInfo5$info === void 0 ? {} : _this$locusInfo5$info, datachannelUrl = _this$locusInfo5$info2.datachannelUrl;
|
|
4324
|
+
isJoined = this.joinedWith && this.joinedWith.state === 'JOINED'; // @ts-ignore - Fix type
|
|
4137
4325
|
if (!this.webex.internal.llm.isConnected()) {
|
|
4138
|
-
_context5.next =
|
|
4326
|
+
_context5.next = 8;
|
|
4139
4327
|
break;
|
|
4140
4328
|
}
|
|
4141
4329
|
if (!(url === this.webex.internal.llm.getLocusUrl() && isJoined)) {
|
|
@@ -4147,14 +4335,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4147
4335
|
_context5.next = 7;
|
|
4148
4336
|
return this.webex.internal.llm.disconnectLLM();
|
|
4149
4337
|
case 7:
|
|
4338
|
+
// @ts-ignore - Fix type
|
|
4339
|
+
this.webex.internal.llm.off('event:relay.event', this.processRelayEvent);
|
|
4340
|
+
case 8:
|
|
4150
4341
|
if (isJoined) {
|
|
4151
|
-
_context5.next =
|
|
4342
|
+
_context5.next = 10;
|
|
4152
4343
|
break;
|
|
4153
4344
|
}
|
|
4154
4345
|
return _context5.abrupt("return", undefined);
|
|
4155
|
-
case 9:
|
|
4156
|
-
return _context5.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl));
|
|
4157
4346
|
case 10:
|
|
4347
|
+
return _context5.abrupt("return", this.webex.internal.llm.registerAndConnect(url, datachannelUrl));
|
|
4348
|
+
case 11:
|
|
4158
4349
|
case "end":
|
|
4159
4350
|
return _context5.stop();
|
|
4160
4351
|
}
|
|
@@ -4203,26 +4394,28 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4203
4394
|
}, {
|
|
4204
4395
|
key: "dialInPstn",
|
|
4205
4396
|
value: function dialInPstn() {
|
|
4206
|
-
var
|
|
4397
|
+
var _this36 = this;
|
|
4207
4398
|
if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
|
|
4208
4399
|
|
|
4209
4400
|
var correlationId = this.correlationId,
|
|
4210
4401
|
locusUrl = this.locusUrl;
|
|
4211
4402
|
if (!this.dialInUrl) this.dialInUrl = "dialin:///".concat(_uuid.default.v4());
|
|
4212
|
-
return this.meetingRequest
|
|
4403
|
+
return this.meetingRequest
|
|
4404
|
+
// @ts-ignore
|
|
4405
|
+
.dialIn({
|
|
4213
4406
|
correlationId: correlationId,
|
|
4214
4407
|
dialInUrl: this.dialInUrl,
|
|
4215
4408
|
locusUrl: locusUrl,
|
|
4216
4409
|
clientUrl: this.deviceUrl
|
|
4217
4410
|
}).then(function (res) {
|
|
4218
|
-
|
|
4411
|
+
_this36.locusInfo.onFullLocus(res.body.locus);
|
|
4219
4412
|
}).catch(function (error) {
|
|
4220
4413
|
var _error$error2;
|
|
4221
4414
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
|
|
4222
|
-
correlation_id:
|
|
4223
|
-
dial_in_url:
|
|
4415
|
+
correlation_id: _this36.correlationId,
|
|
4416
|
+
dial_in_url: _this36.dialInUrl,
|
|
4224
4417
|
locus_id: locusUrl.split('/').pop(),
|
|
4225
|
-
client_url:
|
|
4418
|
+
client_url: _this36.deviceUrl,
|
|
4226
4419
|
reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
|
|
4227
4420
|
stack: error.stack
|
|
4228
4421
|
});
|
|
@@ -4240,27 +4433,29 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4240
4433
|
}, {
|
|
4241
4434
|
key: "dialOutPstn",
|
|
4242
4435
|
value: function dialOutPstn(phoneNumber) {
|
|
4243
|
-
var
|
|
4436
|
+
var _this37 = this;
|
|
4244
4437
|
if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
|
|
4245
4438
|
|
|
4246
4439
|
var correlationId = this.correlationId,
|
|
4247
4440
|
locusUrl = this.locusUrl;
|
|
4248
4441
|
if (!this.dialOutUrl) this.dialOutUrl = "dialout:///".concat(_uuid.default.v4());
|
|
4249
|
-
return this.meetingRequest
|
|
4442
|
+
return this.meetingRequest
|
|
4443
|
+
// @ts-ignore
|
|
4444
|
+
.dialOut({
|
|
4250
4445
|
correlationId: correlationId,
|
|
4251
4446
|
dialOutUrl: this.dialOutUrl,
|
|
4252
4447
|
phoneNumber: phoneNumber,
|
|
4253
4448
|
locusUrl: locusUrl,
|
|
4254
4449
|
clientUrl: this.deviceUrl
|
|
4255
4450
|
}).then(function (res) {
|
|
4256
|
-
|
|
4451
|
+
_this37.locusInfo.onFullLocus(res.body.locus);
|
|
4257
4452
|
}).catch(function (error) {
|
|
4258
4453
|
var _error$error3;
|
|
4259
4454
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
|
|
4260
|
-
correlation_id:
|
|
4261
|
-
dial_out_url:
|
|
4455
|
+
correlation_id: _this37.correlationId,
|
|
4456
|
+
dial_out_url: _this37.dialOutUrl,
|
|
4262
4457
|
locus_id: locusUrl.split('/').pop(),
|
|
4263
|
-
client_url:
|
|
4458
|
+
client_url: _this37.deviceUrl,
|
|
4264
4459
|
reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
|
|
4265
4460
|
stack: error.stack
|
|
4266
4461
|
});
|
|
@@ -4291,7 +4486,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4291
4486
|
}, {
|
|
4292
4487
|
key: "moveTo",
|
|
4293
4488
|
value: function moveTo(resourceId) {
|
|
4294
|
-
var
|
|
4489
|
+
var _this38 = this;
|
|
4295
4490
|
if (!resourceId) {
|
|
4296
4491
|
throw new _parameter.default('Cannot move call without a resourceId.');
|
|
4297
4492
|
}
|
|
@@ -4327,12 +4522,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4327
4522
|
while (1) switch (_context6.prev = _context6.next) {
|
|
4328
4523
|
case 0:
|
|
4329
4524
|
_context6.prev = 0;
|
|
4330
|
-
if (!
|
|
4525
|
+
if (!_this38.isSharing) {
|
|
4331
4526
|
_context6.next = 4;
|
|
4332
4527
|
break;
|
|
4333
4528
|
}
|
|
4334
4529
|
_context6.next = 4;
|
|
4335
|
-
return
|
|
4530
|
+
return _this38.releaseScreenShareFloor();
|
|
4336
4531
|
case 4:
|
|
4337
4532
|
mediaSettings = {
|
|
4338
4533
|
mediaDirection: {
|
|
@@ -4344,22 +4539,22 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4344
4539
|
receiveShare: true
|
|
4345
4540
|
}
|
|
4346
4541
|
}; // clean up the local tracks
|
|
4347
|
-
|
|
4542
|
+
_this38.mediaProperties.setMediaDirection(mediaSettings.mediaDirection);
|
|
4348
4543
|
|
|
4349
4544
|
// close the existing local tracks
|
|
4350
4545
|
_context6.next = 8;
|
|
4351
|
-
return
|
|
4546
|
+
return _this38.closeLocalStream();
|
|
4352
4547
|
case 8:
|
|
4353
4548
|
_context6.next = 10;
|
|
4354
|
-
return
|
|
4549
|
+
return _this38.closeLocalShare();
|
|
4355
4550
|
case 10:
|
|
4356
|
-
|
|
4551
|
+
_this38.mediaProperties.unsetMediaTracks();
|
|
4357
4552
|
|
|
4358
4553
|
// 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
|
|
4359
4554
|
// once the DX answers we establish connection back the media server with only receiveShare enabled
|
|
4360
4555
|
// @ts-ignore - reconnectMedia does not accept any argument
|
|
4361
4556
|
_context6.next = 13;
|
|
4362
|
-
return
|
|
4557
|
+
return _this38.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
|
|
4363
4558
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
|
|
4364
4559
|
});
|
|
4365
4560
|
case 13:
|
|
@@ -4370,8 +4565,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4370
4565
|
_context6.t0 = _context6["catch"](0);
|
|
4371
4566
|
_loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context6.t0);
|
|
4372
4567
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
|
|
4373
|
-
correlation_id:
|
|
4374
|
-
locus_id:
|
|
4568
|
+
correlation_id: _this38.correlationId,
|
|
4569
|
+
locus_id: _this38.locusUrl.split('/').pop(),
|
|
4375
4570
|
reason: _context6.t0.message,
|
|
4376
4571
|
stack: _context6.t0.stack
|
|
4377
4572
|
});
|
|
@@ -4386,12 +4581,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4386
4581
|
resourceId: resourceId,
|
|
4387
4582
|
moveToResource: true
|
|
4388
4583
|
}).then(function () {
|
|
4389
|
-
|
|
4584
|
+
_this38.meetingFiniteStateMachine.join();
|
|
4390
4585
|
}).catch(function (error) {
|
|
4391
|
-
|
|
4586
|
+
_this38.meetingFiniteStateMachine.fail(error);
|
|
4392
4587
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
|
|
4393
|
-
correlation_id:
|
|
4394
|
-
locus_id:
|
|
4588
|
+
correlation_id: _this38.correlationId,
|
|
4589
|
+
locus_id: _this38.locusUrl.split('/').pop(),
|
|
4395
4590
|
reason: error.message,
|
|
4396
4591
|
stack: error.stack
|
|
4397
4592
|
});
|
|
@@ -4410,7 +4605,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4410
4605
|
}, {
|
|
4411
4606
|
key: "moveFrom",
|
|
4412
4607
|
value: function moveFrom(resourceId) {
|
|
4413
|
-
var
|
|
4608
|
+
var _this39 = this;
|
|
4414
4609
|
// On moveFrom ask the developer to re capture it moveFrom then updateMedia
|
|
4415
4610
|
if (!resourceId) {
|
|
4416
4611
|
throw new _parameter.default('Cannot move call without a resourceId.');
|
|
@@ -4421,19 +4616,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4421
4616
|
meeting: this
|
|
4422
4617
|
});
|
|
4423
4618
|
return _util.default.joinMeetingOptions(this).then(function () {
|
|
4424
|
-
return _util.default.leaveMeeting(
|
|
4619
|
+
return _util.default.leaveMeeting(_this39, {
|
|
4425
4620
|
resourceId: resourceId,
|
|
4426
4621
|
correlationId: oldCorrelationId,
|
|
4427
4622
|
moveMeeting: true
|
|
4428
4623
|
}).then(function () {
|
|
4429
|
-
|
|
4624
|
+
_this39.resourceId = '';
|
|
4430
4625
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
|
|
4431
4626
|
});
|
|
4432
4627
|
}).catch(function (error) {
|
|
4433
|
-
|
|
4628
|
+
_this39.meetingFiniteStateMachine.fail(error);
|
|
4434
4629
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
|
|
4435
|
-
correlation_id:
|
|
4436
|
-
locus_id:
|
|
4630
|
+
correlation_id: _this39.correlationId,
|
|
4631
|
+
locus_id: _this39.locusUrl.split('/').pop(),
|
|
4437
4632
|
reason: error.message,
|
|
4438
4633
|
stack: error.stack
|
|
4439
4634
|
});
|
|
@@ -4489,9 +4684,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4489
4684
|
}, {
|
|
4490
4685
|
key: "forwardEvent",
|
|
4491
4686
|
value: function forwardEvent(eventEmitter, eventTypeToForward, meetingEventType) {
|
|
4492
|
-
var
|
|
4687
|
+
var _this40 = this;
|
|
4493
4688
|
eventEmitter.on(eventTypeToForward, function (data) {
|
|
4494
|
-
return _triggerProxy.default.trigger(
|
|
4689
|
+
return _triggerProxy.default.trigger(_this40, {
|
|
4495
4690
|
file: 'meetings',
|
|
4496
4691
|
function: 'addMedia'
|
|
4497
4692
|
}, meetingEventType, data);
|
|
@@ -4513,7 +4708,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4513
4708
|
}, {
|
|
4514
4709
|
key: "addMedia",
|
|
4515
4710
|
value: function addMedia() {
|
|
4516
|
-
var
|
|
4711
|
+
var _this41 = this;
|
|
4517
4712
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4518
4713
|
var LOG_HEADER = 'Meeting:index#addMedia -->';
|
|
4519
4714
|
var turnDiscoverySkippedReason;
|
|
@@ -4557,41 +4752,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4557
4752
|
}
|
|
4558
4753
|
});
|
|
4559
4754
|
return _util.default.validateOptions(options).then(function () {
|
|
4560
|
-
return
|
|
4755
|
+
return _this41.roap.doTurnDiscovery(_this41, false);
|
|
4561
4756
|
}).then(function (turnDiscoveryObject) {
|
|
4562
4757
|
turnDiscoverySkippedReason = turnDiscoveryObject.turnDiscoverySkippedReason;
|
|
4563
4758
|
turnServerUsed = !turnDiscoverySkippedReason;
|
|
4564
4759
|
var turnServerInfo = turnDiscoveryObject.turnServerInfo;
|
|
4565
|
-
|
|
4566
|
-
var mc =
|
|
4567
|
-
if (
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
return
|
|
4760
|
+
_this41.preMedia(localStream, localShare, mediaSettings);
|
|
4761
|
+
var mc = _this41.createMediaConnection(turnServerInfo);
|
|
4762
|
+
if (_this41.isMultistream) {
|
|
4763
|
+
_this41.remoteMediaManager = new _remoteMediaManager.RemoteMediaManager(_this41.receiveSlotManager, _this41.mediaRequestManagers, remoteMediaManagerConfig);
|
|
4764
|
+
_this41.forwardEvent(_this41.remoteMediaManager, _remoteMediaManager.Event.AudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_AUDIO_CREATED);
|
|
4765
|
+
_this41.forwardEvent(_this41.remoteMediaManager, _remoteMediaManager.Event.ScreenShareAudioCreated, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED);
|
|
4766
|
+
_this41.forwardEvent(_this41.remoteMediaManager, _remoteMediaManager.Event.VideoLayoutChanged, _constants.EVENT_TRIGGERS.REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED);
|
|
4767
|
+
return _this41.remoteMediaManager.start().then(function () {
|
|
4573
4768
|
return mc.initiateOffer();
|
|
4574
4769
|
});
|
|
4575
4770
|
}
|
|
4576
4771
|
return mc.initiateOffer();
|
|
4577
4772
|
}).then(function () {
|
|
4578
|
-
|
|
4773
|
+
_this41.setMercuryListener();
|
|
4579
4774
|
}).then(function () {
|
|
4580
|
-
return
|
|
4775
|
+
return _this41.getDevices().then(function (devices) {
|
|
4581
4776
|
_util.default.handleDeviceLogging(devices);
|
|
4582
4777
|
});
|
|
4583
4778
|
}).then(function () {
|
|
4584
|
-
|
|
4779
|
+
_this41.handleMediaLogging(_this41.mediaProperties);
|
|
4585
4780
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " media connection created"));
|
|
4586
4781
|
|
|
4587
4782
|
// @ts-ignore - config coming from registerPlugin
|
|
4588
|
-
if (
|
|
4783
|
+
if (_this41.config.stats.enableStatsAnalyzer) {
|
|
4589
4784
|
// @ts-ignore - config coming from registerPlugin
|
|
4590
|
-
|
|
4785
|
+
_this41.networkQualityMonitor = new _networkQualityMonitor.default(_this41.config.stats);
|
|
4591
4786
|
// @ts-ignore - config coming from registerPlugin
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4787
|
+
_this41.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(_this41.config.stats, _this41.networkQualityMonitor);
|
|
4788
|
+
_this41.setupStatsAnalyzerEventHandlers();
|
|
4789
|
+
_this41.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this41.sendNetworkQualityEvent.bind(_this41));
|
|
4595
4790
|
}
|
|
4596
4791
|
}).catch(function (error) {
|
|
4597
4792
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
|
|
@@ -4602,12 +4797,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4602
4797
|
|
|
4603
4798
|
// eslint-disable-next-line func-names
|
|
4604
4799
|
// eslint-disable-next-line prefer-arrow-callback
|
|
4605
|
-
if (
|
|
4800
|
+
if (_this41.type === _constants._CALL_) {
|
|
4606
4801
|
resolve();
|
|
4607
4802
|
}
|
|
4608
4803
|
var joiningTimer = setInterval(function () {
|
|
4609
4804
|
timerCount += 1;
|
|
4610
|
-
if (
|
|
4805
|
+
if (_this41.meetingState === _constants.FULL_STATE.ACTIVE) {
|
|
4611
4806
|
clearInterval(joiningTimer);
|
|
4612
4807
|
resolve();
|
|
4613
4808
|
}
|
|
@@ -4618,41 +4813,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4618
4813
|
}, 1000);
|
|
4619
4814
|
});
|
|
4620
4815
|
}).then(function () {
|
|
4621
|
-
return
|
|
4816
|
+
return _this41.mediaProperties.waitForMediaConnectionConnected().catch(function () {
|
|
4622
4817
|
throw (0, _webexErrors.createMeetingsError)(30202, 'Meeting connection failed');
|
|
4623
4818
|
});
|
|
4624
4819
|
}).then(function () {
|
|
4625
4820
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
|
|
4626
4821
|
if (mediaSettings && mediaSettings.sendShare && localShare) {
|
|
4627
|
-
if (
|
|
4628
|
-
return
|
|
4822
|
+
if (_this41.state === _constants.MEETING_STATE.STATES.JOINED) {
|
|
4823
|
+
return _this41.requestScreenShareFloor();
|
|
4629
4824
|
}
|
|
4630
4825
|
|
|
4631
4826
|
// When the self state changes to JOINED then request the floor
|
|
4632
|
-
|
|
4827
|
+
_this41.floorGrantPending = true;
|
|
4633
4828
|
}
|
|
4634
4829
|
return {};
|
|
4635
4830
|
}).then(function () {
|
|
4636
|
-
return
|
|
4831
|
+
return _this41.mediaProperties.getCurrentConnectionType();
|
|
4637
4832
|
}).then(function (connectionType) {
|
|
4638
4833
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, {
|
|
4639
|
-
correlation_id:
|
|
4640
|
-
locus_id:
|
|
4834
|
+
correlation_id: _this41.correlationId,
|
|
4835
|
+
locus_id: _this41.locusUrl.split('/').pop(),
|
|
4641
4836
|
connectionType: connectionType
|
|
4642
4837
|
});
|
|
4643
4838
|
}).catch(function (error) {
|
|
4644
4839
|
// Clean up stats analyzer, peer connection, and turn off listeners
|
|
4645
|
-
var stopStatsAnalyzer =
|
|
4840
|
+
var stopStatsAnalyzer = _this41.statsAnalyzer ? _this41.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
|
|
4646
4841
|
return stopStatsAnalyzer.then(function () {
|
|
4647
|
-
|
|
4648
|
-
if (
|
|
4649
|
-
|
|
4650
|
-
|
|
4842
|
+
_this41.statsAnalyzer = null;
|
|
4843
|
+
if (_this41.mediaProperties.webrtcMediaConnection) {
|
|
4844
|
+
_this41.closePeerConnections();
|
|
4845
|
+
_this41.unsetPeerConnections();
|
|
4651
4846
|
}
|
|
4652
4847
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
|
|
4653
4848
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
|
|
4654
|
-
correlation_id:
|
|
4655
|
-
locus_id:
|
|
4849
|
+
correlation_id: _this41.correlationId,
|
|
4850
|
+
locus_id: _this41.locusUrl.split('/').pop(),
|
|
4656
4851
|
reason: error.message,
|
|
4657
4852
|
stack: error.stack,
|
|
4658
4853
|
code: error.code,
|
|
@@ -4661,12 +4856,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4661
4856
|
});
|
|
4662
4857
|
|
|
4663
4858
|
// Upload logs on error while adding media
|
|
4664
|
-
_triggerProxy.default.trigger(
|
|
4859
|
+
_triggerProxy.default.trigger(_this41, {
|
|
4665
4860
|
file: 'meeting/index',
|
|
4666
4861
|
function: 'addMedia'
|
|
4667
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
4668
|
-
if (error instanceof _internalMediaCore.
|
|
4669
|
-
|
|
4862
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this41);
|
|
4863
|
+
if (error instanceof _internalMediaCore.Errors.SdpError) {
|
|
4864
|
+
_this41.leave({
|
|
4670
4865
|
reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
|
|
4671
4866
|
});
|
|
4672
4867
|
}
|
|
@@ -4699,7 +4894,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4699
4894
|
}, {
|
|
4700
4895
|
key: "enqueueMediaUpdate",
|
|
4701
4896
|
value: function enqueueMediaUpdate(mediaUpdateType, options) {
|
|
4702
|
-
var
|
|
4897
|
+
var _this42 = this;
|
|
4898
|
+
if (mediaUpdateType === MEDIA_UPDATE_TYPE.LAMBDA && typeof (options === null || options === void 0 ? void 0 : options.lambda) !== 'function') {
|
|
4899
|
+
return _promise.default.reject(new Error('lambda must be specified when enqueuing MEDIA_UPDATE_TYPE.LAMBDA'));
|
|
4900
|
+
}
|
|
4901
|
+
var canUpdateMediaNow = this.canUpdateMedia();
|
|
4703
4902
|
return new _promise.default(function (resolve, reject) {
|
|
4704
4903
|
var queueItem = {
|
|
4705
4904
|
pendingPromiseResolve: resolve,
|
|
@@ -4708,7 +4907,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4708
4907
|
options: options
|
|
4709
4908
|
};
|
|
4710
4909
|
_loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
|
|
4711
|
-
|
|
4910
|
+
_this42.queuedMediaUpdates.push(queueItem);
|
|
4911
|
+
if (canUpdateMediaNow) {
|
|
4912
|
+
_this42.processNextQueuedMediaUpdate();
|
|
4913
|
+
}
|
|
4712
4914
|
});
|
|
4713
4915
|
}
|
|
4714
4916
|
|
|
@@ -4733,7 +4935,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4733
4935
|
* @memberof Meeting
|
|
4734
4936
|
*/
|
|
4735
4937
|
function updateMedia() {
|
|
4736
|
-
var
|
|
4938
|
+
var _this43 = this;
|
|
4737
4939
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4738
4940
|
var LOG_HEADER = 'Meeting:index#updateMedia -->';
|
|
4739
4941
|
if (!this.canUpdateMedia()) {
|
|
@@ -4747,27 +4949,27 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4747
4949
|
return _promise.default.reject(new Error('media connection not established, call addMedia() first'));
|
|
4748
4950
|
}
|
|
4749
4951
|
return _util.default.validateOptions(options).then(function () {
|
|
4750
|
-
return
|
|
4952
|
+
return _this43.preMedia(localStream, localShare, mediaSettings);
|
|
4751
4953
|
}).then(function () {
|
|
4752
|
-
return
|
|
4954
|
+
return _this43.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
|
|
4753
4955
|
send: {
|
|
4754
|
-
audio:
|
|
4755
|
-
video:
|
|
4756
|
-
screenShareVideo:
|
|
4956
|
+
audio: _this43.mediaProperties.mediaDirection.sendAudio ? _this43.mediaProperties.audioTrack : null,
|
|
4957
|
+
video: _this43.mediaProperties.mediaDirection.sendVideo ? _this43.mediaProperties.videoTrack : null,
|
|
4958
|
+
screenShareVideo: _this43.mediaProperties.mediaDirection.sendShare ? _this43.mediaProperties.shareTrack : null
|
|
4757
4959
|
},
|
|
4758
4960
|
receive: {
|
|
4759
|
-
audio:
|
|
4760
|
-
video:
|
|
4761
|
-
screenShareVideo:
|
|
4762
|
-
remoteQualityLevel:
|
|
4961
|
+
audio: _this43.mediaProperties.mediaDirection.receiveAudio,
|
|
4962
|
+
video: _this43.mediaProperties.mediaDirection.receiveVideo,
|
|
4963
|
+
screenShareVideo: _this43.mediaProperties.mediaDirection.receiveShare,
|
|
4964
|
+
remoteQualityLevel: _this43.mediaProperties.remoteQualityLevel
|
|
4763
4965
|
}
|
|
4764
4966
|
}).then(function () {
|
|
4765
4967
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " webrtcMediaConnection.updateSendReceiveOptions done"));
|
|
4766
4968
|
}).catch(function (error) {
|
|
4767
4969
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error updatedMedia, "), error);
|
|
4768
4970
|
_metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
|
|
4769
|
-
correlation_id:
|
|
4770
|
-
locus_id:
|
|
4971
|
+
correlation_id: _this43.correlationId,
|
|
4972
|
+
locus_id: _this43.locusUrl.split('/').pop(),
|
|
4771
4973
|
reason: error.message,
|
|
4772
4974
|
stack: error.stack
|
|
4773
4975
|
});
|
|
@@ -4778,15 +4980,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4778
4980
|
// if not, ensure it's called after (now it's called after roap message is sent out, but we're not
|
|
4779
4981
|
// waiting for sendRoapMediaRequest() to be resolved)
|
|
4780
4982
|
.then(function () {
|
|
4781
|
-
return
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4983
|
+
return _this43.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.LAMBDA, {
|
|
4984
|
+
lambda: function lambda() {
|
|
4985
|
+
return _promise.default.resolve().then(function () {
|
|
4986
|
+
return _this43.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
|
|
4987
|
+
}).then(function (startShare) {
|
|
4988
|
+
// This is a special case if we do an /floor grant followed by /media
|
|
4989
|
+
// we actually get a OFFER from the server and a GLAR condition happens
|
|
4990
|
+
if (startShare) {
|
|
4991
|
+
// We are assuming that the clients are connected when doing an update
|
|
4992
|
+
return _this43.requestScreenShareFloor();
|
|
4993
|
+
}
|
|
4994
|
+
return _promise.default.resolve();
|
|
4995
|
+
});
|
|
4996
|
+
}
|
|
4997
|
+
});
|
|
4790
4998
|
});
|
|
4791
4999
|
});
|
|
4792
5000
|
}
|
|
@@ -4808,7 +5016,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4808
5016
|
key: "updateAudio",
|
|
4809
5017
|
value: function () {
|
|
4810
5018
|
var _updateAudio = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(options) {
|
|
4811
|
-
var
|
|
5019
|
+
var _this44 = this;
|
|
4812
5020
|
var sendAudio, receiveAudio, stream, track, bnrEnabled;
|
|
4813
5021
|
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
4814
5022
|
while (1) switch (_context7.prev = _context7.next) {
|
|
@@ -4853,25 +5061,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4853
5061
|
sendAudio: sendAudio,
|
|
4854
5062
|
localStream: stream
|
|
4855
5063
|
}).then(function () {
|
|
4856
|
-
return
|
|
5064
|
+
return _this44.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
|
|
4857
5065
|
send: {
|
|
4858
5066
|
audio: track
|
|
4859
5067
|
},
|
|
4860
5068
|
receive: {
|
|
4861
5069
|
audio: options.receiveAudio,
|
|
4862
|
-
video:
|
|
4863
|
-
screenShareVideo:
|
|
4864
|
-
remoteQualityLevel:
|
|
5070
|
+
video: _this44.mediaProperties.mediaDirection.receiveVideo,
|
|
5071
|
+
screenShareVideo: _this44.mediaProperties.mediaDirection.receiveShare,
|
|
5072
|
+
remoteQualityLevel: _this44.mediaProperties.remoteQualityLevel
|
|
4865
5073
|
}
|
|
4866
5074
|
});
|
|
4867
5075
|
}).then(function () {
|
|
4868
|
-
|
|
5076
|
+
_this44.setLocalAudioTrack(track);
|
|
4869
5077
|
// todo: maybe this.mediaProperties.mediaDirection could be removed? it's duplicating stuff from webrtcMediaConnection
|
|
4870
|
-
|
|
4871
|
-
|
|
5078
|
+
_this44.mediaProperties.mediaDirection.sendAudio = sendAudio;
|
|
5079
|
+
_this44.mediaProperties.mediaDirection.receiveAudio = receiveAudio;
|
|
4872
5080
|
|
|
4873
5081
|
// audio state could be undefined if you have not sent audio before
|
|
4874
|
-
|
|
5082
|
+
_this44.audio = _this44.audio || (0, _muteState.default)(_constants.AUDIO, _this44, _this44.mediaProperties.mediaDirection);
|
|
4875
5083
|
}));
|
|
4876
5084
|
case 17:
|
|
4877
5085
|
case "end":
|
|
@@ -4900,7 +5108,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4900
5108
|
}, {
|
|
4901
5109
|
key: "updateVideo",
|
|
4902
5110
|
value: function updateVideo(options) {
|
|
4903
|
-
var
|
|
5111
|
+
var _this45 = this;
|
|
4904
5112
|
if (!this.canUpdateMedia()) {
|
|
4905
5113
|
return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.VIDEO, options);
|
|
4906
5114
|
}
|
|
@@ -4918,24 +5126,24 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4918
5126
|
sendVideo: sendVideo,
|
|
4919
5127
|
localStream: stream
|
|
4920
5128
|
}).then(function () {
|
|
4921
|
-
return
|
|
5129
|
+
return _this45.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
|
|
4922
5130
|
send: {
|
|
4923
5131
|
video: track
|
|
4924
5132
|
},
|
|
4925
5133
|
receive: {
|
|
4926
|
-
audio:
|
|
5134
|
+
audio: _this45.mediaProperties.mediaDirection.receiveAudio,
|
|
4927
5135
|
video: options.receiveVideo,
|
|
4928
|
-
screenShareVideo:
|
|
4929
|
-
remoteQualityLevel:
|
|
5136
|
+
screenShareVideo: _this45.mediaProperties.mediaDirection.receiveShare,
|
|
5137
|
+
remoteQualityLevel: _this45.mediaProperties.remoteQualityLevel
|
|
4930
5138
|
}
|
|
4931
5139
|
});
|
|
4932
5140
|
}).then(function () {
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
5141
|
+
_this45.setLocalVideoTrack(track);
|
|
5142
|
+
_this45.mediaProperties.mediaDirection.sendVideo = sendVideo;
|
|
5143
|
+
_this45.mediaProperties.mediaDirection.receiveVideo = receiveVideo;
|
|
4936
5144
|
|
|
4937
5145
|
// video state could be undefined if you have not sent video before
|
|
4938
|
-
|
|
5146
|
+
_this45.video = _this45.video || (0, _muteState.default)(_constants.VIDEO, _this45, _this45.mediaProperties.mediaDirection);
|
|
4939
5147
|
});
|
|
4940
5148
|
}
|
|
4941
5149
|
|
|
@@ -4978,7 +5186,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4978
5186
|
}, {
|
|
4979
5187
|
key: "updateShare",
|
|
4980
5188
|
value: function updateShare(options) {
|
|
4981
|
-
var
|
|
5189
|
+
var _this46 = this;
|
|
4982
5190
|
if (!options.skipSignalingCheck && !this.canUpdateMedia()) {
|
|
4983
5191
|
return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE, options);
|
|
4984
5192
|
}
|
|
@@ -4998,29 +5206,50 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4998
5206
|
sendShare: sendShare,
|
|
4999
5207
|
localShare: stream
|
|
5000
5208
|
}).then(function () {
|
|
5001
|
-
return
|
|
5209
|
+
return _this46.checkForStopShare(sendShare, previousSendShareStatus);
|
|
5002
5210
|
}).then(function (startShare) {
|
|
5003
|
-
return
|
|
5211
|
+
return _this46.mediaProperties.webrtcMediaConnection.updateSendReceiveOptions({
|
|
5004
5212
|
send: {
|
|
5005
5213
|
screenShareVideo: track
|
|
5006
5214
|
},
|
|
5007
5215
|
receive: {
|
|
5008
|
-
audio:
|
|
5009
|
-
video:
|
|
5216
|
+
audio: _this46.mediaProperties.mediaDirection.receiveAudio,
|
|
5217
|
+
video: _this46.mediaProperties.mediaDirection.receiveVideo,
|
|
5010
5218
|
screenShareVideo: options.receiveShare,
|
|
5011
|
-
remoteQualityLevel:
|
|
5219
|
+
remoteQualityLevel: _this46.mediaProperties.remoteQualityLevel
|
|
5012
5220
|
}
|
|
5013
5221
|
}).then(function () {
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5222
|
+
return _this46.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.LAMBDA, {
|
|
5223
|
+
lambda: function () {
|
|
5224
|
+
var _lambda = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
5225
|
+
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
5226
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
5227
|
+
case 0:
|
|
5228
|
+
if (!startShare) {
|
|
5229
|
+
_context8.next = 2;
|
|
5230
|
+
break;
|
|
5231
|
+
}
|
|
5232
|
+
return _context8.abrupt("return", _this46.requestScreenShareFloor());
|
|
5233
|
+
case 2:
|
|
5234
|
+
return _context8.abrupt("return", undefined);
|
|
5235
|
+
case 3:
|
|
5236
|
+
case "end":
|
|
5237
|
+
return _context8.stop();
|
|
5238
|
+
}
|
|
5239
|
+
}, _callee8);
|
|
5240
|
+
}));
|
|
5241
|
+
function lambda() {
|
|
5242
|
+
return _lambda.apply(this, arguments);
|
|
5243
|
+
}
|
|
5244
|
+
return lambda;
|
|
5245
|
+
}()
|
|
5246
|
+
});
|
|
5018
5247
|
});
|
|
5019
5248
|
}).then(function () {
|
|
5020
|
-
|
|
5021
|
-
|
|
5249
|
+
_this46.mediaProperties.mediaDirection.sendShare = sendShare;
|
|
5250
|
+
_this46.mediaProperties.mediaDirection.receiveShare = receiveShare;
|
|
5022
5251
|
}).catch(function (error) {
|
|
5023
|
-
|
|
5252
|
+
_this46.unsetLocalShareTrack();
|
|
5024
5253
|
throw error;
|
|
5025
5254
|
});
|
|
5026
5255
|
}
|
|
@@ -5060,7 +5289,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5060
5289
|
}, {
|
|
5061
5290
|
key: "acknowledge",
|
|
5062
5291
|
value: function acknowledge(type) {
|
|
5063
|
-
var
|
|
5292
|
+
var _this47 = this;
|
|
5064
5293
|
if (!type) {
|
|
5065
5294
|
return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
|
|
5066
5295
|
}
|
|
@@ -5072,10 +5301,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5072
5301
|
}).then(function (response) {
|
|
5073
5302
|
return _promise.default.resolve(response);
|
|
5074
5303
|
}).then(function (response) {
|
|
5075
|
-
|
|
5304
|
+
_this47.meetingFiniteStateMachine.ring(type);
|
|
5076
5305
|
_metrics.default.postEvent({
|
|
5077
5306
|
event: _config.eventType.ALERT_DISPLAYED,
|
|
5078
|
-
meeting:
|
|
5307
|
+
meeting: _this47
|
|
5079
5308
|
});
|
|
5080
5309
|
return _promise.default.resolve({
|
|
5081
5310
|
response: response
|
|
@@ -5099,12 +5328,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5099
5328
|
}, {
|
|
5100
5329
|
key: "decline",
|
|
5101
5330
|
value: function decline(reason) {
|
|
5102
|
-
var
|
|
5331
|
+
var _this48 = this;
|
|
5103
5332
|
return _util.default.declineMeeting(this, reason).then(function (decline) {
|
|
5104
|
-
|
|
5333
|
+
_this48.meetingFiniteStateMachine.decline();
|
|
5105
5334
|
return _promise.default.resolve(decline);
|
|
5106
5335
|
}).catch(function (error) {
|
|
5107
|
-
|
|
5336
|
+
_this48.meetingFiniteStateMachine.fail(error);
|
|
5108
5337
|
return _promise.default.reject(error);
|
|
5109
5338
|
});
|
|
5110
5339
|
}
|
|
@@ -5120,7 +5349,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5120
5349
|
}, {
|
|
5121
5350
|
key: "leave",
|
|
5122
5351
|
value: function leave() {
|
|
5123
|
-
var
|
|
5352
|
+
var _this49 = this;
|
|
5124
5353
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5125
5354
|
_metrics.default.postEvent({
|
|
5126
5355
|
event: _config.eventType.LEAVE,
|
|
@@ -5133,39 +5362,39 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5133
5362
|
var leaveReason = options.reason || _constants.MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
|
|
5134
5363
|
_loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
|
|
5135
5364
|
return _util.default.leaveMeeting(this, options).then(function (leave) {
|
|
5136
|
-
|
|
5137
|
-
|
|
5365
|
+
_this49.meetingFiniteStateMachine.leave();
|
|
5366
|
+
_this49.clearMeetingData();
|
|
5138
5367
|
|
|
5139
5368
|
// upload logs on leave irrespective of meeting delete
|
|
5140
|
-
_triggerProxy.default.trigger(
|
|
5369
|
+
_triggerProxy.default.trigger(_this49, {
|
|
5141
5370
|
file: 'meeting/index',
|
|
5142
5371
|
function: 'leave'
|
|
5143
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
5372
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this49);
|
|
5144
5373
|
|
|
5145
5374
|
// TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
|
|
5146
|
-
if (
|
|
5375
|
+
if (_this49.wirelessShare || _this49.guest) {
|
|
5147
5376
|
// If screen sharing clean the meeting object
|
|
5148
|
-
_triggerProxy.default.trigger(
|
|
5377
|
+
_triggerProxy.default.trigger(_this49, {
|
|
5149
5378
|
file: 'meeting/index',
|
|
5150
5379
|
function: 'leave'
|
|
5151
5380
|
}, _constants.EVENTS.DESTROY_MEETING, {
|
|
5152
5381
|
reason: options.reason,
|
|
5153
|
-
meetingId:
|
|
5382
|
+
meetingId: _this49.id
|
|
5154
5383
|
});
|
|
5155
5384
|
}
|
|
5156
5385
|
_loggerProxy.default.logger.log('Meeting:index#leave --> LEAVE REASON ', leaveReason);
|
|
5157
5386
|
return leave;
|
|
5158
5387
|
}).catch(function (error) {
|
|
5159
|
-
|
|
5388
|
+
_this49.meetingFiniteStateMachine.fail(error);
|
|
5160
5389
|
_loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error);
|
|
5161
5390
|
// upload logs on leave irrespective of meeting delete
|
|
5162
|
-
_triggerProxy.default.trigger(
|
|
5391
|
+
_triggerProxy.default.trigger(_this49, {
|
|
5163
5392
|
file: 'meeting/index',
|
|
5164
5393
|
function: 'leave'
|
|
5165
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
5394
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this49);
|
|
5166
5395
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
|
|
5167
|
-
correlation_id:
|
|
5168
|
-
locus_id:
|
|
5396
|
+
correlation_id: _this49.correlationId,
|
|
5397
|
+
locus_id: _this49.locusUrl.split('/').pop(),
|
|
5169
5398
|
reason: error.message,
|
|
5170
5399
|
stack: error.stack,
|
|
5171
5400
|
code: error.code
|
|
@@ -5185,7 +5414,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5185
5414
|
}, {
|
|
5186
5415
|
key: "startWhiteboardShare",
|
|
5187
5416
|
value: function startWhiteboardShare(channelUrl, resourceToken) {
|
|
5188
|
-
var
|
|
5417
|
+
var _this50 = this;
|
|
5189
5418
|
var whiteboard = this.locusInfo.mediaShares.find(function (element) {
|
|
5190
5419
|
return element.name === 'whiteboard';
|
|
5191
5420
|
});
|
|
@@ -5208,13 +5437,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5208
5437
|
body.resourceToken = resourceToken;
|
|
5209
5438
|
}
|
|
5210
5439
|
return this.meetingRequest.changeMeetingFloor(body).then(function () {
|
|
5211
|
-
|
|
5440
|
+
_this50.isSharing = false;
|
|
5212
5441
|
return _promise.default.resolve();
|
|
5213
5442
|
}).catch(function (error) {
|
|
5214
5443
|
_loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
|
|
5215
5444
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
|
|
5216
|
-
correlation_id:
|
|
5217
|
-
locus_id:
|
|
5445
|
+
correlation_id: _this50.correlationId,
|
|
5446
|
+
locus_id: _this50.locusUrl.split('/').pop(),
|
|
5218
5447
|
reason: error.message,
|
|
5219
5448
|
stack: error.stack,
|
|
5220
5449
|
board: {
|
|
@@ -5237,7 +5466,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5237
5466
|
}, {
|
|
5238
5467
|
key: "stopWhiteboardShare",
|
|
5239
5468
|
value: function stopWhiteboardShare(channelUrl) {
|
|
5240
|
-
var
|
|
5469
|
+
var _this51 = this;
|
|
5241
5470
|
var whiteboard = this.locusInfo.mediaShares.find(function (element) {
|
|
5242
5471
|
return element.name === 'whiteboard';
|
|
5243
5472
|
});
|
|
@@ -5256,8 +5485,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5256
5485
|
_metrics.default.sendBehavioralMetric(
|
|
5257
5486
|
// @ts-ignore - check if STOP_WHITEBOARD_SHARE_FAILURE exists
|
|
5258
5487
|
_constants2.default.STOP_WHITEBOARD_SHARE_FAILURE, {
|
|
5259
|
-
correlation_id:
|
|
5260
|
-
locus_id:
|
|
5488
|
+
correlation_id: _this51.correlationId,
|
|
5489
|
+
locus_id: _this51.locusUrl.split('/').pop(),
|
|
5261
5490
|
reason: error.message,
|
|
5262
5491
|
stack: error.stack,
|
|
5263
5492
|
board: {
|
|
@@ -5279,7 +5508,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5279
5508
|
}, {
|
|
5280
5509
|
key: "requestScreenShareFloor",
|
|
5281
5510
|
value: function requestScreenShareFloor() {
|
|
5282
|
-
var
|
|
5511
|
+
var _this52 = this;
|
|
5283
5512
|
var content = this.locusInfo.mediaShares.find(function (element) {
|
|
5284
5513
|
return element.name === _constants.CONTENT;
|
|
5285
5514
|
});
|
|
@@ -5295,13 +5524,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5295
5524
|
uri: content.url,
|
|
5296
5525
|
resourceUrl: this.resourceUrl
|
|
5297
5526
|
}).then(function () {
|
|
5298
|
-
|
|
5527
|
+
_this52.isSharing = true;
|
|
5299
5528
|
return _promise.default.resolve();
|
|
5300
5529
|
}).catch(function (error) {
|
|
5301
5530
|
_loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
|
|
5302
5531
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
|
|
5303
|
-
correlation_id:
|
|
5304
|
-
locus_id:
|
|
5532
|
+
correlation_id: _this52.correlationId,
|
|
5533
|
+
locus_id: _this52.locusUrl.split('/').pop(),
|
|
5305
5534
|
reason: error.message,
|
|
5306
5535
|
stack: error.stack
|
|
5307
5536
|
});
|
|
@@ -5338,7 +5567,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5338
5567
|
}, {
|
|
5339
5568
|
key: "releaseScreenShareFloor",
|
|
5340
5569
|
value: function releaseScreenShareFloor() {
|
|
5341
|
-
var
|
|
5570
|
+
var _this53 = this;
|
|
5342
5571
|
var content = this.locusInfo.mediaShares.find(function (element) {
|
|
5343
5572
|
return element.name === _constants.CONTENT;
|
|
5344
5573
|
});
|
|
@@ -5362,14 +5591,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5362
5591
|
}).catch(function (error) {
|
|
5363
5592
|
_loggerProxy.default.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
|
|
5364
5593
|
_metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
|
|
5365
|
-
correlation_id:
|
|
5366
|
-
locus_id:
|
|
5594
|
+
correlation_id: _this53.correlationId,
|
|
5595
|
+
locus_id: _this53.locusUrl.split('/').pop(),
|
|
5367
5596
|
reason: error.message,
|
|
5368
5597
|
stack: error.stack
|
|
5369
5598
|
});
|
|
5370
5599
|
return _promise.default.reject(error);
|
|
5371
5600
|
}).finally(function () {
|
|
5372
|
-
|
|
5601
|
+
_this53.isSharing = false;
|
|
5373
5602
|
});
|
|
5374
5603
|
}
|
|
5375
5604
|
return _promise.default.reject(new _parameter.default('Cannot stop share without content'));
|
|
@@ -5384,7 +5613,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5384
5613
|
}, {
|
|
5385
5614
|
key: "startRecording",
|
|
5386
5615
|
value: function startRecording() {
|
|
5387
|
-
return
|
|
5616
|
+
return this.recordingController.startRecording();
|
|
5388
5617
|
}
|
|
5389
5618
|
|
|
5390
5619
|
/**
|
|
@@ -5396,7 +5625,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5396
5625
|
}, {
|
|
5397
5626
|
key: "stopRecording",
|
|
5398
5627
|
value: function stopRecording() {
|
|
5399
|
-
return
|
|
5628
|
+
return this.recordingController.stopRecording();
|
|
5400
5629
|
}
|
|
5401
5630
|
|
|
5402
5631
|
/**
|
|
@@ -5408,7 +5637,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5408
5637
|
}, {
|
|
5409
5638
|
key: "pauseRecording",
|
|
5410
5639
|
value: function pauseRecording() {
|
|
5411
|
-
return
|
|
5640
|
+
return this.recordingController.pauseRecording();
|
|
5412
5641
|
}
|
|
5413
5642
|
|
|
5414
5643
|
/**
|
|
@@ -5420,7 +5649,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5420
5649
|
}, {
|
|
5421
5650
|
key: "resumeRecording",
|
|
5422
5651
|
value: function resumeRecording() {
|
|
5423
|
-
return
|
|
5652
|
+
return this.recordingController.resumeRecording();
|
|
5424
5653
|
}
|
|
5425
5654
|
|
|
5426
5655
|
/**
|
|
@@ -5501,7 +5730,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5501
5730
|
}, {
|
|
5502
5731
|
key: "changeVideoLayout",
|
|
5503
5732
|
value: function changeVideoLayout(layoutType) {
|
|
5504
|
-
var
|
|
5733
|
+
var _this54 = this;
|
|
5505
5734
|
var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
5506
5735
|
var main = renderInfo.main,
|
|
5507
5736
|
content = renderInfo.content;
|
|
@@ -5555,7 +5784,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5555
5784
|
}
|
|
5556
5785
|
this.lastVideoLayoutInfo = (0, _cloneDeep2.default)(layoutInfo);
|
|
5557
5786
|
this.locusInfo.once(_constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED, function (envelope) {
|
|
5558
|
-
_triggerProxy.default.trigger(
|
|
5787
|
+
_triggerProxy.default.trigger(_this54, {
|
|
5559
5788
|
file: 'meeting/index',
|
|
5560
5789
|
function: 'changeVideoLayout'
|
|
5561
5790
|
}, _constants.EVENT_TRIGGERS.MEETING_CONTROLS_LAYOUT_UPDATE, {
|
|
@@ -5570,7 +5799,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5570
5799
|
content: layoutInfo.content
|
|
5571
5800
|
}).then(function (response) {
|
|
5572
5801
|
if (response && response.body && response.body.locus) {
|
|
5573
|
-
|
|
5802
|
+
_this54.locusInfo.onFullLocus(response.body.locus);
|
|
5574
5803
|
}
|
|
5575
5804
|
}).catch(function (error) {
|
|
5576
5805
|
_loggerProxy.default.logger.error('Meeting:index#changeVideoLayout --> Error ', error);
|
|
@@ -5586,7 +5815,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5586
5815
|
}, {
|
|
5587
5816
|
key: "setLocalVideoQuality",
|
|
5588
5817
|
value: function setLocalVideoQuality(level) {
|
|
5589
|
-
var
|
|
5818
|
+
var _this55 = this;
|
|
5590
5819
|
_loggerProxy.default.logger.log("Meeting:index#setLocalVideoQuality --> Setting quality to ".concat(level));
|
|
5591
5820
|
if (!_constants.VIDEO_RESOLUTIONS[level]) {
|
|
5592
5821
|
return this.rejectWithErrorLog("Meeting:index#setLocalVideoQuality --> ".concat(level, " not defined"));
|
|
@@ -5615,28 +5844,28 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5615
5844
|
// open bug link: https://bugs.chromium.org/p/chromium/issues/detail?id=943469
|
|
5616
5845
|
if (isBrowser('chrome') && this.mediaProperties.videoTrack) _media.default.stopTracks(this.mediaProperties.videoTrack);
|
|
5617
5846
|
return this.getMediaStreams(mediaDirection, _constants.VIDEO_RESOLUTIONS[level]).then( /*#__PURE__*/function () {
|
|
5618
|
-
var
|
|
5619
|
-
var
|
|
5620
|
-
return _regenerator.default.wrap(function
|
|
5621
|
-
while (1) switch (
|
|
5847
|
+
var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(_ref15) {
|
|
5848
|
+
var _ref17, localStream;
|
|
5849
|
+
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
5850
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
5622
5851
|
case 0:
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
return
|
|
5852
|
+
_ref17 = (0, _slicedToArray2.default)(_ref15, 1), localStream = _ref17[0];
|
|
5853
|
+
_context9.next = 3;
|
|
5854
|
+
return _this55.updateVideo({
|
|
5626
5855
|
sendVideo: true,
|
|
5627
5856
|
receiveVideo: true,
|
|
5628
5857
|
stream: localStream
|
|
5629
5858
|
});
|
|
5630
5859
|
case 3:
|
|
5631
|
-
return
|
|
5860
|
+
return _context9.abrupt("return", localStream);
|
|
5632
5861
|
case 4:
|
|
5633
5862
|
case "end":
|
|
5634
|
-
return
|
|
5863
|
+
return _context9.stop();
|
|
5635
5864
|
}
|
|
5636
|
-
},
|
|
5865
|
+
}, _callee9);
|
|
5637
5866
|
}));
|
|
5638
5867
|
return function (_x5) {
|
|
5639
|
-
return
|
|
5868
|
+
return _ref16.apply(this, arguments);
|
|
5640
5869
|
};
|
|
5641
5870
|
}());
|
|
5642
5871
|
}
|
|
@@ -5679,7 +5908,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5679
5908
|
}, {
|
|
5680
5909
|
key: "setMeetingQuality",
|
|
5681
5910
|
value: function setMeetingQuality(level) {
|
|
5682
|
-
var
|
|
5911
|
+
var _this56 = this;
|
|
5683
5912
|
_loggerProxy.default.logger.log("Meeting:index#setMeetingQuality --> Setting quality to ".concat(level));
|
|
5684
5913
|
if (!_constants.QUALITY_LEVELS[level]) {
|
|
5685
5914
|
return this.rejectWithErrorLog("Meeting:index#setMeetingQuality --> ".concat(level, " not defined"));
|
|
@@ -5701,15 +5930,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5701
5930
|
receiveVideo = _this$mediaProperties4.receiveVideo,
|
|
5702
5931
|
sendVideo = _this$mediaProperties4.sendVideo;
|
|
5703
5932
|
return (sendVideo ? this.setLocalVideoQuality(level) : _promise.default.resolve()).then(function () {
|
|
5704
|
-
return receiveAudio || receiveVideo ?
|
|
5933
|
+
return receiveAudio || receiveVideo ? _this56.setRemoteQualityLevel(level) : _promise.default.resolve();
|
|
5705
5934
|
}).catch(function (error) {
|
|
5706
5935
|
// From troubleshooting it seems that the stream itself doesn't change the max-fs if the peer connection isn't stable
|
|
5707
|
-
|
|
5708
|
-
|
|
5936
|
+
_this56.mediaProperties.setLocalQualityLevel(previousLevel.local);
|
|
5937
|
+
_this56.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
|
|
5709
5938
|
_loggerProxy.default.logger.error("Meeting:index#setMeetingQuality --> ".concat(error.message));
|
|
5710
5939
|
_metrics.default.sendBehavioralMetric(_constants2.default.SET_MEETING_QUALITY_FAILURE, {
|
|
5711
|
-
correlation_id:
|
|
5712
|
-
locus_id:
|
|
5940
|
+
correlation_id: _this56.correlationId,
|
|
5941
|
+
locus_id: _this56.locusUrl.split('/').pop(),
|
|
5713
5942
|
reason: error.message,
|
|
5714
5943
|
stack: error.stack
|
|
5715
5944
|
}, {
|
|
@@ -5735,7 +5964,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5735
5964
|
}, {
|
|
5736
5965
|
key: "shareScreen",
|
|
5737
5966
|
value: function shareScreen() {
|
|
5738
|
-
var
|
|
5967
|
+
var _this57 = this;
|
|
5739
5968
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5740
5969
|
_loggerProxy.default.logger.log('Meeting:index#shareScreen --> Getting local share');
|
|
5741
5970
|
var shareConstraints = _objectSpread({
|
|
@@ -5745,9 +5974,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5745
5974
|
|
|
5746
5975
|
// @ts-ignore - config coming from registerPlugin
|
|
5747
5976
|
return _media.default.getDisplayMedia(shareConstraints, this.config).then(function (shareStream) {
|
|
5748
|
-
return
|
|
5977
|
+
return _this57.updateShare({
|
|
5749
5978
|
sendShare: true,
|
|
5750
|
-
receiveShare:
|
|
5979
|
+
receiveShare: _this57.mediaProperties.mediaDirection.receiveShare,
|
|
5751
5980
|
stream: shareStream
|
|
5752
5981
|
});
|
|
5753
5982
|
}).catch(function (error) {
|
|
@@ -5760,8 +5989,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5760
5989
|
// TODO: The getDisplayMedia errors need to be moved inside `media.getDisplayMedia`
|
|
5761
5990
|
var metricName = _constants2.default.GET_DISPLAY_MEDIA_FAILURE;
|
|
5762
5991
|
var data = {
|
|
5763
|
-
correlation_id:
|
|
5764
|
-
locus_id:
|
|
5992
|
+
correlation_id: _this57.correlationId,
|
|
5993
|
+
locus_id: _this57.locusUrl.split('/').pop(),
|
|
5765
5994
|
reason: error.message,
|
|
5766
5995
|
stack: error.stack
|
|
5767
5996
|
};
|
|
@@ -5837,9 +6066,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5837
6066
|
*/
|
|
5838
6067
|
}, {
|
|
5839
6068
|
key: "handleMediaLogging",
|
|
5840
|
-
value: function handleMediaLogging(
|
|
5841
|
-
var audioTrack =
|
|
5842
|
-
videoTrack =
|
|
6069
|
+
value: function handleMediaLogging(_ref18) {
|
|
6070
|
+
var audioTrack = _ref18.audioTrack,
|
|
6071
|
+
videoTrack = _ref18.videoTrack;
|
|
5843
6072
|
_util.default.handleVideoLogging(videoTrack);
|
|
5844
6073
|
_util.default.handleAudioLogging(audioTrack);
|
|
5845
6074
|
}
|
|
@@ -6046,7 +6275,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6046
6275
|
}, {
|
|
6047
6276
|
key: "endMeetingForAll",
|
|
6048
6277
|
value: function endMeetingForAll() {
|
|
6049
|
-
var
|
|
6278
|
+
var _this58 = this;
|
|
6050
6279
|
_metrics.default.postEvent({
|
|
6051
6280
|
event: _config.eventType.LEAVE,
|
|
6052
6281
|
meeting: this,
|
|
@@ -6061,25 +6290,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6061
6290
|
locus_id: this.locusId
|
|
6062
6291
|
});
|
|
6063
6292
|
return _util.default.endMeetingForAll(this).then(function (end) {
|
|
6064
|
-
|
|
6065
|
-
|
|
6293
|
+
_this58.meetingFiniteStateMachine.end();
|
|
6294
|
+
_this58.clearMeetingData();
|
|
6066
6295
|
// upload logs on leave irrespective of meeting delete
|
|
6067
|
-
_triggerProxy.default.trigger(
|
|
6296
|
+
_triggerProxy.default.trigger(_this58, {
|
|
6068
6297
|
file: 'meeting/index',
|
|
6069
6298
|
function: 'endMeetingForAll'
|
|
6070
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
6299
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this58);
|
|
6071
6300
|
return end;
|
|
6072
6301
|
}).catch(function (error) {
|
|
6073
|
-
|
|
6302
|
+
_this58.meetingFiniteStateMachine.fail(error);
|
|
6074
6303
|
_loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error);
|
|
6075
6304
|
// upload logs on leave irrespective of meeting delete
|
|
6076
|
-
_triggerProxy.default.trigger(
|
|
6305
|
+
_triggerProxy.default.trigger(_this58, {
|
|
6077
6306
|
file: 'meeting/index',
|
|
6078
6307
|
function: 'endMeetingForAll'
|
|
6079
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
6308
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this58);
|
|
6080
6309
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
|
|
6081
|
-
correlation_id:
|
|
6082
|
-
locus_id:
|
|
6310
|
+
correlation_id: _this58.correlationId,
|
|
6311
|
+
locus_id: _this58.locusUrl.split('/').pop(),
|
|
6083
6312
|
reason: error.message,
|
|
6084
6313
|
stack: error.stack,
|
|
6085
6314
|
code: error.code
|
|
@@ -6117,29 +6346,29 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6117
6346
|
}, {
|
|
6118
6347
|
key: "internal_enableBNR",
|
|
6119
6348
|
value: function () {
|
|
6120
|
-
var _internal_enableBNR = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
6349
|
+
var _internal_enableBNR = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(audioTrack) {
|
|
6121
6350
|
var bnrAudioTrack;
|
|
6122
|
-
return _regenerator.default.wrap(function
|
|
6123
|
-
while (1) switch (
|
|
6351
|
+
return _regenerator.default.wrap(function _callee10$(_context10) {
|
|
6352
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
6124
6353
|
case 0:
|
|
6125
|
-
|
|
6354
|
+
_context10.prev = 0;
|
|
6126
6355
|
_loggerProxy.default.logger.info('Meeting:index#internal_enableBNR. Internal enable BNR called');
|
|
6127
|
-
|
|
6356
|
+
_context10.next = 4;
|
|
6128
6357
|
return _internalMediaCore.Media.Effects.BNR.enableBNR(audioTrack);
|
|
6129
6358
|
case 4:
|
|
6130
|
-
bnrAudioTrack =
|
|
6359
|
+
bnrAudioTrack = _context10.sent;
|
|
6131
6360
|
_loggerProxy.default.logger.info('Meeting:index#internal_enableBNR. BNR enabled track obtained from WebRTC & returned as stream');
|
|
6132
|
-
return
|
|
6361
|
+
return _context10.abrupt("return", bnrAudioTrack);
|
|
6133
6362
|
case 9:
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
_loggerProxy.default.logger.error('Meeting:index#internal_enableBNR.',
|
|
6137
|
-
throw
|
|
6363
|
+
_context10.prev = 9;
|
|
6364
|
+
_context10.t0 = _context10["catch"](0);
|
|
6365
|
+
_loggerProxy.default.logger.error('Meeting:index#internal_enableBNR.', _context10.t0);
|
|
6366
|
+
throw _context10.t0;
|
|
6138
6367
|
case 13:
|
|
6139
6368
|
case "end":
|
|
6140
|
-
return
|
|
6369
|
+
return _context10.stop();
|
|
6141
6370
|
}
|
|
6142
|
-
},
|
|
6371
|
+
}, _callee10, null, [[0, 9]]);
|
|
6143
6372
|
}));
|
|
6144
6373
|
function internal_enableBNR(_x6) {
|
|
6145
6374
|
return _internal_enableBNR.apply(this, arguments);
|
|
@@ -6223,8 +6452,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6223
6452
|
* @memberof Meeting
|
|
6224
6453
|
*/
|
|
6225
6454
|
function sendReaction(reactionType, skinToneType) {
|
|
6226
|
-
var _this$
|
|
6227
|
-
var reactionChannelUrl = (_this$
|
|
6455
|
+
var _this$locusInfo6, _this$locusInfo6$cont, _this$locusInfo6$cont2;
|
|
6456
|
+
var reactionChannelUrl = (_this$locusInfo6 = this.locusInfo) === null || _this$locusInfo6 === void 0 ? void 0 : (_this$locusInfo6$cont = _this$locusInfo6.controls) === null || _this$locusInfo6$cont === void 0 ? void 0 : (_this$locusInfo6$cont2 = _this$locusInfo6$cont.reactions) === null || _this$locusInfo6$cont2 === void 0 ? void 0 : _this$locusInfo6$cont2.reactionChannelUrl;
|
|
6228
6457
|
var participantId = this.members.selfId;
|
|
6229
6458
|
var reactionData = _reactions.Reactions[reactionType];
|
|
6230
6459
|
if (!reactionData) {
|
|
@@ -6255,8 +6484,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6255
6484
|
}, {
|
|
6256
6485
|
key: "toggleReactions",
|
|
6257
6486
|
value: function toggleReactions(enable) {
|
|
6258
|
-
var _this$
|
|
6259
|
-
var isEnabled = (_this$
|
|
6487
|
+
var _this$locusInfo7, _this$locusInfo7$cont, _this$locusInfo7$cont2;
|
|
6488
|
+
var isEnabled = (_this$locusInfo7 = this.locusInfo) === null || _this$locusInfo7 === void 0 ? void 0 : (_this$locusInfo7$cont = _this$locusInfo7.controls) === null || _this$locusInfo7$cont === void 0 ? void 0 : (_this$locusInfo7$cont2 = _this$locusInfo7$cont.reactions) === null || _this$locusInfo7$cont2 === void 0 ? void 0 : _this$locusInfo7$cont2.enabled;
|
|
6260
6489
|
if (isEnabled && enable || !isEnabled && !enable) {
|
|
6261
6490
|
return _promise.default.resolve("Reactions are already ".concat(isEnabled ? 'enabled' : 'disabled', "."));
|
|
6262
6491
|
}
|