CC-3737: ON AIR turns to grey from time to time, while the stream keeps playing

-fixed
This commit is contained in:
denise 2012-05-16 12:54:02 -04:00
parent fd70768910
commit 1629f41a8d
2 changed files with 4 additions and 2 deletions

View file

@ -78,16 +78,18 @@ function updateProgressBarValue(){
$('#progress-show').attr("style", "width:"+showPercentDone+"%");
var songPercentDone = 0;
var songElapsedTime = 0;
var scheduled_play_div = $("#scheduled_play_div");
var scheduled_play_line_to_switch = scheduled_play_div.parent().find(".line-to-switch");
if (currentSong !== null){
songPercentDone = (estimatedSchedulePosixTime - currentSong.songStartPosixTime)/currentSong.songLengthMs*100;
songElapsedTime = estimatedSchedulePosixTime - currentSong.songStartPosixTime;
if (songPercentDone < 0 || songPercentDone > 100){
songPercentDone = 0;
currentSong = null;
} else {
if (currentSong.media_item_played == true && currentShow.length > 0){
if ( (currentSong.media_item_played == true && currentShow.length > 0) || songElapsedTime < 5000 ){
scheduled_play_line_to_switch.attr("class", "line-to-switch on");
scheduled_play_div.addClass("ready");
scheduled_play_source = true;