testing player js
parent
3cc3455ec2
commit
bf57c60d0e
Binary file not shown.
@ -0,0 +1,37 @@
|
||||
WEBVTT
|
||||
Kind: captions
|
||||
Language: en
|
||||
|
||||
00:00.000 --> 05:33.747
|
||||
{"title": "track_1", "ENCODER": "Liquidsoap/1.3.3 (Unix; OCaml 4.05.0)"}
|
||||
|
||||
05:33.747 --> 11:12.594
|
||||
{"title": "track_2", "artist": "Damlanur Bilgin", "date": "2020", "album": "Damlanur Bilgin's Album", "ENCODER": "Liquidsoap/1.3.3 (Unix; OCaml 4.05.0)"}
|
||||
|
||||
11:12.594 --> 11:19.634
|
||||
{"title": "track_3", "ENCODER": "Liquidsoap/1.3.3 (Unix; OCaml 4.05.0)"}
|
||||
|
||||
11:19.634 --> 14:41.795
|
||||
{"title": "track_4", "ENCODER": "Liquidsoap/1.3.3 (Unix; OCaml 4.05.0)"}
|
||||
|
||||
14:41.795 --> 22:34.710
|
||||
{"title": "track_5", "ENCODER": "Liquidsoap/1.3.3 (Unix; OCaml 4.05.0)"}
|
||||
|
||||
22:34.710 --> 22:36.564
|
||||
{"title": "track_6", "ENCODER": "Liquidsoap/1.3.3 (Unix; OCaml 4.05.0)"}
|
||||
|
||||
22:36.564 --> 24:23.750
|
||||
{"title": "track_7", "ENCODER": "Liquidsoap/1.3.3 (Unix; OCaml 4.05.0)"}
|
||||
|
||||
24:23.750 --> 35:28.017
|
||||
{"title": "track_8", "ENCODER": "Liquidsoap/1.3.3 (Unix; OCaml 4.05.0)"}
|
||||
|
||||
35:28.017 --> 37:09.058
|
||||
{"title": "track_9", "ENCODER": "Liquidsoap/1.3.3 (Unix; OCaml 4.05.0)"}
|
||||
|
||||
37:09.058 --> 43:21.851
|
||||
{"title": "track_10", "ENCODER": "Liquidsoap/1.3.3 (Unix; OCaml 4.05.0)"}
|
||||
|
||||
43:21.851 --> 43:26.851
|
||||
{"title": "track_11", "ENCODER": "Liquidsoap/1.3.3 (Unix; OCaml 4.05.0)"}
|
||||
|
@ -0,0 +1,16 @@
|
||||
var track = document.querySelector("track"),
|
||||
track_div = document.getElementById("track");
|
||||
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);
|
||||
console.log("d",d);
|
||||
track_div.innerHTML = d.title;
|
||||
var old = document.querySelector(".now_playing");
|
||||
if (old) {
|
||||
old.classList.remove("now_playing");
|
||||
}
|
||||
var playing = document.getElementById(d.title);
|
||||
playing.classList.add("now_playing");
|
||||
console.log("playing",playing);
|
||||
});
|
Loading…
Reference in New Issue