Skip to content

Commit

Permalink
Fixed reading from config
Browse files Browse the repository at this point in the history
  • Loading branch information
EssGeeEich authored Jan 14, 2021
1 parent 68f9542 commit c7b6336
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit c7b6336

Please sign in to comment.