Stop progress bar when paused
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1ffc0dbdd3
commit
e03e48d08f
1 changed files with 2 additions and 0 deletions
|
@ -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>
|
Loading…
Reference in a new issue