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

feat: Region pinning support

Open typester opened this issue 1 year ago • 1 comments

typester avatar May 02 '25 19:05 typester

it seems like you haven't added any nanpa changeset files to this PR.

if this pull request includes changes to code, make sure to add a changeset, by writing a file to .nanpa/<unique-name>.kdl:

minor type="added" "Introduce frobnication algorithm"

refer to the manpage for more information.

ilo-nanpa[bot] avatar May 02 '25 19:05 ilo-nanpa[bot]

I made the following changes:

  • Moved the connection fallback to regional URLs functionality to the SignalClient.
  • Removed the initial fetching of regional URLs. If the default connection is refused, try connecting to the regional URLs.
  • Log an error if the default URL returns an error other than 403.

typester avatar May 14 '25 17:05 typester

lgtm, the only nit I have is that now for region pinned projects users that don't connect correctly via geo always get the penalty of a failed connection attempt first.

Ideally we'd offer a prepare_connection method on top that sets the region url for the next connect attempt. see https://github.com/livekit/client-sdk-js/blob/main/src/room/Room.ts#L656-L665

Yeah, we'll need this at some point in the future, but I think it's fine for this PR in terms of minimal implementation. I'll keep it in mind. Thank you!

typester avatar May 15 '25 20:05 typester