CC-3737: ON AIR turns to grey from time to time, while the stream keeps playing
- fixed - added a 'type' key to distinguish between tracks and shows
This commit is contained in:
parent
791d1dae1b
commit
9967f5451c
3 changed files with 25 additions and 11 deletions
|
@ -47,8 +47,10 @@ function secondsTimer(){
|
|||
|
||||
function newSongStart(){
|
||||
nextSongPrepare = true;
|
||||
currentSong = nextSong;
|
||||
nextSong = null;
|
||||
if (nextSong.type == 'track') {
|
||||
currentSong = nextSong;
|
||||
nextSong = null;
|
||||
}
|
||||
}
|
||||
|
||||
function nextShowStart(){
|
||||
|
@ -74,12 +76,14 @@ function updateProgressBarValue(){
|
|||
var scheduled_play_line_to_switch = scheduled_play_div.parent().find(".line-to-switch");
|
||||
|
||||
if (currentSong !== null){
|
||||
var songElpasedTime = 0;
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue