From a0e520e128d5744d57b920611015b7d35ba1de96 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sun, 11 Oct 2020 22:02:20 +0200 Subject: [PATCH] Make player poster customisable, fix #20 --- docs/ghostream.example.yml | 5 +++++ internal/config/config.go | 1 + web/template/player.html | 2 +- web/web.go | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/ghostream.example.yml b/docs/ghostream.example.yml index 7b32c82..c5c8f20 100644 --- a/docs/ghostream.example.yml +++ b/docs/ghostream.example.yml @@ -102,6 +102,11 @@ web: # #oneStreamPerDomain: false + # Stream player poster + # Shown when stream is loading or inactive. + # + #playerPoster: /static/img/no_stream.svg + # Refresh period for viewer stats (below the player) # #viewersCounterRefreshPeriod: 20000 diff --git a/internal/config/config.go b/internal/config/config.go index f1b46c0..96e8606 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -63,6 +63,7 @@ func New() *Config { ListenAddress: ":8080", Name: "Ghostream", OneStreamPerDomain: false, + PlayerPoster: "/static/img/no_stream.svg", ViewersCounterRefreshPeriod: 20000, }, WebRTC: webrtc.Options{ diff --git a/web/template/player.html b/web/template/player.html index b3df8c3..ae7d284 100644 --- a/web/template/player.html +++ b/web/template/player.html @@ -3,7 +3,7 @@
- +
diff --git a/web/web.go b/web/web.go index 0f3f47c..ef25844 100644 --- a/web/web.go +++ b/web/web.go @@ -23,6 +23,7 @@ type Options struct { ListenAddress string Name string OneStreamPerDomain bool + PlayerPoster string SRTServerPort string STUNServers []string ViewersCounterRefreshPeriod int