python-sdks icon indicating copy to clipboard operation
python-sdks copied to clipboard

How to pass RtcConfiguration with ice_servers?

Open avivace opened this issue 9 months ago • 0 comments

Hi, I'm trying to to use a specific TURN server while using the real-time SDK for Python but I couldn't find a precise example .. Does this look ok?

ice_servers = [
            room_pb2.IceServer(
                urls=["turn:turn.myserver"], 

            )
        ]

        rtc_config = rtc.RtcConfiguration(
            ice_servers=ice_servers
        )

        options = rtc.RoomOptions(
            auto_subscribe=True,
            rtc_config=rtc_config
        )

        await room.connect(
            livekit_endpoint,
            token,
            options=options,
        )

I don't get any specific error, but it seems like it's not taking any effect.

avivace avatar Apr 04 '25 09:04 avivace