fix:Avoid progress slider from becoming 'stuck' because the timer died unexpectedly.

Also see https://github.com/adamcik/media-progress-timer/issues/3
This commit is contained in:
jcass 2016-02-22 22:05:15 +02:00
parent 49b15f8894
commit 0965f0083e
3 changed files with 6 additions and 3 deletions

View File

@ -16,7 +16,6 @@ function resetSong() {
data.track.artists = '';
data.track.length = 0;
data.track.uri = ' ';
setSongInfo(data);
}
function resizeMb() {

View File

@ -1,6 +1,6 @@
CACHE MANIFEST
# 2016-02-18:v2
# 2016-02-22:v1
NETWORK:
*

View File

@ -111,7 +111,11 @@ ProgressTimer.prototype._update = function(timestamp) {
}
this._scheduleUpdate(timestamp);
} else {
this._running = false;
// Workaround for https://github.com/adamcik/media-progress-timer/issues/3
// This causes the timer to die unexpectedly if the position goes
// over the duration slightly.
// this._running = false;
this._callback(duration, duration, this._running);
}
};