diff --git a/assets/index.html b/assets/index.html index abd7d87..e4fe587 100644 --- a/assets/index.html +++ b/assets/index.html @@ -6,7 +6,7 @@
- + diff --git a/assets/index.js b/assets/index.js index 33702df..2e71d0f 100644 --- a/assets/index.js +++ b/assets/index.js @@ -20,9 +20,16 @@ function updateTimer() { .then(capturing => { console.debug('capturing', capturing) const active = capturing ? config.capturing : config.idle; + + // Update text document.getElementById('text').innerText = active.text; + + // Update colors const body = document.getElementsByTagName('body')[0]; body.style.backgroundColor = active.background; body.style.color = active.color; + + // Update logo + document.getElementById('logo').src = active.image.replace(/\s/g, ''); }) } diff --git a/assets/virtuos-logo.png b/assets/virtuos-logo.png deleted file mode 100644 index ba03b1c..0000000 Binary files a/assets/virtuos-logo.png and /dev/null differ diff --git a/main.go b/main.go index f5f1907..41bb4a3 100644 --- a/main.go +++ b/main.go @@ -43,6 +43,7 @@ type DisplayConfig struct { Text string `json:"text"` Color string `json:"color"` Background string `json:"background"` + Image string `json:"image"` } type Config struct { diff --git a/opencast-ca-display.yml b/opencast-ca-display.yml index c4e2cbc..db6ca93 100644 --- a/opencast-ca-display.yml +++ b/opencast-ca-display.yml @@ -9,16 +9,107 @@ opencast: # Capture agent to show the status for agent: test -# display configuration +# Display configuration +# Each state configuration contains four fields: +# - text: The text to display in that state +# - color: The text color +# - background: The background color +# - image: A logo to display. This can be a URL or a base64 encoded image display: capturing: text: Aufzeichnung läuft color: white background: '#ac0634' + image: > + data:image/png;base64, + iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAABKVBMVEX////b + ///3//+s//+s//OsjG2sITSsBjSsVUSsyqG8///f//+s/9SscVisLDSs//Dz + ///O///A///+//+s/+3D//+slnesCTSs5rm1//+s/87i//+s98fm//+sEDSs + WETH//+salLp///w//+sq4ms26+sPTSse1+s8MDY//+s37K5//+sXEesFzTt + //+sRzbK//+sFDSstZCv//+s0aSsX0usiWqy///R//+sk3SsvJas7bys//qs + /+msqIWsfmasMzSsZk6soX6s/9+sh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EEgoi/+av94EDPGSvJQYv2D/ihTRFZfMDsJA9S9j9kVvwg + /eD9ZZoDH4Plsvr12wkUtUvZdEocT3yHxgdxfqsWlOafqNWiz3K/5u/9C81W + FpUnumvJ6te607X1TbOU4+qvyGt5T2y8INRo07Qd7btz9nlkneSrZrR3xBok + 3mer5jkY+yB7m/dPkj7IDzse91dOO6p8MlrFP6NDmtsLtR8f5Fe8HHwsi/ry + aX9UnNMXfyfJwdifwIRMCDLpQ9J1Js+/rSn/arrF1htNMWvFH7wq9KoYH2Q5 + eN2O5jlQ18b6lTHlUidUnEoWY+ir1wP/shsfhJXkD9T8F6LhZ1F7qquOpHu5 + HrhVPXVWTkn97VSgt/62FZZY0/33iOhe/l+Lb5X8k000WMtkiZpKH0S9QSaT + OeiRdiQV+jtsszv4S0ehWoGoej5se96jOgMAAAAAAAAAAAAAAAAAAAAAuBD/ + AO9hftIMDgN8AAAAAElFTkSuQmCC + idle: text: Keine Aufzeichnung color: black background: white + image: > + data:image/png;base64, + iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAC2VBMVEWsBjS5 + LVOxFUDLY4DgobLv0Nn57/L////+/Pz04OXpvsrZjqPCSWq4KlHQc4zjrLvy + 2N/47PDfobOyGELVgpncl6q9OV7BRGevEDz57PDgo7TARGasBzWtCzjObYju + zdb//f389vjmtsPEUHDjrr23KVDlsb+uDTq2JU2sCDbblan79PbMaIT89/j0 + 3+W/P2Ly2uHdnK7Xip+1IUrx2N/HV3bCSmyzHkfKYX7sx9Houcb35+z35+uv + Ej3w1d3blKjls8G6MVfYjKHETm/QcoznuMXMZoK9Ol66L1bDTG3UgJf03uT7 + 8vW0H0n25Onbk6fXh52zGkW+PGD78/XMZ4PrxM/clandmay0IUrksb/GVnXp + vMnz3ePXiZ7w0dr68vSuDjv89vf9+frZj6TReJHObIfHWXfFUnK8OFyyGUPZ + j6PSepPWh539+/uxGEK+PmLNa4buztfZkKTqws3ltMLjq7uzHEbNaoXenbDh + pLW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88oK7dti/ul3z266pm60yaf9sZes/rfda70pFqPTsNaV/XElL7e5Q2/FSa + f4+spFz+r0VResjN9mzc3jXalThjwh+ybVHjPl+Xy+X60+fO9CjG+Gv5fn9N + bdf+Ja02rbN0Tm63v7bb1/63qhYAAAAAAAAAAAAAAAAAAAAAAAAAAIDY8w9T + Gxe/25sMhQAAAABJRU5ErkJggg== + # IP address and port to bind to listen: 127.0.0.1:8080