Правильный deviceId
This commit is contained in:
@@ -16,7 +16,7 @@ import { attachReceiverE2EE, attachSenderE2EE } from "./audioE2EE";
|
|||||||
import { useDeattachedSender } from "../DialogProvider/useDeattachedSender";
|
import { useDeattachedSender } from "../DialogProvider/useDeattachedSender";
|
||||||
import { AttachmentType } from "../ProtocolProvider/protocol/packets/packet.message";
|
import { AttachmentType } from "../ProtocolProvider/protocol/packets/packet.message";
|
||||||
import { generateRandomKey } from "@/app/utils/utils";
|
import { generateRandomKey } from "@/app/utils/utils";
|
||||||
import { useCoreDevice } from "../DeviceProvider/useCoreDevice";
|
import { useSystemInformation } from "../SystemProvider/useSystemInformation";
|
||||||
|
|
||||||
export interface CallContextValue {
|
export interface CallContextValue {
|
||||||
call: (callable: string) => void;
|
call: (callable: string) => void;
|
||||||
@@ -86,7 +86,7 @@ export function CallProvider(props : CallProviderProps) {
|
|||||||
const soundRef = useRef<boolean>(true);
|
const soundRef = useRef<boolean>(true);
|
||||||
const {sendMessage} = useDeattachedSender();
|
const {sendMessage} = useDeattachedSender();
|
||||||
const hasRemoteTrackRef = useRef<boolean>(false);
|
const hasRemoteTrackRef = useRef<boolean>(false);
|
||||||
const { deviceId } = useCoreDevice();
|
const systemInformation = useSystemInformation();
|
||||||
|
|
||||||
const {playSound, stopSound, stopLoopSound} = useSound();
|
const {playSound, stopSound, stopLoopSound} = useSound();
|
||||||
const {setWindowPriority} = useWindow();
|
const {setWindowPriority} = useWindow();
|
||||||
@@ -197,7 +197,7 @@ export function CallProvider(props : CallProviderProps) {
|
|||||||
answerSignal.setSignalType(WebRTCSignalType.ANSWER);
|
answerSignal.setSignalType(WebRTCSignalType.ANSWER);
|
||||||
answerSignal.setSdpOrCandidate(JSON.stringify(answer));
|
answerSignal.setSdpOrCandidate(JSON.stringify(answer));
|
||||||
answerSignal.setPublicKey(publicKey);
|
answerSignal.setPublicKey(publicKey);
|
||||||
answerSignal.setDeviceId(deviceId);
|
answerSignal.setDeviceId(systemInformation.id);
|
||||||
send(answerSignal);
|
send(answerSignal);
|
||||||
info("Received WebRTC offer, set remote description and sent answer");
|
info("Received WebRTC offer, set remote description and sent answer");
|
||||||
return;
|
return;
|
||||||
@@ -342,7 +342,7 @@ export function CallProvider(props : CallProviderProps) {
|
|||||||
candidateSignal.setSignalType(WebRTCSignalType.ICE_CANDIDATE);
|
candidateSignal.setSignalType(WebRTCSignalType.ICE_CANDIDATE);
|
||||||
candidateSignal.setSdpOrCandidate(JSON.stringify(event.candidate));
|
candidateSignal.setSdpOrCandidate(JSON.stringify(event.candidate));
|
||||||
offerSignal.setPublicKey(publicKey);
|
offerSignal.setPublicKey(publicKey);
|
||||||
offerSignal.setDeviceId(deviceId);
|
offerSignal.setDeviceId(systemInformation.id);
|
||||||
send(candidateSignal);
|
send(candidateSignal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -405,7 +405,7 @@ export function CallProvider(props : CallProviderProps) {
|
|||||||
offerSignal.setSignalType(WebRTCSignalType.OFFER);
|
offerSignal.setSignalType(WebRTCSignalType.OFFER);
|
||||||
offerSignal.setSdpOrCandidate(JSON.stringify(offer));
|
offerSignal.setSdpOrCandidate(JSON.stringify(offer));
|
||||||
offerSignal.setPublicKey(publicKey);
|
offerSignal.setPublicKey(publicKey);
|
||||||
offerSignal.setDeviceId(deviceId);
|
offerSignal.setDeviceId(systemInformation.id);
|
||||||
send(offerSignal);
|
send(offerSignal);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
export const SERVERS = [
|
export const SERVERS = [
|
||||||
//'wss://cdn.rosetta-im.com',
|
//'wss://cdn.rosetta-im.com',
|
||||||
//'ws://10.211.55.2:3000',
|
'ws://10.211.55.2:3000',
|
||||||
//'ws://192.168.6.82:3000',
|
//'ws://192.168.6.82:3000',
|
||||||
'wss://wss.rosetta.im'
|
//'wss://wss.rosetta.im'
|
||||||
];
|
];
|
||||||
|
|
||||||
export function selectServer(): string {
|
export function selectServer(): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user