1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-07-05 04:34:02 +02:00

Use config file for OME broadcasting

This commit is contained in:
Yohann D'ANELLO
2020-11-09 17:18:37 +01:00
parent cfcde6f530
commit 3d8ba0623d
10 changed files with 55 additions and 11 deletions

View File

@ -2,6 +2,7 @@
package web
import (
"gitlab.crans.org/nounous/ghostream/stream/ovenmediaengine"
"html/template"
"io/ioutil"
"log"
@ -32,6 +33,8 @@ type Options struct {
var (
cfg *Options
omeCfg *ovenmediaengine.Options
// Preload templates
templates *template.Template
@ -70,9 +73,10 @@ func loadTemplates() error {
}
// Serve HTTP server
func Serve(s *messaging.Streams, c *Options) {
func Serve(s *messaging.Streams, c *Options, ome *ovenmediaengine.Options) {
streams = s
cfg = c
omeCfg = ome
if !cfg.Enabled {
// Web server is not enabled, ignore