vani-meeting-client-native 0.3.7-beta5 → 0.3.7-beta7
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.
|
@@ -107,8 +107,8 @@ var WebrtcHandler = /** @class */ (function (_super) {
|
|
|
107
107
|
peerConnection = peerConnectionObject.rtcPeerConnection ? peerConnectionObject.rtcPeerConnection : this.dynamicLibHelper.getRTCPeerConnection(this.meetingStartRequest);
|
|
108
108
|
if (!peerConnection) return [3 /*break*/, 2];
|
|
109
109
|
this.subToConnectionState(participant);
|
|
110
|
-
peerConnection.addTransceiver("audio", { direction: "sendrecv" })
|
|
111
|
-
peerConnection.addTransceiver("video", { direction: "sendrecv" })
|
|
110
|
+
// peerConnection.addTransceiver("audio", { direction: "sendrecv" })
|
|
111
|
+
// peerConnection.addTransceiver("video", { direction: "sendrecv" })
|
|
112
112
|
peerConnection.setRemoteDescription({ type: 'offer', sdp: peerConnectionObject.remoteOffer });
|
|
113
113
|
return [4 /*yield*/, peerConnection.createAnswer()];
|
|
114
114
|
case 1:
|
|
@@ -219,14 +219,25 @@ var WebrtcHandler = /** @class */ (function (_super) {
|
|
|
219
219
|
});
|
|
220
220
|
}); };
|
|
221
221
|
_this.sendTrackToParticipant = function (track, participant) { return __awaiter(_this, void 0, void 0, function () {
|
|
222
|
-
var selfParticpant, peerConnection;
|
|
222
|
+
var selfParticpant, peerConnection, transceiver;
|
|
223
223
|
return __generator(this, function (_a) {
|
|
224
|
+
if (!track.track) {
|
|
225
|
+
return [2 /*return*/];
|
|
226
|
+
}
|
|
224
227
|
selfParticpant = this.communicationHandler.getSelfParticipant();
|
|
225
228
|
if (selfParticpant) {
|
|
226
229
|
peerConnection = selfParticpant.getPeerConnectionsViaUserId(participant.userId, this.meetingStartRequest);
|
|
227
230
|
if (peerConnection && peerConnection.rtcPeerConnection) {
|
|
228
231
|
this.printLogIfRequired("Send Track", participant);
|
|
229
|
-
peerConnection.rtcPeerConnection.
|
|
232
|
+
transceiver = peerConnection.rtcPeerConnection.getTransceivers().find(function (t) { return t.receiver.track.kind === track.track.kind; });
|
|
233
|
+
if (transceiver) {
|
|
234
|
+
this.printLogIfRequired("Replace track", participant, track);
|
|
235
|
+
transceiver.sender.replaceTrack(track.track);
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
this.printLogIfRequired("Send add track - reaplce track not found", participant, track);
|
|
239
|
+
peerConnection.rtcPeerConnection.addTrack(track.track);
|
|
240
|
+
}
|
|
230
241
|
// peerConnection.rtcPeerConnection.addStream(new MediaStream([track.track]))
|
|
231
242
|
}
|
|
232
243
|
}
|