From 279fed865c9033f0127dd4c3871f2a1315178efc Mon Sep 17 00:00:00 2001
From: kaotisk
Date: Sat, 12 Oct 2024 05:49:49 +0300
Subject: Look and feel enhance
---
client/index.html | 24 ++++++++++++++++--------
client/js/radio_emulator.js | 2 ++
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/client/index.html b/client/index.html
index 1025d69..daa861b 100644
--- a/client/index.html
+++ b/client/index.html
@@ -17,17 +17,25 @@
Sometimes, you will need to press the "Sync" button more than once. That's mostly
due to bandwidth capabilities of both the server and the client. The "tune" would
be right if you press it multiple times and land near the same timespace over and
- over. Three to four times would be enough.
+ over.
-
-
-
+
+ Ideally, if "Listening at:" and "Show playback:" have the same value then you are
+ in sync!
+
+
+
+
+
+
+
Listening at:
+
Show playback:
/
-
+
@@ -40,7 +48,7 @@
Artist
Title
-
Duration
+
Starts On
@@ -67,9 +75,9 @@
Data segments
Hash of current show
-
+
Hash of list
-
+
diff --git a/client/js/radio_emulator.js b/client/js/radio_emulator.js
index 56222c4..2df187b 100644
--- a/client/js/radio_emulator.js
+++ b/client/js/radio_emulator.js
@@ -42,6 +42,7 @@ var ProgressBar = document.querySelector('progress');
var startsOnP = document.querySelector('.starts-on');
var showDurationP = document.querySelector('.show-duration');
var relativeTime = document.querySelector('.relative-time');
+var listeningAt = document.querySelector('.listening-at');
const documentTitle = "Radio Station Emulator";
const separator = " :: ";
@@ -61,6 +62,7 @@ function increaseSeconds()
youAreHere.innerText = seconds_here;
ProgressBar.value = parseInt(currentTimeP.innerText) + seconds_here;
relativeTime.innerText = parseInt(currentTimeP.innerText) + seconds_here;
+ listeningAt.innerText = Math.floor(audioElement.currentTime);
return seconds_here;
}
function getSecondsHere()
--
cgit v1.2.3