1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-22 20:52:20 +00:00

Make player poster customisable, fix #20

This commit is contained in:
Alexandre Iooss 2020-10-11 22:02:20 +02:00
parent 1cab361815
commit a0e520e128
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
4 changed files with 8 additions and 1 deletions

View File

@ -102,6 +102,11 @@ web:
# #
#oneStreamPerDomain: false #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) # Refresh period for viewer stats (below the player)
# #
#viewersCounterRefreshPeriod: 20000 #viewersCounterRefreshPeriod: 20000

View File

@ -63,6 +63,7 @@ func New() *Config {
ListenAddress: ":8080", ListenAddress: ":8080",
Name: "Ghostream", Name: "Ghostream",
OneStreamPerDomain: false, OneStreamPerDomain: false,
PlayerPoster: "/static/img/no_stream.svg",
ViewersCounterRefreshPeriod: 20000, ViewersCounterRefreshPeriod: 20000,
}, },
WebRTC: webrtc.Options{ WebRTC: webrtc.Options{

View File

@ -3,7 +3,7 @@
<div class="col-video"> <div class="col-video">
<!-- Video --> <!-- Video -->
<div class="video-responsive"> <div class="video-responsive">
<video id="viewer" poster="/static/img/no_stream.svg" muted controls autoplay></video> <video id="viewer" poster="{{.Cfg.PlayerPoster}}" muted controls autoplay></video>
</div> </div>
<!-- Links and settings under video --> <!-- Links and settings under video -->

View File

@ -23,6 +23,7 @@ type Options struct {
ListenAddress string ListenAddress string
Name string Name string
OneStreamPerDomain bool OneStreamPerDomain bool
PlayerPoster string
SRTServerPort string SRTServerPort string
STUNServers []string STUNServers []string
ViewersCounterRefreshPeriod int ViewersCounterRefreshPeriod int