diff --git a/.changeset/big-ducks-play.md b/.changeset/big-ducks-play.md new file mode 100644 index 00000000..cb77c82a --- /dev/null +++ b/.changeset/big-ducks-play.md @@ -0,0 +1,6 @@ +--- +"@livekit/protocol": patch +"github.com/livekit/protocol": patch +--- + +Add auto_subscribe_data_track to StartSession. diff --git a/livekit/livekit_internal.pb.go b/livekit/livekit_internal.pb.go index 4c2b7380..a0b5a286 100644 --- a/livekit/livekit_internal.pb.go +++ b/livekit/livekit_internal.pb.go @@ -1043,8 +1043,9 @@ type StartSession struct { Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` ConnectionId string `protobuf:"bytes,3,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` // if a client is reconnecting (i.e. resume instead of restart) - Reconnect bool `protobuf:"varint,4,opt,name=reconnect,proto3" json:"reconnect,omitempty"` - AutoSubscribe bool `protobuf:"varint,9,opt,name=auto_subscribe,json=autoSubscribe,proto3" json:"auto_subscribe,omitempty"` + Reconnect bool `protobuf:"varint,4,opt,name=reconnect,proto3" json:"reconnect,omitempty"` + AutoSubscribe bool `protobuf:"varint,9,opt,name=auto_subscribe,json=autoSubscribe,proto3" json:"auto_subscribe,omitempty"` + AutoSubscribeDataTrack *bool `protobuf:"varint,25,opt,name=auto_subscribe_data_track,json=autoSubscribeDataTrack,proto3,oneof" json:"auto_subscribe_data_track,omitempty"` // Deprecated: Marked as deprecated in livekit_internal.proto. Hidden bool `protobuf:"varint,10,opt,name=hidden,proto3" json:"hidden,omitempty"` Client *ClientInfo `protobuf:"bytes,11,opt,name=client,proto3" json:"client,omitempty"` @@ -1133,6 +1134,13 @@ func (x *StartSession) GetAutoSubscribe() bool { return false } +func (x *StartSession) GetAutoSubscribeDataTrack() bool { + if x != nil && x.AutoSubscribeDataTrack != nil { + return *x.AutoSubscribeDataTrack + } + return false +} + // Deprecated: Marked as deprecated in livekit_internal.proto. func (x *StartSession) GetHidden() bool { if x != nil { @@ -1381,7 +1389,7 @@ var File_livekit_internal_proto protoreflect.FileDescriptor const file_livekit_internal_proto_rawDesc = "" + "\n" + - "\x16livekit_internal.proto\x12\alivekit\x1a\x14livekit_models.proto\x1a\x14livekit_egress.proto\x1a\x1clivekit_agent_dispatch.proto\x1a\x12livekit_room.proto\x1a\x11livekit_rtc.proto\"\xd4\x01\n" + + "\x16livekit_internal.proto\x12\alivekit\x1a\x1clivekit_agent_dispatch.proto\x1a\x14livekit_egress.proto\x1a\x14livekit_models.proto\x1a\x12livekit_room.proto\x1a\x11livekit_rtc.proto\"\xd4\x01\n" + "\x04Node\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x0e\n" + "\x02ip\x18\x02 \x01(\tR\x02ip\x12\x19\n" + @@ -1487,13 +1495,14 @@ const file_livekit_internal_proto_rawDesc = "" + "memoryLoad\x12\x1f\n" + "\vmemory_used\x18\x16 \x01(\x02R\n" + "memoryUsed\x12!\n" + - "\fmemory_total\x18\x17 \x01(\x02R\vmemoryTotal\"\x9f\a\n" + + "\fmemory_total\x18\x17 \x01(\x02R\vmemoryTotal\"\xfd\a\n" + "\fStartSession\x12\x1b\n" + "\troom_name\x18\x01 \x01(\tR\broomName\x12\x1a\n" + "\bidentity\x18\x02 \x01(\tR\bidentity\x12#\n" + "\rconnection_id\x18\x03 \x01(\tR\fconnectionId\x12\x1c\n" + "\treconnect\x18\x04 \x01(\bR\treconnect\x12%\n" + - "\x0eauto_subscribe\x18\t \x01(\bR\rautoSubscribe\x12\x1a\n" + + "\x0eauto_subscribe\x18\t \x01(\bR\rautoSubscribe\x12>\n" + + "\x19auto_subscribe_data_track\x18\x19 \x01(\bH\x00R\x16autoSubscribeDataTrack\x88\x01\x01\x12\x1a\n" + "\x06hidden\x18\n" + " \x01(\bB\x02\x18\x01R\x06hidden\x12+\n" + "\x06client\x18\v \x01(\v2\x13.livekit.ClientInfoR\x06client\x12\x1e\n" + @@ -1504,7 +1513,7 @@ const file_livekit_internal_proto_rawDesc = "" + "\x0fadaptive_stream\x18\x0f \x01(\bR\x0eadaptiveStream\x12%\n" + "\x0eparticipant_id\x18\x10 \x01(\tR\rparticipantId\x12C\n" + "\x10reconnect_reason\x18\x11 \x01(\x0e2\x18.livekit.ReconnectReasonR\x0freconnectReason\x129\n" + - "\x16subscriber_allow_pause\x18\x12 \x01(\bH\x00R\x14subscriberAllowPause\x88\x01\x01\x12(\n" + + "\x16subscriber_allow_pause\x18\x12 \x01(\bH\x01R\x14subscriberAllowPause\x88\x01\x01\x12(\n" + "\x10disable_ice_lite\x18\x13 \x01(\bR\x0edisableIceLite\x12;\n" + "\vcreate_room\x18\x14 \x01(\v2\x1a.livekit.CreateRoomRequestR\n" + "createRoom\x12F\n" + @@ -1512,7 +1521,8 @@ const file_livekit_internal_proto_rawDesc = "" + "\x0fpublisher_offer\x18\x16 \x01(\v2\x1b.livekit.SessionDescriptionR\x0epublisherOffer\x121\n" + "\n" + "sync_state\x18\x17 \x01(\v2\x12.livekit.SyncStateR\tsyncState\x12;\n" + - "\x1ause_single_peer_connection\x18\x18 \x01(\bR\x17useSinglePeerConnectionB\x19\n" + + "\x1ause_single_peer_connection\x18\x18 \x01(\bR\x17useSinglePeerConnectionB\x1c\n" + + "\x1a_auto_subscribe_data_trackB\x19\n" + "\x17_subscriber_allow_pause\"\xe7\x02\n" + "\fRoomInternal\x12;\n" + "\ftrack_egress\x18\x01 \x01(\v2\x18.livekit.AutoTrackEgressR\vtrackEgress\x12M\n" + @@ -1608,9 +1618,9 @@ func file_livekit_internal_proto_init() { if File_livekit_internal_proto != nil { return } - file_livekit_models_proto_init() - file_livekit_egress_proto_init() file_livekit_agent_dispatch_proto_init() + file_livekit_egress_proto_init() + file_livekit_models_proto_init() file_livekit_room_proto_init() file_livekit_rtc_proto_init() file_livekit_internal_proto_msgTypes[3].OneofWrappers = []any{} diff --git a/protobufs/livekit_internal.proto b/protobufs/livekit_internal.proto index 4cb04ba8..71ca3752 100644 --- a/protobufs/livekit_internal.proto +++ b/protobufs/livekit_internal.proto @@ -15,17 +15,18 @@ syntax = "proto3"; package livekit; -option go_package = "github.com/livekit/protocol/livekit"; -option csharp_namespace = "LiveKit.Proto"; -option ruby_package = "LiveKit::Proto"; +import "livekit_agent_dispatch.proto"; +import "livekit_egress.proto"; // internal protos, not exposed to clients import "livekit_models.proto"; -import "livekit_egress.proto"; -import "livekit_agent_dispatch.proto"; import "livekit_room.proto"; import "livekit_rtc.proto"; +option csharp_namespace = "LiveKit.Proto"; +option go_package = "github.com/livekit/protocol/livekit"; +option ruby_package = "LiveKit::Proto"; + enum NodeType { SERVER = 0; CONTROLLER = 1; @@ -65,14 +66,14 @@ message NodeStats { int32 num_tracks_in = 5; int32 num_tracks_out = 6; int32 num_track_publish_attempts = 36; - float track_publish_attempts_per_sec = 37 [deprecated=true]; + float track_publish_attempts_per_sec = 37 [deprecated = true]; int32 num_track_publish_success = 38; - float track_publish_success_per_sec = 39 [deprecated=true]; + float track_publish_success_per_sec = 39 [deprecated = true]; int32 num_track_publish_cancels = 51; int32 num_track_subscribe_attempts = 40; - float track_subscribe_attempts_per_sec = 41 [deprecated=true]; + float track_subscribe_attempts_per_sec = 41 [deprecated = true]; int32 num_track_subscribe_success = 42; - float track_subscribe_success_per_sec = 43 [deprecated=true]; + float track_subscribe_success_per_sec = 43 [deprecated = true]; int32 num_track_subscribe_cancels = 52; // packet @@ -81,11 +82,11 @@ message NodeStats { uint64 packets_in = 9; uint64 packets_out = 10; uint64 nack_total = 11; - float bytes_in_per_sec = 12 [deprecated=true]; - float bytes_out_per_sec = 13 [deprecated=true]; + float bytes_in_per_sec = 12 [deprecated = true]; + float bytes_out_per_sec = 13 [deprecated = true]; float packets_in_per_sec = 14; - float packets_out_per_sec = 15 [deprecated=true]; - float nack_per_sec = 16 [deprecated=true]; + float packets_out_per_sec = 15 [deprecated = true]; + float nack_per_sec = 16 [deprecated = true]; // system uint32 num_cpus = 17; @@ -93,28 +94,28 @@ message NodeStats { float load_avg_last5min = 19; float load_avg_last15min = 20; float cpu_load = 21; - float memory_load = 33 [deprecated=true]; + float memory_load = 33 [deprecated = true]; uint64 memory_total = 34; uint64 memory_used = 35; uint32 sys_packets_out = 28; uint32 sys_packets_dropped = 29; - float sys_packets_out_per_sec = 30 [deprecated=true]; - float sys_packets_dropped_per_sec = 31 [deprecated=true]; - float sys_packets_dropped_pct_per_sec = 32 [deprecated=true]; + float sys_packets_out_per_sec = 30 [deprecated = true]; + float sys_packets_dropped_per_sec = 31 [deprecated = true]; + float sys_packets_dropped_pct_per_sec = 32 [deprecated = true]; // retransmissions uint64 retransmit_bytes_out = 22; uint64 retransmit_packets_out = 23; - float retransmit_bytes_out_per_sec = 24 [deprecated=true]; - float retransmit_packets_out_per_sec = 25 [deprecated=true]; + float retransmit_bytes_out_per_sec = 24 [deprecated = true]; + float retransmit_packets_out_per_sec = 25 [deprecated = true]; // participant joins uint64 participant_signal_connected = 26; - float participant_signal_connected_per_sec = 27 [deprecated=true]; + float participant_signal_connected_per_sec = 27 [deprecated = true]; uint64 participant_rtc_connected = 44; - float participant_rtc_connected_per_sec = 45 [deprecated=true]; + float participant_rtc_connected_per_sec = 45 [deprecated = true]; uint64 participant_rtc_init = 46; - float participant_rtc_init_per_sec = 47 [deprecated=true]; + float participant_rtc_init_per_sec = 47 [deprecated = true]; uint64 participant_rtc_canceled = 53; // forward metrics @@ -172,9 +173,10 @@ message StartSession { // if a client is reconnecting (i.e. resume instead of restart) bool reconnect = 4; bool auto_subscribe = 9; - bool hidden = 10 [deprecated=true]; + optional bool auto_subscribe_data_track = 25; + bool hidden = 10 [deprecated = true]; ClientInfo client = 11; - bool recorder = 12 [deprecated=true]; + bool recorder = 12 [deprecated = true]; string name = 13; // A user's ClaimGrants serialized in JSON string grants_json = 14; @@ -189,6 +191,8 @@ message StartSession { SessionDescription publisher_offer = 22; SyncState sync_state = 23; bool use_single_peer_connection = 24; + + // NEXT ID: 26 } // room info that should not be returned to clients