Update '12/liveplayer.js'

master
barkaiavital 5 years ago
parent a0a6322a1c
commit 2d506579eb

@ -18,12 +18,18 @@ function liveplayer (elt) {
old_nowplaying.classList.remove("now_playing"); old_nowplaying.classList.remove("now_playing");
} }
var nowplaying = elt.querySelector("#"+d.title); var nowplaying = elt.querySelector("#"+d.title);
var iframe = elt.querySelector("iframe");
if (nowplaying) { if (nowplaying) {
console.log("liveplayer: nowplaying", nowplaying); console.log("liveplayer: nowplaying", nowplaying);
nowplaying.classList.add("now_playing"); nowplaying.classList.add("now_playing");
} else { } else {
console.log("liveplayer: warning no div matching title " + d.title); console.log("liveplayer: warning no div matching title " + d.title);
} }
if (iframe&&d.artist){
iframe.src = d.artist;
}
}, DELAY_TIME_SECS*1000); }, DELAY_TIME_SECS*1000);
} }
window.setTimeout(poll, 10000); window.setTimeout(poll, 10000);

Loading…
Cancel
Save