1
0
mirror of https://github.com/danbee/mpd-client synced 2025-03-04 08:39:09 +00:00
mpd-client/public/views/transport.ejs
2013-12-10 17:59:47 +00:00

25 lines
978 B
Plaintext

<div class="scrubber">
<% if (status.attr('state') == 'play' || status.attr('state') == 'pause') { %>
<div class="time elapsed"><%= formatLength(status.attr('time')[0]) %></div>
<div class="time total">-<%= formatLength(status.attr('time')[1] - status.attr('time')[0]) %></div>
<% } else { %>
<div class="time elapsed">--:--</div>
<div class="time total">--:--</div>
<% } %>
<div class="track">
<% if (status.attr('state') == 'play' || status.attr('state') == 'pause') { %>
<div class="marker" style="left: <%= (status.attr('time')[0] / status.attr('time')[1]) * 100 %>%"></div>
<% } %>
</div>
</div>
<nav class="controls">
<button data-command="previous">previous</button>
<% if (status.attr('state') == 'play') { %>
<button data-command="pause">pause</button>
<% } else { %>
<button data-command="play">play</button>
<% } %>
<button data-command="stop">stop</button>
<button data-command="next">next</button>
</nav>