MCPcopy Create free account
hub / github.com/Monibuca/engine / OnEvent

Method OnEvent

subscriber.go:152–159  ·  view source on GitHub ↗
(event any)

Source from the content-addressed store, hash-verified

150 }
151}
152func (s *Subscriber) OnEvent(event any) {
153 switch v := event.(type) {
154 case Track: //默认接受所有track
155 s.AddTrack(v)
156 default:
157 s.IO.OnEvent(event)
158 }
159}
160
161func (s *Subscriber) CreateTrackReader(t *track.Media) (result *track.AVRingReader) {
162 result = track.NewAVRingReader(t)

Callers

nothing calls this directly

Calls 2

AddTrackMethod · 0.95
OnEventMethod · 0.65

Tested by

no test coverage detected