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:
@ -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
|
||||
|
Reference in New Issue
Block a user