Skip to content

Handle data track SID reassignment#1228

Merged
ladvoc merged 5 commits into
mainfrom
ladvoc/handle-data-track-sid-change
Jul 9, 2026
Merged

Handle data track SID reassignment#1228
ladvoc merged 5 commits into
mainfrom
ladvoc/handle-data-track-sid-change

Conversation

@ladvoc

@ladvoc ladvoc commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Closes BOT-456

@ladvoc
ladvoc requested a review from 1egoman as a code owner July 8, 2026 16:43
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Changeset

The following package versions will be affected by this PR:

Package Bump
livekit patch
livekit-datatrack patch
livekit-ffi patch

devin-ai-integration[bot]

This comment was marked as resolved.

@stephen-derosa stephen-derosa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm -- nice tests!

@1egoman 1egoman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally makes sense to me!

let Some(descriptor) = self.descriptors.remove(&old_sid) else {
return false;
};
*descriptor.info.sid.write().unwrap() = new_sid.clone();

@1egoman 1egoman Jul 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just want to call out, in case this makes you more confident that this is correct - I did something very similar to this in a recent node sdk change (also ported this to python) for regular tracks to ensure that upon republish just the sid is updated: https://github.com/livekit/node-sdks/blob/e4a769c9717e6657f03ef44528640c2fb74973a8/packages/livekit-rtc/src/room.ts#L607-L615

@ladvoc
ladvoc merged commit 6df0f1a into main Jul 9, 2026
31 of 33 checks passed
@ladvoc
ladvoc deleted the ladvoc/handle-data-track-sid-change branch July 9, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants