mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-12-24 13:48:04 +08:00
22 lines
374 B
Go
22 lines
374 B
Go
package rtmp
|
|
|
|
import (
|
|
. "github.com/langhuihui/monibuca/monica"
|
|
"log"
|
|
)
|
|
|
|
var config = new(ListenerConfig)
|
|
|
|
func init() {
|
|
InstallPlugin(&PluginConfig{
|
|
Name: "RTMP",
|
|
Type: PLUGIN_SUBSCRIBER | PLUGIN_PUBLISHER,
|
|
Config: config,
|
|
Run: run,
|
|
})
|
|
}
|
|
func run() {
|
|
log.Printf("server rtmp start at %s", config.ListenAddr)
|
|
log.Fatal(ListenRtmp(config.ListenAddr))
|
|
}
|