muaz-khan / RTCMultiConnection

RTCMultiConnection is a WebRTC JavaScript library for peer-to-peer applications (screen sharing, audio/video conferencing, file sharing, media streaming etc.)
https://muazkhan.com:9001/
MIT License
2.53k stars 1.37k forks source link

One country to another country not working #1054

Open ajesh1234 opened 1 year ago

ajesh1234 commented 1 year ago

Hi, Its working in same country network but if one user from india and another from other country then its not working and not showing any audio/video. Let me know pls if is required any changes in configuration

MediaKitApp commented 1 year ago

From what you mention it seems a Stun/Turn problem, you should configure your own server using for example: Coturn (With Ubuntu), then you use this code and modify it with your data:

// first step, ignore default STUN+TURN servers
connection.iceServers = [];

// second step, set STUN url
connection.iceServers.push({
    urls: 'stun:yourSTUN.com:port'
});

// last step, set TURN url (recommended)
connection.iceServers.push({
    urls: 'turn:yourTURN.com:port',
    credential: 'password',
    username: 'username'
});

connection.openOrJoin('your-room-id');