Update '12/player.js'

master
barkaiavital 5 years ago
parent 6a03a788a3
commit ecec1a618d

@ -1,9 +1,9 @@
var track = document.querySelector("track_1"), var track = document.querySelector("track_1"),
track_1_div = document.getElementById("track_1"); track_1_div = document.getElementById("track_1");
track_1.addEventListener('cuechange', function () { track_1.addEventListener('cuechange', function () {
let cues = track_1.track_1.activeCues; // array of current cues let cues_1 = track_1.track_1.activeCues; // array of current cues
console.log("cuechange", cues, cues[0].text, cues[0].startTime, cues[0].endTime); console.log("cuechange", cues_1, cues_1[0].text, cues_1[0].startTime, cues_1[0].endTime);
var d_1 = JSON.parse(cues[0].text); var d_1 = JSON.parse(cues_1[0].text);
console.log("d_1",d_1); console.log("d_1",d_1);
track_1_div.innerHTML = d_1.title; track_1_div.innerHTML = d_1.title;
var old = document.querySelector(".now_playing"); var old = document.querySelector(".now_playing");

Loading…
Cancel
Save