vani-meeting-client-native 0.4.6-beta1 → 0.4.6-beta2
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();
|
|
@@ -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) {
|