From 70ac4f34da761e28142be483105a083187b49aae Mon Sep 17 00:00:00 2001 From: Jeremy Kahn Date: Tue, 30 Aug 2022 09:38:14 -0500 Subject: [PATCH] feat: use relay servers when necessary --- src/components/Room/Room.tsx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/components/Room/Room.tsx b/src/components/Room/Room.tsx index f50c923..730efad 100644 --- a/src/components/Room/Room.tsx +++ b/src/components/Room/Room.tsx @@ -39,6 +39,28 @@ export function Room({ trackerUrls: process.env.REACT_APP_TRACKER_URL ? [process.env.REACT_APP_TRACKER_URL] : undefined, + rtcConfig: { + iceServers: [ + { + urls: 'stun:openrelay.metered.ca:80', + }, + { + urls: 'turn:openrelay.metered.ca:80', + username: 'openrelayproject', + credential: 'openrelayproject', + }, + { + urls: 'turn:openrelay.metered.ca:443', + username: 'openrelayproject', + credential: 'openrelayproject', + }, + { + urls: 'turn:openrelay.metered.ca:443?transport=tcp', + username: 'openrelayproject', + credential: 'openrelayproject', + }, + ], + }, }, roomId )