|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
var track = document.querySelector("track"),
|
|
|
|
|
track_div = document.getElementById("track");
|
|
|
|
|
track.addEventListener('cuechange', function () {
|
|
|
|
|
function player(element){
|
|
|
|
|
var track = element.querySelector("track"),
|
|
|
|
|
track_div = element.querySelector(".track_display");
|
|
|
|
|
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);
|
|
|
|
|
var d = JSON.parse(cues[0].text);
|
|
|
|
@ -13,4 +14,8 @@ track.addEventListener('cuechange', function () {
|
|
|
|
|
var playing = document.getElementById(d.title);
|
|
|
|
|
playing.classList.add("now_playing");
|
|
|
|
|
console.log("playing",playing);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
player(document.querySelector("#week_02");
|
|
|
|
|
player(document.querySelector("#week_01");
|