1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-07-06 02:23:51 +02:00

Web handler adapts its configuration wherever OME support is enabled or not

This commit is contained in:
Yohann D'ANELLO
2020-11-09 17:31:58 +01:00
parent a20c6202fd
commit 6ca354f44f
2 changed files with 18 additions and 9 deletions

View File

@ -13,6 +13,7 @@ import (
"github.com/markbates/pkger"
"gitlab.crans.org/nounous/ghostream/internal/monitoring"
"gitlab.crans.org/nounous/ghostream/stream/ovenmediaengine"
"gitlab.crans.org/nounous/ghostream/stream/webrtc"
)
@ -61,8 +62,8 @@ func viewerHandler(w http.ResponseWriter, r *http.Request) {
Cfg *Options
Path string
WidgetURL string
OMEApp string
}{Path: path, Cfg: cfg, WidgetURL: "", OMEApp: omeCfg.App}
OMECfg *ovenmediaengine.Options
}{Path: path, Cfg: cfg, WidgetURL: "", OMECfg: omeCfg}
// Load widget is user does not disable it with ?nowidget
if _, ok := r.URL.Query()["nowidget"]; !ok {