Take control over your live stream video by running it yourself. Streaming + chat out of the box.
HTML activitypubbroadcastingchatdecentralizedfederationfediversegolanghacktoberfesthlslivelivestreamowncastrtmpself-hostedstreaming-videovideo
Make setting the web server port optional
Gabe Kangasaee3c26e3772
diff --git a/config-example.yaml b/config-example.yamlindex a01af771a2..b7c4508a9e 100644--- a/config-example.yaml+++ b/config-example.yaml@@ -1,5 +1,3 @@-webServerPort: 8080-instanceDetails:name: Owncasttitle: Owncast Demo Serverdiff --git a/config/config.go b/config/config.goindex 6658020524..56b23e972e 100644--- a/config/config.go+++ b/config/config.go@@ -180,6 +180,15 @@ func (c *config) GetPrivateHLSSavePath() string {return "hls"}+func (c *config) GetPublicWebServerPort() int {+ if c.WebServerPort != 0 {+ return c.WebServerPort+ }++ // Default web server port+ return 8080+}+//Load tries to load the configuration filefunc Load(filePath string, versionInfo string) error {Config = new(config)diff --git a/router/router.go b/router/router.goindex b310bf19cb..9cdc6f4e28 100644--- a/router/router.go+++ b/router/router.go@@ -34,7 +34,7 @@ func Start() error {http.HandleFunc("/config", controllers.GetWebConfig)}- port := config.Config.WebServerPort+ port := config.Config.GetPublicWebServerPort()log.Infof("Web server running on port: %d", port)