vani-meeting-client 2.3.7-beta2 → 2.3.7-beta3
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.
|
@@ -16,6 +16,7 @@ export declare class Participant {
|
|
|
16
16
|
isRecordingUser: boolean;
|
|
17
17
|
private peerConnections;
|
|
18
18
|
getPeerConnections: () => Map<string, PeerConnection>;
|
|
19
|
+
isPeerConnectionsViaUserIdPresent: (userId: string) => PeerConnection;
|
|
19
20
|
getPeerConnectionsViaUserId: (userId: string, meetingStartRequest: MeetingStartRequest) => PeerConnection;
|
|
20
21
|
constructor(_userId: string, _roomId: string, _userData?: any, _isAdmin?: boolean);
|
|
21
22
|
}
|
package/lib/model/Participant.js
CHANGED
|
@@ -22,6 +22,9 @@ var Participant = /** @class */ (function () {
|
|
|
22
22
|
}
|
|
23
23
|
return _this.peerConnections;
|
|
24
24
|
};
|
|
25
|
+
this.isPeerConnectionsViaUserIdPresent = function (userId) {
|
|
26
|
+
return _this.getPeerConnections().get(userId);
|
|
27
|
+
};
|
|
25
28
|
this.getPeerConnectionsViaUserId = function (userId, meetingStartRequest) {
|
|
26
29
|
if (!_this.getPeerConnections().has(userId)) {
|
|
27
30
|
var peerConnection = new PeerConnection();
|
|
@@ -324,10 +324,15 @@ var MediaAdaptationManager = /** @class */ (function () {
|
|
|
324
324
|
// ─── Lifecycle ───────────────────────────────────────────────
|
|
325
325
|
MediaAdaptationManager.prototype.start = function () {
|
|
326
326
|
return __awaiter(this, void 0, void 0, function () {
|
|
327
|
+
var nonClosedPeerConnection;
|
|
327
328
|
return __generator(this, function (_a) {
|
|
328
329
|
if (this.handle) {
|
|
329
330
|
return [2 /*return*/];
|
|
330
331
|
}
|
|
332
|
+
nonClosedPeerConnection = this.getPeerConnections().find(function (eachPeerConnection) { return eachPeerConnection.connectionState !== 'closed'; });
|
|
333
|
+
if (nonClosedPeerConnection) {
|
|
334
|
+
this.handle = setTimeout(this.tick, 3000);
|
|
335
|
+
}
|
|
331
336
|
return [2 /*return*/];
|
|
332
337
|
});
|
|
333
338
|
});
|
|
@@ -261,10 +261,19 @@ var WebrtcHandler = /** @class */ (function (_super) {
|
|
|
261
261
|
_this.loopSendOffer = function (peerConnectionObject, participant, mungedOffer, count) {
|
|
262
262
|
if (count === void 0) { count = 0; }
|
|
263
263
|
return __awaiter(_this, void 0, void 0, function () {
|
|
264
|
-
var messageJson;
|
|
264
|
+
var selfParticpant, messageJson;
|
|
265
265
|
var _this = this;
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
var _a;
|
|
267
|
+
return __generator(this, function (_b) {
|
|
268
|
+
selfParticpant = (_a = this.communicationHandler) === null || _a === void 0 ? void 0 : _a.getSelfParticipant();
|
|
269
|
+
if (!selfParticpant) {
|
|
270
|
+
return [2 /*return*/];
|
|
271
|
+
}
|
|
272
|
+
if (!selfParticpant.isPeerConnectionsViaUserIdPresent(participant.userId)) {
|
|
273
|
+
this.printLogIfRequired("loopSendOffer", "Not found", selfParticpant, participant);
|
|
274
|
+
return [2 /*return*/];
|
|
275
|
+
}
|
|
276
|
+
this.printLogIfRequired("Send Offer", mungedOffer, participant);
|
|
268
277
|
messageJson = { to: participant.userId, type: WebrtcMessageType.SendOffer, data: mungedOffer };
|
|
269
278
|
this.sendWebrtcMessage(messageJson);
|
|
270
279
|
if (peerConnectionObject.remoteAnswer || count > 20) {
|