@webex/plugin-meetings 2.19.1 → 2.19.3
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/README.md +0 -300
- package/dist/constants.js +3 -206
- package/dist/constants.js.map +1 -1
- package/dist/meeting/index.js +352 -489
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +4 -213
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +0 -28
- package/dist/meetings/index.js.map +1 -1
- package/dist/statsAnalyzer/index.js +145 -86
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/package.json +5 -7
- package/src/constants.ts +1 -214
- package/src/meeting/index.js +110 -208
- package/src/meeting/util.js +4 -252
- package/src/meetings/index.js +0 -22
- package/src/statsAnalyzer/index.js +164 -99
- package/test/integration/spec/journey.js +2 -67
- package/test/unit/spec/meeting/index.js +88 -29
- package/test/unit/spec/meeting/utils.js +0 -2
- package/test/unit/spec/stats-analyzer/index.js +209 -1
- package/dist/analyzer/analyzer.js +0 -113
- package/dist/analyzer/analyzer.js.map +0 -1
- package/dist/analyzer/calculator.js +0 -87
- package/dist/analyzer/calculator.js.map +0 -1
- package/dist/metrics/mqa-processor.js +0 -170
- package/dist/metrics/mqa-processor.js.map +0 -1
- package/dist/stats/data.js +0 -93
- package/dist/stats/data.js.map +0 -1
- package/dist/stats/events.js +0 -222
- package/dist/stats/events.js.map +0 -1
- package/dist/stats/filter.js +0 -84
- package/dist/stats/filter.js.map +0 -1
- package/dist/stats/history.js +0 -147
- package/dist/stats/history.js.map +0 -1
- package/dist/stats/index.js +0 -425
- package/dist/stats/index.js.map +0 -1
- package/dist/stats/metrics.js +0 -112
- package/dist/stats/metrics.js.map +0 -1
- package/dist/stats/stats.js +0 -592
- package/dist/stats/stats.js.map +0 -1
- package/dist/stats/stream.js +0 -156
- package/dist/stats/stream.js.map +0 -1
- package/dist/stats/transformer.js +0 -126
- package/dist/stats/transformer.js.map +0 -1
- package/dist/stats/util.js +0 -64
- package/dist/stats/util.js.map +0 -1
- package/src/analyzer/analyzer.js +0 -78
- package/src/analyzer/calculator.js +0 -77
- package/src/metrics/mqa-processor.js +0 -118
- package/src/stats/data.js +0 -56
- package/src/stats/events.js +0 -185
- package/src/stats/filter.js +0 -40
- package/src/stats/history.js +0 -107
- package/src/stats/index.js +0 -320
- package/src/stats/metrics.js +0 -95
- package/src/stats/stats.js +0 -477
- package/src/stats/stream.js +0 -108
- package/src/stats/transformer.js +0 -109
- package/src/stats/util.js +0 -44
package/dist/meeting/index.js
CHANGED
|
@@ -68,7 +68,7 @@ var _internalMediaCore = require("@webex/internal-media-core");
|
|
|
68
68
|
|
|
69
69
|
var _webexErrors = require("../common/errors/webex-errors");
|
|
70
70
|
|
|
71
|
-
var _statsAnalyzer =
|
|
71
|
+
var _statsAnalyzer = require("../statsAnalyzer");
|
|
72
72
|
|
|
73
73
|
var _networkQualityMonitor = _interopRequireDefault(require("../networkQualityMonitor"));
|
|
74
74
|
|
|
@@ -106,12 +106,6 @@ var _util = _interopRequireDefault(require("../meeting/util"));
|
|
|
106
106
|
|
|
107
107
|
var _util2 = _interopRequireDefault(require("../media/util"));
|
|
108
108
|
|
|
109
|
-
var _index3 = _interopRequireDefault(require("../stats/index"));
|
|
110
|
-
|
|
111
|
-
var _metrics2 = _interopRequireDefault(require("../stats/metrics"));
|
|
112
|
-
|
|
113
|
-
var _util3 = _interopRequireDefault(require("../stats/util"));
|
|
114
|
-
|
|
115
109
|
var _transcription = _interopRequireDefault(require("../transcription"));
|
|
116
110
|
|
|
117
111
|
var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
|
|
@@ -132,8 +126,6 @@ var _media2 = _interopRequireDefault(require("../common/errors/media"));
|
|
|
132
126
|
|
|
133
127
|
var _meetingInfoV = require("../meeting-info/meeting-info-v2");
|
|
134
128
|
|
|
135
|
-
var _mqaProcessor = _interopRequireDefault(require("../metrics/mqa-processor"));
|
|
136
|
-
|
|
137
129
|
var _browserDetection = _interopRequireDefault(require("../common/browser-detection"));
|
|
138
130
|
|
|
139
131
|
var _collection = _interopRequireDefault(require("../roap/collection"));
|
|
@@ -578,6 +570,74 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
578
570
|
(0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "getDevices", function () {
|
|
579
571
|
return _media.default.getDevices();
|
|
580
572
|
});
|
|
573
|
+
(0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "setupStatsAnalyzerEventHandlers", function () {
|
|
574
|
+
_this.statsAnalyzer.on(_statsAnalyzer.EVENTS.MEDIA_QUALITY, function (options) {
|
|
575
|
+
var _this$webex$meetings$;
|
|
576
|
+
|
|
577
|
+
// TODO: might have to send the same event to the developer
|
|
578
|
+
// Add ip address info if geo hint is present
|
|
579
|
+
options.data.intervalMetadata.peerReflexiveIP = ((_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;
|
|
580
|
+
|
|
581
|
+
_metrics.default.postEvent({
|
|
582
|
+
event: _config.eventType.MEDIA_QUALITY,
|
|
583
|
+
meeting: (0, _assertThisInitialized2.default)(_this),
|
|
584
|
+
data: {
|
|
585
|
+
intervalData: options.data,
|
|
586
|
+
networkType: options.networkType
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
});
|
|
590
|
+
|
|
591
|
+
_this.statsAnalyzer.on(_statsAnalyzer.EVENTS.LOCAL_MEDIA_STARTED, function (data) {
|
|
592
|
+
_triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
|
|
593
|
+
file: 'meeting/index',
|
|
594
|
+
function: 'addMedia'
|
|
595
|
+
}, _constants.EVENT_TRIGGERS.MEETING_MEDIA_LOCAL_STARTED, data);
|
|
596
|
+
|
|
597
|
+
_metrics.default.postEvent({
|
|
598
|
+
event: _config.eventType.SENDING_MEDIA_START,
|
|
599
|
+
meeting: (0, _assertThisInitialized2.default)(_this),
|
|
600
|
+
data: {
|
|
601
|
+
mediaType: data.type
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
});
|
|
605
|
+
|
|
606
|
+
_this.statsAnalyzer.on(_statsAnalyzer.EVENTS.LOCAL_MEDIA_STOPPED, function (data) {
|
|
607
|
+
_metrics.default.postEvent({
|
|
608
|
+
event: _config.eventType.SENDING_MEDIA_STOP,
|
|
609
|
+
meeting: (0, _assertThisInitialized2.default)(_this),
|
|
610
|
+
data: {
|
|
611
|
+
mediaType: data.type
|
|
612
|
+
}
|
|
613
|
+
});
|
|
614
|
+
});
|
|
615
|
+
|
|
616
|
+
_this.statsAnalyzer.on(_statsAnalyzer.EVENTS.REMOTE_MEDIA_STARTED, function (data) {
|
|
617
|
+
_triggerProxy.default.trigger((0, _assertThisInitialized2.default)(_this), {
|
|
618
|
+
file: 'meeting/index',
|
|
619
|
+
function: 'addMedia'
|
|
620
|
+
}, _constants.EVENT_TRIGGERS.MEETING_MEDIA_REMOTE_STARTED, data);
|
|
621
|
+
|
|
622
|
+
_metrics.default.postEvent({
|
|
623
|
+
event: _config.eventType.RECEIVING_MEDIA_START,
|
|
624
|
+
meeting: (0, _assertThisInitialized2.default)(_this),
|
|
625
|
+
data: {
|
|
626
|
+
mediaType: data.type
|
|
627
|
+
}
|
|
628
|
+
});
|
|
629
|
+
});
|
|
630
|
+
|
|
631
|
+
_this.statsAnalyzer.on(_statsAnalyzer.EVENTS.REMOTE_MEDIA_STOPPED, function (data) {
|
|
632
|
+
_metrics.default.postEvent({
|
|
633
|
+
event: _config.eventType.RECEIVING_MEDIA_STOP,
|
|
634
|
+
meeting: (0, _assertThisInitialized2.default)(_this),
|
|
635
|
+
data: {
|
|
636
|
+
mediaType: data.type
|
|
637
|
+
}
|
|
638
|
+
});
|
|
639
|
+
});
|
|
640
|
+
});
|
|
581
641
|
(0, _defineProperty3.default)((0, _assertThisInitialized2.default)(_this), "mediaNegotiatedEvent", function () {
|
|
582
642
|
if (_this.config.experimental.enableMediaNegotiatedEvent) {
|
|
583
643
|
_loggerProxy.default.logger.info('Meeting:mediaNegotiatedEvent --> Media server negotiated');
|
|
@@ -800,23 +860,6 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
800
860
|
*/
|
|
801
861
|
|
|
802
862
|
_this.meetingFiniteStateMachine = _state.default.create((0, _assertThisInitialized2.default)(_this));
|
|
803
|
-
/**
|
|
804
|
-
* @instance
|
|
805
|
-
* @type {WebRTCStats}
|
|
806
|
-
* @public
|
|
807
|
-
* @memberof Meeting
|
|
808
|
-
*/
|
|
809
|
-
|
|
810
|
-
_this.stats = null;
|
|
811
|
-
/**
|
|
812
|
-
* @instance
|
|
813
|
-
* @type {WebRTCStats}
|
|
814
|
-
* @readonly
|
|
815
|
-
* @private
|
|
816
|
-
* @memberof Meeting
|
|
817
|
-
*/
|
|
818
|
-
|
|
819
|
-
_this.internalStats = null;
|
|
820
863
|
/**
|
|
821
864
|
* @instance
|
|
822
865
|
* @type {String}
|
|
@@ -1069,15 +1112,6 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1069
1112
|
*/
|
|
1070
1113
|
|
|
1071
1114
|
_this.dialOutUrl = '';
|
|
1072
|
-
/**
|
|
1073
|
-
* @instance
|
|
1074
|
-
* @type {MediaMetrics}
|
|
1075
|
-
* @readonly
|
|
1076
|
-
* @private
|
|
1077
|
-
* @memberof Meeting
|
|
1078
|
-
*/
|
|
1079
|
-
|
|
1080
|
-
_this.mediaQualityMetrics = null;
|
|
1081
1115
|
/**
|
|
1082
1116
|
* @instance
|
|
1083
1117
|
* @type {StatsAnalyzer}
|
|
@@ -1094,15 +1128,6 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
1094
1128
|
*/
|
|
1095
1129
|
|
|
1096
1130
|
_this.networkQualityMonitor = null;
|
|
1097
|
-
/**
|
|
1098
|
-
* @instance
|
|
1099
|
-
* @type {MQAProcessor}
|
|
1100
|
-
* @readonly
|
|
1101
|
-
* @private
|
|
1102
|
-
* @memberof Meeting
|
|
1103
|
-
*/
|
|
1104
|
-
|
|
1105
|
-
_this.mqaProcessor = null;
|
|
1106
1131
|
/**
|
|
1107
1132
|
* @instance
|
|
1108
1133
|
* @type {String}
|
|
@@ -2544,146 +2569,6 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2544
2569
|
value: function getMembers() {
|
|
2545
2570
|
return this.members;
|
|
2546
2571
|
}
|
|
2547
|
-
/**
|
|
2548
|
-
* If this gets turned off mid meeting after attaching media, it will shut down the MQA metrics and they will
|
|
2549
|
-
* not restart unless the start function is called again
|
|
2550
|
-
* @returns {undefined}
|
|
2551
|
-
* @public
|
|
2552
|
-
* @memberof Meeting
|
|
2553
|
-
*/
|
|
2554
|
-
|
|
2555
|
-
}, {
|
|
2556
|
-
key: "cleanMQAInterval",
|
|
2557
|
-
value: function cleanMQAInterval() {
|
|
2558
|
-
if (this.mqaInterval) {
|
|
2559
|
-
clearInterval(this.mqaInterval);
|
|
2560
|
-
}
|
|
2561
|
-
}
|
|
2562
|
-
/**
|
|
2563
|
-
* Automatically publishes media metrics data and on a config interval
|
|
2564
|
-
* uses the existing getStats data filter, so no new streams are created
|
|
2565
|
-
* but it is separate than history, so history will not be available
|
|
2566
|
-
* @returns {MediaMetrics}
|
|
2567
|
-
* @public
|
|
2568
|
-
* @memberof Meeting
|
|
2569
|
-
*/
|
|
2570
|
-
|
|
2571
|
-
}, {
|
|
2572
|
-
key: "startMediaQualityMetrics",
|
|
2573
|
-
value: function startMediaQualityMetrics() {
|
|
2574
|
-
var _this18 = this;
|
|
2575
|
-
|
|
2576
|
-
var automaticMetrics = new _metrics2.default({
|
|
2577
|
-
config: this.config
|
|
2578
|
-
});
|
|
2579
|
-
var stats = this.getStats(automaticMetrics.initialize(), true);
|
|
2580
|
-
this.mediaQualityMetrics = automaticMetrics;
|
|
2581
|
-
this.mediaQualityMetrics.setStats(stats);
|
|
2582
|
-
this.mqaInterval = setInterval(function () {
|
|
2583
|
-
return _this18.processMQAData();
|
|
2584
|
-
}, this.config.metrics.mqaMetricsInterval);
|
|
2585
|
-
return automaticMetrics;
|
|
2586
|
-
}
|
|
2587
|
-
/**
|
|
2588
|
-
* @private
|
|
2589
|
-
* @returns {undefined}
|
|
2590
|
-
* @memberof Meeting
|
|
2591
|
-
*/
|
|
2592
|
-
|
|
2593
|
-
}, {
|
|
2594
|
-
key: "processMQAData",
|
|
2595
|
-
value: function processMQAData() {
|
|
2596
|
-
var _this19 = this;
|
|
2597
|
-
|
|
2598
|
-
if (!this.mqaProcessor) {
|
|
2599
|
-
this.mqaProcessor = new _mqaProcessor.default();
|
|
2600
|
-
}
|
|
2601
|
-
|
|
2602
|
-
_constants.MQA_STATS.DATA_PLACEMENTS.forEach(function (key) {
|
|
2603
|
-
if (_this19.mediaQualityMetrics && _this19.mediaQualityMetrics.stats) {
|
|
2604
|
-
var sendRecvData;
|
|
2605
|
-
|
|
2606
|
-
if (key.toLowerCase().endsWith(_constants.STATS.SENDER)) {
|
|
2607
|
-
sendRecvData = _this19.mediaQualityMetrics.stats.getSender(key);
|
|
2608
|
-
} else if (key.toLowerCase().endsWith(_constants.STATS.RECEIVER)) {
|
|
2609
|
-
sendRecvData = _this19.mediaQualityMetrics.stats.getReceiver(key);
|
|
2610
|
-
}
|
|
2611
|
-
|
|
2612
|
-
var mqa;
|
|
2613
|
-
|
|
2614
|
-
if (sendRecvData) {
|
|
2615
|
-
mqa = sendRecvData.getMQA();
|
|
2616
|
-
}
|
|
2617
|
-
|
|
2618
|
-
if (mqa) {
|
|
2619
|
-
var interval = mqa.getSlice(_this19.config.metrics.mqaMetricsInterval / 1000); // milliseconds -> second based intervals
|
|
2620
|
-
|
|
2621
|
-
_this19.mqaProcessor.process(key, interval);
|
|
2622
|
-
}
|
|
2623
|
-
}
|
|
2624
|
-
});
|
|
2625
|
-
}
|
|
2626
|
-
/**
|
|
2627
|
-
* Reference to the stats builder object
|
|
2628
|
-
* @param {Object} options - see #createStats
|
|
2629
|
-
* @param {Boolean} override - override the previous getStats
|
|
2630
|
-
* @returns {WebRTCStats}
|
|
2631
|
-
* @public
|
|
2632
|
-
* @memberof Meeting
|
|
2633
|
-
*/
|
|
2634
|
-
|
|
2635
|
-
}, {
|
|
2636
|
-
key: "getStats",
|
|
2637
|
-
value: function getStats(options, override) {
|
|
2638
|
-
if (!this.stats) {
|
|
2639
|
-
return this.createStats(options);
|
|
2640
|
-
}
|
|
2641
|
-
|
|
2642
|
-
if (override) {
|
|
2643
|
-
if (this.stats) {
|
|
2644
|
-
_loggerProxy.default.logger.log('Meeting:index#getStats --> Overriding the previous stats object without destroying first can result in memory leaks.');
|
|
2645
|
-
}
|
|
2646
|
-
|
|
2647
|
-
return this.createStats(options);
|
|
2648
|
-
}
|
|
2649
|
-
|
|
2650
|
-
return this.stats;
|
|
2651
|
-
}
|
|
2652
|
-
/**
|
|
2653
|
-
* write the stats builder object and assign to meeting property
|
|
2654
|
-
* @param {Object} options
|
|
2655
|
-
* @returns {WebRTCStats}
|
|
2656
|
-
* @public
|
|
2657
|
-
* @memberof Meeting
|
|
2658
|
-
*/
|
|
2659
|
-
|
|
2660
|
-
}, {
|
|
2661
|
-
key: "createStats",
|
|
2662
|
-
value: function createStats() {
|
|
2663
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2664
|
-
|
|
2665
|
-
_util3.default.generateOptions(options, _constants.STATS.CONFIG, this);
|
|
2666
|
-
|
|
2667
|
-
options.config = _constants.STATS.CONFIG;
|
|
2668
|
-
this.stats = new _index3.default(this.attrs, this.options, options);
|
|
2669
|
-
return this.stats;
|
|
2670
|
-
}
|
|
2671
|
-
/**
|
|
2672
|
-
* if you have started a stats instance, here's how you can stop it
|
|
2673
|
-
* @returns {undefined}
|
|
2674
|
-
* @public
|
|
2675
|
-
* @memberof Meeting
|
|
2676
|
-
*/
|
|
2677
|
-
|
|
2678
|
-
}, {
|
|
2679
|
-
key: "stopStats",
|
|
2680
|
-
value: function stopStats() {
|
|
2681
|
-
if (this.stats) {
|
|
2682
|
-
this.stats.destroySenders();
|
|
2683
|
-
this.stats.destroyReceivers();
|
|
2684
|
-
this.stats = null;
|
|
2685
|
-
}
|
|
2686
|
-
}
|
|
2687
2572
|
/**
|
|
2688
2573
|
* Truthy when a meeting has an audio connection established
|
|
2689
2574
|
* @returns {Boolean} true if meeting audio is connected otherwise false
|
|
@@ -2901,7 +2786,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2901
2786
|
}, {
|
|
2902
2787
|
key: "setRemoteStream",
|
|
2903
2788
|
value: function setRemoteStream(pc) {
|
|
2904
|
-
var
|
|
2789
|
+
var _this18 = this;
|
|
2905
2790
|
|
|
2906
2791
|
if (!pc) {
|
|
2907
2792
|
return;
|
|
@@ -2944,8 +2829,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2944
2829
|
trackMediaID = null;
|
|
2945
2830
|
|
|
2946
2831
|
_metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
|
|
2947
|
-
correlation_id:
|
|
2948
|
-
locus_id:
|
|
2832
|
+
correlation_id: _this18.correlationId,
|
|
2833
|
+
locus_id: _this18.locusUrl.split('/').pop()
|
|
2949
2834
|
});
|
|
2950
2835
|
}
|
|
2951
2836
|
}
|
|
@@ -2954,14 +2839,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2954
2839
|
case MEDIA_ID.AUDIO_TRACK:
|
|
2955
2840
|
eventType = _constants.EVENT_TYPES.REMOTE_AUDIO;
|
|
2956
2841
|
|
|
2957
|
-
|
|
2842
|
+
_this18.mediaProperties.setRemoteAudioTrack(mediaTrack);
|
|
2958
2843
|
|
|
2959
2844
|
break;
|
|
2960
2845
|
|
|
2961
2846
|
case MEDIA_ID.VIDEO_TRACK:
|
|
2962
2847
|
eventType = _constants.EVENT_TYPES.REMOTE_VIDEO;
|
|
2963
2848
|
|
|
2964
|
-
|
|
2849
|
+
_this18.mediaProperties.setRemoteVideoTrack(mediaTrack);
|
|
2965
2850
|
|
|
2966
2851
|
break;
|
|
2967
2852
|
|
|
@@ -2969,7 +2854,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2969
2854
|
if (event.track) {
|
|
2970
2855
|
eventType = _constants.EVENT_TYPES.REMOTE_SHARE;
|
|
2971
2856
|
|
|
2972
|
-
|
|
2857
|
+
_this18.mediaProperties.setRemoteShare(mediaTrack);
|
|
2973
2858
|
}
|
|
2974
2859
|
|
|
2975
2860
|
break;
|
|
@@ -2981,10 +2866,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
2981
2866
|
} // start stats here the stats are coming null if you dont receive streams
|
|
2982
2867
|
|
|
2983
2868
|
|
|
2984
|
-
|
|
2869
|
+
_this18.statsAnalyzer.startAnalyzer(_this18.mediaProperties.peerConnection);
|
|
2985
2870
|
|
|
2986
2871
|
if (eventType && mediaTrack) {
|
|
2987
|
-
_triggerProxy.default.trigger(
|
|
2872
|
+
_triggerProxy.default.trigger(_this18, {
|
|
2988
2873
|
file: 'meeting/index',
|
|
2989
2874
|
function: 'setRemoteStream:pc.ontrack'
|
|
2990
2875
|
}, _constants.EVENT_TRIGGERS.MEDIA_READY, {
|
|
@@ -3064,7 +2949,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3064
2949
|
}, {
|
|
3065
2950
|
key: "closeRemoteTracks",
|
|
3066
2951
|
value: function closeRemoteTracks() {
|
|
3067
|
-
var
|
|
2952
|
+
var _this19 = this;
|
|
3068
2953
|
|
|
3069
2954
|
var _this$mediaProperties = this.mediaProperties,
|
|
3070
2955
|
remoteAudioTrack = _this$mediaProperties.remoteAudioTrack,
|
|
@@ -3078,7 +2963,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3078
2963
|
*/
|
|
3079
2964
|
|
|
3080
2965
|
var triggerMediaStoppedEvent = function triggerMediaStoppedEvent(mediaType) {
|
|
3081
|
-
_triggerProxy.default.trigger(
|
|
2966
|
+
_triggerProxy.default.trigger(_this19, {
|
|
3082
2967
|
file: 'meeting/index',
|
|
3083
2968
|
function: 'closeRemoteTracks'
|
|
3084
2969
|
}, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
|
|
@@ -3233,7 +3118,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3233
3118
|
}, {
|
|
3234
3119
|
key: "setLocalShareTrack",
|
|
3235
3120
|
value: function setLocalShareTrack(localShare) {
|
|
3236
|
-
var
|
|
3121
|
+
var _this20 = this;
|
|
3237
3122
|
|
|
3238
3123
|
var settings = null;
|
|
3239
3124
|
|
|
@@ -3256,7 +3141,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3256
3141
|
}
|
|
3257
3142
|
|
|
3258
3143
|
contentTracks.onended = function () {
|
|
3259
|
-
return
|
|
3144
|
+
return _this20.handleShareTrackEnded(localShare);
|
|
3260
3145
|
};
|
|
3261
3146
|
|
|
3262
3147
|
_triggerProxy.default.trigger(this, {
|
|
@@ -3279,7 +3164,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3279
3164
|
}, {
|
|
3280
3165
|
key: "closeLocalStream",
|
|
3281
3166
|
value: function closeLocalStream() {
|
|
3282
|
-
var
|
|
3167
|
+
var _this21 = this;
|
|
3283
3168
|
|
|
3284
3169
|
var _this$mediaProperties2 = this.mediaProperties,
|
|
3285
3170
|
audioTrack = _this$mediaProperties2.audioTrack,
|
|
@@ -3291,7 +3176,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3291
3176
|
var videoStopped = videoTrack && videoTrack.readyState === _constants.ENDED; // triggers event for audio and video stop , sometime either audio or video one of them exists
|
|
3292
3177
|
|
|
3293
3178
|
if (audioStopped || videoStopped) {
|
|
3294
|
-
_triggerProxy.default.trigger(
|
|
3179
|
+
_triggerProxy.default.trigger(_this21, {
|
|
3295
3180
|
file: 'meeting/index',
|
|
3296
3181
|
function: 'closeLocalStream'
|
|
3297
3182
|
}, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
|
|
@@ -3313,12 +3198,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3313
3198
|
}, {
|
|
3314
3199
|
key: "closeLocalShare",
|
|
3315
3200
|
value: function closeLocalShare() {
|
|
3316
|
-
var
|
|
3201
|
+
var _this22 = this;
|
|
3317
3202
|
|
|
3318
3203
|
var track = this.mediaProperties.shareTrack;
|
|
3319
3204
|
return _media.default.stopTracks(track).then(function () {
|
|
3320
3205
|
if (track && track.readyState === _constants.ENDED) {
|
|
3321
|
-
_triggerProxy.default.trigger(
|
|
3206
|
+
_triggerProxy.default.trigger(_this22, {
|
|
3322
3207
|
file: 'meeting/index',
|
|
3323
3208
|
function: 'closeLocalShare'
|
|
3324
3209
|
}, _constants.EVENT_TRIGGERS.MEDIA_STOPPED, {
|
|
@@ -3364,7 +3249,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3364
3249
|
}, {
|
|
3365
3250
|
key: "setMercuryListener",
|
|
3366
3251
|
value: function setMercuryListener() {
|
|
3367
|
-
var
|
|
3252
|
+
var _this23 = this;
|
|
3368
3253
|
|
|
3369
3254
|
// Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
|
|
3370
3255
|
// if the meeting has active peer connections, it should try to reconnect.
|
|
@@ -3372,29 +3257,29 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3372
3257
|
_loggerProxy.default.logger.info('Meeting:index#setMercuryListener --> Web socket online'); // Only send restore event when it was disconnected before and for connected later
|
|
3373
3258
|
|
|
3374
3259
|
|
|
3375
|
-
if (!
|
|
3260
|
+
if (!_this23.hasWebsocketConnected) {
|
|
3376
3261
|
_metrics.default.postEvent({
|
|
3377
3262
|
event: _config.eventType.MERCURY_CONNECTION_RESTORED,
|
|
3378
|
-
meeting:
|
|
3263
|
+
meeting: _this23
|
|
3379
3264
|
});
|
|
3380
3265
|
|
|
3381
3266
|
_metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_RESTORED, {
|
|
3382
|
-
correlation_id:
|
|
3267
|
+
correlation_id: _this23.correlationId
|
|
3383
3268
|
});
|
|
3384
3269
|
}
|
|
3385
3270
|
|
|
3386
|
-
|
|
3271
|
+
_this23.hasWebsocketConnected = true;
|
|
3387
3272
|
});
|
|
3388
3273
|
this.webex.internal.mercury.on(_constants.OFFLINE, function () {
|
|
3389
3274
|
_loggerProxy.default.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
|
|
3390
3275
|
|
|
3391
3276
|
_metrics.default.postEvent({
|
|
3392
3277
|
event: _config.eventType.MERCURY_CONNECTION_LOST,
|
|
3393
|
-
meeting:
|
|
3278
|
+
meeting: _this23
|
|
3394
3279
|
});
|
|
3395
3280
|
|
|
3396
3281
|
_metrics.default.sendBehavioralMetric(_constants2.default.MERCURY_CONNECTION_FAILURE, {
|
|
3397
|
-
correlation_id:
|
|
3282
|
+
correlation_id: _this23.correlationId
|
|
3398
3283
|
});
|
|
3399
3284
|
});
|
|
3400
3285
|
}
|
|
@@ -3452,7 +3337,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3452
3337
|
}, {
|
|
3453
3338
|
key: "muteAudio",
|
|
3454
3339
|
value: function muteAudio() {
|
|
3455
|
-
var
|
|
3340
|
+
var _this24 = this;
|
|
3456
3341
|
|
|
3457
3342
|
if (!_util.default.isUserInJoinedState(this.locusInfo)) {
|
|
3458
3343
|
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
@@ -3470,11 +3355,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3470
3355
|
var LOG_HEADER = 'Meeting:index#muteAudio -->'; // First, stop sending the local audio media
|
|
3471
3356
|
|
|
3472
3357
|
return logRequest(this.audio.handleClientRequest(this, true).then(function () {
|
|
3473
|
-
_util.default.handleAudioLogging(
|
|
3358
|
+
_util.default.handleAudioLogging(_this24.mediaProperties.audioTrack);
|
|
3474
3359
|
|
|
3475
3360
|
_metrics.default.postEvent({
|
|
3476
3361
|
event: _config.eventType.MUTED,
|
|
3477
|
-
meeting:
|
|
3362
|
+
meeting: _this24,
|
|
3478
3363
|
data: {
|
|
3479
3364
|
trigger: _config.trigger.USER_INTERACTION,
|
|
3480
3365
|
mediaType: _config.mediaType.AUDIO
|
|
@@ -3482,8 +3367,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3482
3367
|
});
|
|
3483
3368
|
}).catch(function (error) {
|
|
3484
3369
|
_metrics.default.sendBehavioralMetric(_constants2.default.MUTE_AUDIO_FAILURE, {
|
|
3485
|
-
correlation_id:
|
|
3486
|
-
locus_id:
|
|
3370
|
+
correlation_id: _this24.correlationId,
|
|
3371
|
+
locus_id: _this24.locusUrl.split('/').pop(),
|
|
3487
3372
|
reason: error.message,
|
|
3488
3373
|
stack: error.stack
|
|
3489
3374
|
});
|
|
@@ -3505,7 +3390,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3505
3390
|
}, {
|
|
3506
3391
|
key: "unmuteAudio",
|
|
3507
3392
|
value: function unmuteAudio() {
|
|
3508
|
-
var
|
|
3393
|
+
var _this25 = this;
|
|
3509
3394
|
|
|
3510
3395
|
if (!_util.default.isUserInJoinedState(this.locusInfo)) {
|
|
3511
3396
|
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
@@ -3523,11 +3408,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3523
3408
|
var LOG_HEADER = 'Meeting:index#unmuteAudio -->'; // First, send the control to unmute the participant on the server
|
|
3524
3409
|
|
|
3525
3410
|
return logRequest(this.audio.handleClientRequest(this, false).then(function () {
|
|
3526
|
-
_util.default.handleAudioLogging(
|
|
3411
|
+
_util.default.handleAudioLogging(_this25.mediaProperties.audioTrack);
|
|
3527
3412
|
|
|
3528
3413
|
_metrics.default.postEvent({
|
|
3529
3414
|
event: _config.eventType.UNMUTED,
|
|
3530
|
-
meeting:
|
|
3415
|
+
meeting: _this25,
|
|
3531
3416
|
data: {
|
|
3532
3417
|
trigger: _config.trigger.USER_INTERACTION,
|
|
3533
3418
|
mediaType: _config.mediaType.AUDIO
|
|
@@ -3535,8 +3420,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3535
3420
|
});
|
|
3536
3421
|
}).catch(function (error) {
|
|
3537
3422
|
_metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_AUDIO_FAILURE, {
|
|
3538
|
-
correlation_id:
|
|
3539
|
-
locus_id:
|
|
3423
|
+
correlation_id: _this25.correlationId,
|
|
3424
|
+
locus_id: _this25.locusUrl.split('/').pop(),
|
|
3540
3425
|
reason: error.message,
|
|
3541
3426
|
stack: error.stack
|
|
3542
3427
|
});
|
|
@@ -3558,7 +3443,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3558
3443
|
}, {
|
|
3559
3444
|
key: "muteVideo",
|
|
3560
3445
|
value: function muteVideo() {
|
|
3561
|
-
var
|
|
3446
|
+
var _this26 = this;
|
|
3562
3447
|
|
|
3563
3448
|
if (!_util.default.isUserInJoinedState(this.locusInfo)) {
|
|
3564
3449
|
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
@@ -3575,11 +3460,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3575
3460
|
|
|
3576
3461
|
var LOG_HEADER = 'Meeting:index#muteVideo -->';
|
|
3577
3462
|
return logRequest(this.video.handleClientRequest(this, true).then(function () {
|
|
3578
|
-
_util.default.handleVideoLogging(
|
|
3463
|
+
_util.default.handleVideoLogging(_this26.mediaProperties.videoTrack);
|
|
3579
3464
|
|
|
3580
3465
|
_metrics.default.postEvent({
|
|
3581
3466
|
event: _config.eventType.MUTED,
|
|
3582
|
-
meeting:
|
|
3467
|
+
meeting: _this26,
|
|
3583
3468
|
data: {
|
|
3584
3469
|
trigger: _config.trigger.USER_INTERACTION,
|
|
3585
3470
|
mediaType: _config.mediaType.VIDEO
|
|
@@ -3587,8 +3472,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3587
3472
|
});
|
|
3588
3473
|
}).catch(function (error) {
|
|
3589
3474
|
_metrics.default.sendBehavioralMetric(_constants2.default.MUTE_VIDEO_FAILURE, {
|
|
3590
|
-
correlation_id:
|
|
3591
|
-
locus_id:
|
|
3475
|
+
correlation_id: _this26.correlationId,
|
|
3476
|
+
locus_id: _this26.locusUrl.split('/').pop(),
|
|
3592
3477
|
reason: error.message,
|
|
3593
3478
|
stack: error.stack
|
|
3594
3479
|
});
|
|
@@ -3610,7 +3495,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3610
3495
|
}, {
|
|
3611
3496
|
key: "unmuteVideo",
|
|
3612
3497
|
value: function unmuteVideo() {
|
|
3613
|
-
var
|
|
3498
|
+
var _this27 = this;
|
|
3614
3499
|
|
|
3615
3500
|
if (!_util.default.isUserInJoinedState(this.locusInfo)) {
|
|
3616
3501
|
return _promise.default.reject(new _webexErrors.UserNotJoinedError());
|
|
@@ -3627,11 +3512,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3627
3512
|
|
|
3628
3513
|
var LOG_HEADER = 'Meeting:index#unmuteVideo -->';
|
|
3629
3514
|
return logRequest(this.video.handleClientRequest(this, false).then(function () {
|
|
3630
|
-
_util.default.handleVideoLogging(
|
|
3515
|
+
_util.default.handleVideoLogging(_this27.mediaProperties.videoTrack);
|
|
3631
3516
|
|
|
3632
3517
|
_metrics.default.postEvent({
|
|
3633
3518
|
event: _config.eventType.UNMUTED,
|
|
3634
|
-
meeting:
|
|
3519
|
+
meeting: _this27,
|
|
3635
3520
|
data: {
|
|
3636
3521
|
trigger: _config.trigger.USER_INTERACTION,
|
|
3637
3522
|
mediaType: _config.mediaType.VIDEO
|
|
@@ -3639,8 +3524,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3639
3524
|
});
|
|
3640
3525
|
}).catch(function (error) {
|
|
3641
3526
|
_metrics.default.sendBehavioralMetric(_constants2.default.UNMUTE_VIDEO_FAILURE, {
|
|
3642
|
-
correlation_id:
|
|
3643
|
-
locus_id:
|
|
3527
|
+
correlation_id: _this27.correlationId,
|
|
3528
|
+
locus_id: _this27.locusUrl.split('/').pop(),
|
|
3644
3529
|
reason: error.message,
|
|
3645
3530
|
stack: error.stack
|
|
3646
3531
|
});
|
|
@@ -3681,7 +3566,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3681
3566
|
}, {
|
|
3682
3567
|
key: "joinWithMedia",
|
|
3683
3568
|
value: function joinWithMedia() {
|
|
3684
|
-
var
|
|
3569
|
+
var _this28 = this;
|
|
3685
3570
|
|
|
3686
3571
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3687
3572
|
// TODO: add validations for parameters
|
|
@@ -3689,12 +3574,12 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3689
3574
|
joinOptions = options.joinOptions,
|
|
3690
3575
|
audioVideoOptions = options.audioVideoOptions;
|
|
3691
3576
|
return this.join(joinOptions).then(function (joinResponse) {
|
|
3692
|
-
return
|
|
3577
|
+
return _this28.getMediaStreams(mediaSettings, audioVideoOptions).then(function (_ref8) {
|
|
3693
3578
|
var _ref9 = (0, _slicedToArray2.default)(_ref8, 2),
|
|
3694
3579
|
localStream = _ref9[0],
|
|
3695
3580
|
localShare = _ref9[1];
|
|
3696
3581
|
|
|
3697
|
-
return
|
|
3582
|
+
return _this28.addMedia({
|
|
3698
3583
|
mediaSettings: mediaSettings,
|
|
3699
3584
|
localShare: localShare,
|
|
3700
3585
|
localStream: localStream
|
|
@@ -3710,8 +3595,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3710
3595
|
_loggerProxy.default.logger.error('Meeting:index#joinWithMedia --> ', error);
|
|
3711
3596
|
|
|
3712
3597
|
_metrics.default.sendBehavioralMetric(_constants2.default.JOIN_WITH_MEDIA_FAILURE, {
|
|
3713
|
-
correlation_id:
|
|
3714
|
-
locus_id:
|
|
3598
|
+
correlation_id: _this28.correlationId,
|
|
3599
|
+
locus_id: _this28.locusUrl.split('/').pop(),
|
|
3715
3600
|
reason: error.message,
|
|
3716
3601
|
stack: error.stack
|
|
3717
3602
|
}, {
|
|
@@ -3733,7 +3618,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3733
3618
|
}, {
|
|
3734
3619
|
key: "reconnect",
|
|
3735
3620
|
value: function reconnect(options) {
|
|
3736
|
-
var
|
|
3621
|
+
var _this29 = this;
|
|
3737
3622
|
|
|
3738
3623
|
_loggerProxy.default.logger.log("Meeting:index#reconnect --> attempting to reconnect meeting ".concat(this.id));
|
|
3739
3624
|
|
|
@@ -3766,14 +3651,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3766
3651
|
}, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING);
|
|
3767
3652
|
|
|
3768
3653
|
return this.reconnectionManager.reconnect(options).then(function () {
|
|
3769
|
-
_triggerProxy.default.trigger(
|
|
3654
|
+
_triggerProxy.default.trigger(_this29, {
|
|
3770
3655
|
file: 'meeting/index',
|
|
3771
3656
|
function: 'reconnect'
|
|
3772
3657
|
}, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_SUCCESS);
|
|
3773
3658
|
|
|
3774
3659
|
_loggerProxy.default.logger.log('Meeting:index#reconnect --> Meeting reconnect success');
|
|
3775
3660
|
}).catch(function (error) {
|
|
3776
|
-
_triggerProxy.default.trigger(
|
|
3661
|
+
_triggerProxy.default.trigger(_this29, {
|
|
3777
3662
|
file: 'meeting/index',
|
|
3778
3663
|
function: 'reconnect'
|
|
3779
3664
|
}, _constants.EVENT_TRIGGERS.MEETING_RECONNECTION_FAILURE, {
|
|
@@ -3783,20 +3668,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3783
3668
|
_loggerProxy.default.logger.error('Meeting:index#reconnect --> Meeting reconnect failed', error);
|
|
3784
3669
|
|
|
3785
3670
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_RECONNECT_FAILURE, {
|
|
3786
|
-
correlation_id:
|
|
3787
|
-
locus_id:
|
|
3671
|
+
correlation_id: _this29.correlationId,
|
|
3672
|
+
locus_id: _this29.locusUrl.split('/').pop(),
|
|
3788
3673
|
reason: error.message,
|
|
3789
3674
|
stack: error.stack
|
|
3790
3675
|
});
|
|
3791
3676
|
|
|
3792
|
-
|
|
3677
|
+
_this29.uploadLogs({
|
|
3793
3678
|
file: 'meeting/index',
|
|
3794
3679
|
function: 'reconnect'
|
|
3795
3680
|
});
|
|
3796
3681
|
|
|
3797
3682
|
return _promise.default.reject(new _reconnection.default('Reconnection failure event', error));
|
|
3798
3683
|
}).finally(function () {
|
|
3799
|
-
|
|
3684
|
+
_this29.reconnectionManager.reset();
|
|
3800
3685
|
});
|
|
3801
3686
|
}
|
|
3802
3687
|
/**
|
|
@@ -3827,20 +3712,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3827
3712
|
}, {
|
|
3828
3713
|
key: "monitorTranscriptionSocketConnection",
|
|
3829
3714
|
value: function monitorTranscriptionSocketConnection() {
|
|
3830
|
-
var
|
|
3715
|
+
var _this30 = this;
|
|
3831
3716
|
|
|
3832
3717
|
this.transcription.onCloseSocket(function (event) {
|
|
3833
3718
|
_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));
|
|
3834
3719
|
|
|
3835
|
-
|
|
3720
|
+
_this30.triggerStopReceivingTranscriptionEvent();
|
|
3836
3721
|
});
|
|
3837
3722
|
this.transcription.onErrorSocket(function (event) {
|
|
3838
3723
|
_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));
|
|
3839
3724
|
|
|
3840
|
-
|
|
3725
|
+
_this30.triggerStopReceivingTranscriptionEvent();
|
|
3841
3726
|
|
|
3842
3727
|
_metrics.default.sendBehavioralMetric(_constants2.default.RECEIVE_TRANSCRIPTION_FAILURE, {
|
|
3843
|
-
correlation_id:
|
|
3728
|
+
correlation_id: _this30.correlationId,
|
|
3844
3729
|
reason: 'unexpected error: transcription LLM web socket connection error had occured.',
|
|
3845
3730
|
event: event
|
|
3846
3731
|
});
|
|
@@ -3856,7 +3741,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3856
3741
|
key: "receiveTranscription",
|
|
3857
3742
|
value: function () {
|
|
3858
3743
|
var _receiveTranscription = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
3859
|
-
var
|
|
3744
|
+
var _this31 = this;
|
|
3860
3745
|
|
|
3861
3746
|
var datachannelUrl, _yield$this$request, webSocketUrl;
|
|
3862
3747
|
|
|
@@ -3889,7 +3774,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3889
3774
|
|
|
3890
3775
|
|
|
3891
3776
|
this.transcription.subscribe(function (payload) {
|
|
3892
|
-
_triggerProxy.default.trigger(
|
|
3777
|
+
_triggerProxy.default.trigger(_this31, {
|
|
3893
3778
|
file: 'meeting/index',
|
|
3894
3779
|
function: 'join'
|
|
3895
3780
|
}, _constants.EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION, payload);
|
|
@@ -3971,7 +3856,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
3971
3856
|
}, {
|
|
3972
3857
|
key: "join",
|
|
3973
3858
|
value: function join() {
|
|
3974
|
-
var
|
|
3859
|
+
var _this32 = this;
|
|
3975
3860
|
|
|
3976
3861
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3977
3862
|
|
|
@@ -4080,17 +3965,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4080
3965
|
}
|
|
4081
3966
|
|
|
4082
3967
|
return _util.default.joinMeetingOptions(this, options).then(function (join) {
|
|
4083
|
-
|
|
3968
|
+
_this32.meetingFiniteStateMachine.join();
|
|
4084
3969
|
|
|
4085
3970
|
_loggerProxy.default.logger.log('Meeting:index#join --> Success');
|
|
4086
3971
|
|
|
4087
3972
|
return join;
|
|
4088
3973
|
}).then(function (join) {
|
|
4089
3974
|
joinSuccess(join);
|
|
4090
|
-
|
|
3975
|
+
_this32.deferJoin = undefined;
|
|
4091
3976
|
|
|
4092
3977
|
_metrics.default.sendBehavioralMetric(_constants2.default.JOIN_SUCCESS, {
|
|
4093
|
-
correlation_id:
|
|
3978
|
+
correlation_id: _this32.correlationId
|
|
4094
3979
|
});
|
|
4095
3980
|
|
|
4096
3981
|
return join;
|
|
@@ -4105,18 +3990,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4105
3990
|
break;
|
|
4106
3991
|
}
|
|
4107
3992
|
|
|
4108
|
-
if (!(
|
|
3993
|
+
if (!(_this32.config.receiveTranscription || options.receiveTranscription)) {
|
|
4109
3994
|
_context3.next = 6;
|
|
4110
3995
|
break;
|
|
4111
3996
|
}
|
|
4112
3997
|
|
|
4113
|
-
if (!
|
|
3998
|
+
if (!_this32.isTranscriptionSupported()) {
|
|
4114
3999
|
_context3.next = 6;
|
|
4115
4000
|
break;
|
|
4116
4001
|
}
|
|
4117
4002
|
|
|
4118
4003
|
_context3.next = 5;
|
|
4119
|
-
return
|
|
4004
|
+
return _this32.receiveTranscription();
|
|
4120
4005
|
|
|
4121
4006
|
case 5:
|
|
4122
4007
|
_loggerProxy.default.logger.info('Meeting:index#join --> enabled to recieve transcription!');
|
|
@@ -4145,14 +4030,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4145
4030
|
}()).catch(function (error) {
|
|
4146
4031
|
var _error$error;
|
|
4147
4032
|
|
|
4148
|
-
|
|
4033
|
+
_this32.meetingFiniteStateMachine.fail(error);
|
|
4149
4034
|
|
|
4150
4035
|
_loggerProxy.default.logger.error('Meeting:index#join --> Failed', error);
|
|
4151
4036
|
|
|
4152
4037
|
_metrics.default.postEvent({
|
|
4153
4038
|
event: _config.eventType.LOCUS_JOIN_RESPONSE,
|
|
4154
|
-
meeting:
|
|
4155
|
-
meetingId:
|
|
4039
|
+
meeting: _this32,
|
|
4040
|
+
meetingId: _this32.id,
|
|
4156
4041
|
data: {
|
|
4157
4042
|
errors: [_metrics.default.parseLocusError(error.error, true)]
|
|
4158
4043
|
}
|
|
@@ -4160,19 +4045,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4160
4045
|
|
|
4161
4046
|
|
|
4162
4047
|
_metrics.default.sendBehavioralMetric(_constants2.default.JOIN_FAILURE, {
|
|
4163
|
-
correlation_id:
|
|
4048
|
+
correlation_id: _this32.correlationId,
|
|
4164
4049
|
reason: (_error$error = error.error) === null || _error$error === void 0 ? void 0 : _error$error.message,
|
|
4165
4050
|
stack: error.stack
|
|
4166
4051
|
}); // Upload logs on join Failure
|
|
4167
4052
|
|
|
4168
4053
|
|
|
4169
|
-
_triggerProxy.default.trigger(
|
|
4054
|
+
_triggerProxy.default.trigger(_this32, {
|
|
4170
4055
|
file: 'meeting/index',
|
|
4171
4056
|
function: 'join'
|
|
4172
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
4057
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this32);
|
|
4173
4058
|
|
|
4174
4059
|
joinFailed(error);
|
|
4175
|
-
|
|
4060
|
+
_this32.deferJoin = undefined;
|
|
4176
4061
|
return _promise.default.reject(error);
|
|
4177
4062
|
});
|
|
4178
4063
|
}
|
|
@@ -4216,7 +4101,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4216
4101
|
}, {
|
|
4217
4102
|
key: "dialInPstn",
|
|
4218
4103
|
value: function dialInPstn() {
|
|
4219
|
-
var
|
|
4104
|
+
var _this33 = this;
|
|
4220
4105
|
|
|
4221
4106
|
if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial in devices from being provisioned
|
|
4222
4107
|
|
|
@@ -4229,15 +4114,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4229
4114
|
locusUrl: locusUrl,
|
|
4230
4115
|
clientUrl: this.deviceUrl
|
|
4231
4116
|
}).then(function (res) {
|
|
4232
|
-
|
|
4117
|
+
_this33.locusInfo.onFullLocus(res.body.locus);
|
|
4233
4118
|
}).catch(function (error) {
|
|
4234
4119
|
var _error$error2;
|
|
4235
4120
|
|
|
4236
4121
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_IN_FAILURE, {
|
|
4237
|
-
correlation_id:
|
|
4238
|
-
dial_in_url:
|
|
4122
|
+
correlation_id: _this33.correlationId,
|
|
4123
|
+
dial_in_url: _this33.dialInUrl,
|
|
4239
4124
|
locus_id: locusUrl.split('/').pop(),
|
|
4240
|
-
client_url:
|
|
4125
|
+
client_url: _this33.deviceUrl,
|
|
4241
4126
|
reason: (_error$error2 = error.error) === null || _error$error2 === void 0 ? void 0 : _error$error2.message,
|
|
4242
4127
|
stack: error.stack
|
|
4243
4128
|
});
|
|
@@ -4256,7 +4141,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4256
4141
|
}, {
|
|
4257
4142
|
key: "dialOutPstn",
|
|
4258
4143
|
value: function dialOutPstn(phoneNumber) {
|
|
4259
|
-
var
|
|
4144
|
+
var _this34 = this;
|
|
4260
4145
|
|
|
4261
4146
|
if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return _promise.default.resolve(); // prevent multiple dial out devices from being provisioned
|
|
4262
4147
|
|
|
@@ -4270,15 +4155,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4270
4155
|
locusUrl: locusUrl,
|
|
4271
4156
|
clientUrl: this.deviceUrl
|
|
4272
4157
|
}).then(function (res) {
|
|
4273
|
-
|
|
4158
|
+
_this34.locusInfo.onFullLocus(res.body.locus);
|
|
4274
4159
|
}).catch(function (error) {
|
|
4275
4160
|
var _error$error3;
|
|
4276
4161
|
|
|
4277
4162
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_DIAL_OUT_FAILURE, {
|
|
4278
|
-
correlation_id:
|
|
4279
|
-
dial_out_url:
|
|
4163
|
+
correlation_id: _this34.correlationId,
|
|
4164
|
+
dial_out_url: _this34.dialOutUrl,
|
|
4280
4165
|
locus_id: locusUrl.split('/').pop(),
|
|
4281
|
-
client_url:
|
|
4166
|
+
client_url: _this34.deviceUrl,
|
|
4282
4167
|
reason: (_error$error3 = error.error) === null || _error$error3 === void 0 ? void 0 : _error$error3.message,
|
|
4283
4168
|
stack: error.stack
|
|
4284
4169
|
});
|
|
@@ -4310,7 +4195,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4310
4195
|
}, {
|
|
4311
4196
|
key: "moveTo",
|
|
4312
4197
|
value: function moveTo(resourceId) {
|
|
4313
|
-
var
|
|
4198
|
+
var _this35 = this;
|
|
4314
4199
|
|
|
4315
4200
|
if (!resourceId) {
|
|
4316
4201
|
throw new _parameter.default('Cannot move call without a resourceId.');
|
|
@@ -4352,13 +4237,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4352
4237
|
case 0:
|
|
4353
4238
|
_context4.prev = 0;
|
|
4354
4239
|
|
|
4355
|
-
if (!
|
|
4240
|
+
if (!_this35.isSharing) {
|
|
4356
4241
|
_context4.next = 4;
|
|
4357
4242
|
break;
|
|
4358
4243
|
}
|
|
4359
4244
|
|
|
4360
4245
|
_context4.next = 4;
|
|
4361
|
-
return
|
|
4246
|
+
return _this35.stopFloorRequest();
|
|
4362
4247
|
|
|
4363
4248
|
case 4:
|
|
4364
4249
|
mediaSettings = {
|
|
@@ -4372,23 +4257,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4372
4257
|
}
|
|
4373
4258
|
}; // clean up the local tracks
|
|
4374
4259
|
|
|
4375
|
-
|
|
4260
|
+
_this35.mediaProperties.setMediaDirection(mediaSettings.mediaDirection); // close the existing local tracks
|
|
4376
4261
|
|
|
4377
4262
|
|
|
4378
4263
|
_context4.next = 8;
|
|
4379
|
-
return
|
|
4264
|
+
return _this35.closeLocalStream();
|
|
4380
4265
|
|
|
4381
4266
|
case 8:
|
|
4382
4267
|
_context4.next = 10;
|
|
4383
|
-
return
|
|
4268
|
+
return _this35.closeLocalShare();
|
|
4384
4269
|
|
|
4385
4270
|
case 10:
|
|
4386
|
-
|
|
4271
|
+
_this35.mediaProperties.unsetMediaTracks(); // 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
|
|
4387
4272
|
// once the DX answers we establish connection back the media server with only receiveShare enabled
|
|
4388
4273
|
|
|
4389
4274
|
|
|
4390
4275
|
_context4.next = 13;
|
|
4391
|
-
return
|
|
4276
|
+
return _this35.reconnectionManager.reconnectMedia(mediaSettings).then(function () {
|
|
4392
4277
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_SUCCESS);
|
|
4393
4278
|
});
|
|
4394
4279
|
|
|
@@ -4403,8 +4288,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4403
4288
|
_loggerProxy.default.logger.error('Meeting:index#moveTo --> Failed to moveTo resourceId', _context4.t0);
|
|
4404
4289
|
|
|
4405
4290
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
|
|
4406
|
-
correlation_id:
|
|
4407
|
-
locus_id:
|
|
4291
|
+
correlation_id: _this35.correlationId,
|
|
4292
|
+
locus_id: _this35.locusUrl.split('/').pop(),
|
|
4408
4293
|
reason: _context4.t0.message,
|
|
4409
4294
|
stack: _context4.t0.stack
|
|
4410
4295
|
});
|
|
@@ -4423,13 +4308,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4423
4308
|
resourceId: resourceId,
|
|
4424
4309
|
moveToResource: true
|
|
4425
4310
|
}).then(function () {
|
|
4426
|
-
|
|
4311
|
+
_this35.meetingFiniteStateMachine.join();
|
|
4427
4312
|
}).catch(function (error) {
|
|
4428
|
-
|
|
4313
|
+
_this35.meetingFiniteStateMachine.fail(error);
|
|
4429
4314
|
|
|
4430
4315
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_TO_FAILURE, {
|
|
4431
|
-
correlation_id:
|
|
4432
|
-
locus_id:
|
|
4316
|
+
correlation_id: _this35.correlationId,
|
|
4317
|
+
locus_id: _this35.locusUrl.split('/').pop(),
|
|
4433
4318
|
reason: error.message,
|
|
4434
4319
|
stack: error.stack
|
|
4435
4320
|
});
|
|
@@ -4450,7 +4335,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4450
4335
|
}, {
|
|
4451
4336
|
key: "moveFrom",
|
|
4452
4337
|
value: function moveFrom(resourceId) {
|
|
4453
|
-
var
|
|
4338
|
+
var _this36 = this;
|
|
4454
4339
|
|
|
4455
4340
|
// On moveFrom ask the developer to re capture it moveFrom then updateMedia
|
|
4456
4341
|
if (!resourceId) {
|
|
@@ -4465,21 +4350,21 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4465
4350
|
});
|
|
4466
4351
|
|
|
4467
4352
|
return _util.default.joinMeetingOptions(this).then(function () {
|
|
4468
|
-
return _util.default.leaveMeeting(
|
|
4353
|
+
return _util.default.leaveMeeting(_this36, {
|
|
4469
4354
|
resourceId: resourceId,
|
|
4470
4355
|
correlationId: oldCorrelationId,
|
|
4471
4356
|
moveMeeting: true
|
|
4472
4357
|
}).then(function () {
|
|
4473
|
-
|
|
4358
|
+
_this36.resourceId = '';
|
|
4474
4359
|
|
|
4475
4360
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_SUCCESS);
|
|
4476
4361
|
});
|
|
4477
4362
|
}).catch(function (error) {
|
|
4478
|
-
|
|
4363
|
+
_this36.meetingFiniteStateMachine.fail(error);
|
|
4479
4364
|
|
|
4480
4365
|
_metrics.default.sendBehavioralMetric(_constants2.default.MOVE_FROM_FAILURE, {
|
|
4481
|
-
correlation_id:
|
|
4482
|
-
locus_id:
|
|
4366
|
+
correlation_id: _this36.correlationId,
|
|
4367
|
+
locus_id: _this36.locusUrl.split('/').pop(),
|
|
4483
4368
|
reason: error.message,
|
|
4484
4369
|
stack: error.stack
|
|
4485
4370
|
});
|
|
@@ -4515,7 +4400,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4515
4400
|
* @memberof Meeting
|
|
4516
4401
|
*/
|
|
4517
4402
|
function addMedia() {
|
|
4518
|
-
var
|
|
4403
|
+
var _this37 = this;
|
|
4519
4404
|
|
|
4520
4405
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4521
4406
|
var LOG_HEADER = 'Meeting:index#addMedia -->';
|
|
@@ -4563,69 +4448,48 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4563
4448
|
});
|
|
4564
4449
|
|
|
4565
4450
|
return _util.default.validateOptions(options).then(function () {
|
|
4566
|
-
|
|
4451
|
+
_this37.mediaProperties.setMediaPeerConnection(_util2.default.createPeerConnection());
|
|
4567
4452
|
|
|
4568
|
-
|
|
4453
|
+
_this37.setMercuryListener();
|
|
4569
4454
|
|
|
4570
|
-
_peerConnectionManager.default.setPeerConnectionEvents(
|
|
4455
|
+
_peerConnectionManager.default.setPeerConnectionEvents(_this37);
|
|
4571
4456
|
|
|
4572
|
-
return
|
|
4457
|
+
return _this37.preMedia(localStream, localShare, mediaSettings);
|
|
4573
4458
|
}).then(function () {
|
|
4574
|
-
return _media.default.attachMedia(
|
|
4575
|
-
meetingId:
|
|
4576
|
-
remoteQualityLevel:
|
|
4577
|
-
enableRtx:
|
|
4578
|
-
enableExtmap:
|
|
4579
|
-
setStartLocalSDPGenRemoteSDPRecvDelay:
|
|
4459
|
+
return _media.default.attachMedia(_this37.mediaProperties, {
|
|
4460
|
+
meetingId: _this37.id,
|
|
4461
|
+
remoteQualityLevel: _this37.mediaProperties.remoteQualityLevel,
|
|
4462
|
+
enableRtx: _this37.config.enableRtx,
|
|
4463
|
+
enableExtmap: _this37.config.enableExtmap,
|
|
4464
|
+
setStartLocalSDPGenRemoteSDPRecvDelay: _this37.setStartLocalSDPGenRemoteSDPRecvDelay.bind(_this37)
|
|
4580
4465
|
}).then(function (peerConnection) {
|
|
4581
|
-
return
|
|
4466
|
+
return _this37.getDevices().then(function (devices) {
|
|
4582
4467
|
_util.default.handleDeviceLogging(devices);
|
|
4583
4468
|
|
|
4584
4469
|
return peerConnection;
|
|
4585
4470
|
});
|
|
4586
4471
|
}).then(function (peerConnection) {
|
|
4587
|
-
|
|
4472
|
+
_this37.handleMediaLogging(_this37.mediaProperties);
|
|
4588
4473
|
|
|
4589
4474
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection Received from attachMedia "));
|
|
4590
4475
|
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
_util.default.startInternalStats(_this39);
|
|
4594
|
-
|
|
4595
|
-
if (_this39.config.metrics.autoSendMQA) {
|
|
4596
|
-
_this39.startMediaQualityMetrics();
|
|
4597
|
-
}
|
|
4476
|
+
_this37.setRemoteStream(peerConnection);
|
|
4598
4477
|
|
|
4599
|
-
if (
|
|
4478
|
+
if (_this37.config.stats.enableStatsAnalyzer) {
|
|
4600
4479
|
// TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
|
|
4601
|
-
|
|
4602
|
-
|
|
4480
|
+
_this37.networkQualityMonitor = new _networkQualityMonitor.default(_this37.config.stats);
|
|
4481
|
+
_this37.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(_this37.config.stats, _this37.networkQualityMonitor);
|
|
4603
4482
|
|
|
4604
|
-
|
|
4605
|
-
var _this39$webex$meeting;
|
|
4483
|
+
_this37.setupStatsAnalyzerEventHandlers();
|
|
4606
4484
|
|
|
4607
|
-
|
|
4608
|
-
// Add ip address info if geo hint is present
|
|
4609
|
-
options.data.intervalMetadata.peerReflexiveIP = ((_this39$webex$meeting = _this39.webex.meetings.geoHintInfo) === null || _this39$webex$meeting === void 0 ? void 0 : _this39$webex$meeting.clientAddress) || options.data.intervalMetadata.peerReflexiveIP || _constants.MQA_STATS.DEFAULT_IP;
|
|
4610
|
-
|
|
4611
|
-
_metrics.default.postEvent({
|
|
4612
|
-
event: _config.eventType.MEDIA_QUALITY,
|
|
4613
|
-
meeting: _this39,
|
|
4614
|
-
data: {
|
|
4615
|
-
intervalData: options.data,
|
|
4616
|
-
networkType: options.networkType
|
|
4617
|
-
}
|
|
4618
|
-
});
|
|
4619
|
-
});
|
|
4620
|
-
|
|
4621
|
-
_this39.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this39.sendNetworkQualityEvent.bind(_this39));
|
|
4485
|
+
_this37.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this37.sendNetworkQualityEvent.bind(_this37));
|
|
4622
4486
|
}
|
|
4623
4487
|
}).catch(function (error) {
|
|
4624
4488
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
|
|
4625
4489
|
|
|
4626
4490
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
|
|
4627
|
-
correlation_id:
|
|
4628
|
-
locus_id:
|
|
4491
|
+
correlation_id: _this37.correlationId,
|
|
4492
|
+
locus_id: _this37.locusUrl.split('/').pop(),
|
|
4629
4493
|
reason: error.message,
|
|
4630
4494
|
stack: error.stack
|
|
4631
4495
|
});
|
|
@@ -4636,14 +4500,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4636
4500
|
var timerCount = 0; // eslint-disable-next-line func-names
|
|
4637
4501
|
// eslint-disable-next-line prefer-arrow-callback
|
|
4638
4502
|
|
|
4639
|
-
if (
|
|
4503
|
+
if (_this37.type === _constants._CALL_) {
|
|
4640
4504
|
resolve();
|
|
4641
4505
|
}
|
|
4642
4506
|
|
|
4643
4507
|
var joiningTimer = setInterval(function () {
|
|
4644
4508
|
timerCount += 1;
|
|
4645
4509
|
|
|
4646
|
-
if (
|
|
4510
|
+
if (_this37.meetingState === _constants.FULL_STATE.ACTIVE) {
|
|
4647
4511
|
clearInterval(joiningTimer);
|
|
4648
4512
|
resolve();
|
|
4649
4513
|
}
|
|
@@ -4655,10 +4519,10 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4655
4519
|
}, 1000);
|
|
4656
4520
|
});
|
|
4657
4521
|
}).then(function () {
|
|
4658
|
-
return logRequest(
|
|
4659
|
-
sdp:
|
|
4660
|
-
roapSeq:
|
|
4661
|
-
meeting:
|
|
4522
|
+
return logRequest(_this37.roap.sendRoapMediaRequest({
|
|
4523
|
+
sdp: _this37.mediaProperties.peerConnection.sdp,
|
|
4524
|
+
roapSeq: _this37.roapSeq,
|
|
4525
|
+
meeting: _this37 // or can pass meeting ID
|
|
4662
4526
|
|
|
4663
4527
|
}), {
|
|
4664
4528
|
header: "".concat(LOG_HEADER, " Send Roap Media Request."),
|
|
@@ -4666,7 +4530,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4666
4530
|
failure: "".concat(LOG_HEADER, " Error joining the call on send roap media request, ")
|
|
4667
4531
|
});
|
|
4668
4532
|
}).then(function () {
|
|
4669
|
-
var peerConnection =
|
|
4533
|
+
var peerConnection = _this37.mediaProperties.peerConnection;
|
|
4670
4534
|
return new _promise.default(function (resolve, reject) {
|
|
4671
4535
|
if (peerConnection.connectionState === _constants.CONNECTION_STATE.CONNECTED) {
|
|
4672
4536
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
|
|
@@ -4687,7 +4551,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4687
4551
|
}
|
|
4688
4552
|
}, _constants.PC_BAIL_TIMEOUT);
|
|
4689
4553
|
|
|
4690
|
-
|
|
4554
|
+
_this37.once(_constants.EVENT_TRIGGERS.MEDIA_READY, function () {
|
|
4691
4555
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED, clearing stability timer."));
|
|
4692
4556
|
|
|
4693
4557
|
clearTimeout(stabilityTimeout);
|
|
@@ -4696,61 +4560,60 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4696
4560
|
});
|
|
4697
4561
|
}).then(function () {
|
|
4698
4562
|
if (mediaSettings && mediaSettings.sendShare && localShare) {
|
|
4699
|
-
if (
|
|
4700
|
-
return
|
|
4563
|
+
if (_this37.state === _constants.MEETING_STATE.STATES.JOINED) {
|
|
4564
|
+
return _this37.share();
|
|
4701
4565
|
} // When the self state changes to JOINED then request the floor
|
|
4702
4566
|
|
|
4703
4567
|
|
|
4704
|
-
|
|
4568
|
+
_this37.floorGrantPending = true;
|
|
4705
4569
|
}
|
|
4706
4570
|
|
|
4707
4571
|
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, {
|
|
4708
|
-
correlation_id:
|
|
4709
|
-
locus_id:
|
|
4572
|
+
correlation_id: _this37.correlationId,
|
|
4573
|
+
locus_id: _this37.locusUrl.split('/').pop()
|
|
4710
4574
|
});
|
|
4711
4575
|
|
|
4712
4576
|
return _promise.default.resolve();
|
|
4713
4577
|
});
|
|
4714
4578
|
}).catch(function (error) {
|
|
4715
4579
|
// Clean up stats analyzer, peer connection, and turn off listeners
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
_this39.statsAnalyzer = null;
|
|
4720
|
-
}
|
|
4580
|
+
var stopStatsAnalyzer = _this37.statsAnalyzer ? _this37.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
|
|
4581
|
+
stopStatsAnalyzer.then(function () {
|
|
4582
|
+
_this37.statsAnalyzer = null;
|
|
4721
4583
|
|
|
4722
|
-
|
|
4723
|
-
|
|
4584
|
+
if (_this37.mediaProperties.peerConnection) {
|
|
4585
|
+
_this37.closePeerConnections();
|
|
4724
4586
|
|
|
4725
|
-
|
|
4726
|
-
|
|
4587
|
+
_this37.unsetPeerConnections();
|
|
4588
|
+
}
|
|
4727
4589
|
|
|
4728
|
-
|
|
4590
|
+
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media failed to initiate PC and send request, "), error);
|
|
4729
4591
|
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4592
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
|
|
4593
|
+
correlation_id: _this37.correlationId,
|
|
4594
|
+
locus_id: _this37.locusUrl.split('/').pop(),
|
|
4595
|
+
reason: error.message,
|
|
4596
|
+
stack: error.stack,
|
|
4597
|
+
code: error.code
|
|
4598
|
+
}); // Upload logs on error while adding media
|
|
4737
4599
|
|
|
4738
4600
|
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4601
|
+
_triggerProxy.default.trigger(_this37, {
|
|
4602
|
+
file: 'meeting/index',
|
|
4603
|
+
function: 'addMedia'
|
|
4604
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this37); // If addMedia failes for not establishing connection then
|
|
4605
|
+
// leave the meeting with reson connection failed as meeting anyways will end
|
|
4606
|
+
// and cannot be connected unless network condition is checked for firewall
|
|
4745
4607
|
|
|
4746
4608
|
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4609
|
+
if (error.code === _webexErrors.InvalidSdpError.CODE) {
|
|
4610
|
+
_this37.leave({
|
|
4611
|
+
reason: _constants.MEETING_REMOVED_REASON.MEETING_CONNECTION_FAILED
|
|
4612
|
+
});
|
|
4613
|
+
}
|
|
4752
4614
|
|
|
4753
|
-
|
|
4615
|
+
throw error;
|
|
4616
|
+
});
|
|
4754
4617
|
});
|
|
4755
4618
|
}
|
|
4756
4619
|
/**
|
|
@@ -4775,7 +4638,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4775
4638
|
}, {
|
|
4776
4639
|
key: "enqueueMediaUpdate",
|
|
4777
4640
|
value: function enqueueMediaUpdate(mediaUpdateType, options) {
|
|
4778
|
-
var
|
|
4641
|
+
var _this38 = this;
|
|
4779
4642
|
|
|
4780
4643
|
return new _promise.default(function (resolve, reject) {
|
|
4781
4644
|
var queueItem = {
|
|
@@ -4787,7 +4650,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4787
4650
|
|
|
4788
4651
|
_loggerProxy.default.logger.log("Meeting:index#enqueueMediaUpdate --> enqueuing media update type=".concat(mediaUpdateType));
|
|
4789
4652
|
|
|
4790
|
-
|
|
4653
|
+
_this38.queuedMediaUpdates.push(queueItem);
|
|
4791
4654
|
});
|
|
4792
4655
|
}
|
|
4793
4656
|
/**
|
|
@@ -4813,7 +4676,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4813
4676
|
* @memberof Meeting
|
|
4814
4677
|
*/
|
|
4815
4678
|
function updateMedia() {
|
|
4816
|
-
var
|
|
4679
|
+
var _this39 = this;
|
|
4817
4680
|
|
|
4818
4681
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
4819
4682
|
var LOG_HEADER = 'Meeting:index#updateMedia -->';
|
|
@@ -4827,17 +4690,17 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4827
4690
|
mediaSettings = options.mediaSettings;
|
|
4828
4691
|
var previousSendShareStatus = this.mediaProperties.mediaDirection.sendShare;
|
|
4829
4692
|
return _util.default.validateOptions(options).then(function () {
|
|
4830
|
-
return
|
|
4693
|
+
return _this39.preMedia(localStream, localShare, mediaSettings);
|
|
4831
4694
|
}).then(function () {
|
|
4832
|
-
return _media.default.updateMedia(
|
|
4833
|
-
meetingId:
|
|
4834
|
-
remoteQualityLevel:
|
|
4835
|
-
enableRtx:
|
|
4836
|
-
enableExtmap:
|
|
4695
|
+
return _media.default.updateMedia(_this39.mediaProperties, {
|
|
4696
|
+
meetingId: _this39.id,
|
|
4697
|
+
remoteQualityLevel: _this39.mediaProperties.remoteQualityLevel,
|
|
4698
|
+
enableRtx: _this39.config.enableRtx,
|
|
4699
|
+
enableExtmap: _this39.config.enableExtmap
|
|
4837
4700
|
}).then(function (peerConnection) {
|
|
4838
4701
|
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection received from updateMedia, ").concat(peerConnection));
|
|
4839
4702
|
|
|
4840
|
-
|
|
4703
|
+
_this39.setRemoteStream(peerConnection);
|
|
4841
4704
|
|
|
4842
4705
|
if (mediaSettings.receiveShare || localShare) {
|
|
4843
4706
|
_peerConnectionManager.default.setContentSlides(peerConnection);
|
|
@@ -4846,18 +4709,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4846
4709
|
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error updatedMedia, "), error);
|
|
4847
4710
|
|
|
4848
4711
|
_metrics.default.sendBehavioralMetric(_constants2.default.UPDATE_MEDIA_FAILURE, {
|
|
4849
|
-
correlation_id:
|
|
4850
|
-
locus_id:
|
|
4712
|
+
correlation_id: _this39.correlationId,
|
|
4713
|
+
locus_id: _this39.locusUrl.split('/').pop(),
|
|
4851
4714
|
reason: error.message,
|
|
4852
4715
|
stack: error.stack
|
|
4853
4716
|
});
|
|
4854
4717
|
|
|
4855
4718
|
throw error;
|
|
4856
4719
|
}).then(function () {
|
|
4857
|
-
return logRequest(
|
|
4858
|
-
sdp:
|
|
4859
|
-
roapSeq:
|
|
4860
|
-
meeting:
|
|
4720
|
+
return logRequest(_this39.roap.sendRoapMediaRequest({
|
|
4721
|
+
sdp: _this39.mediaProperties.peerConnection.sdp,
|
|
4722
|
+
roapSeq: _this39.roapSeq,
|
|
4723
|
+
meeting: _this39 // or can pass meeting ID
|
|
4861
4724
|
|
|
4862
4725
|
}), {
|
|
4863
4726
|
header: "".concat(LOG_HEADER, " sendRoapMediaRequest being sent"),
|
|
@@ -4865,13 +4728,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4865
4728
|
failure: "".concat(LOG_HEADER, " Error updateMedia on send roap media request, ")
|
|
4866
4729
|
});
|
|
4867
4730
|
}).then(function () {
|
|
4868
|
-
return
|
|
4731
|
+
return _this39.checkForStopShare(mediaSettings.sendShare, previousSendShareStatus);
|
|
4869
4732
|
}).then(function (startShare) {
|
|
4870
4733
|
// This is a special case if we do an /floor grant followed by /media
|
|
4871
4734
|
// we actually get a OFFER from the server and a GLAR condition happens
|
|
4872
4735
|
if (startShare) {
|
|
4873
4736
|
// We are assuming that the clients are connected when doing an update
|
|
4874
|
-
return
|
|
4737
|
+
return _this39.share();
|
|
4875
4738
|
}
|
|
4876
4739
|
|
|
4877
4740
|
return _promise.default.resolve();
|
|
@@ -4893,7 +4756,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4893
4756
|
key: "updateAudio",
|
|
4894
4757
|
value: function () {
|
|
4895
4758
|
var _updateAudio = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(options) {
|
|
4896
|
-
var
|
|
4759
|
+
var _this40 = this;
|
|
4897
4760
|
|
|
4898
4761
|
var sendAudio, receiveAudio, stream, audioTransceiver, track, bnrEnabled;
|
|
4899
4762
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
@@ -4949,13 +4812,13 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4949
4812
|
}).then(function () {
|
|
4950
4813
|
var previousMediaDirection = {};
|
|
4951
4814
|
|
|
4952
|
-
if (
|
|
4815
|
+
if (_this40.mediaProperties.mediaDirection) {
|
|
4953
4816
|
previousMediaDirection = {
|
|
4954
|
-
sendTrack:
|
|
4955
|
-
receiveTrack:
|
|
4817
|
+
sendTrack: _this40.mediaProperties.mediaDirection.sendAudio,
|
|
4818
|
+
receiveTrack: _this40.mediaProperties.mediaDirection.receiveAudio
|
|
4956
4819
|
};
|
|
4957
4820
|
} else {
|
|
4958
|
-
|
|
4821
|
+
_this40.mediaProperties.mediaDirection = {};
|
|
4959
4822
|
}
|
|
4960
4823
|
|
|
4961
4824
|
return _util.default.updateTransceiver({
|
|
@@ -4964,20 +4827,20 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4964
4827
|
receiveTrack: options.receiveAudio,
|
|
4965
4828
|
track: track,
|
|
4966
4829
|
transceiver: audioTransceiver,
|
|
4967
|
-
peerConnection:
|
|
4830
|
+
peerConnection: _this40.mediaProperties.peerConnection,
|
|
4968
4831
|
previousMediaDirection: previousMediaDirection
|
|
4969
4832
|
}, {
|
|
4970
|
-
mediaProperties:
|
|
4971
|
-
meeting:
|
|
4972
|
-
id:
|
|
4833
|
+
mediaProperties: _this40.mediaProperties,
|
|
4834
|
+
meeting: _this40,
|
|
4835
|
+
id: _this40.id
|
|
4973
4836
|
});
|
|
4974
4837
|
}).then(function () {
|
|
4975
|
-
|
|
4838
|
+
_this40.setLocalAudioTrack(track);
|
|
4976
4839
|
|
|
4977
|
-
|
|
4978
|
-
|
|
4840
|
+
_this40.mediaProperties.mediaDirection.sendAudio = sendAudio;
|
|
4841
|
+
_this40.mediaProperties.mediaDirection.receiveAudio = receiveAudio; // audio state could be undefined if you have not sent audio before
|
|
4979
4842
|
|
|
4980
|
-
|
|
4843
|
+
_this40.audio = _this40.audio || (0, _muteState.default)(_constants.AUDIO, _this40, _this40.mediaProperties.mediaDirection);
|
|
4981
4844
|
}));
|
|
4982
4845
|
|
|
4983
4846
|
case 16:
|
|
@@ -5008,7 +4871,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5008
4871
|
}, {
|
|
5009
4872
|
key: "updateVideo",
|
|
5010
4873
|
value: function updateVideo(options) {
|
|
5011
|
-
var
|
|
4874
|
+
var _this41 = this;
|
|
5012
4875
|
|
|
5013
4876
|
if (!this.canUpdateMedia()) {
|
|
5014
4877
|
return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.VIDEO, options);
|
|
@@ -5035,23 +4898,23 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5035
4898
|
receiveTrack: options.receiveVideo,
|
|
5036
4899
|
track: track,
|
|
5037
4900
|
transceiver: videoTransceiver,
|
|
5038
|
-
peerConnection:
|
|
4901
|
+
peerConnection: _this41.mediaProperties.peerConnection,
|
|
5039
4902
|
previousMediaDirection: {
|
|
5040
|
-
sendTrack:
|
|
5041
|
-
receiveTrack:
|
|
4903
|
+
sendTrack: _this41.mediaProperties.mediaDirection.sendVideo,
|
|
4904
|
+
receiveTrack: _this41.mediaProperties.mediaDirection.receiveVideo
|
|
5042
4905
|
}
|
|
5043
4906
|
}, {
|
|
5044
|
-
mediaProperties:
|
|
5045
|
-
meeting:
|
|
5046
|
-
id:
|
|
4907
|
+
mediaProperties: _this41.mediaProperties,
|
|
4908
|
+
meeting: _this41,
|
|
4909
|
+
id: _this41.id
|
|
5047
4910
|
});
|
|
5048
4911
|
}).then(function () {
|
|
5049
|
-
|
|
4912
|
+
_this41.setLocalVideoTrack(track);
|
|
5050
4913
|
|
|
5051
|
-
|
|
5052
|
-
|
|
4914
|
+
_this41.mediaProperties.mediaDirection.sendVideo = sendVideo;
|
|
4915
|
+
_this41.mediaProperties.mediaDirection.receiveVideo = receiveVideo; // video state could be undefined if you have not sent video before
|
|
5053
4916
|
|
|
5054
|
-
|
|
4917
|
+
_this41.video = _this41.video || (0, _muteState.default)(_constants.VIDEO, _this41, _this41.mediaProperties.mediaDirection);
|
|
5055
4918
|
});
|
|
5056
4919
|
}
|
|
5057
4920
|
/**
|
|
@@ -5093,7 +4956,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5093
4956
|
}, {
|
|
5094
4957
|
key: "updateShare",
|
|
5095
4958
|
value: function updateShare(options) {
|
|
5096
|
-
var
|
|
4959
|
+
var _this42 = this;
|
|
5097
4960
|
|
|
5098
4961
|
if (!options.skipSignalingCheck && !this.canUpdateMedia()) {
|
|
5099
4962
|
return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE, options);
|
|
@@ -5116,7 +4979,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5116
4979
|
sendShare: sendShare,
|
|
5117
4980
|
localShare: stream
|
|
5118
4981
|
}).then(function () {
|
|
5119
|
-
return
|
|
4982
|
+
return _this42.checkForStopShare(sendShare, previousSendShareStatus);
|
|
5120
4983
|
}).then(function (startShare) {
|
|
5121
4984
|
return _util.default.updateTransceiver({
|
|
5122
4985
|
type: 'video',
|
|
@@ -5124,41 +4987,41 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5124
4987
|
receiveTrack: receiveShare,
|
|
5125
4988
|
track: track,
|
|
5126
4989
|
transceiver: shareTransceiver,
|
|
5127
|
-
peerConnection:
|
|
4990
|
+
peerConnection: _this42.mediaProperties.peerConnection,
|
|
5128
4991
|
previousMediaDirection: {
|
|
5129
|
-
sendTrack:
|
|
5130
|
-
receiveTrack:
|
|
4992
|
+
sendTrack: _this42.mediaProperties.mediaDirection.sendShare,
|
|
4993
|
+
receiveTrack: _this42.mediaProperties.mediaDirection.receiveShare
|
|
5131
4994
|
}
|
|
5132
4995
|
}, {
|
|
5133
|
-
mediaProperties:
|
|
5134
|
-
meeting:
|
|
5135
|
-
id:
|
|
4996
|
+
mediaProperties: _this42.mediaProperties,
|
|
4997
|
+
meeting: _this42,
|
|
4998
|
+
id: _this42.id
|
|
5136
4999
|
}).then(function () {
|
|
5137
5000
|
if (startShare) {
|
|
5138
|
-
return
|
|
5001
|
+
return _this42.share();
|
|
5139
5002
|
}
|
|
5140
5003
|
|
|
5141
5004
|
return _promise.default.resolve();
|
|
5142
5005
|
});
|
|
5143
5006
|
}).then(function () {
|
|
5144
|
-
|
|
5145
|
-
|
|
5007
|
+
_this42.mediaProperties.mediaDirection.sendShare = sendShare;
|
|
5008
|
+
_this42.mediaProperties.mediaDirection.receiveShare = receiveShare;
|
|
5146
5009
|
}).catch(function (error) {
|
|
5147
|
-
|
|
5010
|
+
_this42.unsetLocalShareTrack(stream);
|
|
5148
5011
|
|
|
5149
5012
|
throw error;
|
|
5150
5013
|
}).finally(function () {
|
|
5151
5014
|
var delay = 1e3; // Check to see if share was stopped natively before onended was assigned.
|
|
5152
5015
|
|
|
5153
|
-
var sharingModeIsActive =
|
|
5154
|
-
var isSharingOutOfSync = sharingModeIsActive && !
|
|
5016
|
+
var sharingModeIsActive = _this42.mediaProperties.peerConnection.shareTransceiver.direction === _constants.SENDRECV;
|
|
5017
|
+
var isSharingOutOfSync = sharingModeIsActive && !_this42.isLocalShareLive;
|
|
5155
5018
|
|
|
5156
5019
|
if (isSharingOutOfSync) {
|
|
5157
5020
|
// Adding a delay to avoid a 409 from server
|
|
5158
5021
|
// which results in user still appearing as if sharing.
|
|
5159
5022
|
// Also delay give time for changes to peerConnection.
|
|
5160
5023
|
setTimeout(function () {
|
|
5161
|
-
return
|
|
5024
|
+
return _this42.handleShareTrackEnded(stream);
|
|
5162
5025
|
}, delay);
|
|
5163
5026
|
}
|
|
5164
5027
|
});
|
|
@@ -5198,7 +5061,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5198
5061
|
}, {
|
|
5199
5062
|
key: "acknowledge",
|
|
5200
5063
|
value: function acknowledge(type) {
|
|
5201
|
-
var
|
|
5064
|
+
var _this43 = this;
|
|
5202
5065
|
|
|
5203
5066
|
if (!type) {
|
|
5204
5067
|
return _promise.default.reject(new _parameter.default('Type must be set to acknowledge the meeting.'));
|
|
@@ -5212,11 +5075,11 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5212
5075
|
}).then(function (response) {
|
|
5213
5076
|
return _promise.default.resolve(response);
|
|
5214
5077
|
}).then(function (response) {
|
|
5215
|
-
|
|
5078
|
+
_this43.meetingFiniteStateMachine.ring(type);
|
|
5216
5079
|
|
|
5217
5080
|
_metrics.default.postEvent({
|
|
5218
5081
|
event: _config.eventType.ALERT_DISPLAYED,
|
|
5219
|
-
meeting:
|
|
5082
|
+
meeting: _this43
|
|
5220
5083
|
});
|
|
5221
5084
|
|
|
5222
5085
|
return _promise.default.resolve({
|
|
@@ -5241,14 +5104,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5241
5104
|
}, {
|
|
5242
5105
|
key: "decline",
|
|
5243
5106
|
value: function decline(reason) {
|
|
5244
|
-
var
|
|
5107
|
+
var _this44 = this;
|
|
5245
5108
|
|
|
5246
5109
|
return _util.default.declineMeeting(this, reason).then(function (decline) {
|
|
5247
|
-
|
|
5110
|
+
_this44.meetingFiniteStateMachine.decline();
|
|
5248
5111
|
|
|
5249
5112
|
return _promise.default.resolve(decline);
|
|
5250
5113
|
}).catch(function (error) {
|
|
5251
|
-
|
|
5114
|
+
_this44.meetingFiniteStateMachine.fail(error);
|
|
5252
5115
|
|
|
5253
5116
|
return _promise.default.reject(error);
|
|
5254
5117
|
});
|
|
@@ -5265,7 +5128,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5265
5128
|
}, {
|
|
5266
5129
|
key: "leave",
|
|
5267
5130
|
value: function leave() {
|
|
5268
|
-
var
|
|
5131
|
+
var _this45 = this;
|
|
5269
5132
|
|
|
5270
5133
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5271
5134
|
|
|
@@ -5283,25 +5146,25 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5283
5146
|
_loggerProxy.default.logger.log('Meeting:index#leave --> Leaving a meeting');
|
|
5284
5147
|
|
|
5285
5148
|
return _util.default.leaveMeeting(this, options).then(function (leave) {
|
|
5286
|
-
|
|
5149
|
+
_this45.meetingFiniteStateMachine.leave();
|
|
5287
5150
|
|
|
5288
|
-
|
|
5151
|
+
_this45.clearMeetingData(); // upload logs on leave irrespective of meeting delete
|
|
5289
5152
|
|
|
5290
5153
|
|
|
5291
|
-
_triggerProxy.default.trigger(
|
|
5154
|
+
_triggerProxy.default.trigger(_this45, {
|
|
5292
5155
|
file: 'meeting/index',
|
|
5293
5156
|
function: 'leave'
|
|
5294
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
5157
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this45); // TODO: more testing before we remove this code, we are not sure the scenarios for destroy here
|
|
5295
5158
|
|
|
5296
5159
|
|
|
5297
|
-
if (
|
|
5160
|
+
if (_this45.wirelessShare || _this45.guest) {
|
|
5298
5161
|
// If screen sharing clean the meeting object
|
|
5299
|
-
_triggerProxy.default.trigger(
|
|
5162
|
+
_triggerProxy.default.trigger(_this45, {
|
|
5300
5163
|
file: 'meeting/index',
|
|
5301
5164
|
function: 'leave'
|
|
5302
5165
|
}, _constants.EVENTS.DESTROY_MEETING, {
|
|
5303
5166
|
reason: options.reason,
|
|
5304
|
-
meetingId:
|
|
5167
|
+
meetingId: _this45.id
|
|
5305
5168
|
});
|
|
5306
5169
|
}
|
|
5307
5170
|
|
|
@@ -5309,19 +5172,19 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5309
5172
|
|
|
5310
5173
|
return leave;
|
|
5311
5174
|
}).catch(function (error) {
|
|
5312
|
-
|
|
5175
|
+
_this45.meetingFiniteStateMachine.fail(error);
|
|
5313
5176
|
|
|
5314
5177
|
_loggerProxy.default.logger.error('Meeting:index#leave --> Failed to leave ', error); // upload logs on leave irrespective of meeting delete
|
|
5315
5178
|
|
|
5316
5179
|
|
|
5317
|
-
_triggerProxy.default.trigger(
|
|
5180
|
+
_triggerProxy.default.trigger(_this45, {
|
|
5318
5181
|
file: 'meeting/index',
|
|
5319
5182
|
function: 'leave'
|
|
5320
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
5183
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this45);
|
|
5321
5184
|
|
|
5322
5185
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_LEAVE_FAILURE, {
|
|
5323
|
-
correlation_id:
|
|
5324
|
-
locus_id:
|
|
5186
|
+
correlation_id: _this45.correlationId,
|
|
5187
|
+
locus_id: _this45.locusUrl.split('/').pop(),
|
|
5325
5188
|
reason: error.message,
|
|
5326
5189
|
stack: error.stack,
|
|
5327
5190
|
code: error.code
|
|
@@ -5342,7 +5205,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5342
5205
|
}, {
|
|
5343
5206
|
key: "startWhiteboardShare",
|
|
5344
5207
|
value: function startWhiteboardShare(channelUrl, resourceToken) {
|
|
5345
|
-
var
|
|
5208
|
+
var _this46 = this;
|
|
5346
5209
|
|
|
5347
5210
|
var whiteboard = this.locusInfo.mediaShares.find(function (element) {
|
|
5348
5211
|
return element.name === 'whiteboard';
|
|
@@ -5371,14 +5234,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5371
5234
|
}
|
|
5372
5235
|
|
|
5373
5236
|
return this.meetingRequest.changeMeetingFloor(body).then(function () {
|
|
5374
|
-
|
|
5237
|
+
_this46.isSharing = false;
|
|
5375
5238
|
return _promise.default.resolve();
|
|
5376
5239
|
}).catch(function (error) {
|
|
5377
5240
|
_loggerProxy.default.logger.error('Meeting:index#startWhiteboardShare --> Error ', error);
|
|
5378
5241
|
|
|
5379
5242
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_START_WHITEBOARD_SHARE_FAILURE, {
|
|
5380
|
-
correlation_id:
|
|
5381
|
-
locus_id:
|
|
5243
|
+
correlation_id: _this46.correlationId,
|
|
5244
|
+
locus_id: _this46.locusUrl.split('/').pop(),
|
|
5382
5245
|
reason: error.message,
|
|
5383
5246
|
stack: error.stack,
|
|
5384
5247
|
board: {
|
|
@@ -5403,7 +5266,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5403
5266
|
}, {
|
|
5404
5267
|
key: "stopWhiteboardShare",
|
|
5405
5268
|
value: function stopWhiteboardShare(channelUrl) {
|
|
5406
|
-
var
|
|
5269
|
+
var _this47 = this;
|
|
5407
5270
|
|
|
5408
5271
|
var whiteboard = this.locusInfo.mediaShares.find(function (element) {
|
|
5409
5272
|
return element.name === 'whiteboard';
|
|
@@ -5424,8 +5287,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5424
5287
|
_loggerProxy.default.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
|
|
5425
5288
|
|
|
5426
5289
|
_metrics.default.sendBehavioralMetric(_constants2.default.STOP_WHITEBOARD_SHARE_FAILURE, {
|
|
5427
|
-
correlation_id:
|
|
5428
|
-
locus_id:
|
|
5290
|
+
correlation_id: _this47.correlationId,
|
|
5291
|
+
locus_id: _this47.locusUrl.split('/').pop(),
|
|
5429
5292
|
reason: error.message,
|
|
5430
5293
|
stack: error.stack,
|
|
5431
5294
|
board: {
|
|
@@ -5449,7 +5312,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5449
5312
|
}, {
|
|
5450
5313
|
key: "share",
|
|
5451
5314
|
value: function share() {
|
|
5452
|
-
var
|
|
5315
|
+
var _this48 = this;
|
|
5453
5316
|
|
|
5454
5317
|
var content = this.locusInfo.mediaShares.find(function (element) {
|
|
5455
5318
|
return element.name === _constants.CONTENT;
|
|
@@ -5468,14 +5331,14 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5468
5331
|
uri: content.url,
|
|
5469
5332
|
resourceUrl: this.resourceUrl
|
|
5470
5333
|
}).then(function () {
|
|
5471
|
-
|
|
5334
|
+
_this48.isSharing = true;
|
|
5472
5335
|
return _promise.default.resolve();
|
|
5473
5336
|
}).catch(function (error) {
|
|
5474
5337
|
_loggerProxy.default.logger.error('Meeting:index#share --> Error ', error);
|
|
5475
5338
|
|
|
5476
5339
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_SHARE_FAILURE, {
|
|
5477
|
-
correlation_id:
|
|
5478
|
-
locus_id:
|
|
5340
|
+
correlation_id: _this48.correlationId,
|
|
5341
|
+
locus_id: _this48.locusUrl.split('/').pop(),
|
|
5479
5342
|
reason: error.message,
|
|
5480
5343
|
stack: error.stack
|
|
5481
5344
|
});
|
|
@@ -5514,7 +5377,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5514
5377
|
}, {
|
|
5515
5378
|
key: "stopFloorRequest",
|
|
5516
5379
|
value: function stopFloorRequest() {
|
|
5517
|
-
var
|
|
5380
|
+
var _this49 = this;
|
|
5518
5381
|
|
|
5519
5382
|
var content = this.locusInfo.mediaShares.find(function (element) {
|
|
5520
5383
|
return element.name === _constants.CONTENT;
|
|
@@ -5544,15 +5407,15 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5544
5407
|
_loggerProxy.default.logger.error('Meeting:index#stopFloorRequest --> Error ', error);
|
|
5545
5408
|
|
|
5546
5409
|
_metrics.default.sendBehavioralMetric(_constants2.default.STOP_FLOOR_REQUEST_FAILURE, {
|
|
5547
|
-
correlation_id:
|
|
5548
|
-
locus_id:
|
|
5410
|
+
correlation_id: _this49.correlationId,
|
|
5411
|
+
locus_id: _this49.locusUrl.split('/').pop(),
|
|
5549
5412
|
reason: error.message,
|
|
5550
5413
|
stack: error.stack
|
|
5551
5414
|
});
|
|
5552
5415
|
|
|
5553
5416
|
return _promise.default.reject(error);
|
|
5554
5417
|
}).finally(function () {
|
|
5555
|
-
|
|
5418
|
+
_this49.isSharing = false;
|
|
5556
5419
|
});
|
|
5557
5420
|
}
|
|
5558
5421
|
|
|
@@ -5688,7 +5551,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5688
5551
|
}, {
|
|
5689
5552
|
key: "changeVideoLayout",
|
|
5690
5553
|
value: function changeVideoLayout(layoutType) {
|
|
5691
|
-
var
|
|
5554
|
+
var _this50 = this;
|
|
5692
5555
|
|
|
5693
5556
|
var renderInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
5694
5557
|
var main = renderInfo.main,
|
|
@@ -5751,7 +5614,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5751
5614
|
content: layoutInfo.content
|
|
5752
5615
|
}).then(function (response) {
|
|
5753
5616
|
if (response && response.body && response.body.locus) {
|
|
5754
|
-
|
|
5617
|
+
_this50.locusInfo.onFullLocus(response.body.locus);
|
|
5755
5618
|
}
|
|
5756
5619
|
}).catch(function (error) {
|
|
5757
5620
|
_loggerProxy.default.logger.error('Meeting:index#changeVideoLayout --> Error ', error);
|
|
@@ -5768,7 +5631,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5768
5631
|
}, {
|
|
5769
5632
|
key: "setLocalVideoQuality",
|
|
5770
5633
|
value: function setLocalVideoQuality(level) {
|
|
5771
|
-
var
|
|
5634
|
+
var _this51 = this;
|
|
5772
5635
|
|
|
5773
5636
|
_loggerProxy.default.logger.log("Meeting:index#setLocalVideoQuality --> Setting quality to ".concat(level));
|
|
5774
5637
|
|
|
@@ -5798,7 +5661,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5798
5661
|
var _ref13 = (0, _slicedToArray2.default)(_ref12, 1),
|
|
5799
5662
|
localStream = _ref13[0];
|
|
5800
5663
|
|
|
5801
|
-
return
|
|
5664
|
+
return _this51.updateVideo({
|
|
5802
5665
|
sendVideo: true,
|
|
5803
5666
|
receiveVideo: true,
|
|
5804
5667
|
stream: localStream
|
|
@@ -5846,7 +5709,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5846
5709
|
}, {
|
|
5847
5710
|
key: "setMeetingQuality",
|
|
5848
5711
|
value: function setMeetingQuality(level) {
|
|
5849
|
-
var
|
|
5712
|
+
var _this52 = this;
|
|
5850
5713
|
|
|
5851
5714
|
_loggerProxy.default.logger.log("Meeting:index#setMeetingQuality --> Setting quality to ".concat(level));
|
|
5852
5715
|
|
|
@@ -5871,18 +5734,18 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5871
5734
|
receiveVideo = _this$mediaProperties4.receiveVideo,
|
|
5872
5735
|
sendVideo = _this$mediaProperties4.sendVideo;
|
|
5873
5736
|
return (sendVideo ? this.setLocalVideoQuality(level) : _promise.default.resolve()).then(function () {
|
|
5874
|
-
return receiveAudio || receiveVideo ?
|
|
5737
|
+
return receiveAudio || receiveVideo ? _this52.setRemoteQualityLevel(level) : _promise.default.resolve();
|
|
5875
5738
|
}).catch(function (error) {
|
|
5876
5739
|
// From troubleshooting it seems that the stream itself doesn't change the max-fs if the peer connection isn't stable
|
|
5877
|
-
|
|
5740
|
+
_this52.mediaProperties.setLocalQualityLevel(previousLevel.local);
|
|
5878
5741
|
|
|
5879
|
-
|
|
5742
|
+
_this52.mediaProperties.setRemoteQualityLevel(previousLevel.remote);
|
|
5880
5743
|
|
|
5881
5744
|
_loggerProxy.default.logger.error("Meeting:index#setMeetingQuality --> ".concat(error.message));
|
|
5882
5745
|
|
|
5883
5746
|
_metrics.default.sendBehavioralMetric(_constants2.default.SET_MEETING_QUALITY_FAILURE, {
|
|
5884
|
-
correlation_id:
|
|
5885
|
-
locus_id:
|
|
5747
|
+
correlation_id: _this52.correlationId,
|
|
5748
|
+
locus_id: _this52.locusUrl.split('/').pop(),
|
|
5886
5749
|
reason: error.message,
|
|
5887
5750
|
stack: error.stack
|
|
5888
5751
|
}, {
|
|
@@ -5906,7 +5769,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5906
5769
|
}, {
|
|
5907
5770
|
key: "shareScreen",
|
|
5908
5771
|
value: function shareScreen() {
|
|
5909
|
-
var
|
|
5772
|
+
var _this53 = this;
|
|
5910
5773
|
|
|
5911
5774
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5912
5775
|
|
|
@@ -5918,9 +5781,9 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5918
5781
|
}, options);
|
|
5919
5782
|
|
|
5920
5783
|
return _media.default.getDisplayMedia(shareConstraints, this.config).then(function (shareStream) {
|
|
5921
|
-
return
|
|
5784
|
+
return _this53.updateShare({
|
|
5922
5785
|
sendShare: true,
|
|
5923
|
-
receiveShare:
|
|
5786
|
+
receiveShare: _this53.mediaProperties.mediaDirection.receiveShare,
|
|
5924
5787
|
stream: shareStream
|
|
5925
5788
|
});
|
|
5926
5789
|
}).catch(function (error) {
|
|
@@ -5932,8 +5795,8 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
5932
5795
|
// TODO: The getDisplayMedia errors need to be moved inside `media.getDisplayMedia`
|
|
5933
5796
|
var metricName = _constants2.default.GET_DISPLAY_MEDIA_FAILURE;
|
|
5934
5797
|
var data = {
|
|
5935
|
-
correlation_id:
|
|
5936
|
-
locus_id:
|
|
5798
|
+
correlation_id: _this53.correlationId,
|
|
5799
|
+
locus_id: _this53.locusUrl.split('/').pop(),
|
|
5937
5800
|
reason: error.message,
|
|
5938
5801
|
stack: error.stack
|
|
5939
5802
|
};
|
|
@@ -6229,7 +6092,7 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6229
6092
|
}, {
|
|
6230
6093
|
key: "endMeetingForAll",
|
|
6231
6094
|
value: function endMeetingForAll() {
|
|
6232
|
-
var
|
|
6095
|
+
var _this54 = this;
|
|
6233
6096
|
|
|
6234
6097
|
_metrics.default.postEvent({
|
|
6235
6098
|
event: _config.eventType.LEAVE,
|
|
@@ -6248,31 +6111,31 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
6248
6111
|
});
|
|
6249
6112
|
|
|
6250
6113
|
return _util.default.endMeetingForAll(this).then(function (end) {
|
|
6251
|
-
|
|
6114
|
+
_this54.meetingFiniteStateMachine.end();
|
|
6252
6115
|
|
|
6253
|
-
|
|
6116
|
+
_this54.clearMeetingData(); // upload logs on leave irrespective of meeting delete
|
|
6254
6117
|
|
|
6255
6118
|
|
|
6256
|
-
_triggerProxy.default.trigger(
|
|
6119
|
+
_triggerProxy.default.trigger(_this54, {
|
|
6257
6120
|
file: 'meeting/index',
|
|
6258
6121
|
function: 'endMeetingForAll'
|
|
6259
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
6122
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
|
|
6260
6123
|
|
|
6261
6124
|
return end;
|
|
6262
6125
|
}).catch(function (error) {
|
|
6263
|
-
|
|
6126
|
+
_this54.meetingFiniteStateMachine.fail(error);
|
|
6264
6127
|
|
|
6265
6128
|
_loggerProxy.default.logger.error('Meeting:index#endMeetingForAll --> Failed to end meeting ', error); // upload logs on leave irrespective of meeting delete
|
|
6266
6129
|
|
|
6267
6130
|
|
|
6268
|
-
_triggerProxy.default.trigger(
|
|
6131
|
+
_triggerProxy.default.trigger(_this54, {
|
|
6269
6132
|
file: 'meeting/index',
|
|
6270
6133
|
function: 'endMeetingForAll'
|
|
6271
|
-
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS,
|
|
6134
|
+
}, _constants.EVENTS.REQUEST_UPLOAD_LOGS, _this54);
|
|
6272
6135
|
|
|
6273
6136
|
_metrics.default.sendBehavioralMetric(_constants2.default.MEETING_END_ALL_FAILURE, {
|
|
6274
|
-
correlation_id:
|
|
6275
|
-
locus_id:
|
|
6137
|
+
correlation_id: _this54.correlationId,
|
|
6138
|
+
locus_id: _this54.locusUrl.split('/').pop(),
|
|
6276
6139
|
reason: error.message,
|
|
6277
6140
|
stack: error.stack,
|
|
6278
6141
|
code: error.code
|