ctucx.git: webmusic-nginx

nginx xslt-based index files optimized for music, inspired by https://git.ztn.sh/zotan/webmusic

commit 04e1b588142f2beaa97e031625241480aab23e18
parent 25e8e7d23002e1c94b0d3bc8522bfea90b2d86dd
Author: Isabelle <hi@f2k1.de>
Date: Sun, 7 Mar 2021 18:14:28 +0100

webmusic.js: add progress in %
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/webmusic.js b/webmusic.js
@@ -140,7 +140,7 @@ const updatePlayerState = () => {
 	let statestr = '[' + playerState;
 
 	if (!audioPlayer.paused) {
-		statestr += ' ' + formatTime(audioPlayer.currentTime) + '/' + formatTime(audioPlayer.duration);
+		statestr += ' ' + formatTime(audioPlayer.currentTime) + '/' + formatTime(audioPlayer.duration) + '  ' + Math.round(audioPlayer.currentTime / audioPlayer.duration * 100) + '%';
 	}
 
 	statestr += ']';