Шифрование звонков E2EE

This commit is contained in:
RoyceDa
2026-03-20 17:18:46 +02:00
parent 9f8840e077
commit 427f2e9e33
3 changed files with 80 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ import { modals } from "@mantine/modals";
import { Button, Flex, Text } from "@mantine/core";
import { useSound } from "@/app/hooks/useSound";
import useWindow from "@/app/hooks/useWindow";
import { enableAudioE2EE } from "./audioE2EE";
export interface CallContextValue {
call: (callable: string) => void;
@@ -345,6 +346,8 @@ export function CallProvider(props : CallProviderProps) {
localStream.getTracks().forEach(track => {
peerConnectionRef.current?.addTrack(track, localStream);
});
await enableAudioE2EE(peerConnectionRef.current, Buffer.from(sharedSecret, 'hex'));
/**
* Отправляем свой оффер другой стороне
*/