allow for audio filters to be registered after initial room connection - #1273
Merged
Conversation
lukasIO
requested review from
MaxHeimbrock,
alan-george-lk,
ladvoc,
stephen-derosa and
xianshijing-lk
as code owners
July 22, 2026 08:30
Contributor
Changeset ✓This PR includes a changeset covering all affected packages:
|
xianshijing-lk
left a comment
Contributor
There was a problem hiding this comment.
lgtm if you add the test.
…vekit/rust-sdks into lukas/filter-load-late-import
xianshijing-lk
approved these changes
Jul 29, 2026
Merged
1egoman
pushed a commit
that referenced
this pull request
Jul 29, 2026
> [!IMPORTANT] > Merging this pull request will create these releases # livekit-protocol 0.7.12 (2026-07-29) ## Fixes - Add data streams v2 - #1192 (@1egoman) # livekit 0.8.1 (2026-07-29) ## Fixes - allow for audio filters to be registered after initial room connection - #1273 (@lukasIO) - Caching of tokio backend reqwest http client - #1285 (@MaxHeimbrock) - Add data streams v2 - #1192 (@1egoman) - Ensure participant disconnects are synthesized after connection resume - #1250 (@lukasIO) # livekit-api 0.6.1 (2026-07-29) ## Fixes - Caching of tokio backend reqwest http client - #1285 (@MaxHeimbrock) - Add data streams v2 - #1192 (@1egoman) # livekit-net 0.1.2 (2026-07-29) ## Fixes - Caching of tokio backend reqwest http client - #1285 (@MaxHeimbrock) # livekit-data-stream 0.1.1 (2026-07-29) ## Features - Add data streams v2 - #1192 (@1egoman) # livekit-uniffi 0.1.7 (2026-07-29) ## Fixes - Caching of tokio backend reqwest http client - #1285 (@MaxHeimbrock) - Add data streams v2 - #1192 (@1egoman) # livekit-ffi 0.12.73 (2026-07-29) ## Fixes - allow for audio filters to be registered after initial room connection - #1273 (@lukasIO) - Caching of tokio backend reqwest http client - #1285 (@MaxHeimbrock) - Add data streams v2 - #1192 (@1egoman) - Ensure participant disconnects are synthesized after connection resume - #1250 (@lukasIO) # livekit-datatrack 0.1.13 (2026-07-29) ## Fixes - Add data streams v2 - #1192 (@1egoman) Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Audio-filter plugins are authenticated in a one-time pass: when a room
connects,
FfiRoom::connectcallson_load(url, token)for every pluginregistered at that moment. A plugin registered after the room has
connected is never initialized for it — its later
createthen failsbecause the connection was never authenticated (surfacing downstream as
"failed to initialize the audio filter").
Because
room.connect()is async, any registration that lands in thatwindow loses the race.
Fix
When a plugin is registered (
LoadAudioFilterPlugin), also run itson_loadagainst every already-connected room, using each room's connect URL and
current token — so registration order no longer matters.
Room::token()accessor (livekit): current signalling token, needed toauthenticate late-registered plugins.
FfiServer::list_rooms()(livekit-ffi): snapshot of connected rooms(refactored out of the existing
disposelogic).on_load_audio_filter_pluginrunson_loadper room onspawn_blocking(fire-and-forget), so a plugin whose
on_loaddoes network I/O can't stallthe request thread.
on_loadis idempotent per URL, so this can't conflictwith the connect-time pass. Registration happens before the loop so a
concurrently-connecting room is still covered by the normal path.
Notes
key matches what
createlater looks up.