Identify LiveKit room participants by user id, not peer id
This way, their participant id can remain the same when they reconnect.
This commit is contained in:
parent
c2f5381e5a
commit
ad37034960
9 changed files with 55 additions and 42 deletions
|
@ -2141,7 +2141,7 @@ impl Workspace {
|
|||
|
||||
let call = self.active_call()?;
|
||||
let room = call.read(cx).room()?.read(cx);
|
||||
let participant = room.remote_participants().get(&leader_id)?;
|
||||
let participant = room.remote_participant_for_peer_id(leader_id)?;
|
||||
|
||||
let mut items_to_add = Vec::new();
|
||||
match participant.location {
|
||||
|
@ -2190,7 +2190,7 @@ impl Workspace {
|
|||
) -> Option<ViewHandle<SharedScreen>> {
|
||||
let call = self.active_call()?;
|
||||
let room = call.read(cx).room()?.read(cx);
|
||||
let participant = room.remote_participants().get(&peer_id)?;
|
||||
let participant = room.remote_participant_for_peer_id(peer_id)?;
|
||||
let track = participant.tracks.values().next()?.clone();
|
||||
let user = participant.user.clone();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue