in my case after get everything done and running i want to migrate from add track to addTranciever
i have 2 peerConnection
yourConn = new RTCPeerConnection(servers);
yourConn2 = new RTCPeerConnection(servers);
and with following steps i see in many example casses i addTransciever like so
yourConn.addTransceiver(streams.getAudeoTracks()[0]);
how to recieve from yourConn peer ? and can i achieve that with send from peer 1 to peer 2 and p1 recieve from p2 with no need to negotiation again
what should i do also in ontrack event on both side with , should i use addTrack there or not if i wish
here yourConn2 event side here offer to send what about offer to recieve?
yourConn2.ontrack = (e) => {
e.transceiver.direction = 'sendrecv';
await e.transceiver.sender.replaceTrack(remoteStream);
};
should i grap
RemoteAudioFromlocal = yourConn2.getTransceivers()[0];
and i upgrade" the direction to sendrecv like so ?
RemoteAudioFromlocal.direction = "sendrecv"
await RemoteAudioFromlocal.reciever.replaceTrack(remotePeerStramIn);