mirror of
https://github.com/Monibuca/plugin-rtmp.git
synced 2025-10-05 23:47:04 +08:00
24 lines
394 B
Go
24 lines
394 B
Go
package rtmpplugin
|
|
|
|
import (
|
|
"log"
|
|
|
|
. "github.com/Monibuca/engine"
|
|
)
|
|
|
|
var config = new(ListenerConfig)
|
|
|
|
func init() {
|
|
InstallPlugin(&PluginConfig{
|
|
Name: "RTMP",
|
|
Type: PLUGIN_SUBSCRIBER | PLUGIN_PUBLISHER,
|
|
Config: config,
|
|
Version: "1.0.0",
|
|
Run: run,
|
|
})
|
|
}
|
|
func run() {
|
|
log.Printf("server rtmp start at %s", config.ListenAddr)
|
|
log.Fatal(ListenRtmp(config.ListenAddr))
|
|
}
|