@webex/plugin-meetings 3.0.0-beta.0 → 3.0.0-beta.1
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/meeting/index.js +79 -99
- package/dist/meeting/index.js.map +1 -1
- package/package.json +17 -17
- package/src/meeting/index.js +87 -108
package/dist/meeting/index.js
CHANGED
|
@@ -4619,125 +4619,105 @@ var Meeting = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
4619
4619
|
enableRtx: _this38.config.enableRtx,
|
|
4620
4620
|
enableExtmap: _this38.config.enableExtmap,
|
|
4621
4621
|
setStartLocalSDPGenRemoteSDPRecvDelay: _this38.setStartLocalSDPGenRemoteSDPRecvDelay.bind(_this38)
|
|
4622
|
-
})
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
return peerConnection;
|
|
4627
|
-
});
|
|
4628
|
-
}).then(function (peerConnection) {
|
|
4629
|
-
_this38.handleMediaLogging(_this38.mediaProperties);
|
|
4630
|
-
|
|
4631
|
-
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection Received from attachMedia "));
|
|
4632
|
-
|
|
4633
|
-
_this38.setRemoteStream(peerConnection);
|
|
4634
|
-
|
|
4635
|
-
if (_this38.config.stats.enableStatsAnalyzer) {
|
|
4636
|
-
// TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
|
|
4637
|
-
_this38.networkQualityMonitor = new _networkQualityMonitor.default(_this38.config.stats);
|
|
4638
|
-
_this38.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(_this38.config.stats, _this38.networkQualityMonitor);
|
|
4639
|
-
|
|
4640
|
-
_this38.setupStatsAnalyzerEventHandlers();
|
|
4641
|
-
|
|
4642
|
-
_this38.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this38.sendNetworkQualityEvent.bind(_this38));
|
|
4643
|
-
}
|
|
4644
|
-
}).catch(function (error) {
|
|
4645
|
-
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
|
|
4646
|
-
|
|
4647
|
-
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
|
|
4648
|
-
correlation_id: _this38.correlationId,
|
|
4649
|
-
locus_id: _this38.locusUrl.split('/').pop(),
|
|
4650
|
-
reason: error.message,
|
|
4651
|
-
stack: error.stack,
|
|
4652
|
-
turnDiscoverySkippedReason: turnDiscoverySkippedReason,
|
|
4653
|
-
turnServerUsed: turnServerUsed
|
|
4654
|
-
});
|
|
4622
|
+
});
|
|
4623
|
+
}).then(function (peerConnection) {
|
|
4624
|
+
return _this38.getDevices().then(function (devices) {
|
|
4625
|
+
_util.default.handleDeviceLogging(devices);
|
|
4655
4626
|
|
|
4656
|
-
|
|
4657
|
-
})
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
// eslint-disable-next-line prefer-arrow-callback
|
|
4627
|
+
return peerConnection;
|
|
4628
|
+
});
|
|
4629
|
+
}).then(function (peerConnection) {
|
|
4630
|
+
_this38.handleMediaLogging(_this38.mediaProperties);
|
|
4661
4631
|
|
|
4662
|
-
|
|
4663
|
-
resolve();
|
|
4664
|
-
}
|
|
4632
|
+
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection Received from attachMedia "));
|
|
4665
4633
|
|
|
4666
|
-
|
|
4667
|
-
timerCount += 1;
|
|
4634
|
+
_this38.setRemoteStream(peerConnection);
|
|
4668
4635
|
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4636
|
+
if (_this38.config.stats.enableStatsAnalyzer) {
|
|
4637
|
+
// TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
|
|
4638
|
+
_this38.networkQualityMonitor = new _networkQualityMonitor.default(_this38.config.stats);
|
|
4639
|
+
_this38.statsAnalyzer = new _statsAnalyzer.StatsAnalyzer(_this38.config.stats, _this38.networkQualityMonitor);
|
|
4673
4640
|
|
|
4674
|
-
|
|
4675
|
-
clearInterval(joiningTimer);
|
|
4676
|
-
reject(new Error('Meeting is still not active '));
|
|
4677
|
-
}
|
|
4678
|
-
}, 1000);
|
|
4679
|
-
});
|
|
4680
|
-
}).then(function () {
|
|
4681
|
-
return logRequest(_this38.roap.sendRoapMediaRequest({
|
|
4682
|
-
sdp: _this38.mediaProperties.peerConnection.sdp,
|
|
4683
|
-
roapSeq: _this38.roapSeq,
|
|
4684
|
-
meeting: _this38 // or can pass meeting ID
|
|
4641
|
+
_this38.setupStatsAnalyzerEventHandlers();
|
|
4685
4642
|
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
});
|
|
4691
|
-
}).then(function () {
|
|
4692
|
-
var peerConnection = _this38.mediaProperties.peerConnection;
|
|
4693
|
-
return new _promise.default(function (resolve, reject) {
|
|
4694
|
-
if (peerConnection.connectionState === _constants.CONNECTION_STATE.CONNECTED) {
|
|
4695
|
-
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
|
|
4643
|
+
_this38.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this38.sendNetworkQualityEvent.bind(_this38));
|
|
4644
|
+
}
|
|
4645
|
+
}).catch(function (error) {
|
|
4646
|
+
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
|
|
4696
4647
|
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4648
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_FAILURE, {
|
|
4649
|
+
correlation_id: _this38.correlationId,
|
|
4650
|
+
locus_id: _this38.locusUrl.split('/').pop(),
|
|
4651
|
+
reason: error.message,
|
|
4652
|
+
stack: error.stack,
|
|
4653
|
+
turnDiscoverySkippedReason: turnDiscoverySkippedReason,
|
|
4654
|
+
turnServerUsed: turnServerUsed
|
|
4655
|
+
});
|
|
4700
4656
|
|
|
4657
|
+
throw error;
|
|
4658
|
+
}).then(function () {
|
|
4659
|
+
return new _promise.default(function (resolve, reject) {
|
|
4660
|
+
var timerCount = 0; // eslint-disable-next-line func-names
|
|
4661
|
+
// eslint-disable-next-line prefer-arrow-callback
|
|
4701
4662
|
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
reject((0, _webexErrors.createMeetingsError)(30202, 'Meeting connection failed'));
|
|
4706
|
-
} else {
|
|
4707
|
-
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
|
|
4663
|
+
if (_this38.type === _constants._CALL_) {
|
|
4664
|
+
resolve();
|
|
4665
|
+
}
|
|
4708
4666
|
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
}, _constants.PC_BAIL_TIMEOUT);
|
|
4667
|
+
var joiningTimer = setInterval(function () {
|
|
4668
|
+
timerCount += 1;
|
|
4712
4669
|
|
|
4713
|
-
_this38.
|
|
4714
|
-
|
|
4670
|
+
if (_this38.meetingState === _constants.FULL_STATE.ACTIVE) {
|
|
4671
|
+
clearInterval(joiningTimer);
|
|
4672
|
+
resolve();
|
|
4673
|
+
}
|
|
4715
4674
|
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4675
|
+
if (timerCount === 4) {
|
|
4676
|
+
clearInterval(joiningTimer);
|
|
4677
|
+
reject(new Error('Meeting is still not active '));
|
|
4678
|
+
}
|
|
4679
|
+
}, 1000);
|
|
4680
|
+
});
|
|
4681
|
+
}).then(function () {
|
|
4682
|
+
return logRequest(_this38.roap.sendRoapMediaRequest({
|
|
4683
|
+
sdp: _this38.mediaProperties.peerConnection.sdp,
|
|
4684
|
+
roapSeq: _this38.roapSeq,
|
|
4685
|
+
meeting: _this38 // or can pass meeting ID
|
|
4686
|
+
|
|
4687
|
+
}), {
|
|
4688
|
+
header: "".concat(LOG_HEADER, " Send Roap Media Request."),
|
|
4689
|
+
success: "".concat(LOG_HEADER, " Successfully send roap media request"),
|
|
4690
|
+
failure: "".concat(LOG_HEADER, " Error joining the call on send roap media request, ")
|
|
4691
|
+
});
|
|
4692
|
+
}).then(function () {
|
|
4693
|
+
return _this38.mediaProperties.waitForIceConnectedState().catch(function () {
|
|
4694
|
+
throw (0, _webexErrors.createMeetingsError)(30202, 'Meeting connection failed');
|
|
4695
|
+
});
|
|
4696
|
+
}).then(function () {
|
|
4697
|
+
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
|
|
4725
4698
|
|
|
4699
|
+
if (mediaSettings && mediaSettings.sendShare && localShare) {
|
|
4700
|
+
if (_this38.state === _constants.MEETING_STATE.STATES.JOINED) {
|
|
4701
|
+
return _this38.share();
|
|
4702
|
+
} // When the self state changes to JOINED then request the floor
|
|
4726
4703
|
|
|
4727
|
-
_this38.floorGrantPending = true;
|
|
4728
|
-
}
|
|
4729
4704
|
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
locus_id: _this38.locusUrl.split('/').pop()
|
|
4733
|
-
});
|
|
4705
|
+
_this38.floorGrantPending = true;
|
|
4706
|
+
}
|
|
4734
4707
|
|
|
4735
|
-
|
|
4708
|
+
return {};
|
|
4709
|
+
}).then(function () {
|
|
4710
|
+
return _this38.mediaProperties.getCurrentConnectionType();
|
|
4711
|
+
}).then(function (connectionType) {
|
|
4712
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, {
|
|
4713
|
+
correlation_id: _this38.correlationId,
|
|
4714
|
+
locus_id: _this38.locusUrl.split('/').pop(),
|
|
4715
|
+
connectionType: connectionType
|
|
4736
4716
|
});
|
|
4737
4717
|
}).catch(function (error) {
|
|
4738
4718
|
// Clean up stats analyzer, peer connection, and turn off listeners
|
|
4739
4719
|
var stopStatsAnalyzer = _this38.statsAnalyzer ? _this38.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
|
|
4740
|
-
stopStatsAnalyzer.then(function () {
|
|
4720
|
+
return stopStatsAnalyzer.then(function () {
|
|
4741
4721
|
_this38.statsAnalyzer = null;
|
|
4742
4722
|
|
|
4743
4723
|
if (_this38.mediaProperties.peerConnection) {
|