mirror of
https://github.com/Monibuca/plugin-rtmp.git
synced 2025-09-27 12:02:50 +08:00
feat: add push regexp config
This commit is contained in:
6
main.go
6
main.go
@@ -41,9 +41,9 @@ func (c *RTMPConfig) OnEvent(event any) {
|
|||||||
go c.ListenTCP(RTMPPlugin, c)
|
go c.ListenTCP(RTMPPlugin, c)
|
||||||
}
|
}
|
||||||
case SEpublish:
|
case SEpublish:
|
||||||
if url, ok := c.PushList[v.Target.Path]; ok {
|
if remoteURL := conf.CheckPush(v.Target.Path); remoteURL != "" {
|
||||||
if err := RTMPPlugin.Push(v.Target.Path, url, new(RTMPPusher), false); err != nil {
|
if err := RTMPPlugin.Push(v.Target.Path, remoteURL, new(RTMPPusher), false); err != nil {
|
||||||
RTMPPlugin.Error("push", zap.String("streamPath", v.Target.Path), zap.String("url", url), zap.Error(err))
|
RTMPPlugin.Error("push", zap.String("streamPath", v.Target.Path), zap.String("url", remoteURL), zap.Error(err))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case InvitePublish: //按需拉流
|
case InvitePublish: //按需拉流
|
||||||
|
Reference in New Issue
Block a user