Skip to content

UrlParams: Intent system update, split into configuration and propreties #3376

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

Merged
merged 12 commits into from
Jul 24, 2025

Conversation

toger5
Copy link
Contributor

@toger5 toger5 commented Jun 30, 2025

Needed for implementing #3372 more cleanly

This PR updates the intend system. We want to solve this before starting on the telephone usecase implementation to prohibit us needing to make too many rust-sdk PR's and to converge to a solution we think brings the best benefits to maintain the url paramters.

This solution tries to get us the most features from this list:

  • Authority in EC (change all platforms at once)
  • Flexible usage of EC in other clients (secondary)
  • Very simple/fast setup on EX (one prop preferably)
  • As much transparency as possible (intent -> changes things the dev did not know about anymore) No time should be wasted on: “was this handled by an intent, do i need to look into the intent description, or do i need to look through feature list”
  • No artificial entanglement (flexibility) If the intent “telephoneOneOnOne” controls “autoleave” (for example) we will always get “startUnmuted” if we want autoleave. Sometimes only one of them is desired.
  • (off topic but related) We want EC to feel like a custom react component with properties. It can execute functions (send call member event, encryption keys) but things like “sendNotifyEvent” might be configurable as params

By implementing intends with a "preset" architecture:

  • The intend is optional and it is possible to tweak each individual configuration
  • Each intend is a list of presets that also adapt based on platform
  • Web + EX configurations should only set the intend and keep all the other options blank. So everything can get controlled in the EC codebase.
  • It is still possible to provide an intend but overwrite a subset of the configuration properties via individual query parametrs.

This PR changes:

  • remove all deprecated fields
  • split the url parameters into UrlProperties and UrlConfiguration (configuration are the ones where you can skip with one intend, properties are always required)

@toger5 toger5 added the PR-Developer-Experience Release note category. A PR that does not change EC but improves working with the repository. label Jun 30, 2025
@toger5 toger5 marked this pull request as ready for review July 1, 2025 08:27
@toger5 toger5 requested a review from a team as a code owner July 1, 2025 08:27
@toger5 toger5 requested a review from robintown July 1, 2025 08:27
src/UrlParams.ts Outdated
controlledAudioDevices: platform === "desktop" ? false : true,
skipLobby: false,
returnToLobby: false,
sendNotificationType: undefined,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be "notification", because it's possible to start a call under this intent too if the previous call ends while you're on the lobby screen.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the logic for checking this would run in EC right?

Copy link
Contributor Author

@toger5 toger5 Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sendNotificationType is slightly wrong. More correct would be requestSendingNotificationtype

(I remember we discussed that we do not have a "should do sth if checks pass" var prefix)

src/UrlParams.ts Outdated
Comment on lines 325 to 354
intentPreset = {
confineToRoom: true,
appPrompt: false,
preload: true,
header: platform === "desktop" ? HeaderStyle.None : HeaderStyle.AppBar,
showControls: true,
hideScreensharing: false,
allowIceFallback: true,
perParticipantE2EE: true,
controlledAudioDevices: platform === "desktop" ? false : true,
skipLobby: true,
returnToLobby: false,
sendNotificationType: "notification",
};
break;
case UserIntent.JoinExistingCall:
intentPreset = {
confineToRoom: true,
appPrompt: false,
preload: true,
header: platform === "desktop" ? HeaderStyle.None : HeaderStyle.AppBar,
showControls: true,
hideScreensharing: false,
allowIceFallback: true,
perParticipantE2EE: true,
controlledAudioDevices: platform === "desktop" ? false : true,
skipLobby: false,
returnToLobby: false,
sendNotificationType: undefined,
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: Since the difference between these cases is pretty minute (only skipLobby changes), it'd be nice to collapse these two branches into one, so it's clearer what changes

@robintown robintown changed the title UrlParams: Intend system update, split into configuration and propreties UrlParams: Intent system update, split into configuration and propreties Jul 24, 2025
@toger5 toger5 merged commit 2f55d8e into livekit Jul 24, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Developer-Experience Release note category. A PR that does not change EC but improves working with the repository.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants