summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsabelle <hi@f2k1.de>2021-03-07 18:14:28 +0100
committerIsabelle <hi@f2k1.de>2021-03-07 18:14:28 +0100
commit04e1b588142f2beaa97e031625241480aab23e18 (patch)
treee57b5b10420481d70593150e4afdf0a39293c30a
parent25e8e7d23002e1c94b0d3bc8522bfea90b2d86dd (diff)
downloadwebmusic-nginx-04e1b588142f2beaa97e031625241480aab23e18.tar.gz
webmusic-nginx-04e1b588142f2beaa97e031625241480aab23e18.tar.bz2
webmusic-nginx-04e1b588142f2beaa97e031625241480aab23e18.zip
webmusic.js: add progress in %
-rw-r--r--webmusic.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/webmusic.js b/webmusic.js
index ab1cce6..3e15933 100644
--- 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 += ']';