|
|
@ -1,4 +1,4 @@
|
|
|
|
function player(element){
|
|
|
|
function player(element,iframe){
|
|
|
|
var track = element.querySelector("track");
|
|
|
|
var track = element.querySelector("track");
|
|
|
|
track.addEventListener('cuechange', function () {
|
|
|
|
track.addEventListener('cuechange', function () {
|
|
|
|
let cues = track.track.activeCues; // array of current cues
|
|
|
|
let cues = track.track.activeCues; // array of current cues
|
|
|
@ -12,6 +12,11 @@ function player(element){
|
|
|
|
var playing = document.getElementById(d.title);
|
|
|
|
var playing = document.getElementById(d.title);
|
|
|
|
playing.classList.add("now_playing");
|
|
|
|
playing.classList.add("now_playing");
|
|
|
|
console.log("playing",playing);
|
|
|
|
console.log("playing",playing);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (iframe&&d.artist) {
|
|
|
|
|
|
|
|
iframe.src = d.artist;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|