Can't connect to LiveKit room with TURN servers
janoskranczler opened this issue · 2 comments
janoskranczler commented
Hi!
I tried to connect to a LiveKit room with TURN servers. I changed the RoomContext.connect
method to configure the servers:
let rtcConfiguration = RTCConfiguration()
rtcConfiguration.iceServers = [
RTCIceServer(
urlStrings: [
"turn:*********?transport=udp",
"turns::*********:443?transport=tcp"
],
username: ":*********",
credential: ":*********"
)
]
let connectOptions = ConnectOptions(
autoSubscribe: !publish && autoSubscribe, // don't autosubscribe if publish mode
rtcConfiguration: rtcConfiguration,
publishOnlyMode: publish ? "publish_\(UUID().uuidString)" : nil
)
But when I tried to connect with the example app I got the following error message:
When I try to connect to a room that doesn't require TURN, it works.
janoskranczler commented
I've found the root cause of the issue and created a PR:
livekit/client-sdk-swift#174
hiroshihorie commented
@janoskranczler Thanks for the PR !, It has been merged so I'll close this one.