CC-3737: ON AIR turns to grey from time to time, while the stream keeps playing
-fixed
This commit is contained in:
parent
fd70768910
commit
1629f41a8d
|
@ -78,16 +78,18 @@ function updateProgressBarValue(){
|
||||||
$('#progress-show').attr("style", "width:"+showPercentDone+"%");
|
$('#progress-show').attr("style", "width:"+showPercentDone+"%");
|
||||||
|
|
||||||
var songPercentDone = 0;
|
var songPercentDone = 0;
|
||||||
|
var songElapsedTime = 0;
|
||||||
var scheduled_play_div = $("#scheduled_play_div");
|
var scheduled_play_div = $("#scheduled_play_div");
|
||||||
var scheduled_play_line_to_switch = scheduled_play_div.parent().find(".line-to-switch");
|
var scheduled_play_line_to_switch = scheduled_play_div.parent().find(".line-to-switch");
|
||||||
|
|
||||||
if (currentSong !== null){
|
if (currentSong !== null){
|
||||||
songPercentDone = (estimatedSchedulePosixTime - currentSong.songStartPosixTime)/currentSong.songLengthMs*100;
|
songPercentDone = (estimatedSchedulePosixTime - currentSong.songStartPosixTime)/currentSong.songLengthMs*100;
|
||||||
|
songElapsedTime = estimatedSchedulePosixTime - currentSong.songStartPosixTime;
|
||||||
if (songPercentDone < 0 || songPercentDone > 100){
|
if (songPercentDone < 0 || songPercentDone > 100){
|
||||||
songPercentDone = 0;
|
songPercentDone = 0;
|
||||||
currentSong = null;
|
currentSong = null;
|
||||||
} else {
|
} 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_line_to_switch.attr("class", "line-to-switch on");
|
||||||
scheduled_play_div.addClass("ready");
|
scheduled_play_div.addClass("ready");
|
||||||
scheduled_play_source = true;
|
scheduled_play_source = true;
|
||||||
|
|
|
@ -202,7 +202,7 @@ class PypoPush(Thread):
|
||||||
for queue_item in liquidsoap_queue_approx:
|
for queue_item in liquidsoap_queue_approx:
|
||||||
if queue_item['start'] in media_schedule.keys():
|
if queue_item['start'] in media_schedule.keys():
|
||||||
media_item = media_schedule[queue_item['start']]
|
media_item = media_schedule[queue_item['start']]
|
||||||
if queue_item['id'] == media_item['id']:
|
if queue_item['row_id'] == media_item['row_id']:
|
||||||
if queue_item['end'] == media_item['end']:
|
if queue_item['end'] == media_item['end']:
|
||||||
#Everything OK for this iteration.
|
#Everything OK for this iteration.
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue