From 17facb7382229bd908e909fd6c55e9bb9b323c8b Mon Sep 17 00:00:00 2001 From: lukasIO Date: Wed, 11 Nov 2026 13:50:40 +0100 Subject: [PATCH 1/2] Add full_snapshot to ParticipantUpdate Set when the message lists every participant visible to the receiver, so a client can drop the remote participants that are missing from it. The server sets it on the roster it sends after a resume. Co-Authored-By: Claude Fable 5.1 --- .../participant-update-full-snapshot.md | 5 ++++ livekit/livekit_rtc.pb.go | 30 +++++++++++++------ protobufs/livekit_rtc.proto | 4 +++ 3 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 .changeset/participant-update-full-snapshot.md diff --git a/.changeset/participant-update-full-snapshot.md b/.changeset/participant-update-full-snapshot.md new file mode 100644 index 000000000..67cf0cdda --- /dev/null +++ b/.changeset/participant-update-full-snapshot.md @@ -0,0 +1,5 @@ +--- +"@livekit/protocol": patch +--- + +Add `full_snapshot` to `ParticipantUpdate`, set when the message lists every visible participant so clients can drop remote participants that are missing from it diff --git a/livekit/livekit_rtc.pb.go b/livekit/livekit_rtc.pb.go index e5f3228f1..f19b2c75e 100644 --- a/livekit/livekit_rtc.pb.go +++ b/livekit/livekit_rtc.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.12 -// protoc v7.35.1 +// protoc v7.36.2 // source: livekit_rtc.proto package livekit @@ -2420,8 +2420,12 @@ func (x *SessionDescription) GetMidToTrackId() map[string]string { } type ParticipantUpdate struct { - state protoimpl.MessageState `protogen:"open.v1"` - Participants []*ParticipantInfo `protobuf:"bytes,1,rep,name=participants,proto3" json:"participants,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Participants []*ParticipantInfo `protobuf:"bytes,1,rep,name=participants,proto3" json:"participants,omitempty"` + // when set, `participants` holds every participant visible to the receiver (the receiver itself + // included, hidden participants excluded) at the time the server built the message: the receiver + // drops any remote participant that is not listed. Unset for incremental updates. + FullSnapshot bool `protobuf:"varint,2,opt,name=full_snapshot,json=fullSnapshot,proto3" json:"full_snapshot,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2463,6 +2467,13 @@ func (x *ParticipantUpdate) GetParticipants() []*ParticipantInfo { return nil } +func (x *ParticipantUpdate) GetFullSnapshot() bool { + if x != nil { + return x.FullSnapshot + } + return false +} + type UpdateSubscription struct { state protoimpl.MessageState `protogen:"open.v1"` TrackSids []string `protobuf:"bytes,1,rep,name=track_sids,json=trackSids,proto3" json:"track_sids,omitempty"` @@ -2801,10 +2812,10 @@ type UpdateTrackSettings struct { // subscription priority. 1 being the highest (0 is unset) // when unset, server sill assign priority based on the order of subscription // server will use priority in the following ways: - // 1. when subscribed tracks exceed per-participant subscription limit, server will - // pause the lowest priority tracks - // 2. when the network is congested, server will assign available bandwidth to - // higher priority tracks first. lowest priority tracks can be paused + // 1. when subscribed tracks exceed per-participant subscription limit, server will + // pause the lowest priority tracks + // 2. when the network is congested, server will assign available bandwidth to + // higher priority tracks first. lowest priority tracks can be paused Priority uint32 `protobuf:"varint,8,opt,name=priority,proto3" json:"priority,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -5550,9 +5561,10 @@ const file_livekit_rtc_proto_rawDesc = "" + "\x0fmid_to_track_id\x18\x04 \x03(\v2-.livekit.SessionDescription.MidToTrackIdEntryB\x0f\xbaP\fmidToTrackIDR\fmidToTrackId\x1a?\n" + "\x11MidToTrackIdEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"Q\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"v\n" + "\x11ParticipantUpdate\x12<\n" + - "\fparticipants\x18\x01 \x03(\v2\x18.livekit.ParticipantInfoR\fparticipants\"\x9c\x01\n" + + "\fparticipants\x18\x01 \x03(\v2\x18.livekit.ParticipantInfoR\fparticipants\x12#\n" + + "\rfull_snapshot\x18\x02 \x01(\bR\ffullSnapshot\"\x9c\x01\n" + "\x12UpdateSubscription\x12\x1d\n" + "\n" + "track_sids\x18\x01 \x03(\tR\ttrackSids\x12\x1c\n" + diff --git a/protobufs/livekit_rtc.proto b/protobufs/livekit_rtc.proto index cdcaf1955..a7302ca93 100644 --- a/protobufs/livekit_rtc.proto +++ b/protobufs/livekit_rtc.proto @@ -293,6 +293,10 @@ message SessionDescription { message ParticipantUpdate { repeated ParticipantInfo participants = 1; + // when set, `participants` holds every participant visible to the receiver (the receiver itself + // included, hidden participants excluded) at the time the server built the message: the receiver + // drops any remote participant that is not listed. Unset for incremental updates. + bool full_snapshot = 2; } message UpdateSubscription { From 522fc0b0efec924fa14354d642d6aa8e1c130e6c Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 11 Nov 2026 12:52:13 +0000 Subject: [PATCH 2/2] generated protobuf --- livekit/livekit_rtc.pb.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/livekit/livekit_rtc.pb.go b/livekit/livekit_rtc.pb.go index f19b2c75e..b54c824d3 100644 --- a/livekit/livekit_rtc.pb.go +++ b/livekit/livekit_rtc.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.12 -// protoc v7.36.2 +// protoc v7.35.1 // source: livekit_rtc.proto package livekit @@ -2812,10 +2812,10 @@ type UpdateTrackSettings struct { // subscription priority. 1 being the highest (0 is unset) // when unset, server sill assign priority based on the order of subscription // server will use priority in the following ways: - // 1. when subscribed tracks exceed per-participant subscription limit, server will - // pause the lowest priority tracks - // 2. when the network is congested, server will assign available bandwidth to - // higher priority tracks first. lowest priority tracks can be paused + // 1. when subscribed tracks exceed per-participant subscription limit, server will + // pause the lowest priority tracks + // 2. when the network is congested, server will assign available bandwidth to + // higher priority tracks first. lowest priority tracks can be paused Priority uint32 `protobuf:"varint,8,opt,name=priority,proto3" json:"priority,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache