vani-meeting-client-native 0.3.7-beta4 → 0.3.7-beta6
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.
|
@@ -178,7 +178,7 @@ var WebrtcHandler = /** @class */ (function (_super) {
|
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
180
|
rtcConnection.addEventListener('iceconnectionstatechange', function (event) {
|
|
181
|
-
_this.printLogIfRequired("iceconnectionstatechange", event, remoteParticipant);
|
|
181
|
+
_this.printLogIfRequired("iceconnectionstatechange", rtcConnection.iceConnectionState, event, remoteParticipant);
|
|
182
182
|
});
|
|
183
183
|
rtcConnection.addEventListener('connectionstatechange', function (event) {
|
|
184
184
|
_this.printLogIfRequired("connectionstatechange", event, rtcConnection.connectionState);
|
|
@@ -187,7 +187,6 @@ var WebrtcHandler = /** @class */ (function (_super) {
|
|
|
187
187
|
_this.startSendTrackToPartiipant(remoteParticipant);
|
|
188
188
|
}
|
|
189
189
|
});
|
|
190
|
-
rtcConnection.addEventListener("");
|
|
191
190
|
rtcConnection.addEventListener("track", function (onRemoteTrack) {
|
|
192
191
|
var _a, _b;
|
|
193
192
|
_this.printLogIfRequired("On New Track Remote", onRemoteTrack);
|
|
@@ -220,13 +219,25 @@ var WebrtcHandler = /** @class */ (function (_super) {
|
|
|
220
219
|
});
|
|
221
220
|
}); };
|
|
222
221
|
_this.sendTrackToParticipant = function (track, participant) { return __awaiter(_this, void 0, void 0, function () {
|
|
223
|
-
var selfParticpant, peerConnection;
|
|
222
|
+
var selfParticpant, peerConnection, senders, _i, senders_1, eachSender;
|
|
224
223
|
return __generator(this, function (_a) {
|
|
225
224
|
selfParticpant = this.communicationHandler.getSelfParticipant();
|
|
226
225
|
if (selfParticpant) {
|
|
227
226
|
peerConnection = selfParticpant.getPeerConnectionsViaUserId(participant.userId, this.meetingStartRequest);
|
|
228
227
|
if (peerConnection && peerConnection.rtcPeerConnection) {
|
|
229
228
|
this.printLogIfRequired("Send Track", participant);
|
|
229
|
+
senders = peerConnection.rtcPeerConnection.getSenders();
|
|
230
|
+
if (senders && senders.length > 0) {
|
|
231
|
+
for (_i = 0, senders_1 = senders; _i < senders_1.length; _i++) {
|
|
232
|
+
eachSender = senders_1[_i];
|
|
233
|
+
if (eachSender && eachSender.track && eachSender.track.kind === track.track.kind) {
|
|
234
|
+
this.printLogIfRequired("Send Replace track", participant, track);
|
|
235
|
+
eachSender.replaceTrack(track.track);
|
|
236
|
+
return [2 /*return*/];
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
this.printLogIfRequired("Send add track - reaplce track not found", participant, track);
|
|
230
241
|
peerConnection.rtcPeerConnection.addTrack(track.track);
|
|
231
242
|
// peerConnection.rtcPeerConnection.addStream(new MediaStream([track.track]))
|
|
232
243
|
}
|
|
@@ -283,7 +294,7 @@ var WebrtcHandler = /** @class */ (function (_super) {
|
|
|
283
294
|
};
|
|
284
295
|
WebrtcHandler.prototype.onSocketMessage = function (websocketCallHandler) {
|
|
285
296
|
var _a;
|
|
286
|
-
|
|
297
|
+
this.printLogIfRequired("websocketCallHandler", websocketCallHandler);
|
|
287
298
|
var data = websocketCallHandler.data;
|
|
288
299
|
if (websocketCallHandler.data.message) {
|
|
289
300
|
data = websocketCallHandler.data.message;
|