|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
var track_1 = document.querySelector("track_1"),
|
|
|
|
|
track_div_1 = document.getElementById("track_1");
|
|
|
|
|
track.addEventListener('cuechange', function () {
|
|
|
|
|
let cues = track.track.activeCues; // array of current cues
|
|
|
|
|
console.log("cuechange", cues, cues[0].text, cues[0].startTime, cues[0].endTime);
|
|
|
|
|
let cues1 = track.track.activeCues; // array of current cues
|
|
|
|
|
console.log("cuechange", cues1, cues1[0].text, cues1[0].startTime, cues1[0].endTime);
|
|
|
|
|
var d1 = JSON.parse(cues[0].text);
|
|
|
|
|
console.log("d1",d1);
|
|
|
|
|
track_div_1.innerHTML = d1.title;
|
|
|
|
@ -10,7 +10,7 @@ track.addEventListener('cuechange', function () {
|
|
|
|
|
if (old) {
|
|
|
|
|
old.classList.remove("now_playing");
|
|
|
|
|
}
|
|
|
|
|
var playing = document.getElementById(d.title);
|
|
|
|
|
playing.classList.add("now_playing");
|
|
|
|
|
console.log("playing",playing);
|
|
|
|
|
var playing1 = document.getElementById(d.title);
|
|
|
|
|
playing1.classList.add("now_playing");
|
|
|
|
|
console.log("playing1",playing1);
|
|
|
|
|
});
|