@@ -161,18 +161,17 @@ func GetDisconnectionReason(reason livekit.DisconnectReason) DisconnectionReason
161161}
162162
163163type RoomCallback struct {
164- OnDisconnected func ()
165- OnDisconnectedWithReason func (reason DisconnectionReason )
166- OnParticipantConnected func (* RemoteParticipant )
167- OnParticipantDisconnected func (* RemoteParticipant )
168- OnParticipantDisconnectedWithReason func (* RemoteParticipant , livekit.DisconnectReason )
169- OnActiveSpeakersChanged func ([]Participant )
170- OnRoomMetadataChanged func (metadata string )
171- OnRecordingStatusChanged func (isRecording bool )
172- OnRoomMoved func (roomName string , token string )
173- OnReconnecting func ()
174- OnReconnected func ()
175- OnLocalTrackSubscribed func (publication * LocalTrackPublication , lp * LocalParticipant )
164+ OnDisconnected func ()
165+ OnDisconnectedWithReason func (reason DisconnectionReason )
166+ OnParticipantConnected func (* RemoteParticipant )
167+ OnParticipantDisconnected func (* RemoteParticipant )
168+ OnActiveSpeakersChanged func ([]Participant )
169+ OnRoomMetadataChanged func (metadata string )
170+ OnRecordingStatusChanged func (isRecording bool )
171+ OnRoomMoved func (roomName string , token string )
172+ OnReconnecting func ()
173+ OnReconnected func ()
174+ OnLocalTrackSubscribed func (publication * LocalTrackPublication , lp * LocalParticipant )
176175
177176 // participant events are sent to the room as well
178177 ParticipantCallback
@@ -184,18 +183,17 @@ func NewRoomCallback() *RoomCallback {
184183 return & RoomCallback {
185184 ParticipantCallback : * pc ,
186185
187- OnDisconnected : func () {},
188- OnDisconnectedWithReason : func (reason DisconnectionReason ) {},
189- OnParticipantConnected : func (participant * RemoteParticipant ) {},
190- OnParticipantDisconnected : func (participant * RemoteParticipant ) {},
191- OnParticipantDisconnectedWithReason : func (participant * RemoteParticipant , reason livekit.DisconnectReason ) {},
192- OnActiveSpeakersChanged : func (participants []Participant ) {},
193- OnRoomMetadataChanged : func (metadata string ) {},
194- OnRecordingStatusChanged : func (isRecording bool ) {},
195- OnRoomMoved : func (roomName string , token string ) {},
196- OnReconnecting : func () {},
197- OnReconnected : func () {},
198- OnLocalTrackSubscribed : func (publication * LocalTrackPublication , lp * LocalParticipant ) {},
186+ OnDisconnected : func () {},
187+ OnDisconnectedWithReason : func (reason DisconnectionReason ) {},
188+ OnParticipantConnected : func (participant * RemoteParticipant ) {},
189+ OnParticipantDisconnected : func (participant * RemoteParticipant ) {},
190+ OnActiveSpeakersChanged : func (participants []Participant ) {},
191+ OnRoomMetadataChanged : func (metadata string ) {},
192+ OnRecordingStatusChanged : func (isRecording bool ) {},
193+ OnRoomMoved : func (roomName string , token string ) {},
194+ OnReconnecting : func () {},
195+ OnReconnected : func () {},
196+ OnLocalTrackSubscribed : func (publication * LocalTrackPublication , lp * LocalParticipant ) {},
199197 }
200198}
201199
@@ -217,9 +215,6 @@ func (cb *RoomCallback) Merge(other *RoomCallback) {
217215 if other .OnParticipantDisconnected != nil {
218216 cb .OnParticipantDisconnected = other .OnParticipantDisconnected
219217 }
220- if other .OnParticipantDisconnectedWithReason != nil {
221- cb .OnParticipantDisconnectedWithReason = other .OnParticipantDisconnectedWithReason
222- }
223218 if other .OnActiveSpeakersChanged != nil {
224219 cb .OnActiveSpeakersChanged = other .OnActiveSpeakersChanged
225220 }
0 commit comments