Browse Source

Fixed reading from config

pull/152/head
Mauro 4 years ago committed by GitHub
parent
commit
c7b6336d2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      main.go

24
main.go

@ -134,13 +134,21 @@ func main() { @@ -134,13 +134,21 @@ func main() {
version: %s
`, VERSION)
stream := rtmp.NewRtmpStream()
var hlsServer *hls.Server
if configure.Config.GetBool("hls") {
hlsServer = startHls()
}
startHTTPFlv(stream)
startAPI(stream)
apps := configure.Applications{}
configure.Config.UnmarshalKey("server", &apps)
for _, app := range apps {
stream := rtmp.NewRtmpStream()
var hlsServer *hls.Server
if app.Hls {
hlsServer = startHls()
}
if app.Flv {
startHTTPFlv(stream)
}
if app.Api {
startAPI(stream)
}
startRtmp(stream, hlsServer)
startRtmp(stream, hlsServer)
}
}

Loading…
Cancel
Save