From: David Thompson Date: Sat, 21 Mar 2015 15:04:44 +0000 (-0400) Subject: 2015: live: Show when a stream is not broadcasting. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=defc83342c3ce49540a3812ee98c59f36e1986e7;p=libreplanet-static.git 2015: live: Show when a stream is not broadcasting. --- 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),