forked from platypush/platypush
Clear track elapsed time display on stop event
This commit is contained in:
parent
a287a10bcc
commit
4503eb31ed
1 changed files with 8 additions and 0 deletions
|
@ -90,6 +90,11 @@ $(document).ready(function() {
|
|||
refreshElapsedInterval = undefined;
|
||||
}
|
||||
|
||||
if (time === undefined) {
|
||||
$timeElapsedElement.text('-:--');
|
||||
return;
|
||||
}
|
||||
|
||||
timeElapsed = parseInt(time);
|
||||
$timeElapsedElement.text(secondsToTimeString(timeElapsed));
|
||||
|
||||
|
@ -111,6 +116,9 @@ $(document).ready(function() {
|
|||
|
||||
if ('state' in status) {
|
||||
setState(state=status.state);
|
||||
if (status.state === 'stop') {
|
||||
setTrackElapsed();
|
||||
}
|
||||
}
|
||||
|
||||
if ('elapsed' in status) {
|
||||
|
|
Loading…
Reference in a new issue