From 42a34df63eca9a58432aa1ee2354255b9aa856af Mon Sep 17 00:00:00 2001 From: Ginger Wong Date: Thu, 20 Aug 2020 15:51:11 -0700 Subject: [PATCH] move consts over --- webroot/js/app2.js | 4 +++- webroot/js/player.js | 2 ++ webroot/js/utils.js | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/webroot/js/app2.js b/webroot/js/app2.js index 05d672952..894178093 100644 --- a/webroot/js/app2.js +++ b/webroot/js/app2.js @@ -175,6 +175,8 @@ export default class App extends Component { // handle UI things from stream status result updateStreamStatus(status = {}) { + const { streamOnline: curStreamOnline } = this.state; + if (!status) { return; } @@ -184,7 +186,6 @@ export default class App extends Component { overallMaxViewerCount, online, } = status; - const { streamOnline: curStreamOnline } = this.state; this.lastDisconnectTime = status.lastDisconnectTime; @@ -304,6 +305,7 @@ export default class App extends Component { streamStatusMessage, chatEnabled, } = state; + const { version: appVersion, logo = {}, diff --git a/webroot/js/player.js b/webroot/js/player.js index 6e88d875e..7a933ad4e 100644 --- a/webroot/js/player.js +++ b/webroot/js/player.js @@ -25,6 +25,8 @@ const VIDEO_OPTIONS = { sources: [VIDEO_SRC], }; +export const POSTER_DEFAULT = `/img/logo.png`; +export const POSTER_THUMB = `/thumbnail.jpg`; class OwncastPlayer { constructor() { diff --git a/webroot/js/utils.js b/webroot/js/utils.js index bd9f12d08..7beda7a1e 100644 --- a/webroot/js/utils.js +++ b/webroot/js/utils.js @@ -15,8 +15,7 @@ export const TEMP_IMAGE = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAE export const MESSAGE_OFFLINE = 'Stream is offline.'; export const MESSAGE_ONLINE = 'Stream is online'; -export const POSTER_DEFAULT = `/img/logo.png`; -export const POSTER_THUMB = `/thumbnail.jpg`; + export const URL_OWNCAST = 'https://github.com/gabek/owncast'; // used in footer