-
-
Notifications
You must be signed in to change notification settings - Fork 219
/
Copy pathrtcConfig.ts
32 lines (32 loc) · 1.16 KB
/
rtcConfig.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// This object is provided as `config.rtcConfig` to Trystero's `joinRoom`
// function: https://github.com/dmotz/trystero#joinroomconfig-namespace
//
// https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection#parameters
export const rtcConfig: RTCConfiguration = {
// These are the relay servers that are used in case a direct peer-to-peer
// connection cannot be made. Feel free to change them as you'd like. If you
// would like to disable relay servers entirely, remove the `iceServers`
// property from the rtcConfig object. IF YOU DISABLE RELAY SERVERS,
// CHITCHATTER PEERS MAY NOT BE ABLE TO CONNECT DEPENDING ON HOW THEY ARE
// CONNECTED TO THE INTERNET.
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',
},
],
}