vani-meeting-client-native 0.4.7 → 0.4.8
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.
|
@@ -272,11 +272,11 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
272
272
|
});
|
|
273
273
|
};
|
|
274
274
|
SFUHandler.prototype.onRestartIceCandidateResponse = function (data) {
|
|
275
|
-
var _a;
|
|
275
|
+
var _a, _b;
|
|
276
276
|
return __awaiter(this, void 0, void 0, function () {
|
|
277
277
|
var transportId, iceParameters;
|
|
278
|
-
return __generator(this, function (
|
|
279
|
-
switch (
|
|
278
|
+
return __generator(this, function (_c) {
|
|
279
|
+
switch (_c.label) {
|
|
280
280
|
case 0:
|
|
281
281
|
transportId = data.message.transportId;
|
|
282
282
|
iceParameters = data.message.iceParameters;
|
|
@@ -285,17 +285,17 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
285
285
|
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("Restat Ice consumer");
|
|
286
286
|
return [4 /*yield*/, this.consumerTransport.restartIce({ iceParameters: iceParameters })];
|
|
287
287
|
case 1:
|
|
288
|
-
|
|
288
|
+
_c.sent();
|
|
289
289
|
return [3 /*break*/, 4];
|
|
290
290
|
case 2:
|
|
291
291
|
if (!(this.sendTransport && this.sendTransport.id === transportId)) return [3 /*break*/, 4];
|
|
292
292
|
this.meetingStartRequest && this.meetingStartRequest.logLevel === LogLevel.Debug && console.log("Restat Ice sender");
|
|
293
293
|
return [4 /*yield*/, this.sendTransport.restartIce({ iceParameters: iceParameters })];
|
|
294
294
|
case 3:
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
_c.sent();
|
|
296
|
+
_c.label = 4;
|
|
297
297
|
case 4:
|
|
298
|
-
this.communicationHandler.onReconnect(false);
|
|
298
|
+
(_b = this.communicationHandler) === null || _b === void 0 ? void 0 : _b.onReconnect(false);
|
|
299
299
|
return [2 /*return*/];
|
|
300
300
|
}
|
|
301
301
|
});
|
|
@@ -670,8 +670,9 @@ var SFUHandler = /** @class */ (function (_super) {
|
|
|
670
670
|
});
|
|
671
671
|
};
|
|
672
672
|
SFUHandler.prototype.onRouterRtpCapabilities = function (data) {
|
|
673
|
+
var _a;
|
|
673
674
|
try {
|
|
674
|
-
if (this.getDevice() && this.getDevice().loaded) {
|
|
675
|
+
if (this.getDevice() && ((_a = this.getDevice()) === null || _a === void 0 ? void 0 : _a.loaded)) {
|
|
675
676
|
return;
|
|
676
677
|
}
|
|
677
678
|
if (data && data.message && data.message.rtpCapabilities) {
|
|
@@ -252,6 +252,7 @@ var WebrtcHandler = /** @class */ (function (_super) {
|
|
|
252
252
|
// send offer to peer
|
|
253
253
|
peerConnectionObject.remoteAnswer = undefined;
|
|
254
254
|
this.loopSendOffer(peerConnectionObject, participant, mungedOffer);
|
|
255
|
+
this.printLogIfRequired("CheckIfCanSendOffer new", peerConnectionObject, __spreadArray([], __read(selfParticpant.getPeerConnections().entries()), false));
|
|
255
256
|
_c.label = 5;
|
|
256
257
|
case 5: return [2 /*return*/];
|
|
257
258
|
}
|
|
@@ -565,10 +566,13 @@ var WebrtcHandler = /** @class */ (function (_super) {
|
|
|
565
566
|
}
|
|
566
567
|
});
|
|
567
568
|
rtcConnection.addEventListener('signalingstatechange', function (event) {
|
|
569
|
+
var _a;
|
|
568
570
|
_this.printLogIfRequired("signalingstatechange", event, rtcConnection.signalingState);
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
571
|
+
var selfParticpant = (_a = _this.communicationHandler) === null || _a === void 0 ? void 0 : _a.getSelfParticipant();
|
|
572
|
+
var innerPeerConnectionObject = selfParticpant === null || selfParticpant === void 0 ? void 0 : selfParticpant.isPeerConnectionsViaUserIdPresent(remoteParticipant.userId);
|
|
573
|
+
if (innerPeerConnectionObject && rtcConnection.signalingState === 'stable') {
|
|
574
|
+
innerPeerConnectionObject.isCreatingOffer = false;
|
|
575
|
+
if (innerPeerConnectionObject.isNegotiationNeeded) {
|
|
572
576
|
_this.onNegotiationNeeded(remoteParticipant, false, 0, true);
|
|
573
577
|
}
|
|
574
578
|
}
|
|
@@ -583,13 +587,17 @@ var WebrtcHandler = /** @class */ (function (_super) {
|
|
|
583
587
|
// }
|
|
584
588
|
// })
|
|
585
589
|
rtcConnection.addEventListener('negotiationneeded', function (event) {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
590
|
+
var _a, _b;
|
|
591
|
+
_this.printLogIfRequired("negotiationneeded", rtcConnection.signalingState, remoteParticipant, peerConnectionObject);
|
|
592
|
+
var selfParticpant = (_a = _this.communicationHandler) === null || _a === void 0 ? void 0 : _a.getSelfParticipant();
|
|
593
|
+
var innerPeerConnectionObject = selfParticpant === null || selfParticpant === void 0 ? void 0 : selfParticpant.isPeerConnectionsViaUserIdPresent(remoteParticipant.userId);
|
|
594
|
+
var remoteUser = (_b = _this.communicationHandler) === null || _b === void 0 ? void 0 : _b.participantByUserId(remoteParticipant.userId);
|
|
595
|
+
if (!remoteUser && (!innerPeerConnectionObject || (!innerPeerConnectionObject.offer && !innerPeerConnectionObject.answer))) {
|
|
596
|
+
_this.printLogIfRequired("negotiationneeded ignored", rtcConnection.signalingState, remoteParticipant, innerPeerConnectionObject, __spreadArray([], __read(selfParticpant.getPeerConnections().entries()), false));
|
|
589
597
|
return;
|
|
590
598
|
}
|
|
591
|
-
|
|
592
|
-
|
|
599
|
+
innerPeerConnectionObject.isNegotiationNeeded = true;
|
|
600
|
+
innerPeerConnectionObject.negotiationId = new Date().getTime() + "_" + (Math.floor(Math.random() * 100) + 1);
|
|
593
601
|
if (rtcConnection.signalingState === 'stable') {
|
|
594
602
|
_this.onNegotiationNeeded(remoteParticipant, false, 0, true);
|
|
595
603
|
}
|
|
@@ -627,6 +635,7 @@ var WebrtcHandler = /** @class */ (function (_super) {
|
|
|
627
635
|
selfParticpant = this.communicationHandler.getSelfParticipant();
|
|
628
636
|
peerConnectionObject = selfParticpant.getPeerConnectionsViaUserId(remoteParticipant.userId, this.meetingStartRequest);
|
|
629
637
|
if (peerConnectionObject && shouldRestartIce && peerConnectionObject.rtcPeerConnection && peerConnectionObject.rtcPeerConnection.connectionState === 'connected') {
|
|
638
|
+
this.printLogIfRequired("onNegotiationNeeded return", remoteParticipant, shouldRestartIce, peerConnectionObject);
|
|
630
639
|
return [2 /*return*/];
|
|
631
640
|
}
|
|
632
641
|
// if(shouldIgnoreAllOldOpetionalNego){
|