Update '12/player.js'

master
barkaiavital 5 years ago
parent 893b0cbc5a
commit 6a03a788a3

@ -3,14 +3,14 @@ var track = document.querySelector("track_1"),
track_1.addEventListener('cuechange', function () {
let cues = track_1.track_1.activeCues; // array of current cues
console.log("cuechange", cues, cues[0].text, cues[0].startTime, cues[0].endTime);
var d = JSON.parse(cues[0].text);
console.log("d",d);
track_1_div.innerHTML = d.title;
var d_1 = JSON.parse(cues[0].text);
console.log("d_1",d_1);
track_1_div.innerHTML = d_1.title;
var old = document.querySelector(".now_playing");
if (old) {
old.classList.remove("now_playing");
}
var playing = document.getElementById(d.title);
var playing = document.getElementById(d_1.title);
playing.classList.add("now_playing");
console.log("playing",playing);
});

Loading…
Cancel
Save