added hls via https support
@ -45,7 +45,8 @@ Run `docker run -p 1935:1935 -p 7001:7001 -p 7002:7002 -p 8090:8090 -d gwuhaolin
- `RTMP`:`rtmp://localhost:1935/{appname}/movie`
- `FLV`:`http://127.0.0.1:7001/{appname}/movie.flv`
- `HLS`:`http://127.0.0.1:7002/{appname}/movie.m3u8`
5. Use hls via https: generate ssl certificate(server.key, server.crt files), place them in directory with executable file, change "use_hls_https" option in livego.yaml to true (false by default)
all options:
```bash
./livego -h
@ -14,6 +14,7 @@
# # HLS Options
# hls_addr: ":7002"
#use_hls_https: true
# # API Options
# api_addr: ":8090"
@ -53,7 +53,13 @@ func (server *Server) Serve(listener net.Listener) error {
server.handle(w, r)
})
server.listener = listener
http.Serve(listener, mux)
if configure.Config.GetBool("use_hls_https") {
http.ServeTLS(listener, mux, "server.crt", "server.key")
} else {
}
return nil