Files
plugin-rtmp/main.go
2020-04-12 11:16:34 +08:00

27 lines
444 B
Go

package rtmp
import (
"log"
. "github.com/Monibuca/engine"
. "github.com/logrusorgru/aurora"
)
var config = new(struct {
ListenAddr string
FirstScreen bool
})
func init() {
InstallPlugin(&PluginConfig{
Name: "RTMP",
Type: PLUGIN_SUBSCRIBER | PLUGIN_PUBLISHER,
Config: config,
Run: run,
})
}
func run() {
Print(Green("server rtmp start at"), BrightBlue(config.ListenAddr))
log.Fatal(ListenRtmp(config.ListenAddr))
}