Skip to content

Conversation

@pblazej
Copy link
Contributor

@pblazej pblazej commented Dec 2, 2025

No description provided.

@pblazej pblazej requested a review from hiroshihorie December 2, 2025 12:40
Copy link
Member

@hiroshihorie hiroshihorie left a comment

Choose a reason for hiding this comment

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

I think JS SDK emits both RemoteParticipant disconnected / connected events (by using the normal participant disconnect flow etc), maybe we should do that also ?

Comment on lines 166 to 175
// Re-add participants
var participantsToAdd: [Livekit_ParticipantInfo] = []
if response.hasParticipant {
participantsToAdd.append(response.participant)
}
participantsToAdd.append(contentsOf: response.otherParticipants)

for info in participantsToAdd {
_state.mutate { $0.updateRemoteParticipant(info: info, room: self) }
}
Copy link
Member

Choose a reason for hiding this comment

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

It’s not well documented, but response.participant appears to be a LocalParticipant. We should probably call localParticipant.updateInfo instead. (I’m not sure if any of the info actually changes, though.)

@pblazej
Copy link
Contributor Author

pblazej commented Dec 4, 2025

@hiroshihorie I don't think that's a hi-priority task tbh, any reliable ways to test it?

@hiroshihorie
Copy link
Member

@pblazej Yes, probably not super high priority. I was hoping Livekit_SimulateScenario as a case but it looks like it doesn't.

@pblazej
Copy link
Contributor Author

pblazej commented Dec 4, 2025

Let's try to prioritize #845 (more severe), then fix this one.

@pblazej pblazej requested a review from hiroshihorie December 17, 2025 11:14
@pblazej
Copy link
Contributor Author

pblazej commented Dec 17, 2025

@lukasIO lo-priority question: how was it tested on JS (e2e)?

@pblazej pblazej changed the title Handle room moved Handle Room moved Dec 17, 2025
@hiroshihorie
Copy link
Member

hiroshihorie commented Dec 23, 2025

We should bump protocol ver to v16
We can test it with https://docs.livekit.io/intro/basics/rooms-participants-tracks/participants/#moveparticipant

}

// Update local participant
if response.hasParticipant {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if we wanna validate this to avoid partial states?

sender._set(subscribedQualities: qualities)
}

override func set(info: Livekit_ParticipantInfo, connectionState: ConnectionState) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is more of an inconsistency with JS.

case v11 = 11
/// Faster room join (delayed ``Room/sid``)
case v12 = 12
/// Regions in leave request, `canReconnect` obsoleted by `action`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This would be a nice prerequisite to the changes actually introduced in #845

@pblazej
Copy link
Contributor Author

pblazej commented Dec 30, 2025

@hiroshihorie I think the basic logic + protocol is there, working with the CLI:

Recording.at.2025-12-30.10.49.44.AM.Cropped.in.2025-12-30.10.52.43.AM.mp4

@pblazej pblazej changed the title Handle Room moved Protocol v16, handle Room moved Dec 30, 2025
localParticipant.set(info: response.participant, connectionState: _state.connectionState)
}

_republishLocalTracks()
Copy link
Member

@hiroshihorie hiroshihorie Jan 8, 2026

Choose a reason for hiding this comment

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

@pblazej Can you check if this is required ? 🙏 We might not need to re-publish ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes it is unfortunately, you can check by commenting that out

@pblazej pblazej merged commit d8b73fd into main Jan 9, 2026
27 of 28 checks passed
@pblazej pblazej deleted the blaze/room-moved branch January 9, 2026 14:56
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