1.1.1-1.5.3 #17

Merged
Royce59 merged 7 commits from dev into main 2026-03-20 16:49:30 +00:00
Showing only changes of commit 59d40e3005 - Show all commits

View File

@@ -324,7 +324,12 @@ export function CallProvider(props : CallProviderProps) {
}
}
peerConnectionRef.current.ontrack = (event) => {
peerConnectionRef.current.ontrack = async (event) => {
try {
await attachReceiverE2EE(event.receiver, Buffer.from(sharedSecret, "hex"));
} catch (e) {
console.error("attachReceiverE2EE failed:", e);
}
/**
* При получении медиа-трека с другой стороны
*/
@@ -347,13 +352,12 @@ export function CallProvider(props : CallProviderProps) {
const tx = peerConnectionRef.current.addTransceiver(audioTrack, {
direction: "sendrecv",
streams: [localStream]
direction: "sendrecv",
streams: [localStream]
});
await attachSenderE2EE(tx.sender, Buffer.from(sharedSecret, "hex"));
await attachReceiverE2EE(tx.receiver, Buffer.from(sharedSecret, "hex"));
/**
* Отправляем свой оффер другой стороне
*/
@@ -365,7 +369,7 @@ export function CallProvider(props : CallProviderProps) {
send(offerSignal);
return;
}
}, [activeCall, sessionKeys]);
}, [activeCall, sessionKeys, sharedSecret]);
const openCallsModal = (text : string) => {
modals.open({