Правильный deviceId

This commit is contained in:
RoyceDa
2026-04-02 17:38:34 +02:00
parent de7a00f37a
commit 93e4898bec
2 changed files with 7 additions and 7 deletions

View File

@@ -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<boolean>(true);
const {sendMessage} = useDeattachedSender();
const hasRemoteTrackRef = useRef<boolean>(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;
}

View File

@@ -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 {