feat: Region pinning support
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.
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.
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_connectionmethod 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!