Skip to content

Commit

Permalink
fix: Add stun and turn servers
Browse files Browse the repository at this point in the history
  • Loading branch information
WCY-dt committed Jun 19, 2024
1 parent 42f47d5 commit 78831c0
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,48 @@ document.getElementById('clientIdDisplay').textContent = clientId;

// Connect to the signaling server
const socket = io.connect('https://easy-transfer.glitch.me/');
const configuration = { iceServers: [{ urls: 'stun:stun.l.google.com:19302' }] };
const configuration = { iceServers: [
{
urls: 'stun:stun.l.google.com:19302'
},
{
urls: 'stun:stun1.l.google.com:19302'
},
{
urls: 'stun:stun2.l.google.com:19302'
},
{
urls: 'stun:stun3.l.google.com:19302'
},
{
urls: 'stun:stun4.l.google.com:19302'
},
{
url: 'turn:numb.viagenie.ca',
credential: 'muazkh',
username: 'webrtc@live.com'
},
{
url: 'turn:192.158.29.39:3478?transport=udp',
credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
username: '28224511:1379330808'
},
{
url: 'turn:192.158.29.39:3478?transport=tcp',
credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
username: '28224511:1379330808'
},
{
url: 'turn:turn.bistri.com:80',
credential: 'homeo',
username: 'homeo'
},
{
url: 'turn:turn.anyfirewall.com:443?transport=tcp',
credential: 'webrtc',
username: 'webrtc'
}
]};
const peerConnection = new RTCPeerConnection(configuration);

// Data channel
Expand Down

0 comments on commit 78831c0

Please sign in to comment.