@webex/plugin-meetings 2.35.0 → 3.0.0-beta.0
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 +99 -79
- package/dist/meeting/index.js.map +1 -1
- package/package.json +23 -19
- package/src/meeting/index.js +108 -87
package/dist/meeting/index.js
CHANGED
|
@@ -4619,105 +4619,125 @@ 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
|
-
_util.default.handleDeviceLogging(devices);
|
|
4626
|
-
|
|
4627
|
-
return peerConnection;
|
|
4628
|
-
});
|
|
4629
|
-
}).then(function (peerConnection) {
|
|
4630
|
-
_this38.handleMediaLogging(_this38.mediaProperties);
|
|
4622
|
+
}).then(function (peerConnection) {
|
|
4623
|
+
return _this38.getDevices().then(function (devices) {
|
|
4624
|
+
_util.default.handleDeviceLogging(devices);
|
|
4631
4625
|
|
|
4632
|
-
|
|
4626
|
+
return peerConnection;
|
|
4627
|
+
});
|
|
4628
|
+
}).then(function (peerConnection) {
|
|
4629
|
+
_this38.handleMediaLogging(_this38.mediaProperties);
|
|
4633
4630
|
|
|
4634
|
-
|
|
4631
|
+
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection Received from attachMedia "));
|
|
4635
4632
|
|
|
4636
|
-
|
|
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);
|
|
4633
|
+
_this38.setRemoteStream(peerConnection);
|
|
4640
4634
|
|
|
4641
|
-
_this38.
|
|
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);
|
|
4642
4639
|
|
|
4643
|
-
|
|
4644
|
-
}
|
|
4645
|
-
}).catch(function (error) {
|
|
4646
|
-
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
|
|
4647
|
-
|
|
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
|
-
});
|
|
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
|
|
4640
|
+
_this38.setupStatsAnalyzerEventHandlers();
|
|
4662
4641
|
|
|
4663
|
-
|
|
4664
|
-
resolve();
|
|
4642
|
+
_this38.networkQualityMonitor.on(_constants.EVENT_TRIGGERS.NETWORK_QUALITY, _this38.sendNetworkQualityEvent.bind(_this38));
|
|
4665
4643
|
}
|
|
4644
|
+
}).catch(function (error) {
|
|
4645
|
+
_loggerProxy.default.logger.error("".concat(LOG_HEADER, " Error adding media , setting up peerconnection, "), error);
|
|
4666
4646
|
|
|
4667
|
-
|
|
4668
|
-
|
|
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
|
+
});
|
|
4655
|
+
|
|
4656
|
+
throw error;
|
|
4657
|
+
}).then(function () {
|
|
4658
|
+
return new _promise.default(function (resolve, reject) {
|
|
4659
|
+
var timerCount = 0; // eslint-disable-next-line func-names
|
|
4660
|
+
// eslint-disable-next-line prefer-arrow-callback
|
|
4669
4661
|
|
|
4670
|
-
if (_this38.
|
|
4671
|
-
clearInterval(joiningTimer);
|
|
4662
|
+
if (_this38.type === _constants._CALL_) {
|
|
4672
4663
|
resolve();
|
|
4673
4664
|
}
|
|
4674
4665
|
|
|
4675
|
-
|
|
4676
|
-
|
|
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"));
|
|
4666
|
+
var joiningTimer = setInterval(function () {
|
|
4667
|
+
timerCount += 1;
|
|
4698
4668
|
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4669
|
+
if (_this38.meetingState === _constants.FULL_STATE.ACTIVE) {
|
|
4670
|
+
clearInterval(joiningTimer);
|
|
4671
|
+
resolve();
|
|
4672
|
+
}
|
|
4703
4673
|
|
|
4674
|
+
if (timerCount === 4) {
|
|
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
|
|
4704
4685
|
|
|
4705
|
-
|
|
4706
|
-
|
|
4686
|
+
}), {
|
|
4687
|
+
header: "".concat(LOG_HEADER, " Send Roap Media Request."),
|
|
4688
|
+
success: "".concat(LOG_HEADER, " Successfully send roap media request"),
|
|
4689
|
+
failure: "".concat(LOG_HEADER, " Error joining the call on send roap media request, ")
|
|
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"));
|
|
4707
4696
|
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4697
|
+
resolve(peerConnection);
|
|
4698
|
+
return;
|
|
4699
|
+
} // Check if Peer Connection is STABLE (connected)
|
|
4700
|
+
|
|
4701
|
+
|
|
4702
|
+
var stabilityTimeout = setTimeout(function () {
|
|
4703
|
+
if (peerConnection.connectionState !== _constants.CONNECTION_STATE.CONNECTED) {
|
|
4704
|
+
// TODO: Fix this after the error code pr goes in
|
|
4705
|
+
reject((0, _webexErrors.createMeetingsError)(30202, 'Meeting connection failed'));
|
|
4706
|
+
} else {
|
|
4707
|
+
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED"));
|
|
4708
|
+
|
|
4709
|
+
resolve(peerConnection);
|
|
4710
|
+
}
|
|
4711
|
+
}, _constants.PC_BAIL_TIMEOUT);
|
|
4712
|
+
|
|
4713
|
+
_this38.once(_constants.EVENT_TRIGGERS.MEDIA_READY, function () {
|
|
4714
|
+
_loggerProxy.default.logger.info("".concat(LOG_HEADER, " PeerConnection CONNECTED, clearing stability timer."));
|
|
4715
|
+
|
|
4716
|
+
clearTimeout(stabilityTimeout);
|
|
4717
|
+
resolve(peerConnection);
|
|
4718
|
+
});
|
|
4719
|
+
});
|
|
4720
|
+
}).then(function () {
|
|
4721
|
+
if (mediaSettings && mediaSettings.sendShare && localShare) {
|
|
4722
|
+
if (_this38.state === _constants.MEETING_STATE.STATES.JOINED) {
|
|
4723
|
+
return _this38.share();
|
|
4724
|
+
} // When the self state changes to JOINED then request the floor
|
|
4725
|
+
|
|
4726
|
+
|
|
4727
|
+
_this38.floorGrantPending = true;
|
|
4728
|
+
}
|
|
4729
|
+
|
|
4730
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.ADD_MEDIA_SUCCESS, {
|
|
4731
|
+
correlation_id: _this38.correlationId,
|
|
4732
|
+
locus_id: _this38.locusUrl.split('/').pop()
|
|
4733
|
+
});
|
|
4734
|
+
|
|
4735
|
+
return _promise.default.resolve();
|
|
4716
4736
|
});
|
|
4717
4737
|
}).catch(function (error) {
|
|
4718
4738
|
// Clean up stats analyzer, peer connection, and turn off listeners
|
|
4719
4739
|
var stopStatsAnalyzer = _this38.statsAnalyzer ? _this38.statsAnalyzer.stopAnalyzer() : _promise.default.resolve();
|
|
4720
|
-
|
|
4740
|
+
stopStatsAnalyzer.then(function () {
|
|
4721
4741
|
_this38.statsAnalyzer = null;
|
|
4722
4742
|
|
|
4723
4743
|
if (_this38.mediaProperties.peerConnection) {
|