diff --git a/.changeset/wise-horses-visit.md b/.changeset/wise-horses-visit.md new file mode 100644 index 000000000..b94b157cc --- /dev/null +++ b/.changeset/wise-horses-visit.md @@ -0,0 +1,6 @@ +--- +"github.com/livekit/protocol": patch +"@livekit/protocol": patch +--- + +Add data track subscription to sync state diff --git a/livekit/livekit_rtc.pb.go b/livekit/livekit_rtc.pb.go index f1cbc4556..e7bdb4dd2 100644 --- a/livekit/livekit_rtc.pb.go +++ b/livekit/livekit_rtc.pb.go @@ -3986,6 +3986,7 @@ type SyncState struct { TrackSidsDisabled []string `protobuf:"bytes,6,rep,name=track_sids_disabled,json=trackSidsDisabled,proto3" json:"track_sids_disabled,omitempty"` DatachannelReceiveStates []*DataChannelReceiveState `protobuf:"bytes,7,rep,name=datachannel_receive_states,json=datachannelReceiveStates,proto3" json:"datachannel_receive_states,omitempty"` PublishDataTracks []*PublishDataTrackResponse `protobuf:"bytes,8,rep,name=publish_data_tracks,json=publishDataTracks,proto3" json:"publish_data_tracks,omitempty"` + DataSubscription *UpdateDataSubscription `protobuf:"bytes,9,opt,name=data_subscription,json=dataSubscription,proto3" json:"data_subscription,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -4076,6 +4077,13 @@ func (x *SyncState) GetPublishDataTracks() []*PublishDataTrackResponse { return nil } +func (x *SyncState) GetDataSubscription() *UpdateDataSubscription { + if x != nil { + return x.DataSubscription + } + return nil +} + type DataChannelReceiveState struct { state protoimpl.MessageState `protogen:"open.v1"` PublisherSid string `protobuf:"bytes,1,opt,name=publisher_sid,json=publisherSid,proto3" json:"publisher_sid,omitempty"` @@ -5616,7 +5624,7 @@ const file_livekit_rtc_proto_rawDesc = "" + "\x04room\x18\x01 \x01(\v2\r.livekit.RoomR\x04room\x12\x14\n" + "\x05token\x18\x02 \x01(\tR\x05token\x12:\n" + "\vparticipant\x18\x03 \x01(\v2\x18.livekit.ParticipantInfoR\vparticipant\x12G\n" + - "\x12other_participants\x18\x04 \x03(\v2\x18.livekit.ParticipantInfoR\x11otherParticipants\"\x9e\x04\n" + + "\x12other_participants\x18\x04 \x03(\v2\x18.livekit.ParticipantInfoR\x11otherParticipants\"\xec\x04\n" + "\tSyncState\x123\n" + "\x06answer\x18\x01 \x01(\v2\x1b.livekit.SessionDescriptionR\x06answer\x12?\n" + "\fsubscription\x18\x02 \x01(\v2\x1b.livekit.UpdateSubscriptionR\fsubscription\x12F\n" + @@ -5625,7 +5633,8 @@ const file_livekit_rtc_proto_rawDesc = "" + "\x05offer\x18\x05 \x01(\v2\x1b.livekit.SessionDescriptionR\x05offer\x12.\n" + "\x13track_sids_disabled\x18\x06 \x03(\tR\x11trackSidsDisabled\x12^\n" + "\x1adatachannel_receive_states\x18\a \x03(\v2 .livekit.DataChannelReceiveStateR\x18datachannelReceiveStates\x12Q\n" + - "\x13publish_data_tracks\x18\b \x03(\v2!.livekit.PublishDataTrackResponseR\x11publishDataTracks\"Y\n" + + "\x13publish_data_tracks\x18\b \x03(\v2!.livekit.PublishDataTrackResponseR\x11publishDataTracks\x12L\n" + + "\x11data_subscription\x18\t \x01(\v2\x1f.livekit.UpdateDataSubscriptionR\x10dataSubscription\"Y\n" + "\x17DataChannelReceiveState\x12#\n" + "\rpublisher_sid\x18\x01 \x01(\tR\fpublisherSid\x12\x19\n" + "\blast_seq\x18\x02 \x01(\rR\alastSeq\"f\n" + @@ -5974,34 +5983,35 @@ var file_livekit_rtc_proto_depIdxs = []int32{ 21, // 111: livekit.SyncState.offer:type_name -> livekit.SessionDescription 51, // 112: livekit.SyncState.datachannel_receive_states:type_name -> livekit.DataChannelReceiveState 11, // 113: livekit.SyncState.publish_data_tracks:type_name -> livekit.PublishDataTrackResponse - 0, // 114: livekit.DataChannelInfo.target:type_name -> livekit.SignalTarget - 2, // 115: livekit.SimulateScenario.switch_candidate_protocol:type_name -> livekit.CandidateProtocol - 57, // 116: livekit.RegionSettings.regions:type_name -> livekit.RegionInfo - 96, // 117: livekit.SubscriptionResponse.err:type_name -> livekit.SubscriptionError - 4, // 118: livekit.RequestResponse.reason:type_name -> livekit.RequestResponse.Reason - 15, // 119: livekit.RequestResponse.trickle:type_name -> livekit.TrickleRequest - 9, // 120: livekit.RequestResponse.add_track:type_name -> livekit.AddTrackRequest - 16, // 121: livekit.RequestResponse.mute:type_name -> livekit.MuteTrackRequest - 34, // 122: livekit.RequestResponse.update_metadata:type_name -> livekit.UpdateParticipantMetadata - 30, // 123: livekit.RequestResponse.update_audio_track:type_name -> livekit.UpdateLocalAudioTrack - 31, // 124: livekit.RequestResponse.update_video_track:type_name -> livekit.UpdateLocalVideoTrack - 10, // 125: livekit.RequestResponse.publish_data_track:type_name -> livekit.PublishDataTrackRequest - 12, // 126: livekit.RequestResponse.unpublish_data_track:type_name -> livekit.UnpublishDataTrackRequest - 97, // 127: livekit.JoinRequest.client_info:type_name -> livekit.ClientInfo - 61, // 128: livekit.JoinRequest.connection_settings:type_name -> livekit.ConnectionSettings - 70, // 129: livekit.JoinRequest.participant_attributes:type_name -> livekit.JoinRequest.ParticipantAttributesEntry - 9, // 130: livekit.JoinRequest.add_track_requests:type_name -> livekit.AddTrackRequest - 21, // 131: livekit.JoinRequest.publisher_offer:type_name -> livekit.SessionDescription - 98, // 132: livekit.JoinRequest.reconnect_reason:type_name -> livekit.ReconnectReason - 50, // 133: livekit.JoinRequest.sync_state:type_name -> livekit.SyncState - 5, // 134: livekit.WrappedJoinRequest.compression:type_name -> livekit.WrappedJoinRequest.Compression - 65, // 135: livekit.DataTrackSubscriberHandles.SubHandlesEntry.value:type_name -> livekit.DataTrackSubscriberHandles.PublishedDataTrack - 99, // 136: livekit.UpdateDataSubscription.Update.options:type_name -> livekit.DataTrackSubscriptionOptions - 137, // [137:137] is the sub-list for method output_type - 137, // [137:137] is the sub-list for method input_type - 137, // [137:137] is the sub-list for extension type_name - 137, // [137:137] is the sub-list for extension extendee - 0, // [0:137] is the sub-list for field type_name + 24, // 114: livekit.SyncState.data_subscription:type_name -> livekit.UpdateDataSubscription + 0, // 115: livekit.DataChannelInfo.target:type_name -> livekit.SignalTarget + 2, // 116: livekit.SimulateScenario.switch_candidate_protocol:type_name -> livekit.CandidateProtocol + 57, // 117: livekit.RegionSettings.regions:type_name -> livekit.RegionInfo + 96, // 118: livekit.SubscriptionResponse.err:type_name -> livekit.SubscriptionError + 4, // 119: livekit.RequestResponse.reason:type_name -> livekit.RequestResponse.Reason + 15, // 120: livekit.RequestResponse.trickle:type_name -> livekit.TrickleRequest + 9, // 121: livekit.RequestResponse.add_track:type_name -> livekit.AddTrackRequest + 16, // 122: livekit.RequestResponse.mute:type_name -> livekit.MuteTrackRequest + 34, // 123: livekit.RequestResponse.update_metadata:type_name -> livekit.UpdateParticipantMetadata + 30, // 124: livekit.RequestResponse.update_audio_track:type_name -> livekit.UpdateLocalAudioTrack + 31, // 125: livekit.RequestResponse.update_video_track:type_name -> livekit.UpdateLocalVideoTrack + 10, // 126: livekit.RequestResponse.publish_data_track:type_name -> livekit.PublishDataTrackRequest + 12, // 127: livekit.RequestResponse.unpublish_data_track:type_name -> livekit.UnpublishDataTrackRequest + 97, // 128: livekit.JoinRequest.client_info:type_name -> livekit.ClientInfo + 61, // 129: livekit.JoinRequest.connection_settings:type_name -> livekit.ConnectionSettings + 70, // 130: livekit.JoinRequest.participant_attributes:type_name -> livekit.JoinRequest.ParticipantAttributesEntry + 9, // 131: livekit.JoinRequest.add_track_requests:type_name -> livekit.AddTrackRequest + 21, // 132: livekit.JoinRequest.publisher_offer:type_name -> livekit.SessionDescription + 98, // 133: livekit.JoinRequest.reconnect_reason:type_name -> livekit.ReconnectReason + 50, // 134: livekit.JoinRequest.sync_state:type_name -> livekit.SyncState + 5, // 135: livekit.WrappedJoinRequest.compression:type_name -> livekit.WrappedJoinRequest.Compression + 65, // 136: livekit.DataTrackSubscriberHandles.SubHandlesEntry.value:type_name -> livekit.DataTrackSubscriberHandles.PublishedDataTrack + 99, // 137: livekit.UpdateDataSubscription.Update.options:type_name -> livekit.DataTrackSubscriptionOptions + 138, // [138:138] is the sub-list for method output_type + 138, // [138:138] is the sub-list for method input_type + 138, // [138:138] is the sub-list for extension type_name + 138, // [138:138] is the sub-list for extension extendee + 0, // [0:138] is the sub-list for field type_name } func init() { file_livekit_rtc_proto_init() } diff --git a/protobufs/livekit_rtc.proto b/protobufs/livekit_rtc.proto index b3eeafe0e..a6b978896 100644 --- a/protobufs/livekit_rtc.proto +++ b/protobufs/livekit_rtc.proto @@ -517,6 +517,7 @@ message SyncState { repeated string track_sids_disabled = 6; repeated DataChannelReceiveState datachannel_receive_states = 7; repeated PublishDataTrackResponse publish_data_tracks = 8; + UpdateDataSubscription data_subscription = 9; } message DataChannelReceiveState {