From: Emilie Date: Wed, 15 Mar 2017 11:32:47 +0000 (+0100) Subject: [Vertigo M&C] : streaming begin + end for one event X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=123f1449fc1c9625084deda897f72582fc0c8107;p=mezzo.git [Vertigo M&C] : streaming begin + end for one event --- diff --git a/app/themes/base/static/src/js/modules/live-streaming-counter.js b/app/themes/base/static/src/js/modules/live-streaming-counter.js index c1bcfaf9..ff84cd36 100644 --- a/app/themes/base/static/src/js/modules/live-streaming-counter.js +++ b/app/themes/base/static/src/js/modules/live-streaming-counter.js @@ -48,14 +48,16 @@ function CountDownTimer(dt_begin, dt_end, id, video_id/*, video_url*/) function showRemaining() { var now = new Date(); var distance_out = begin - now; + console.log("distance_out", distance_out) if (distance_out < 0) { - clearInterval(timer); + //clearInterval(timer); // $('#countdown-title').html('

'); // $('#'+id).html('
'); // $('#live').html('- Live !'); //switchVideo(video_id, video_url); $('.countdown-overlay').hide() + distance_in = 1; nextEvent() return; } @@ -77,6 +79,7 @@ function CountDownTimer(dt_begin, dt_end, id, video_id/*, video_url*/) function nextEvent() { var now = new Date(); var distance_in = end - now; + console.log("distance_in", distance_in) if (distance_in < 0) { $('.countdown-overlay').show() @@ -90,6 +93,8 @@ function CountDownTimer(dt_begin, dt_end, id, video_id/*, video_url*/) if (distance_out > 0) { timer = setInterval(showRemaining, 1000); } + + console.log("distance_in", distance_in) if (distance_in > 0) { timer = setInterval(nextEvent, 1000); }