MCPcopy Index your code
hub / github.com/Monibuca/engine / OnTrack

Method OnTrack

subscribers.go:67–77  ·  view source on GitHub ↗
(track common.Track)

Source from the content-addressed store, hash-verified

65}
66
67func (s *Subscribers) OnTrack(track common.Track) {
68 s.rangeAll(func(sub ISubscriber, wait *waitTracks) {
69 if _, ok := s.waits[wait]; ok {
70 if wait.Accept(track) {
71 delete(s.waits, wait)
72 }
73 } else {
74 sub.OnEvent(track)
75 }
76 })
77}
78
79func (s *Subscribers) OnPublisherLost(event StateEvent) {
80 s.rangeAll(func(sub ISubscriber, wait *waitTracks) {

Callers 1

runMethod · 0.80

Calls 3

rangeAllMethod · 0.95
OnEventMethod · 0.65
AcceptMethod · 0.45

Tested by

no test coverage detected