Include packetsMissing field in string representation (#1659)

* Include packetsMissing field in string representation

* do not set stub directly
This commit is contained in:
Raja Subramanian
2023-04-27 14:39:05 +05:30
committed by GitHub
parent f9f89cd7cf
commit c1c4e8aea0
4 changed files with 18 additions and 17 deletions
+6 -6
View File
@@ -31,7 +31,7 @@ func newMockParticipant(identity livekit.ParticipantIdentity, protocol types.Pro
IsPublisher: publisher,
})
p.SetMetadataStub = func(m string) {
p.SetMetadataCalls(func(m string) {
var f func(participant types.LocalParticipant)
if p.OnParticipantUpdateCallCount() > 0 {
f = p.OnParticipantUpdateArgsForCall(p.OnParticipantUpdateCallCount() - 1)
@@ -39,7 +39,7 @@ func newMockParticipant(identity livekit.ParticipantIdentity, protocol types.Pro
if f != nil {
f(p)
}
}
})
updateTrack := func() {
var f func(participant types.LocalParticipant, track types.MediaTrack)
if p.OnTrackUpdatedCallCount() > 0 {
@@ -50,12 +50,12 @@ func newMockParticipant(identity livekit.ParticipantIdentity, protocol types.Pro
}
}
p.SetTrackMutedStub = func(sid livekit.TrackID, muted bool, fromServer bool) {
p.SetTrackMutedCalls(func(sid livekit.TrackID, muted bool, fromServer bool) {
updateTrack()
}
p.AddTrackStub = func(req *livekit.AddTrackRequest) {
})
p.AddTrackCalls(func(req *livekit.AddTrackRequest) {
updateTrack()
}
})
return p
}