Stop progress bar when paused
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Sijmen 2023-05-02 01:56:48 +02:00
parent 1ffc0dbdd3
commit e03e48d08f
Signed by: vijfhoek
GPG Key ID: DAF7821E067D9C48
1 changed files with 2 additions and 0 deletions

View File

@ -64,6 +64,7 @@
document.title = "Empede";
{% endif %}
{% if state == mpdrs::State::Play %}
progressBar = document.querySelector(".nowplaying .progress");
elapsed = {{ elapsed }};
duration = {{ duration }};
@ -77,4 +78,5 @@
let progress = elapsed / duration;
progressBar.style.width = `${progress * 100}%`;
}, 1000);
{% endif %}
</script>