CC-3406: Live Stream: Switch off live sources on disconnection

- done
This commit is contained in:
James 2012-03-09 12:27:04 -05:00
parent f193047a1c
commit efee025691
3 changed files with 19 additions and 10 deletions

View file

@ -237,10 +237,16 @@ function parseSourceStatus(obj){
}
}
function parseSwitchStatus(obj){
$("#live_dj.source-switch-button").find("span").html(obj.live_dj_source)
$("#master_dj.source-switch-button").find("span").html(obj.master_dj_source)
}
function getScheduleFromServer(){
$.ajax({ url: "/Schedule/get-current-playlist/format/json", dataType:"json", success:function(data){
parseItems(data.entries);
parseSourceStatus(data.source_status);
parseSwitchStatus(data.switch_status);
}, error:function(jqXHR, textStatus, errorThrown){}});
setTimeout(getScheduleFromServer, serverUpdateInterval);
}