switch participant callbacks to room to listener interface (#4136)
* switch participant callbacks to room to listener interface * mage generate * clean up * clear listener * clean up * use interface in up data track manager * tweaks * Paul feedback - should reduce the diff as this keeps the room handlers as is except making methods for a couple of anonymous handlers * clean up
This commit is contained in:
@@ -84,10 +84,10 @@ func TestTrackPublishing(t *testing.T) {
|
||||
track.IDReturns("id")
|
||||
published := false
|
||||
updated := false
|
||||
p.OnTrackUpdated(func(p types.Participant, track types.MediaTrack) {
|
||||
p.listener().(*typesfakes.FakeLocalParticipantListener).OnTrackUpdatedCalls(func(p types.Participant, track types.MediaTrack) {
|
||||
updated = true
|
||||
})
|
||||
p.OnTrackPublished(func(p types.Participant, track types.MediaTrack) {
|
||||
p.listener().(*typesfakes.FakeLocalParticipantListener).OnTrackPublishedCalls(func(p types.Participant, track types.MediaTrack) {
|
||||
published = true
|
||||
})
|
||||
p.UpTrackManager.AddPublishedTrack(track)
|
||||
@@ -814,6 +814,7 @@ func newParticipantForTestWithOpts(identity livekit.ParticipantIdentity, opts *p
|
||||
Reporter: roomobs.NewNoopParticipantSessionReporter(),
|
||||
Telemetry: &telemetryfakes.FakeTelemetryService{},
|
||||
VersionGenerator: utils.NewDefaultTimedVersionGenerator(),
|
||||
ParticipantListener: &typesfakes.FakeLocalParticipantListener{},
|
||||
ParticipantHelper: &typesfakes.FakeLocalParticipantHelper{},
|
||||
})
|
||||
p.isPublisher.Store(opts.publisher)
|
||||
|
||||
Reference in New Issue
Block a user