Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect when LiveKit Cloud SFU is at capacity and show an error to the user #2998

Open
hughns opened this issue Feb 7, 2025 · 0 comments
Open
Assignees
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements

Comments

@hughns
Copy link
Member

hughns commented Feb 7, 2025

Current behaviour:

In SPA mode you get this error screen:

Image

In embedded widget mode:

The EC closes immediately with no feedback to the user at all.

Desired behaviour

  1. In SPA mode

Show a more specific error message. Something like:

Insufficient capacity

The server has reached its maximum capacity and you cannot join the call at this time. Please try again later. If the problem persists please contact your server administrator.

  1. In embedded widget mode

Also have EC display the same error message. Keep EC open until the user has pressed a button. Add a new button instead of the "Return to home screen" which is the "Cancel" button. When Cancel is clicked then EC widget closes and the user goes back to their Matrix client/widget host.

Implementation notes

The capacity being hit should manifest itself as a 429 error from the server which enters into this codepath in the LiveKit client-js-sdk.

So, in EC where we call livekitRoom.connect() we should catch and inspect the ConnectionError.status field to see if it is a 429.

I suspect that the widget host is closing the EC widget automatically when the call membership has been removed. So, in order to implement the desired EC embedded widget behaviour we might need to keep the call membership around for longer until the user presses Cancel (or successfully joins the call).

This capability is needed on the develop/livekit branch but also is a candidate to backport to v0.7.x due to the recent deployment of the sponsored LiveKit Cloud SFU for the Matrix Foundation and that a new release of Element Call is not imminent due to #2972

@hughns hughns added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements label Feb 7, 2025
@hughns hughns assigned toger5 and robintown and unassigned toger5 Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

No branches or pull requests

3 participants