From cb97baf9ee5ba08adf1c50156dab362316c12489 Mon Sep 17 00:00:00 2001 From: murtaugh Date: Tue, 2 Jun 2020 12:29:01 +0200 Subject: [PATCH 1/2] Add 'player/player2.js' --- player/player2.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 player/player2.js diff --git a/player/player2.js b/player/player2.js new file mode 100644 index 0000000..540e9d8 --- /dev/null +++ b/player/player2.js @@ -0,0 +1,16 @@ +function player(element){ + var track = element.querySelector("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); + var old = element.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); + }); +} \ No newline at end of file From 55c2ac60c82b601fc7dce8b978ce791cabeaba13 Mon Sep 17 00:00:00 2001 From: murtaugh Date: Tue, 2 Jun 2020 12:34:02 +0200 Subject: [PATCH 2/2] Add 'player/player.html' --- player/player.html | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 player/player.html diff --git a/player/player.html b/player/player.html new file mode 100644 index 0000000..27bb620 --- /dev/null +++ b/player/player.html @@ -0,0 +1,35 @@ + + + + + + Title of this page + + +
+
#12.1 - 14/05
+
    +
  • Soleil No / Mika / 5'33''
  • +
  • Souvenir / Damla / 5'38''
  • +
  • Jingle
  • +
  • poetry_mini_mix / Sandra / 3'22"
  • +
  • sector D4X0 / Max & Ioana / 7'53''
  • +
  • Jingle
  • +
  • Louis XV will save us all / Clara / 1'47''
  • +
  • Protocall: Do conversations ever end? / Mark & Tisa / ~10''
  • +
  • Synchonisation Piece #1 (a person with a heartbeat of 72 bpm standing next to person with a heartbeat of 70 bpm) / Mark / 1'20''
  • +
  • Imagining, re-thinking and recording the world outside / Anna & Avital / 6'21"
  • +
  • jingle
  • +
+
+ +
+

You can check this pad for resources.

+
+ + \ No newline at end of file