PeerJs Server: custom server on nodejs
Client: Electron App
everything working great but it's not working on some users' devices without errors
after debugging I have figured that peer.connect never opens even on setTimeOut
const handelPeer = async (peerId: string) => {
const id = `${Math.random().toString(16).slice(2)}_${user?.username
?.replaceAll(' ', '_')
.toString()!}`;
const peer = new Peer(id, {
host: 'xxx.xxxx.xxx',
path: '/peerjs',
secure: true,
});
peer.on('open', () => {
const connection = peer.connect(peerId); // Never open on some users
connection.on('open', async () => {
// never getting here on some users
});
});
};
console.log(connection)
many people say I have to change the stun server I tried to change it with Google & some many others nothing changed
