Skip to content

Commit

Permalink
Add stun and turn server to p2p
Browse files Browse the repository at this point in the history
  • Loading branch information
Eclipse-Dominator committed Nov 15, 2023
1 parent c5a8a09 commit f2a8240
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions frontend/src/contexts/sharededitor.context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,35 @@ export const SharedEditorProvider = ({
const _provider = new WebrtcProvider(roomvalue, doc, {
signaling: [wsCollabUrl],
filterBcConns: true,
peerOpts: {
config: {
iceServers: [
{
urls: "stun:stun.relay.metered.ca:80",
},
{
urls: "turn:a.relay.metered.ca:80",
username: "c72cc55907845d336e201a5a",
credential: "1dpTOETKvFt6g6Ei",
},
{
urls: "turn:a.relay.metered.ca:80?transport=tcp",
username: "c72cc55907845d336e201a5a",
credential: "1dpTOETKvFt6g6Ei",
},
{
urls: "turn:a.relay.metered.ca:443",
username: "c72cc55907845d336e201a5a",
credential: "1dpTOETKvFt6g6Ei",
},
{
urls: "turn:a.relay.metered.ca:443?transport=tcp",
username: "c72cc55907845d336e201a5a",
credential: "1dpTOETKvFt6g6Ei",
},
],
},
},
});
setProvider(_provider);

Expand Down

0 comments on commit f2a8240

Please sign in to comment.