Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions .changeset/big-ducks-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@livekit/protocol": patch
"github.com/livekit/protocol": patch
---

Add auto_subscribe_data_track to StartSession.
6 changes: 6 additions & 0 deletions .changeset/plenty-jobs-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@livekit/protocol": patch
"github.com/livekit/protocol": patch
---

Option to control auto subscribe of data tracks.
28 changes: 19 additions & 9 deletions livekit/livekit_internal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 20 additions & 10 deletions livekit/livekit_rtc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 28 additions & 24 deletions protobufs/livekit_internal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -81,40 +82,40 @@ 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;
float load_avg_last1min = 18;
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
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand Down
21 changes: 10 additions & 11 deletions protobufs/livekit_rtc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
syntax = "proto3";

package livekit;
option go_package = "github.com/livekit/protocol/livekit";
option csharp_namespace = "LiveKit.Proto";
option ruby_package = "LiveKit::Proto";

import "livekit_models.proto";

import "logger/options.proto";

option csharp_namespace = "LiveKit.Proto";
option go_package = "github.com/livekit/protocol/livekit";
option ruby_package = "LiveKit::Proto";

message SignalRequest {
oneof message {
// participant offer for publisher
Expand Down Expand Up @@ -316,8 +316,6 @@ message UpdateTrackSettings {
uint32 priority = 8;
}



message UpdateLocalAudioTrack {
string track_sid = 1;
repeated AudioTrackFeature features = 2;
Expand All @@ -332,9 +330,9 @@ message UpdateLocalVideoTrack {
message LeaveRequest {
// indicates action clients should take on receiving this message
enum Action {
DISCONNECT = 0; // should disconnect
RESUME = 1; // should attempt a resume with `reconnect=1` in join URL
RECONNECT = 2; // should attempt a reconnect, i. e. no `reconnect=1`
DISCONNECT = 0; // should disconnect
RESUME = 1; // should attempt a resume with `reconnect=1` in join URL
RECONNECT = 2; // should attempt a reconnect, i. e. no `reconnect=1`
}

// sent when server initiates the disconnect due to server-restart
Expand Down Expand Up @@ -551,7 +549,7 @@ message RequestResponse {
NOT_ALLOWED = 2;
LIMIT_EXCEEDED = 3;
QUEUED = 4;
UNSUPPORTED_TYPE= 5;
UNSUPPORTED_TYPE = 5;
UNCLASSIFIED_ERROR = 6;
INVALID_HANDLE = 7;
INVALID_NAME = 8;
Expand Down Expand Up @@ -583,6 +581,7 @@ message ConnectionSettings {
bool adaptive_stream = 2;
optional bool subscriber_allow_pause = 3;
bool disable_ice_lite = 4;
optional bool auto_subscribe_data_track = 5;
}

message JoinRequest {
Expand Down Expand Up @@ -618,7 +617,7 @@ message WrappedJoinRequest {
}

Compression compression = 1;
bytes join_request = 2; // marshalled JoinRequest + potentially compressed
bytes join_request = 2; // marshalled JoinRequest + potentially compressed
}

message MediaSectionsRequirement {
Expand Down
Loading