Шифрование звонков E2EE
This commit is contained in:
@@ -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'));
|
||||
/**
|
||||
* Отправляем свой оффер другой стороне
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user