feat: use relay servers when necessary

This commit is contained in:
Jeremy Kahn 2022-08-30 09:38:14 -05:00
parent cfc9881b9d
commit 70ac4f34da

View File

@ -39,6 +39,28 @@ export function Room({
trackerUrls: process.env.REACT_APP_TRACKER_URL trackerUrls: process.env.REACT_APP_TRACKER_URL
? [process.env.REACT_APP_TRACKER_URL] ? [process.env.REACT_APP_TRACKER_URL]
: undefined, : 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 roomId
) )