diff --git a/app/providers/CallProvider/CallProvider.tsx b/app/providers/CallProvider/CallProvider.tsx index cd05e4a..86323b6 100644 --- a/app/providers/CallProvider/CallProvider.tsx +++ b/app/providers/CallProvider/CallProvider.tsx @@ -16,7 +16,7 @@ import { attachReceiverE2EE, attachSenderE2EE } from "./audioE2EE"; import { useDeattachedSender } from "../DialogProvider/useDeattachedSender"; import { AttachmentType } from "../ProtocolProvider/protocol/packets/packet.message"; import { generateRandomKey } from "@/app/utils/utils"; -import { useCoreDevice } from "../DeviceProvider/useCoreDevice"; +import { useSystemInformation } from "../SystemProvider/useSystemInformation"; export interface CallContextValue { call: (callable: string) => void; @@ -86,7 +86,7 @@ export function CallProvider(props : CallProviderProps) { const soundRef = useRef(true); const {sendMessage} = useDeattachedSender(); const hasRemoteTrackRef = useRef(false); - const { deviceId } = useCoreDevice(); + const systemInformation = useSystemInformation(); const {playSound, stopSound, stopLoopSound} = useSound(); const {setWindowPriority} = useWindow(); @@ -197,7 +197,7 @@ export function CallProvider(props : CallProviderProps) { answerSignal.setSignalType(WebRTCSignalType.ANSWER); answerSignal.setSdpOrCandidate(JSON.stringify(answer)); answerSignal.setPublicKey(publicKey); - answerSignal.setDeviceId(deviceId); + answerSignal.setDeviceId(systemInformation.id); send(answerSignal); info("Received WebRTC offer, set remote description and sent answer"); return; @@ -342,7 +342,7 @@ export function CallProvider(props : CallProviderProps) { candidateSignal.setSignalType(WebRTCSignalType.ICE_CANDIDATE); candidateSignal.setSdpOrCandidate(JSON.stringify(event.candidate)); offerSignal.setPublicKey(publicKey); - offerSignal.setDeviceId(deviceId); + offerSignal.setDeviceId(systemInformation.id); send(candidateSignal); } } @@ -405,7 +405,7 @@ export function CallProvider(props : CallProviderProps) { offerSignal.setSignalType(WebRTCSignalType.OFFER); offerSignal.setSdpOrCandidate(JSON.stringify(offer)); offerSignal.setPublicKey(publicKey); - offerSignal.setDeviceId(deviceId); + offerSignal.setDeviceId(systemInformation.id); send(offerSignal); return; } diff --git a/app/servers.ts b/app/servers.ts index c5779c3..ce396d3 100644 --- a/app/servers.ts +++ b/app/servers.ts @@ -1,8 +1,8 @@ export const SERVERS = [ //'wss://cdn.rosetta-im.com', - //'ws://10.211.55.2:3000', + 'ws://10.211.55.2:3000', //'ws://192.168.6.82:3000', - 'wss://wss.rosetta.im' + //'wss://wss.rosetta.im' ]; export function selectServer(): string {