feat(room): add --track-name flag to lk room join - #958
Open
Scorpion197 wants to merge 1 commit into
Open
Conversation
Tracks published via --publish previously had no way to set a name: file tracks were named after the file and socket tracks were unnamed, making them hard for subscribers to identify. Add a --track-name flag that overrides the published track name for file, socket, and simulcast publishes. Defaults are unchanged. Resolves livekit#669
Scorpion197
force-pushed
the
feat/join-track-name
branch
from
September 2, 2026 13:19
dd41237 to
442ecaa
Compare
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.
Resolves #669
What
Adds a
--track-nameflag tolk room jointhat sets the name of tracks published via--publish.Why
Previously there was no way to name a published track: file tracks were named after the file path, and socket publishes (e.g.
h264://127.0.0.1:5004) produced tracks with an empty name, making them hard for subscriber clients to identify (see #669).How
--track-nameflag onlk room join, threaded throughhandlePublish→publishFile/publishSocket/publishReader, and throughhandleSimulcastPublishso the flag also applies in simulcast mode.trackPublicationOptionshelper that prefers the override over the per-source default; defaults are unchanged (file name for files, unnamed for sockets,simulcastfor simulcast).TestTrackPublicationOptionscovers the naming logic.Testing
go test ./...passes;gofmt/go vetclean.livekit-server --dev:--publish change-amelia.ogg --track-name my-custom-audio→published track {"name": "my-custom-audio"}published track {"name": ".../change-amelia.ogg"}(unchanged default)