Stop progress bar when paused
All checks were successful
continuous-integration/drone/push Build is passing

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

View file

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