diff --git a/pkg/rtc/datatrack.go b/pkg/rtc/datatrack.go index 103f0b6fb..718c4f605 100644 --- a/pkg/rtc/datatrack.go +++ b/pkg/rtc/datatrack.go @@ -24,6 +24,7 @@ type DataTrack struct { lock sync.RWMutex once sync.Once msgChan chan livekit.DataMessage + onClose func() // map of target participantId -> DownDataChannel subscribers map[string]*DownDataChannel @@ -46,6 +47,13 @@ func NewDataTrack(trackId, participantId string, dc *webrtc.DataChannel) *DataTr t.msgChan <- dm }) + dc.OnClose(func() { + t.RemoveAllSubscribers() + if t.onClose != nil { + t.onClose() + } + }) + return t } @@ -72,6 +80,10 @@ func (t *DataTrack) IsMuted() bool { return false } +func (t *DataTrack) OnClose(f func()) { + t.onClose = f +} + func (t *DataTrack) AddSubscriber(participant types.Participant) error { label := PackDataTrackLabel(t.participantId, t.ID(), t.dataChannel.Label()) downChannel, err := participant.PeerConnection().CreateDataChannel(label, t.dataChannelOptions()) @@ -116,9 +128,6 @@ func (t *DataTrack) RemoveAllSubscribers() { func (t *DataTrack) forwardWorker() { defer Recover() - defer func() { - t.RemoveAllSubscribers() - }() for { msg := <-t.msgChan diff --git a/pkg/rtc/mediatrack.go b/pkg/rtc/mediatrack.go index 891a88426..a542d407a 100644 --- a/pkg/rtc/mediatrack.go +++ b/pkg/rtc/mediatrack.go @@ -41,6 +41,7 @@ type MediaTrack struct { streamID string kind livekit.TrackType codec webrtc.RTPCodecParameters + onClose func() // channel to send RTCP packets to the source rtcpCh chan []rtcp.Packet @@ -97,6 +98,10 @@ func (t *MediaTrack) IsMuted() bool { return t.muted } +func (t *MediaTrack) OnClose(f func()) { + t.onClose = f +} + // subscribes participant to current remoteTrack // creates and add necessary forwarders and starts them func (t *MediaTrack) AddSubscriber(participant types.Participant) error { @@ -138,10 +143,13 @@ func (t *MediaTrack) AddSubscriber(participant types.Participant) error { delete(t.downtracks, participant.ID()) t.lock.Unlock() - // ignore if the subscribing participant disconnected - if participant.PeerConnection().ConnectionState() == webrtc.PeerConnectionStateClosed { + // ignore if the subscribing participant is not connected + if participant.PeerConnection().ConnectionState() != webrtc.PeerConnectionStateConnected { return } + + // if the source has been terminated, we'll need to terminate all of the downtracks + // however, if the dest participant has disconnected, then we can skip sender := transceiver.Sender() if sender != nil { logger.GetLogger().Debugw("removing peerconnection track", @@ -229,6 +237,10 @@ func (t *MediaTrack) forwardRTPWorker() { t.RemoveAllSubscribers() // TODO: send unpublished events? t.nackWorker.Stop() + + if t.onClose != nil { + t.onClose() + } }() for pkt := range t.receiver.RTPChan() { diff --git a/pkg/rtc/participant.go b/pkg/rtc/participant.go index 1bf61556c..91b2344e4 100644 --- a/pkg/rtc/participant.go +++ b/pkg/rtc/participant.go @@ -262,15 +262,6 @@ func (p *ParticipantImpl) AddTrack(clientId, name string, trackType livekit.Trac }) } -func (p *ParticipantImpl) RemoveTrack(sid string) error { - p.lock.Lock() - defer p.lock.Unlock() - - // TODO: handle removal properly - - return nil -} - func (p *ParticipantImpl) HandleAnswer(sdp webrtc.SessionDescription) error { if sdp.Type != webrtc.SDPTypeAnswer { return ErrUnexpectedOffer @@ -539,6 +530,14 @@ func (p *ParticipantImpl) handleTrackPublished(track types.PublishedTrack) { track.Start() + track.OnClose(func() { + // cleanup + p.lock.Lock() + delete(p.publishedTracks, track.ID()) + p.lock.Unlock() + p.onTrackUpdated(p, track) + }) + if p.onTrackPublished != nil { p.onTrackPublished(p, track) } diff --git a/pkg/rtc/room_test.go b/pkg/rtc/room_test.go index b2bf2b221..9122caa15 100644 --- a/pkg/rtc/room_test.go +++ b/pkg/rtc/room_test.go @@ -80,12 +80,13 @@ func TestRoomJoin(t *testing.T) { } }) - t.Run("participant removal is broadcasted to others", func(t *testing.T) { - rm := newRoomWithParticipants(t, numParticipants) + t.Run("participant state change is broadcasted to others", func(t *testing.T) { + rm := newRoomWithParticipants(t, 1) participants := rm.GetParticipants() p := participants[0].(*typesfakes.FakeParticipant) rm.RemoveParticipant(p.ID()) + p.OnStateChangeArgsForCall(0)(p, livekit.ParticipantInfo_ACTIVE) time.Sleep(10 * time.Millisecond) for _, op := range participants { diff --git a/pkg/rtc/types/interfaces.go b/pkg/rtc/types/interfaces.go index 55b65896c..4d8b901f3 100644 --- a/pkg/rtc/types/interfaces.go +++ b/pkg/rtc/types/interfaces.go @@ -59,7 +59,6 @@ type Participant interface { RTCPChan() chan<- []rtcp.Packet AddTrack(clientId, name string, trackType livekit.TrackType) - RemoveTrack(sid string) error Answer(sdp webrtc.SessionDescription) (answer webrtc.SessionDescription, err error) HandleAnswer(sdp webrtc.SessionDescription) error AddICECandidate(candidate webrtc.ICECandidateInit) error @@ -100,6 +99,9 @@ type PublishedTrack interface { AddSubscriber(participant Participant) error RemoveSubscriber(participantId string) RemoveAllSubscribers() + + // callbacks + OnClose(func()) } //counterfeiter:generate . Receiver diff --git a/pkg/rtc/types/typesfakes/fake_participant.go b/pkg/rtc/types/typesfakes/fake_participant.go index 55adf7ec3..11dbc1cc9 100644 --- a/pkg/rtc/types/typesfakes/fake_participant.go +++ b/pkg/rtc/types/typesfakes/fake_participant.go @@ -167,17 +167,6 @@ type FakeParticipant struct { removeSubscriberArgsForCall []struct { arg1 string } - RemoveTrackStub func(string) error - removeTrackMutex sync.RWMutex - removeTrackArgsForCall []struct { - arg1 string - } - removeTrackReturns struct { - result1 error - } - removeTrackReturnsOnCall map[int]struct { - result1 error - } SendJoinResponseStub func(*livekit.RoomInfo, []types.Participant) error sendJoinResponseMutex sync.RWMutex sendJoinResponseArgsForCall []struct { @@ -1092,67 +1081,6 @@ func (fake *FakeParticipant) RemoveSubscriberArgsForCall(i int) string { return argsForCall.arg1 } -func (fake *FakeParticipant) RemoveTrack(arg1 string) error { - fake.removeTrackMutex.Lock() - ret, specificReturn := fake.removeTrackReturnsOnCall[len(fake.removeTrackArgsForCall)] - fake.removeTrackArgsForCall = append(fake.removeTrackArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.RemoveTrackStub - fakeReturns := fake.removeTrackReturns - fake.recordInvocation("RemoveTrack", []interface{}{arg1}) - fake.removeTrackMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeParticipant) RemoveTrackCallCount() int { - fake.removeTrackMutex.RLock() - defer fake.removeTrackMutex.RUnlock() - return len(fake.removeTrackArgsForCall) -} - -func (fake *FakeParticipant) RemoveTrackCalls(stub func(string) error) { - fake.removeTrackMutex.Lock() - defer fake.removeTrackMutex.Unlock() - fake.RemoveTrackStub = stub -} - -func (fake *FakeParticipant) RemoveTrackArgsForCall(i int) string { - fake.removeTrackMutex.RLock() - defer fake.removeTrackMutex.RUnlock() - argsForCall := fake.removeTrackArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeParticipant) RemoveTrackReturns(result1 error) { - fake.removeTrackMutex.Lock() - defer fake.removeTrackMutex.Unlock() - fake.RemoveTrackStub = nil - fake.removeTrackReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeParticipant) RemoveTrackReturnsOnCall(i int, result1 error) { - fake.removeTrackMutex.Lock() - defer fake.removeTrackMutex.Unlock() - fake.RemoveTrackStub = nil - if fake.removeTrackReturnsOnCall == nil { - fake.removeTrackReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.removeTrackReturnsOnCall[i] = struct { - result1 error - }{result1} -} - func (fake *FakeParticipant) SendJoinResponse(arg1 *livekit.RoomInfo, arg2 []types.Participant) error { var arg2Copy []types.Participant if arg2 != nil { @@ -1490,8 +1418,6 @@ func (fake *FakeParticipant) Invocations() map[string][][]interface{} { defer fake.removeDownTrackMutex.RUnlock() fake.removeSubscriberMutex.RLock() defer fake.removeSubscriberMutex.RUnlock() - fake.removeTrackMutex.RLock() - defer fake.removeTrackMutex.RUnlock() fake.sendJoinResponseMutex.RLock() defer fake.sendJoinResponseMutex.RUnlock() fake.sendParticipantUpdateMutex.RLock() diff --git a/pkg/rtc/types/typesfakes/fake_published_track.go b/pkg/rtc/types/typesfakes/fake_published_track.go index 63000c5f3..e4e448108 100644 --- a/pkg/rtc/types/typesfakes/fake_published_track.go +++ b/pkg/rtc/types/typesfakes/fake_published_track.go @@ -60,6 +60,11 @@ type FakePublishedTrack struct { nameReturnsOnCall map[int]struct { result1 string } + OnCloseStub func(func()) + onCloseMutex sync.RWMutex + onCloseArgsForCall []struct { + arg1 func() + } RemoveAllSubscribersStub func() removeAllSubscribersMutex sync.RWMutex removeAllSubscribersArgsForCall []struct { @@ -69,11 +74,6 @@ type FakePublishedTrack struct { removeSubscriberArgsForCall []struct { arg1 string } - SetNameStub func(string) - setNameMutex sync.RWMutex - setNameArgsForCall []struct { - arg1 string - } StartStub func() startMutex sync.RWMutex startArgsForCall []struct { @@ -355,6 +355,38 @@ func (fake *FakePublishedTrack) NameReturnsOnCall(i int, result1 string) { }{result1} } +func (fake *FakePublishedTrack) OnClose(arg1 func()) { + fake.onCloseMutex.Lock() + fake.onCloseArgsForCall = append(fake.onCloseArgsForCall, struct { + arg1 func() + }{arg1}) + stub := fake.OnCloseStub + fake.recordInvocation("OnClose", []interface{}{arg1}) + fake.onCloseMutex.Unlock() + if stub != nil { + fake.OnCloseStub(arg1) + } +} + +func (fake *FakePublishedTrack) OnCloseCallCount() int { + fake.onCloseMutex.RLock() + defer fake.onCloseMutex.RUnlock() + return len(fake.onCloseArgsForCall) +} + +func (fake *FakePublishedTrack) OnCloseCalls(stub func(func())) { + fake.onCloseMutex.Lock() + defer fake.onCloseMutex.Unlock() + fake.OnCloseStub = stub +} + +func (fake *FakePublishedTrack) OnCloseArgsForCall(i int) func() { + fake.onCloseMutex.RLock() + defer fake.onCloseMutex.RUnlock() + argsForCall := fake.onCloseArgsForCall[i] + return argsForCall.arg1 +} + func (fake *FakePublishedTrack) RemoveAllSubscribers() { fake.removeAllSubscribersMutex.Lock() fake.removeAllSubscribersArgsForCall = append(fake.removeAllSubscribersArgsForCall, struct { @@ -411,38 +443,6 @@ func (fake *FakePublishedTrack) RemoveSubscriberArgsForCall(i int) string { return argsForCall.arg1 } -func (fake *FakePublishedTrack) SetName(arg1 string) { - fake.setNameMutex.Lock() - fake.setNameArgsForCall = append(fake.setNameArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.SetNameStub - fake.recordInvocation("SetName", []interface{}{arg1}) - fake.setNameMutex.Unlock() - if stub != nil { - fake.SetNameStub(arg1) - } -} - -func (fake *FakePublishedTrack) SetNameCallCount() int { - fake.setNameMutex.RLock() - defer fake.setNameMutex.RUnlock() - return len(fake.setNameArgsForCall) -} - -func (fake *FakePublishedTrack) SetNameCalls(stub func(string)) { - fake.setNameMutex.Lock() - defer fake.setNameMutex.Unlock() - fake.SetNameStub = stub -} - -func (fake *FakePublishedTrack) SetNameArgsForCall(i int) string { - fake.setNameMutex.RLock() - defer fake.setNameMutex.RUnlock() - argsForCall := fake.setNameArgsForCall[i] - return argsForCall.arg1 -} - func (fake *FakePublishedTrack) Start() { fake.startMutex.Lock() fake.startArgsForCall = append(fake.startArgsForCall, struct { @@ -480,12 +480,12 @@ func (fake *FakePublishedTrack) Invocations() map[string][][]interface{} { defer fake.kindMutex.RUnlock() fake.nameMutex.RLock() defer fake.nameMutex.RUnlock() + fake.onCloseMutex.RLock() + defer fake.onCloseMutex.RUnlock() fake.removeAllSubscribersMutex.RLock() defer fake.removeAllSubscribersMutex.RUnlock() fake.removeSubscriberMutex.RLock() defer fake.removeSubscriberMutex.RUnlock() - fake.setNameMutex.RLock() - defer fake.setNameMutex.RUnlock() fake.startMutex.RLock() defer fake.startMutex.RUnlock() copiedInvocations := map[string][][]interface{}{} diff --git a/pkg/service/rtc.go b/pkg/service/rtc.go index 039bd79e5..b2d652e62 100644 --- a/pkg/service/rtc.go +++ b/pkg/service/rtc.go @@ -167,8 +167,6 @@ func (s *RTCService) ServeHTTP(w http.ResponseWriter, r *http.Request) { } case *livekit.SignalRequest_Mute: participant.SetTrackMuted(msg.Mute.Sid, msg.Mute.Muted) - case *livekit.SignalRequest_RemoveTrack: - participant.RemoveTrack(msg.RemoveTrack.Sid) } } } diff --git a/proto/livekit/rtc.pb.go b/proto/livekit/rtc.pb.go index e304aa427..3bfada4a0 100644 --- a/proto/livekit/rtc.pb.go +++ b/proto/livekit/rtc.pb.go @@ -36,7 +36,6 @@ type SignalRequest struct { // *SignalRequest_Trickle // *SignalRequest_AddTrack // *SignalRequest_Mute - // *SignalRequest_RemoveTrack // *SignalRequest_Negotiate Message isSignalRequest_Message `protobuf_oneof:"message"` } @@ -115,13 +114,6 @@ func (x *SignalRequest) GetMute() *MuteTrackRequest { return nil } -func (x *SignalRequest) GetRemoveTrack() *RemoveTrackRequest { - if x, ok := x.GetMessage().(*SignalRequest_RemoveTrack); ok { - return x.RemoveTrack - } - return nil -} - func (x *SignalRequest) GetNegotiate() *NegotiationRequest { if x, ok := x.GetMessage().(*SignalRequest_Negotiate); ok { return x.Negotiate @@ -155,10 +147,6 @@ type SignalRequest_Mute struct { Mute *MuteTrackRequest `protobuf:"bytes,5,opt,name=mute,proto3,oneof"` } -type SignalRequest_RemoveTrack struct { - RemoveTrack *RemoveTrackRequest `protobuf:"bytes,6,opt,name=remove_track,json=removeTrack,proto3,oneof"` -} - type SignalRequest_Negotiate struct { // when client needs to negotiate Negotiate *NegotiationRequest `protobuf:"bytes,7,opt,name=negotiate,proto3,oneof"` @@ -174,8 +162,6 @@ func (*SignalRequest_AddTrack) isSignalRequest_Message() {} func (*SignalRequest_Mute) isSignalRequest_Message() {} -func (*SignalRequest_RemoveTrack) isSignalRequest_Message() {} - func (*SignalRequest_Negotiate) isSignalRequest_Message() {} type SignalResponse struct { @@ -446,53 +432,6 @@ func (x *TrickleRequest) GetCandidateInit() string { return "" } -type RemoveTrackRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sid string `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty"` -} - -func (x *RemoveTrackRequest) Reset() { - *x = RemoveTrackRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_rtc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveTrackRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveTrackRequest) ProtoMessage() {} - -func (x *RemoveTrackRequest) ProtoReflect() protoreflect.Message { - mi := &file_rtc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveTrackRequest.ProtoReflect.Descriptor instead. -func (*RemoveTrackRequest) Descriptor() ([]byte, []int) { - return file_rtc_proto_rawDescGZIP(), []int{4} -} - -func (x *RemoveTrackRequest) GetSid() string { - if x != nil { - return x.Sid - } - return "" -} - type MuteTrackRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -505,7 +444,7 @@ type MuteTrackRequest struct { func (x *MuteTrackRequest) Reset() { *x = MuteTrackRequest{} if protoimpl.UnsafeEnabled { - mi := &file_rtc_proto_msgTypes[5] + mi := &file_rtc_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -518,7 +457,7 @@ func (x *MuteTrackRequest) String() string { func (*MuteTrackRequest) ProtoMessage() {} func (x *MuteTrackRequest) ProtoReflect() protoreflect.Message { - mi := &file_rtc_proto_msgTypes[5] + mi := &file_rtc_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -531,7 +470,7 @@ func (x *MuteTrackRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MuteTrackRequest.ProtoReflect.Descriptor instead. func (*MuteTrackRequest) Descriptor() ([]byte, []int) { - return file_rtc_proto_rawDescGZIP(), []int{5} + return file_rtc_proto_rawDescGZIP(), []int{4} } func (x *MuteTrackRequest) GetSid() string { @@ -557,7 +496,7 @@ type NegotiationRequest struct { func (x *NegotiationRequest) Reset() { *x = NegotiationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_rtc_proto_msgTypes[6] + mi := &file_rtc_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -570,7 +509,7 @@ func (x *NegotiationRequest) String() string { func (*NegotiationRequest) ProtoMessage() {} func (x *NegotiationRequest) ProtoReflect() protoreflect.Message { - mi := &file_rtc_proto_msgTypes[6] + mi := &file_rtc_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -583,7 +522,7 @@ func (x *NegotiationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use NegotiationRequest.ProtoReflect.Descriptor instead. func (*NegotiationRequest) Descriptor() ([]byte, []int) { - return file_rtc_proto_rawDescGZIP(), []int{6} + return file_rtc_proto_rawDescGZIP(), []int{5} } type JoinResponse struct { @@ -599,7 +538,7 @@ type JoinResponse struct { func (x *JoinResponse) Reset() { *x = JoinResponse{} if protoimpl.UnsafeEnabled { - mi := &file_rtc_proto_msgTypes[7] + mi := &file_rtc_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -612,7 +551,7 @@ func (x *JoinResponse) String() string { func (*JoinResponse) ProtoMessage() {} func (x *JoinResponse) ProtoReflect() protoreflect.Message { - mi := &file_rtc_proto_msgTypes[7] + mi := &file_rtc_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -625,7 +564,7 @@ func (x *JoinResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use JoinResponse.ProtoReflect.Descriptor instead. func (*JoinResponse) Descriptor() ([]byte, []int) { - return file_rtc_proto_rawDescGZIP(), []int{7} + return file_rtc_proto_rawDescGZIP(), []int{6} } func (x *JoinResponse) GetRoom() *RoomInfo { @@ -661,7 +600,7 @@ type TrackPublishedResponse struct { func (x *TrackPublishedResponse) Reset() { *x = TrackPublishedResponse{} if protoimpl.UnsafeEnabled { - mi := &file_rtc_proto_msgTypes[8] + mi := &file_rtc_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -674,7 +613,7 @@ func (x *TrackPublishedResponse) String() string { func (*TrackPublishedResponse) ProtoMessage() {} func (x *TrackPublishedResponse) ProtoReflect() protoreflect.Message { - mi := &file_rtc_proto_msgTypes[8] + mi := &file_rtc_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -687,7 +626,7 @@ func (x *TrackPublishedResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TrackPublishedResponse.ProtoReflect.Descriptor instead. func (*TrackPublishedResponse) Descriptor() ([]byte, []int) { - return file_rtc_proto_rawDescGZIP(), []int{8} + return file_rtc_proto_rawDescGZIP(), []int{7} } func (x *TrackPublishedResponse) GetCid() string { @@ -713,7 +652,7 @@ type NegotiationResponse struct { func (x *NegotiationResponse) Reset() { *x = NegotiationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_rtc_proto_msgTypes[9] + mi := &file_rtc_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -726,7 +665,7 @@ func (x *NegotiationResponse) String() string { func (*NegotiationResponse) ProtoMessage() {} func (x *NegotiationResponse) ProtoReflect() protoreflect.Message { - mi := &file_rtc_proto_msgTypes[9] + mi := &file_rtc_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -739,7 +678,7 @@ func (x *NegotiationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use NegotiationResponse.ProtoReflect.Descriptor instead. func (*NegotiationResponse) Descriptor() ([]byte, []int) { - return file_rtc_proto_rawDescGZIP(), []int{9} + return file_rtc_proto_rawDescGZIP(), []int{8} } type SessionDescription struct { @@ -754,7 +693,7 @@ type SessionDescription struct { func (x *SessionDescription) Reset() { *x = SessionDescription{} if protoimpl.UnsafeEnabled { - mi := &file_rtc_proto_msgTypes[10] + mi := &file_rtc_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -767,7 +706,7 @@ func (x *SessionDescription) String() string { func (*SessionDescription) ProtoMessage() {} func (x *SessionDescription) ProtoReflect() protoreflect.Message { - mi := &file_rtc_proto_msgTypes[10] + mi := &file_rtc_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -780,7 +719,7 @@ func (x *SessionDescription) ProtoReflect() protoreflect.Message { // Deprecated: Use SessionDescription.ProtoReflect.Descriptor instead. func (*SessionDescription) Descriptor() ([]byte, []int) { - return file_rtc_proto_rawDescGZIP(), []int{10} + return file_rtc_proto_rawDescGZIP(), []int{9} } func (x *SessionDescription) GetType() string { @@ -808,7 +747,7 @@ type ParticipantUpdate struct { func (x *ParticipantUpdate) Reset() { *x = ParticipantUpdate{} if protoimpl.UnsafeEnabled { - mi := &file_rtc_proto_msgTypes[11] + mi := &file_rtc_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -821,7 +760,7 @@ func (x *ParticipantUpdate) String() string { func (*ParticipantUpdate) ProtoMessage() {} func (x *ParticipantUpdate) ProtoReflect() protoreflect.Message { - mi := &file_rtc_proto_msgTypes[11] + mi := &file_rtc_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -834,7 +773,7 @@ func (x *ParticipantUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use ParticipantUpdate.ProtoReflect.Descriptor instead. func (*ParticipantUpdate) Descriptor() ([]byte, []int) { - return file_rtc_proto_rawDescGZIP(), []int{11} + return file_rtc_proto_rawDescGZIP(), []int{10} } func (x *ParticipantUpdate) GetParticipants() []*ParticipantInfo { @@ -849,7 +788,7 @@ var File_rtc_proto protoreflect.FileDescriptor var file_rtc_proto_rawDesc = []byte{ 0x0a, 0x09, 0x72, 0x74, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x1a, 0x0b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xa4, 0x03, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x6f, 0x22, 0xe2, 0x02, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, @@ -866,91 +805,85 @@ var file_rtc_proto_rawDesc = []byte{ 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, 0x64, 0x64, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x12, 0x2f, 0x0a, 0x04, 0x6d, 0x75, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4d, 0x75, 0x74, 0x65, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x75, 0x74, 0x65, 0x12, 0x40, - 0x0a, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x72, 0x61, 0x63, 0x6b, - 0x12, 0x3b, 0x0a, 0x09, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4e, 0x65, - 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x48, 0x00, 0x52, 0x09, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x42, 0x09, 0x0a, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa9, 0x03, 0x0a, 0x0e, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x6a, - 0x6f, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6c, 0x69, 0x76, 0x65, - 0x6b, 0x69, 0x74, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x48, 0x00, 0x52, 0x04, 0x6a, 0x6f, 0x69, 0x6e, 0x12, 0x35, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, - 0x69, 0x74, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, - 0x33, 0x0a, 0x05, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x6f, - 0x66, 0x66, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x63, 0x6b, 0x6c, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, - 0x54, 0x72, 0x69, 0x63, 0x6b, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, - 0x52, 0x07, 0x74, 0x72, 0x69, 0x63, 0x6b, 0x6c, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6c, 0x69, 0x76, 0x65, - 0x6b, 0x69, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, - 0x4a, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, - 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, - 0x69, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x72, 0x61, - 0x63, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x09, 0x6e, - 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x09, - 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x5f, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x6c, 0x69, - 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x36, 0x0a, 0x0e, 0x54, 0x72, 0x69, 0x63, 0x6b, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x61, 0x6e, 0x64, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x22, 0x26, 0x0a, - 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x73, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x10, 0x4d, 0x75, 0x74, 0x65, 0x54, 0x72, 0x61, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, - 0x75, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x75, 0x74, 0x65, - 0x64, 0x22, 0x14, 0x0a, 0x12, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xba, 0x01, 0x0a, 0x0c, 0x4a, 0x6f, 0x69, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, - 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, - 0x3a, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x50, - 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, - 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x12, 0x6f, - 0x74, 0x68, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, - 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x11, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, - 0x61, 0x6e, 0x74, 0x73, 0x22, 0x54, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, - 0x12, 0x28, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x22, 0x15, 0x0a, 0x13, 0x4e, 0x65, - 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x3a, 0x0a, 0x12, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, - 0x64, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x64, 0x70, 0x22, 0x51, 0x0a, - 0x11, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, - 0x69, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, - 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, - 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2d, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6c, 0x69, 0x76, 0x65, - 0x6b, 0x69, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x6d, 0x75, 0x74, 0x65, 0x12, 0x3b, + 0x0a, 0x09, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4e, 0x65, 0x67, 0x6f, + 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, + 0x52, 0x09, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa9, 0x03, 0x0a, 0x0e, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x6a, 0x6f, 0x69, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, + 0x74, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, + 0x52, 0x04, 0x6a, 0x6f, 0x69, 0x6e, 0x12, 0x35, 0x0a, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, + 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x12, 0x33, 0x0a, + 0x05, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6c, + 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x66, 0x66, + 0x65, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x63, 0x6b, 0x6c, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x54, 0x72, + 0x69, 0x63, 0x6b, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x07, + 0x74, 0x72, 0x69, 0x63, 0x6b, 0x6c, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, + 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x4a, 0x0a, + 0x0f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, + 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x63, 0x6b, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x09, 0x6e, 0x65, 0x67, + 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6c, + 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x65, + 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x22, 0x5f, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x6c, 0x69, 0x76, 0x65, + 0x6b, 0x69, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x22, 0x36, 0x0a, 0x0e, 0x54, 0x72, 0x69, 0x63, 0x6b, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x61, + 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x22, 0x3a, 0x0a, 0x10, 0x4d, + 0x75, 0x74, 0x65, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x4e, 0x65, 0x67, 0x6f, 0x74, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xba, 0x01, + 0x0a, 0x0c, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, + 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, + 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x3a, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, + 0x70, 0x61, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x69, 0x76, + 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, + 0x74, 0x12, 0x47, 0x0a, 0x12, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, + 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, + 0x61, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x50, 0x61, + 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x54, 0x0a, 0x16, 0x54, 0x72, + 0x61, 0x63, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, + 0x54, 0x72, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x74, 0x72, 0x61, 0x63, 0x6b, + 0x22, 0x15, 0x0a, 0x13, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x12, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x64, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x73, 0x64, 0x70, 0x22, 0x51, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, + 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, + 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, + 0x70, 0x61, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, + 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x6c, 0x69, 0x76, + 0x65, 0x6b, 0x69, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -965,51 +898,49 @@ func file_rtc_proto_rawDescGZIP() []byte { return file_rtc_proto_rawDescData } -var file_rtc_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_rtc_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_rtc_proto_goTypes = []interface{}{ (*SignalRequest)(nil), // 0: livekit.SignalRequest (*SignalResponse)(nil), // 1: livekit.SignalResponse (*AddTrackRequest)(nil), // 2: livekit.AddTrackRequest (*TrickleRequest)(nil), // 3: livekit.TrickleRequest - (*RemoveTrackRequest)(nil), // 4: livekit.RemoveTrackRequest - (*MuteTrackRequest)(nil), // 5: livekit.MuteTrackRequest - (*NegotiationRequest)(nil), // 6: livekit.NegotiationRequest - (*JoinResponse)(nil), // 7: livekit.JoinResponse - (*TrackPublishedResponse)(nil), // 8: livekit.TrackPublishedResponse - (*NegotiationResponse)(nil), // 9: livekit.NegotiationResponse - (*SessionDescription)(nil), // 10: livekit.SessionDescription - (*ParticipantUpdate)(nil), // 11: livekit.ParticipantUpdate - (TrackType)(0), // 12: livekit.TrackType - (*RoomInfo)(nil), // 13: livekit.RoomInfo - (*ParticipantInfo)(nil), // 14: livekit.ParticipantInfo - (*TrackInfo)(nil), // 15: livekit.TrackInfo + (*MuteTrackRequest)(nil), // 4: livekit.MuteTrackRequest + (*NegotiationRequest)(nil), // 5: livekit.NegotiationRequest + (*JoinResponse)(nil), // 6: livekit.JoinResponse + (*TrackPublishedResponse)(nil), // 7: livekit.TrackPublishedResponse + (*NegotiationResponse)(nil), // 8: livekit.NegotiationResponse + (*SessionDescription)(nil), // 9: livekit.SessionDescription + (*ParticipantUpdate)(nil), // 10: livekit.ParticipantUpdate + (TrackType)(0), // 11: livekit.TrackType + (*RoomInfo)(nil), // 12: livekit.RoomInfo + (*ParticipantInfo)(nil), // 13: livekit.ParticipantInfo + (*TrackInfo)(nil), // 14: livekit.TrackInfo } var file_rtc_proto_depIdxs = []int32{ - 10, // 0: livekit.SignalRequest.offer:type_name -> livekit.SessionDescription - 10, // 1: livekit.SignalRequest.answer:type_name -> livekit.SessionDescription + 9, // 0: livekit.SignalRequest.offer:type_name -> livekit.SessionDescription + 9, // 1: livekit.SignalRequest.answer:type_name -> livekit.SessionDescription 3, // 2: livekit.SignalRequest.trickle:type_name -> livekit.TrickleRequest 2, // 3: livekit.SignalRequest.add_track:type_name -> livekit.AddTrackRequest - 5, // 4: livekit.SignalRequest.mute:type_name -> livekit.MuteTrackRequest - 4, // 5: livekit.SignalRequest.remove_track:type_name -> livekit.RemoveTrackRequest - 6, // 6: livekit.SignalRequest.negotiate:type_name -> livekit.NegotiationRequest - 7, // 7: livekit.SignalResponse.join:type_name -> livekit.JoinResponse - 10, // 8: livekit.SignalResponse.answer:type_name -> livekit.SessionDescription - 10, // 9: livekit.SignalResponse.offer:type_name -> livekit.SessionDescription - 3, // 10: livekit.SignalResponse.trickle:type_name -> livekit.TrickleRequest - 11, // 11: livekit.SignalResponse.update:type_name -> livekit.ParticipantUpdate - 8, // 12: livekit.SignalResponse.track_published:type_name -> livekit.TrackPublishedResponse - 9, // 13: livekit.SignalResponse.negotiate:type_name -> livekit.NegotiationResponse - 12, // 14: livekit.AddTrackRequest.type:type_name -> livekit.TrackType - 13, // 15: livekit.JoinResponse.room:type_name -> livekit.RoomInfo - 14, // 16: livekit.JoinResponse.participant:type_name -> livekit.ParticipantInfo - 14, // 17: livekit.JoinResponse.other_participants:type_name -> livekit.ParticipantInfo - 15, // 18: livekit.TrackPublishedResponse.track:type_name -> livekit.TrackInfo - 14, // 19: livekit.ParticipantUpdate.participants:type_name -> livekit.ParticipantInfo - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 4, // 4: livekit.SignalRequest.mute:type_name -> livekit.MuteTrackRequest + 5, // 5: livekit.SignalRequest.negotiate:type_name -> livekit.NegotiationRequest + 6, // 6: livekit.SignalResponse.join:type_name -> livekit.JoinResponse + 9, // 7: livekit.SignalResponse.answer:type_name -> livekit.SessionDescription + 9, // 8: livekit.SignalResponse.offer:type_name -> livekit.SessionDescription + 3, // 9: livekit.SignalResponse.trickle:type_name -> livekit.TrickleRequest + 10, // 10: livekit.SignalResponse.update:type_name -> livekit.ParticipantUpdate + 7, // 11: livekit.SignalResponse.track_published:type_name -> livekit.TrackPublishedResponse + 8, // 12: livekit.SignalResponse.negotiate:type_name -> livekit.NegotiationResponse + 11, // 13: livekit.AddTrackRequest.type:type_name -> livekit.TrackType + 12, // 14: livekit.JoinResponse.room:type_name -> livekit.RoomInfo + 13, // 15: livekit.JoinResponse.participant:type_name -> livekit.ParticipantInfo + 13, // 16: livekit.JoinResponse.other_participants:type_name -> livekit.ParticipantInfo + 14, // 17: livekit.TrackPublishedResponse.track:type_name -> livekit.TrackInfo + 13, // 18: livekit.ParticipantUpdate.participants:type_name -> livekit.ParticipantInfo + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name } func init() { file_rtc_proto_init() } @@ -1068,18 +999,6 @@ func file_rtc_proto_init() { } } file_rtc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveTrackRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_rtc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MuteTrackRequest); i { case 0: return &v.state @@ -1091,7 +1010,7 @@ func file_rtc_proto_init() { return nil } } - file_rtc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_rtc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NegotiationRequest); i { case 0: return &v.state @@ -1103,7 +1022,7 @@ func file_rtc_proto_init() { return nil } } - file_rtc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_rtc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*JoinResponse); i { case 0: return &v.state @@ -1115,7 +1034,7 @@ func file_rtc_proto_init() { return nil } } - file_rtc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_rtc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TrackPublishedResponse); i { case 0: return &v.state @@ -1127,7 +1046,7 @@ func file_rtc_proto_init() { return nil } } - file_rtc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_rtc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NegotiationResponse); i { case 0: return &v.state @@ -1139,7 +1058,7 @@ func file_rtc_proto_init() { return nil } } - file_rtc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_rtc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SessionDescription); i { case 0: return &v.state @@ -1151,7 +1070,7 @@ func file_rtc_proto_init() { return nil } } - file_rtc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_rtc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ParticipantUpdate); i { case 0: return &v.state @@ -1170,7 +1089,6 @@ func file_rtc_proto_init() { (*SignalRequest_Trickle)(nil), (*SignalRequest_AddTrack)(nil), (*SignalRequest_Mute)(nil), - (*SignalRequest_RemoveTrack)(nil), (*SignalRequest_Negotiate)(nil), } file_rtc_proto_msgTypes[1].OneofWrappers = []interface{}{ @@ -1188,7 +1106,7 @@ func file_rtc_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_rtc_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/rtc.proto b/proto/rtc.proto index 2f142a37f..458421def 100644 --- a/proto/rtc.proto +++ b/proto/rtc.proto @@ -14,7 +14,6 @@ message SignalRequest { TrickleRequest trickle = 3; AddTrackRequest add_track = 4; MuteTrackRequest mute = 5; - RemoveTrackRequest remove_track = 6; // when client needs to negotiate NegotiationRequest negotiate = 7; } @@ -50,10 +49,6 @@ message TrickleRequest { string candidateInit = 1; } -message RemoveTrackRequest { - string sid = 1; -} - message MuteTrackRequest { string sid = 1; bool muted = 2;