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

Method Publish

plugin.go:204–215  ·  view source on GitHub ↗
(streamPath string, pub IPublisher)

Source from the content-addressed store, hash-verified

202}
203
204func (opt *Plugin) Publish(streamPath string, pub IPublisher) error {
205 puber := pub.GetPublisher()
206 if puber == nil {
207 if EngineConfig.LogLang == "zh" {
208 return errors.New("不是发布者")
209 } else {
210 return errors.New("not publisher")
211 }
212 }
213 opt.AssignPubConfig(puber)
214 return pub.Publish(streamPath, pub)
215}
216
217var ErrStreamNotExist = errors.New("stream not exist")
218

Callers

nothing calls this directly

Calls 4

AssignPubConfigMethod · 0.95
NewMethod · 0.80
GetPublisherMethod · 0.65
PublishMethod · 0.65

Tested by

no test coverage detected