From defc83342c3ce49540a3812ee98c59f36e1986e7 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 21 Mar 2015 11:04:44 -0400 Subject: [PATCH] 2015: live: Show when a stream is not broadcasting. --- 2015/assets/js/stream.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/2015/assets/js/stream.js b/2015/assets/js/stream.js index a910e28e..a0c11602 100644 --- a/2015/assets/js/stream.js +++ b/2015/assets/js/stream.js @@ -246,11 +246,19 @@ app.view = function(ctrl) { } function renderStats() { - var info = app.validStreamInfo(stats) ? [ - m("strong", stats.server_name), - " — ", - m("i", stats.server_description) - ] : null; + var info; + + if(stats === app.nullStats) { + info = m("i", "not broadcasting"); + } else if(app.validStreamInfo(stats)) { + info = [ + m("strong", stats.server_name), + " — ", + m("i", stats.server_description) + ]; + } else { + info = null; + } return m(".row", [ m(".col-sm-8", info), -- 2.25.1