Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Runtime/Scripts/Room.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public class Room
public string Sid { private set; get; }
public string Name { private set; get; }
public string Metadata { private set; get; }
public uint NumParticipants { private set; get; }
public LocalParticipant LocalParticipant { private set; get; }
public ConnectionState ConnectionState { private set; get; }
public bool IsConnected => RoomHandle != null && ConnectionState != ConnectionState.ConnDisconnected;
Expand Down Expand Up @@ -233,6 +234,7 @@ internal void UpdateFromInfo(RoomInfo info)
Sid = info.Sid;
Name = info.Name;
Metadata = info.Metadata;
NumParticipants = info.NumParticipants;
}

internal void OnRpcMethodInvocationReceived(RpcMethodInvocationEvent e)
Expand Down Expand Up @@ -492,6 +494,17 @@ internal void OnEventReceived(RoomEvent e)
E2EeStateChanged?.Invoke(participant, e.E2EeStateChanged.State);
}
break;
case RoomEvent.MessageOneofCase.RoomUpdated:
{
UpdateFromInfo(e.RoomUpdated);
}
break;
case RoomEvent.MessageOneofCase.Moved:
{
// Participants moved to new room.
UpdateFromInfo(e.Moved);
}
break;
}
}

Expand Down
Loading