Skip to content

Commit 9d45648

Browse files
committed
config: add webrtc parameters
1 parent 2dbf999 commit 9d45648

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

cmd/catalyst/config/config.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,25 @@ func GenerateConfig(cli *Cli) ([]byte, []byte, error) {
118118
protocol.LivepeerAccessToken = cli.Secret
119119
} else if protocol.Connector == "livepeer" && protocol.Broadcaster && protocol.MetadataQueueURI != "" {
120120
protocol.AuthWebhookURL = fmt.Sprintf("http://%s:%s@127.0.0.1:3004/api/stream/hook", adminID, cli.Secret)
121+
} else if protocol.Connector == "WebRTC" {
122+
protocol.ICEServers = []ICEServer{
123+
{
124+
URLs: fmt.Sprintf("stun:%s:3478", u.Hostname()),
125+
},
126+
{
127+
Credential: "livepeer",
128+
URLs: fmt.Sprintf("turn:%s:3478", u.Hostname()),
129+
Username: "livepeer",
130+
},
131+
{
132+
URLs: fmt.Sprintf("stun:%s:5349", u.Hostname()),
133+
},
134+
{
135+
Credential: "livepeer",
136+
URLs: fmt.Sprintf("turn:%s:5349", u.Hostname()),
137+
Username: "livepeer",
138+
},
139+
}
121140
}
122141
}
123142

cmd/catalyst/config/full-stack.spec.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,19 @@
185185
"bindhost": "127.0.0.1",
186186
"iceservers": [
187187
{
188-
"urls": "stun:localhost"
188+
"urls": "stun:example.com:3478"
189189
},
190190
{
191191
"credential": "livepeer",
192-
"urls": "turn:localhost",
192+
"urls": "turn:example.com:3478",
193+
"username": "livepeer"
194+
},
195+
{
196+
"urls": "stun:example.com:5349"
197+
},
198+
{
199+
"credential": "livepeer",
200+
"urls": "turn:example.com:5349",
193201
"username": "livepeer"
194202
}
195203
],

0 commit comments

Comments
 (0)